fix(project): 주간 회의록 1주차 = 그 달 첫 월요일이 있는 주(월간 목표·누적은 1일~말일)
- store.month_weeks: 주는 월요일이 속한 달의 것 — 예) 2026년 10월 = 10/5·12·19·26, 9/28~10/4 는 9월 마지막 주 - 다른 달의 주(?week=)를 열면 그 달 회의록으로 303 - 작은 달력은 그 달 날짜가 든 주 전부(store.calendar_weeks) — 앞 달 주는 흐리게, 누르면 그 달 회의록 - 월 누적·주당 필요 매출은 그대로 1일~말일 기준(1주차면 첫 월요일 전날까지 누적), 캐시 버전 20261001r, 문서 갱신 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -2965,10 +2965,15 @@ def goal_meeting_page(request: Request, year: int, month: int, week: str | None
|
||||
sel = store.validate_week_start(week)
|
||||
except ValueError:
|
||||
sel = None
|
||||
if sel is not None and (sel.year, sel.month) != (year, month):
|
||||
# 다른 달의 주(주는 월요일이 속한 달의 것) — 그 달 회의록 주소로
|
||||
return RedirectResponse(url=f"/project/goals/{sel.year}/meetings/{sel.month}?week={sel.isoformat()}",
|
||||
status_code=303)
|
||||
if sel is None or sel not in [w for w, _ in weeks]:
|
||||
sel = next((w for w, e in weeks if w <= today <= e), weeks[0][0])
|
||||
enabled = st.meetings_enabled()
|
||||
existing = set(st.meeting_weeks(start=weeks[0][0], end=weeks[-1][0])) if enabled else set()
|
||||
cal = store.calendar_weeks(year, month)
|
||||
existing = set(st.meeting_weeks(start=cal[0][0], end=cal[-1][0])) if enabled else set()
|
||||
view = _meeting_view(request, st, year=year, month=month, week=sel) if enabled else {}
|
||||
admin = is_admin(user)
|
||||
return render_template(
|
||||
@@ -2999,6 +3004,19 @@ def goal_meeting_page(request: Request, year: int, month: int, week: str | None
|
||||
"wd": k, "hol": store.KR_HOLIDAYS.get((w + timedelta(days=k)).isoformat(), "")}
|
||||
for k in range(7)]}
|
||||
for i, (w, e) in enumerate(weeks)],
|
||||
# 작은 달력 — 그 달 날짜가 든 주 전부(앞뒤 달에 속한 주는 흐리게, 누르면 그 달 회의록)
|
||||
"cal_weeks": [{"start": w.isoformat(), "own": (w.year, w.month) == (year, month),
|
||||
"href": (f"?week={w.isoformat()}" if (w.year, w.month) == (year, month)
|
||||
else f"/project/goals/{w.year}/meetings/{w.month}?week={w.isoformat()}"),
|
||||
"title": (f"{next(i + 1 for i, (x, _) in enumerate(weeks) if x == w)}주차"
|
||||
if (w.year, w.month) == (year, month) else f"{w.month}월 주")
|
||||
+ f" ({w.month}/{w.day}~{e.month}/{e.day})",
|
||||
"has": w.isoformat() in existing,
|
||||
"days": [{"d": (w + timedelta(days=k)).day, "in": (w + timedelta(days=k)).month == month,
|
||||
"today": w + timedelta(days=k) == today, "wd": k,
|
||||
"hol": store.KR_HOLIDAYS.get((w + timedelta(days=k)).isoformat(), "")}
|
||||
for k in range(7)]}
|
||||
for w, e in store.calendar_weeks(year, month)],
|
||||
"week": sel.isoformat(),
|
||||
"week_n": next(i + 1 for i, (w, _) in enumerate(weeks) if w == sel),
|
||||
"week_end": (sel + timedelta(days=6)).isoformat(),
|
||||
|
||||
@@ -545,10 +545,26 @@ def week_monday(d: date) -> date:
|
||||
return d - timedelta(days=d.weekday())
|
||||
|
||||
|
||||
def month_last_day(year: int, month: int) -> date:
|
||||
return date(year + (month == 12), month % 12 + 1, 1) - timedelta(days=1)
|
||||
|
||||
|
||||
def month_weeks(year: int, month: int) -> list[tuple[date, date]]:
|
||||
"""그 달과 겹치는 주(월요일~일요일) 목록 — 1주차 = 1일이 들어 있는 주."""
|
||||
"""그 달의 주(월요일~일요일) 목록 — **1주차 = 그 달 첫 월요일이 있는 주**, 주는 월요일이 속한 달의 것
|
||||
(2026-10-01 사용자 기준). 예: 2026년 10월 = 10/5·12·19·26 주, 9/28~10/4 주는 9월 마지막 주.
|
||||
월간 목표·누적은 이와 따로 늘 1일~말일."""
|
||||
first = date(year, month, 1)
|
||||
last = (date(year + (month == 12), month % 12 + 1, 1) - timedelta(days=1))
|
||||
last = month_last_day(year, month)
|
||||
out, mon = [], first + timedelta(days=(7 - first.weekday()) % 7)
|
||||
while mon <= last:
|
||||
out.append((mon, mon + timedelta(days=6)))
|
||||
mon += timedelta(days=7)
|
||||
return out
|
||||
|
||||
|
||||
def calendar_weeks(year: int, month: int) -> list[tuple[date, date]]:
|
||||
"""작은 달력용 — 그 달 날짜가 하나라도 든 주(월요일 시작) 전부(1일이 든 주부터 말일이 든 주까지)."""
|
||||
first, last = date(year, month, 1), month_last_day(year, month)
|
||||
out, mon = [], week_monday(first)
|
||||
while mon <= last:
|
||||
out.append((mon, mon + timedelta(days=6)))
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{% extends "erp_base.html" %}
|
||||
|
||||
{% block head_extra %}
|
||||
<link rel="stylesheet" href="/static/project.css?v=20261001q" />
|
||||
<link rel="stylesheet" href="/static/project.css?v=20261001r" />
|
||||
<link rel="stylesheet" href="/static/vendor/material-symbols/material-symbols.css" />
|
||||
{% endblock %}
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
</span>
|
||||
{% endif %}
|
||||
</div>
|
||||
{# 주차 탭 — 주 = 월요일~일요일, 1주차 = 1일이 들어 있는 주. 점 = 회의록 있음 #}
|
||||
{# 주차 탭 — 주 = 월요일~일요일, 1주차 = 그 달 첫 월요일이 있는 주(주는 월요일이 속한 달). 점 = 회의록 있음 #}
|
||||
<nav class="pj-meet-weeks" aria-label="주차">
|
||||
{% for w in weeks %}
|
||||
<a class="pj-meet-week{% if w.start == week %} is-on{% endif %}{% if w.now %} is-now{% endif %}"
|
||||
@@ -51,13 +51,14 @@
|
||||
{% endfor %}
|
||||
</nav>
|
||||
</div>
|
||||
{# 작은 달력 — 월요일 시작(주 = 월~일), 보고 있는 주는 영역 표시, 줄을 누르면 그 주 회의록. 점 = 회의록 있음 #}
|
||||
{# 작은 달력 — 월요일 시작(주 = 월~일), 보고 있는 주는 영역 표시, 줄을 누르면 그 주 회의록. 점 = 회의록 있음.
|
||||
1주차 = 그 달 첫 월요일이 있는 주 — 1일 앞쪽 날짜가 든 주는 앞 달 주(흐리게, 누르면 앞 달 회의록). #}
|
||||
<div class="pj-meet-cal" aria-label="{{ goal_month }}월 달력">
|
||||
<div class="pj-meet-cal-head">{{ goal_year }}년 {{ goal_month }}월</div>
|
||||
<div class="pj-meet-cal-wd"><span>월</span><span>화</span><span>수</span><span>목</span><span>금</span><span class="is-sat">토</span><span class="is-sun">일</span></div>
|
||||
{% for w in weeks %}
|
||||
<a class="pj-meet-cal-row{% if w.start == week %} is-on{% endif %}{% if w.now %} is-now{% endif %}" href="?week={{ w.start }}"
|
||||
title="{{ w.n }}주차 ({{ w.label }}){% if w.has %} · 회의록 있음{% endif %}">
|
||||
{% for w in cal_weeks %}
|
||||
<a class="pj-meet-cal-row{% if w.start == week %} is-on{% endif %}{% if not w.own %} is-other{% endif %}" href="{{ w.href }}"
|
||||
title="{{ w.title }}{% if w.has %} · 회의록 있음{% endif %}{% if not w.own %} — 이 주는 {{ w.title.split('월')[0] }}월 회의록{% endif %}">
|
||||
{% for d in w.days %}<span class="pj-meet-cal-d{% if not d.in %} is-out{% endif %}{% if d.today %} is-today{% endif %}{% if d.wd == 5 %} is-sat{% endif %}{% if d.wd == 6 or d.hol %} is-sun{% endif %}"{% if d.hol %} title="{{ d.hol }}"{% endif %}>{{ d.d }}</span>{% endfor %}
|
||||
{% if w.has %}<i class="pj-meet-cal-dot"></i>{% endif %}
|
||||
</a>
|
||||
@@ -246,5 +247,5 @@
|
||||
{% include "project/_side_modals.html" %}
|
||||
{% include "project/_member_tasks_modal.html" %}
|
||||
|
||||
<script src="/static/project.js?v=20261001q" defer></script>
|
||||
<script src="/static/project.js?v=20261001r" defer></script>
|
||||
{% endblock %}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{% extends "erp_base.html" %}
|
||||
|
||||
{% block head_extra %}
|
||||
<link rel="stylesheet" href="/static/project.css?v=20261001q" />
|
||||
<link rel="stylesheet" href="/static/project.css?v=20261001r" />
|
||||
<link rel="stylesheet" href="/static/vendor/material-symbols/material-symbols.css" />
|
||||
{% endblock %}
|
||||
|
||||
@@ -189,5 +189,5 @@
|
||||
{% include "project/_side_modals.html" %}
|
||||
{% include "project/_member_tasks_modal.html" %}
|
||||
|
||||
<script src="/static/project.js?v=20261001q" defer></script>
|
||||
<script src="/static/project.js?v=20261001r" defer></script>
|
||||
{% endblock %}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{% extends "erp_base.html" %}
|
||||
|
||||
{% block head_extra %}
|
||||
<link rel="stylesheet" href="/static/project.css?v=20261001q" />
|
||||
<link rel="stylesheet" href="/static/project.css?v=20261001r" />
|
||||
<link rel="stylesheet" href="/static/project-help.css?v=20260926v" />
|
||||
<link rel="stylesheet" href="/static/vendor/material-symbols/material-symbols.css" />
|
||||
{% endblock %}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{% extends "erp_base.html" %}
|
||||
|
||||
{% block head_extra %}
|
||||
<link rel="stylesheet" href="/static/project.css?v=20261001q" />
|
||||
<link rel="stylesheet" href="/static/project.css?v=20261001r" />
|
||||
<link rel="stylesheet" href="/static/vendor/material-symbols/material-symbols.css" />
|
||||
{% endblock %}
|
||||
|
||||
@@ -104,5 +104,5 @@
|
||||
{% include "project/_side_modals.html" %}
|
||||
{% include "project/_member_tasks_modal.html" %}
|
||||
|
||||
<script src="/static/project.js?v=20261001q" defer></script>
|
||||
<script src="/static/project.js?v=20261001r" defer></script>
|
||||
{% endblock %}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{% extends "erp_base.html" %}
|
||||
|
||||
{% block head_extra %}
|
||||
<link rel="stylesheet" href="/static/project.css?v=20261001q" />
|
||||
<link rel="stylesheet" href="/static/project.css?v=20261001r" />
|
||||
<link rel="stylesheet" href="/static/vendor/material-symbols/material-symbols.css" />
|
||||
{% endblock %}
|
||||
|
||||
@@ -100,5 +100,5 @@
|
||||
"today": {{ today | tojson }}
|
||||
}
|
||||
</script>
|
||||
<script src="/static/project.js?v=20261001q" defer></script>
|
||||
<script src="/static/project.js?v=20261001r" defer></script>
|
||||
{% endblock %}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{% extends "erp_base.html" %}
|
||||
|
||||
{% block head_extra %}
|
||||
<link rel="stylesheet" href="/static/project.css?v=20261001q" />
|
||||
<link rel="stylesheet" href="/static/project.css?v=20261001r" />
|
||||
<!-- 구글 머티리얼 심볼(담당자 아이콘 등) — self-host -->
|
||||
<link rel="stylesheet" href="/static/vendor/material-symbols/material-symbols.css" />
|
||||
<!-- 타임라인 vis-timeline — self-host -->
|
||||
@@ -496,5 +496,5 @@
|
||||
</script>
|
||||
|
||||
<script src="/static/vendor/vis-timeline/vis-timeline-graph2d.min.js"></script>
|
||||
<script src="/static/project.js?v=20261001q" defer></script>
|
||||
<script src="/static/project.js?v=20261001r" defer></script>
|
||||
{% endblock %}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{% extends "erp_base.html" %}
|
||||
|
||||
{% block head_extra %}
|
||||
<link rel="stylesheet" href="/static/project.css?v=20261001q" />
|
||||
<link rel="stylesheet" href="/static/project.css?v=20261001r" />
|
||||
<link rel="stylesheet" href="/static/vendor/material-symbols/material-symbols.css" />
|
||||
{% endblock %}
|
||||
|
||||
@@ -70,5 +70,5 @@
|
||||
{% include "project/_side_modals.html" %}
|
||||
{% include "project/_member_tasks_modal.html" %}
|
||||
|
||||
<script src="/static/project.js?v=20261001q" defer></script>
|
||||
<script src="/static/project.js?v=20261001r" defer></script>
|
||||
{% endblock %}
|
||||
|
||||
@@ -2203,6 +2203,9 @@ html.pj-goal-selecting, html.pj-goal-selecting * { user-select: none !important;
|
||||
.pj-meet-cal-row:hover { background: #f3f4f6; }
|
||||
/* 보고 있는 주 = 영역 표시 */
|
||||
.pj-meet-cal-row.is-on { background: var(--pj-accent-tint); box-shadow: inset 0 0 0 1.5px var(--pj-accent); }
|
||||
/* 앞뒤 달에 속한 주(월요일이 다른 달) — 흐리게, 누르면 그 달 회의록 */
|
||||
.pj-meet-cal-row.is-other { opacity: .55; }
|
||||
.pj-meet-cal-row.is-other:hover { opacity: 1; }
|
||||
.pj-meet-cal-d { height: 22px; line-height: 22px; text-align: center; font-size: 11px; font-variant-numeric: tabular-nums; }
|
||||
.pj-meet-cal-d.is-sat { color: #2563eb; }
|
||||
.pj-meet-cal-d.is-sun { color: #dc2626; }
|
||||
|
||||
@@ -600,10 +600,15 @@ description 을 항상 HTML로 취급하기 때문). 두 번 실행하면 이중
|
||||
항목을 다음 회의로 이어받아 나란히 리뷰), **OKR 체크인 평가**(완료/일부/미달).
|
||||
|
||||
- 화면 `/project/goals/{연도}/meetings/{월}?week={월요일}`(`goal_meeting.html`, `initGoalMeeting`) — 목표 표 월 머리를 누르면 열린다.
|
||||
- **주차 탭**: 그 달과 겹치는 주(월~일, `store.month_weeks`, 1주차 = 1일이 든 주 — 앞뒤 달과 겹치는 주는 양쪽 달에 같은 회의록).
|
||||
점 = 회의록 있음, "이번 주" 꼬리표. 기본 선택 = 이번 주(그 달이면) 아니면 1주차. ‹ 이전 달 · 다음 달 › 링크, ← 목표 표.
|
||||
- **주차 탭**: 그 달의 주(월~일, `store.month_weeks`) — **1주차 = 그 달 첫 월요일이 있는 주**, 주는 월요일이 속한 달의 것
|
||||
(2026-10-01 사용자 기준. 예: 2026년 10월 = 10/5·12·19·26 주, 9/28~10/4 는 9월 마지막 주). 다른 달의 주를 `?week=` 로 열면
|
||||
그 달 회의록 주소로 303. 점 = 회의록 있음, "이번 주" 꼬리표. 기본 선택 = 이번 주(그 달 주면) 아니면 1주차.
|
||||
‹ 이전 달 · 다음 달 › 링크, ← 목표 표.
|
||||
- **월간 목표·누적은 늘 1일~말일**(주차와 따로): 월 누적 실적 = 1일 ~ 이 주 앞(지난주 일요일, 1주차면 첫 월요일 전날)까지,
|
||||
주당 필요 매출 = (월 목표 − 누적) ÷ 그 달 남은 주 수(이 주 포함).
|
||||
- 머리 배치: 왼쪽 = 제목·‹이전 달·다음 달›·인쇄·회의록 삭제(제목 줄) + 주차 탭, **오른쪽 위 = 작은 달력**(90% 크기, 212px).
|
||||
- **작은 달력**(`.pj-meet-cal`): 그 달 월요일 시작 달력, 줄 = 주(월~일) — 보고 있는 주는 영역 표시(테두리·배경),
|
||||
- **작은 달력**(`.pj-meet-cal`, `store.calendar_weeks`): 그 달 날짜가 든 주 전부(월요일 시작) — 앞 달에 속한 주(1일 앞쪽,
|
||||
예: 10월 달력의 9/28 주)는 흐리게, 누르면 그 달(9월) 회의록. 줄 = 주(월~일) — 보고 있는 주는 영역 표시(테두리·배경),
|
||||
오늘 동그라미, 토 파랑·일/공휴일(`store.KR_HOLIDAYS`) 빨강, 다른 달 날짜 흐리게, 회의록 있는 주는 왼쪽 점. 줄을 누르면 그 주 회의록
|
||||
(`?week=`). 날짜 정보는 라우터가 주마다 `days`(d·in·today·wd·hol)로 넘긴다. 인쇄에선 숨김.
|
||||
- **머리 숫자**(`router._meeting_view`): 월 목표 매출(목표 표 숫자 + 단위, 단위가 원/천/만/십만/백만/천만/억이면 원 환산 —
|
||||
|
||||
Reference in New Issue
Block a user