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(
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{% extends "project/_meeting_content_base.html" if meeting_embedded else "erp_base.html" %}
|
||||
|
||||
{% block head_extra %}
|
||||
<link rel="stylesheet" href="/static/project.css?v=20261007a" />
|
||||
<link rel="stylesheet" href="/static/project.css?v=20261007b" />
|
||||
<link rel="stylesheet" href="/static/vendor/material-symbols/material-symbols.css" />
|
||||
{% endblock %}
|
||||
|
||||
@@ -262,5 +262,5 @@
|
||||
|
||||
<script src="/static/project-goal-text.js?v=20261003d" defer></script>
|
||||
<script src="/static/project-meeting-cells.js?v=20261003b" defer></script>
|
||||
<script src="/static/project.js?v=20261007a" defer></script>
|
||||
<script src="/static/project.js?v=20261007b" defer></script>
|
||||
{% endblock %}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{% extends "erp_base.html" %}
|
||||
|
||||
{% block head_extra %}
|
||||
<link rel="stylesheet" href="/static/project.css?v=20261007a" />
|
||||
<link rel="stylesheet" href="/static/project.css?v=20261007b" />
|
||||
<link rel="stylesheet" href="/static/vendor/material-symbols/material-symbols.css" />
|
||||
{% endblock %}
|
||||
|
||||
@@ -207,5 +207,5 @@
|
||||
{% include "project/_member_tasks_modal.html" %}
|
||||
|
||||
<script src="/static/project-goal-text.js?v=20261003d" defer></script>
|
||||
<script src="/static/project.js?v=20261007a" defer></script>
|
||||
<script src="/static/project.js?v=20261007b" defer></script>
|
||||
{% endblock %}
|
||||
|
||||
@@ -104,5 +104,5 @@
|
||||
{% include "project/_side_modals.html" %}
|
||||
{% include "project/_member_tasks_modal.html" %}
|
||||
|
||||
<script src="/static/project.js?v=20261007a" defer></script>
|
||||
<script src="/static/project.js?v=20261007b" defer></script>
|
||||
{% endblock %}
|
||||
|
||||
@@ -100,5 +100,5 @@
|
||||
"today": {{ today | tojson }}
|
||||
}
|
||||
</script>
|
||||
<script src="/static/project.js?v=20261007a" defer></script>
|
||||
<script src="/static/project.js?v=20261007b" defer></script>
|
||||
{% endblock %}
|
||||
|
||||
@@ -492,5 +492,5 @@
|
||||
</script>
|
||||
|
||||
<script src="/static/vendor/vis-timeline/vis-timeline-graph2d.min.js"></script>
|
||||
<script src="/static/project.js?v=20261007a" defer></script>
|
||||
<script src="/static/project.js?v=20261007b" defer></script>
|
||||
{% endblock %}
|
||||
|
||||
@@ -70,5 +70,5 @@
|
||||
{% include "project/_side_modals.html" %}
|
||||
{% include "project/_member_tasks_modal.html" %}
|
||||
|
||||
<script src="/static/project.js?v=20261007a" defer></script>
|
||||
<script src="/static/project.js?v=20261007b" defer></script>
|
||||
{% endblock %}
|
||||
|
||||
@@ -2692,13 +2692,17 @@ input.pj-meet-amount::placeholder { color: rgba(0, 0, 0, .28); }
|
||||
.pj-goal-numtd.is-weekly .pj-goal-num { cursor: pointer; }
|
||||
.pj-goal-numtd.is-weekly input.pj-goal-num:hover { background: var(--pj-accent-tint); }
|
||||
.pj-goal-wkpop {
|
||||
position: fixed; z-index: 1000; width: 260px; padding: 10px 12px; background: #fff; border: 1px solid var(--pj-border);
|
||||
position: fixed; z-index: 1000; width: 330px; padding: 10px 12px; background: #fff; border: 1px solid var(--pj-border);
|
||||
border-radius: 10px; box-shadow: 0 8px 24px rgba(16, 24, 40, .16); font-size: 13px;
|
||||
}
|
||||
.pj-goal-wkpop-head { font-weight: 700; margin-bottom: 8px; }
|
||||
.pj-goal-wkpop-head small { font-weight: 500; color: var(--pj-ink-soft); }
|
||||
.pj-goal-wkpop-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 4px 0; }
|
||||
.pj-goal-wkpop-row em { font-style: normal; color: var(--pj-ink-soft); font-size: 12px; }
|
||||
.pj-goal-wkpop-days {
|
||||
font-style: normal; display: inline-block; margin-left: 2px; padding: 0 6px; border-radius: 999px; background: #f1f3f6;
|
||||
color: var(--pj-ink-soft); font-size: 11px; font-weight: 600; line-height: 18px;
|
||||
}
|
||||
.pj-goal-wkpop-row input {
|
||||
width: 100px; height: 26px; padding: 0 6px; border: 1px solid var(--pj-border); border-radius: 6px; font: inherit;
|
||||
text-align: right; font-variant-numeric: tabular-nums;
|
||||
|
||||
@@ -9052,7 +9052,8 @@
|
||||
weekPop.innerHTML = '<div class="pj-goal-wkpop-head">' + mo + "월 주차별 매출 목표" +
|
||||
(unit ? " <small>(" + escapeHtml(unit) + ")</small>" : "") + "</div>" +
|
||||
list.map(function (w) {
|
||||
return '<label class="pj-goal-wkpop-row"><span>' + w.n + "주차 <em>" + escapeHtml(w.label) + "</em></span>" +
|
||||
return '<label class="pj-goal-wkpop-row"><span>' + w.n + "주차 <em>" + escapeHtml(w.label) + "</em>" +
|
||||
(w.days ? ' <i class="pj-goal-wkpop-days">' + w.days + "일</i>" : "") + "</span>" +
|
||||
'<input type="text" inputmode="decimal" autocomplete="off" data-start="' + w.start + '" value="' +
|
||||
escapeHtml(w.value || "") + '"' + (edit ? "" : " readonly") + "></label>";
|
||||
}).join("") +
|
||||
|
||||
@@ -434,6 +434,7 @@ function meetServer(env, st) {
|
||||
const pop = env.d.body.querySelector(".pj-goal-wkpop");
|
||||
const ins = pop ? Array.from(pop.querySelectorAll("input")) : [];
|
||||
check("[2e] 창은 body 에, 1월 주차 수만큼 입력칸", !!pop && pop.parentElement === env.d.body && ins.length === 5, ins.length);
|
||||
check("[2e] 주차 날 수 표시(1월 1주차 1/1~1/4 = 4일)", pop.querySelector(".pj-goal-wkpop-days").textContent === "4일", pop.querySelector(".pj-goal-wkpop-days").textContent);
|
||||
check("[2e] 저장된 주차 값·합계", ins[0].value === "100" && ins[1].value === "200" && pop.querySelector(".pj-goal-wkpop-sum b").textContent === "300");
|
||||
type(env, ins[2], "300");
|
||||
check("[2e] 입력하면 합계 다시 계산", pop.querySelector(".pj-goal-wkpop-sum b").textContent === "600");
|
||||
|
||||
@@ -59,7 +59,7 @@ def week_targets() -> dict:
|
||||
"""2026년 달마다 주차(store.month_weeks) — 1월 1·2주차만 값(100·200)."""
|
||||
out = {}
|
||||
for mo in range(1, 13):
|
||||
out[mo] = [{"start": a.isoformat(), "n": i + 1, "label": f"{a.month}/{a.day}~{b.month}/{b.day}",
|
||||
out[mo] = [{"start": a.isoformat(), "n": i + 1, "days": (b - a).days + 1, "label": f"{a.month}/{a.day}~{b.month}/{b.day}",
|
||||
"value": {(1, 0): "100", (1, 1): "200"}.get((mo, i), "")}
|
||||
for i, (a, b) in enumerate(store.month_weeks(2026, mo))]
|
||||
return out
|
||||
|
||||
Reference in New Issue
Block a user