feat(project): show weekday and day count in weekly target popup
Each week reads like "11/1(일)~11/8(일) 8일". Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -2650,7 +2650,9 @@ def goals_page(request: Request, year: int) -> HTMLResponse:
|
||||
week_targets = None
|
||||
if board and st.week_targets_enabled():
|
||||
saved = st.goal_week_targets(start=date(year, 1, 1), end=date(year, 12, 31))
|
||||
week_targets = {mo: [{"start": a.isoformat(), "n": i + 1, "label": f"{a.month}/{a.day}~{b.month}/{b.day}",
|
||||
# 기간 표기 — 11/1(일)~11/8(일), days = 그 주차 날 수
|
||||
week_targets = {mo: [{"start": a.isoformat(), "n": i + 1, "days": (b - a).days + 1,
|
||||
"label": f"{a.month}/{a.day}({_WEEKDAYS_KR[a.weekday()]})~{b.month}/{b.day}({_WEEKDAYS_KR[b.weekday()]})",
|
||||
"value": _goal_label("sales", saved.get(a.isoformat()))}
|
||||
for i, (a, b) in enumerate(store.month_weeks(year, mo))] for mo in range(1, 13)}
|
||||
return render_template(
|
||||
|
||||
Reference in New Issue
Block a user