feat(project): 연간 목표 상·하반기 → 1~4분기, 주간 회의록 머리·표 다듬기
연간 목표 표 - 3·6·9·12월 오른쪽에 1~4분기 칸(글 칸 13=1분기·15=2분기·14=3분기·16=4분기 — 예전 반기 칸 번호를 이어 써서 글 옮기기 없음, 예전 상반기 글은 1분기·하반기 글은 3분기에 보임) - 분기 합계·달성률·로아스 가중 평균, 분기 접기(pj_goal_fold_q), 열 너비 키 q1~q4 - 가로 병합은 같은 분기 월 칸 안에서만(서버·화면·DB CHECK), 분기를 넘는 예전 병합은 잘라서 그림 - 마이그레이션 017: goal_cells 월 칸 0~16, 분기를 넘는 병합은 분기 끝까지로 줄임(글 유지), 회의록 줄 이름 "메타(숫자)" → "메타". 미적용이면 2·4분기 칸 읽기 전용 + 503 주간 회의록 - 달력 폭 줄이고(174px) 글자·칸 5% 키움, 주차 탭은 달력 바로 왼쪽 - 지난주 리뷰 머리에 지난주 기간, "목표 금액" → "정량 목표", "목표 표에서 보기" 삭제 - 첫 회의록 기본 줄 "메타(숫자)" → "메타" 도움말·문서·테스트 갱신, project.css/js 캐시 버전 올림 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -1841,6 +1841,15 @@ class ProjectStore:
|
||||
with self._pool.connection() as conn:
|
||||
return self._table_exists(conn, "goal_years")
|
||||
|
||||
@staticmethod
|
||||
def _goal_quarters(conn: Any) -> bool:
|
||||
"""마이그레이션 017(분기) 적용 여부 — goal_cells 월 칸 CHECK 가 16(4분기)까지 받는가."""
|
||||
row = conn.execute(
|
||||
"SELECT pg_get_constraintdef(c.oid) AS d FROM pg_constraint c "
|
||||
"WHERE c.conname = 'goal_cells_month_check' AND c.conrelid = 'goal_cells'::regclass"
|
||||
).fetchone()
|
||||
return bool(row) and "16" in str(row["d"])
|
||||
|
||||
def goals_halves_enabled(self) -> bool:
|
||||
"""상·하반기 글 칸·월 칸 병합(마이그레이션 014) 적용 여부."""
|
||||
with self._pool.connection() as conn:
|
||||
@@ -1931,7 +1940,8 @@ class ProjectStore:
|
||||
metrics = {"sales": {"target": {1: 12.0, ...}, "actual": {...}}, "roas": {...}}
|
||||
areas = [{id, name, color, rows: [{id, label, cells: {0: "연간 글", 1: "1월 글", 13: "상반기 글", ...},
|
||||
merges: {시작 칸: (가로 칸 수, 세로 줄 수)}}]}]
|
||||
halves = 마이그레이션 014 적용 여부(상·하반기 글 칸·병합)
|
||||
halves = 마이그레이션 014 적용 여부(기간 글 칸·병합 — 이름은 예전 그대로, 지금은 분기 칸)
|
||||
quarters = 마이그레이션 017 적용 여부(2·4분기 칸 15·16 저장)
|
||||
rect = 마이그레이션 015 적용 여부(세로 병합·연간/반기 칸 병합·주간 회의록)
|
||||
"""
|
||||
with self._pool.connection() as conn:
|
||||
@@ -1962,6 +1972,7 @@ class ProjectStore:
|
||||
).fetchall()
|
||||
halves = self._table_exists(conn, "goal_cell_merges")
|
||||
rect = halves and self._column_exists(conn, "goal_cell_merges", "row_span")
|
||||
quarters = halves and self._goal_quarters(conn)
|
||||
merge_rows = conn.execute(
|
||||
"SELECT m.row_id, m.start_month, m.span" + (", m.row_span" if rect else "") + " FROM goal_cell_merges m "
|
||||
"JOIN goal_rows r ON r.id = m.row_id JOIN goal_areas a ON a.id = r.area_id "
|
||||
@@ -1993,7 +2004,8 @@ class ProjectStore:
|
||||
for a in area_rows
|
||||
]
|
||||
return {"year": int(head["year"]), "sales_unit": head["sales_unit"],
|
||||
"metrics": metrics, "areas": areas, "halves": halves, "rect": rect, "groups": groups}
|
||||
"metrics": metrics, "areas": areas, "halves": halves, "rect": rect, "groups": groups,
|
||||
"quarters": quarters}
|
||||
|
||||
def set_goal_metric(
|
||||
self, *, year: int, metric: str, kind: str, month: int, value: float | None, updated_by: str = ""
|
||||
@@ -2268,6 +2280,8 @@ class ProjectStore:
|
||||
halves = self._table_exists(conn, "goal_cell_merges")
|
||||
if m > 12 and not halves:
|
||||
raise store.GoalMigration014Needed()
|
||||
if m in store.GOAL_Q_NEW and not self._goal_quarters(conn):
|
||||
raise store.GoalMigration017Needed()
|
||||
if halves:
|
||||
# 병합에 가려진 칸(글은 왼쪽 위 칸에만 둔다) — 다른 창에서 병합된 뒤의 늦은 저장
|
||||
area_id = conn.execute("SELECT area_id FROM goal_rows WHERE id = %s", (row_id,)).fetchone()["area_id"]
|
||||
@@ -2334,7 +2348,7 @@ class ProjectStore:
|
||||
) -> dict[str, int]:
|
||||
"""업무 영역 칸을 엑셀처럼 사각형으로 합친다 → {row_id(왼쪽 위 줄), start, span, row_span}.
|
||||
|
||||
줄은 같은 영역 안 연속된 줄, 칸은 화면 순서(연간·1~6월·상반기·7~12월·하반기) — 가로는 같은 반기 월 칸끼리만.
|
||||
줄은 같은 영역 안 연속된 줄, 칸은 화면 순서(연간·1~3월·1분기·…·10~12월·4분기) — 가로는 같은 분기 월 칸끼리만.
|
||||
걸친 기존 병합은 통째로 흡수(엑셀이 선택을 넓히듯). 글은 범위 안 칸들의 글을 왼쪽 위부터 줄·칸 순서대로
|
||||
줄바꿈으로 이어 왼쪽 위 칸에 두고, 나머지 칸 글은 지운다(글을 잃지 않게)."""
|
||||
who = store.norm_str(updated_by, lower=True)
|
||||
@@ -2367,8 +2381,10 @@ class ProjectStore:
|
||||
row_span = r1 - r0 + 1
|
||||
if span * row_span < 2:
|
||||
raise ValueError("두 칸 이상 골라야 병합할 수 있습니다.")
|
||||
if (row_span > 1 or start in (store.GOAL_YEAR, store.GOAL_H1, store.GOAL_H2)) and not rect:
|
||||
if (row_span > 1 or start == store.GOAL_YEAR or start in store.GOAL_COL_QUARTER) and not rect:
|
||||
raise store.GoalMigration015Needed()
|
||||
if start in store.GOAL_Q_NEW and not self._goal_quarters(conn):
|
||||
raise store.GoalMigration017Needed()
|
||||
rows_in = ids[r0:r1 + 1]
|
||||
cols_in = list(store.GOAL_COL_ORDER[c0:c1 + 1])
|
||||
bodies = {(int(c["row_id"]), int(c["month"])): str(c["body"]).strip() for c in conn.execute(
|
||||
|
||||
@@ -2514,7 +2514,8 @@ def inbox_page(request: Request) -> HTMLResponse:
|
||||
# 조회: project 권한자 전원 · 입력/구조 변경: 관리자(is_admin) 전용
|
||||
# ────────────────────────────────────────────────────────────
|
||||
_GOALS_MIGRATION_MSG = "연간 목표 기능이 아직 준비되지 않았습니다(DB 마이그레이션 013 필요)."
|
||||
_GOALS_014_MSG = "상·하반기 칸과 칸 병합은 DB 마이그레이션 014 가 필요합니다."
|
||||
_GOALS_014_MSG = "분기 칸과 칸 병합은 DB 마이그레이션 014 가 필요합니다."
|
||||
_GOALS_017_MSG = "2·4분기 칸은 DB 마이그레이션 017 이 필요합니다."
|
||||
_GOALS_015_MSG = "세로 병합·연간/반기 칸 병합과 주간 회의록은 DB 마이그레이션 015 가 필요합니다."
|
||||
_GOALS_016_MSG = "같은 항목 칸 안에 줄 추가(3열)는 DB 마이그레이션 016 이 필요합니다."
|
||||
|
||||
@@ -2535,11 +2536,12 @@ def _goal_label(metric: str, v: float | None) -> str:
|
||||
|
||||
|
||||
def _goal_area_layout(rows: list[dict[str, Any]], this_month: int) -> None:
|
||||
"""업무 영역 줄마다 칸 배치(row["layout"]) — 연간 · 1~6월 · 상반기 · 7~12월 · 하반기 순서, 엑셀식 사각형 병합.
|
||||
"""업무 영역 줄마다 칸 배치(row["layout"]) — 연간 · 1~3월 · 1분기 · 4~6월 · 2분기 … 4분기 순서, 엑셀식 사각형 병합.
|
||||
|
||||
병합(row["merges"] = {시작 칸: (가로 칸 수, 세로 줄 수)})의 시작 칸은 {"span", "rspan"}(colspan/rowspan),
|
||||
병합에 가려진 칸은 빼고 그린다. 칸 = {"m", "kind": year|month|half, "h", "span", "rspan", "now"}.
|
||||
가로는 같은 반기 월 칸 안, 세로는 영역 끝까지로 자른다. 겹치는 병합(있을 수 없지만)은 나중 것을 무시."""
|
||||
병합에 가려진 칸은 빼고 그린다. 칸 = {"m", "kind": year|month|quarter, "h"(분기 1~4), "span", "rspan", "now"}.
|
||||
가로는 같은 분기 월 칸 안(예전 반기 병합이 분기를 넘으면 여기서 잘림), 세로는 영역 끝까지로 자른다.
|
||||
겹치는 병합(있을 수 없지만)은 나중 것을 무시."""
|
||||
order = store.GOAL_COL_ORDER
|
||||
covered: set[tuple[int, int]] = set()
|
||||
anchors: dict[tuple[int, int], tuple[int, int]] = {}
|
||||
@@ -2562,8 +2564,8 @@ def _goal_area_layout(rows: list[dict[str, Any]], this_month: int) -> None:
|
||||
if (ri, ci) in covered:
|
||||
continue
|
||||
span, rspan = anchors.get((ri, ci), (1, 1))
|
||||
kind = "year" if m == store.GOAL_YEAR else "half" if m in (store.GOAL_H1, store.GOAL_H2) else "month"
|
||||
h = 0 if kind == "year" else (1 if m == store.GOAL_H1 else 2) if kind == "half" else store.goal_half_of(m)
|
||||
kind = "year" if m == store.GOAL_YEAR else "quarter" if m in store.GOAL_COL_QUARTER else "month"
|
||||
h = 0 if kind == "year" else store.GOAL_COL_QUARTER[m] if kind == "quarter" else store.goal_quarter_of(m)
|
||||
out.append({"m": m, "kind": kind, "h": h, "span": span, "rspan": rspan,
|
||||
"now": kind == "month" and m <= this_month <= m + span - 1})
|
||||
row["layout"] = out
|
||||
@@ -2593,6 +2595,8 @@ def _goal_call(fn: Any, *args: Any, **kwargs: Any) -> Any:
|
||||
raise HTTPException(status_code=503, detail=_GOALS_015_MSG)
|
||||
except store.GoalMigration016Needed:
|
||||
raise HTTPException(status_code=503, detail=_GOALS_016_MSG)
|
||||
except store.GoalMigration017Needed:
|
||||
raise HTTPException(status_code=503, detail=_GOALS_017_MSG)
|
||||
except UndefinedTable:
|
||||
raise HTTPException(status_code=503, detail=_GOALS_MIGRATION_MSG)
|
||||
except KeyError:
|
||||
@@ -2656,8 +2660,9 @@ def goals_page(request: Request, year: int) -> HTMLResponse:
|
||||
"goal_year": year,
|
||||
"board": board,
|
||||
"months": list(range(1, 13)),
|
||||
"halves": [(1, list(range(1, 7)), store.GOAL_H1, "상반기"),
|
||||
(2, list(range(7, 13)), store.GOAL_H2, "하반기")],
|
||||
# 분기 — (분기, 그 분기 월, 분기 글 칸 번호, 이름). 분기 칸은 그 분기 월 바로 오른쪽
|
||||
"quarters": [(q, list(range(q * 3 - 2, q * 3 + 1)), store.GOAL_QUARTER_COL[q], f"{q}분기")
|
||||
for q in (1, 2, 3, 4)],
|
||||
"this_month": this_month,
|
||||
"goal_area_colors": list(store.GOAL_AREA_COLORS),
|
||||
},
|
||||
@@ -2790,7 +2795,8 @@ def api_move_goal_row(request: Request, row_id: int, payload: dict[str, Any] = B
|
||||
def api_set_goal_cell(
|
||||
request: Request, row_id: int, month: int, payload: dict[str, Any] = Body(...)
|
||||
) -> JSONResponse:
|
||||
"""업무 영역 칸 글 — month 0 = 연간, 1~12 = 월, 13 = 상반기, 14 = 하반기(014). 빈 글 = 지움."""
|
||||
"""업무 영역 칸 글 — month 0 = 연간, 1~12 = 월, 분기 칸 13 = 1분기 · 15 = 2분기 · 14 = 3분기 · 16 = 4분기
|
||||
(014, 15·16 은 017). 빈 글 = 지움."""
|
||||
user = _require_admin(request)
|
||||
st = _db_or_503(request)
|
||||
_goal_call(
|
||||
@@ -2802,8 +2808,8 @@ def api_set_goal_cell(
|
||||
|
||||
@router.post("/api/goals/areas/{area_id}/merge")
|
||||
def api_merge_goal_rect(request: Request, area_id: int, payload: dict[str, Any] = Body(...)) -> JSONResponse:
|
||||
"""엑셀식 병합 {row_from, row_to(줄 id), col_from, col_to(칸 번호 0·1~12·13·14)} — 같은 영역 안 사각형,
|
||||
가로는 같은 반기 월 칸끼리. 걸친 병합은 흡수, 글은 왼쪽 위부터 이어서 왼쪽 위 칸에."""
|
||||
"""엑셀식 병합 {row_from, row_to(줄 id), col_from, col_to(칸 번호 0·1~12·13~16)} — 같은 영역 안 사각형,
|
||||
가로는 같은 분기 월 칸끼리. 걸친 병합은 흡수, 글은 왼쪽 위부터 이어서 왼쪽 위 칸에."""
|
||||
user = _require_admin(request)
|
||||
st = _db_or_503(request)
|
||||
res = _goal_call(
|
||||
@@ -3081,6 +3087,7 @@ def goal_meeting_page(request: Request, year: int, month: int, week: str | None
|
||||
"week_n": next(i + 1 for i, (w, _) in enumerate(weeks) if w == sel),
|
||||
"week_end": (sel + timedelta(days=6)).isoformat(),
|
||||
"prev_week": (sel - timedelta(days=7)).isoformat(),
|
||||
"prev_week_end": (sel - timedelta(days=1)).isoformat(),
|
||||
# 주차를 열면 다시 받을 매출 기간(실적 모듈 매출 업데이트) — 지난주 월요일 ~ 이번 주 일요일(오늘까지)
|
||||
"sync_from": (sel - timedelta(days=7)).isoformat() if sel - timedelta(days=7) <= today else "",
|
||||
"sync_to": min(sel + timedelta(days=6), today).isoformat(),
|
||||
|
||||
@@ -388,32 +388,40 @@ def validate_goal_year(y: Any) -> int:
|
||||
|
||||
|
||||
class GoalMigration014Needed(RuntimeError):
|
||||
"""상·하반기 글 칸·월 칸 병합은 마이그레이션 014(goal_cell_merges) 뒤에만 된다."""
|
||||
"""기간(분기) 글 칸·월 칸 병합은 마이그레이션 014(goal_cell_merges) 뒤에만 된다."""
|
||||
|
||||
|
||||
class GoalMigration017Needed(RuntimeError):
|
||||
"""2·4분기 글 칸(15·16)은 마이그레이션 017(분기) 뒤에만 된다."""
|
||||
|
||||
|
||||
GOAL_YEAR = 0 # 업무 영역 글 칸 — 연간
|
||||
GOAL_H1 = 13 # 상반기(1~6월) — 마이그레이션 014
|
||||
GOAL_H2 = 14 # 하반기(7~12월)
|
||||
# 분기 글 칸(2026-10-01 상·하반기 → 1~4분기). 칸 번호는 예전 반기 칸을 그대로 이어 쓴다 — 데이터 옮기기 없이
|
||||
# 예전 상반기 글(13)은 1분기, 하반기 글(14)은 3분기에 보인다. 2분기(15)·4분기(16)는 마이그레이션 017 뒤에 저장.
|
||||
GOAL_QUARTER_COL: dict[int, int] = {1: 13, 2: 15, 3: 14, 4: 16}
|
||||
GOAL_COL_QUARTER: dict[int, int] = {c: q for q, c in GOAL_QUARTER_COL.items()}
|
||||
GOAL_Q_NEW: tuple[int, ...] = (15, 16) # 017 이 있어야 저장되는 분기 칸
|
||||
GOAL_MAX_COL = 16
|
||||
|
||||
|
||||
def goal_half_of(month: int) -> int:
|
||||
"""1~6월 → 1(상반기), 7~12월 → 2(하반기)."""
|
||||
return 1 if month <= 6 else 2
|
||||
def goal_quarter_of(month: int) -> int:
|
||||
"""1~3월 → 1분기, 4~6월 → 2분기, 7~9월 → 3분기, 10~12월 → 4분기."""
|
||||
return (int(month) - 1) // 3 + 1
|
||||
|
||||
|
||||
def validate_goal_month(m: Any, *, allow_year: bool = False) -> int:
|
||||
"""1~12월. allow_year 이면 업무 영역 글 칸 — 0(연간)·13(상반기)·14(하반기)도 허용."""
|
||||
"""1~12월. allow_year 이면 업무 영역 글 칸 — 0(연간)·13~16(분기 칸, GOAL_QUARTER_COL)도 허용."""
|
||||
try:
|
||||
v = int(m)
|
||||
except (TypeError, ValueError):
|
||||
raise ValueError("월이 올바르지 않습니다.")
|
||||
if not ((0 if allow_year else 1) <= v <= (GOAL_H2 if allow_year else 12)):
|
||||
if not ((0 if allow_year else 1) <= v <= (GOAL_MAX_COL if allow_year else 12)):
|
||||
raise ValueError("월이 올바르지 않습니다.")
|
||||
return v
|
||||
|
||||
|
||||
def validate_goal_merge(start: Any, end: Any) -> tuple[int, int]:
|
||||
"""월 칸 병합 범위(start~end 월, 2칸 이상) — 상반기·하반기를 넘지 않는다."""
|
||||
"""월 칸 병합 범위(start~end 월, 2칸 이상) — 분기를 넘지 않는다."""
|
||||
try:
|
||||
s, e = int(start), int(end)
|
||||
except (TypeError, ValueError):
|
||||
@@ -422,8 +430,8 @@ def validate_goal_merge(start: Any, end: Any) -> tuple[int, int]:
|
||||
s, e = e, s
|
||||
if not (1 <= s and e <= 12) or s == e:
|
||||
raise ValueError("병합은 1~12월 안에서 2칸 이상 골라야 합니다.")
|
||||
if goal_half_of(s) != goal_half_of(e):
|
||||
raise ValueError("상반기(1~6월)와 하반기(7~12월)를 넘어 병합할 수 없습니다.")
|
||||
if goal_quarter_of(s) != goal_quarter_of(e):
|
||||
raise ValueError("분기(1~3·4~6·7~9·10~12월)를 넘어 병합할 수 없습니다.")
|
||||
return s, e
|
||||
|
||||
|
||||
@@ -481,22 +489,22 @@ class GoalMigration016Needed(RuntimeError):
|
||||
"""항목 칸(2열) 묶음(같은 항목 칸 안에 줄 추가)은 마이그레이션 016 뒤에만 된다."""
|
||||
|
||||
|
||||
# 업무 영역 글 칸의 화면 순서 — 연간 · 1~6월 · 상반기 · 7~12월 · 하반기
|
||||
GOAL_COL_ORDER: tuple[int, ...] = (0, 1, 2, 3, 4, 5, 6, GOAL_H1, 7, 8, 9, 10, 11, 12, GOAL_H2)
|
||||
# 업무 영역 글 칸의 화면 순서 — 연간 · 1~3월 · 1분기 · 4~6월 · 2분기 · 7~9월 · 3분기 · 10~12월 · 4분기
|
||||
GOAL_COL_ORDER: tuple[int, ...] = (0, 1, 2, 3, 13, 4, 5, 6, 15, 7, 8, 9, 14, 10, 11, 12, 16)
|
||||
|
||||
|
||||
def goal_col_group(m: int) -> str:
|
||||
"""병합 가능 묶음 — 가로 병합은 같은 묶음 안에서만(연간·반기 칸은 혼자, 월은 같은 반기끼리)."""
|
||||
"""병합 가능 묶음 — 가로 병합은 같은 묶음 안에서만(연간·분기 칸은 혼자, 월은 같은 분기끼리)."""
|
||||
if m == GOAL_YEAR:
|
||||
return "year"
|
||||
if m in (GOAL_H1, GOAL_H2):
|
||||
return f"half{1 if m == GOAL_H1 else 2}"
|
||||
return f"months{goal_half_of(m)}"
|
||||
if m in GOAL_COL_QUARTER:
|
||||
return f"q{GOAL_COL_QUARTER[m]}"
|
||||
return f"months{goal_quarter_of(m)}"
|
||||
|
||||
|
||||
def validate_goal_rect_cols(col_from: Any, col_to: Any) -> tuple[int, int]:
|
||||
"""병합할 칸 범위(화면 순서의 양 끝 칸 번호) → (시작 칸 번호, 가로 칸 수).
|
||||
가로로 여러 칸이면 같은 반기의 월 칸끼리만 — 연간·상반기·하반기 칸은 세로로만 합칠 수 있다."""
|
||||
가로로 여러 칸이면 같은 분기의 월 칸끼리만 — 연간·분기 칸은 세로로만 합칠 수 있다."""
|
||||
try:
|
||||
a, b = int(col_from), int(col_to)
|
||||
except (TypeError, ValueError):
|
||||
@@ -506,7 +514,7 @@ def validate_goal_rect_cols(col_from: Any, col_to: Any) -> tuple[int, int]:
|
||||
ia, ib = sorted((GOAL_COL_ORDER.index(a), GOAL_COL_ORDER.index(b)))
|
||||
cols = GOAL_COL_ORDER[ia:ib + 1]
|
||||
if len({goal_col_group(m) for m in cols}) > 1:
|
||||
raise ValueError("연간·상반기·하반기 칸은 세로로만, 월 칸은 같은 반기 안에서만 합칠 수 있습니다.")
|
||||
raise ValueError("연간·분기 칸은 세로로만, 월 칸은 같은 분기 안에서만 합칠 수 있습니다.")
|
||||
return cols[0], len(cols)
|
||||
|
||||
|
||||
@@ -518,7 +526,7 @@ MEETING_LABEL_MAX = 50
|
||||
# 그 줄들로, 없는 구역은 빈 줄 하나. 다음 주부터는 지난주 회의록 줄을 그대로 이어받는다.
|
||||
MEETING_TEMPLATE: dict[str, tuple[str, ...]] = {
|
||||
"상품": ("상품1", "상품2", "상품3", "상품4", "상품5"),
|
||||
"마케팅": ("메타(숫자)", "구글", "네이버", "기타.신규"),
|
||||
"마케팅": ("메타", "구글", "네이버", "기타.신규"),
|
||||
"컨텐츠": ("내용1", "내용2", "내용3", "내용4", "내용5"),
|
||||
"유통": ("신규 인플루언서", "콜라보", "쿠팡", "네이버", "gs", "토스", "애터미", "해외", "오프라인", "기타"),
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{% extends "erp_base.html" %}
|
||||
|
||||
{% block head_extra %}
|
||||
<link rel="stylesheet" href="/static/project.css?v=20261001x" />
|
||||
<link rel="stylesheet" href="/static/project.css?v=20261001y" />
|
||||
<link rel="stylesheet" href="/static/vendor/material-symbols/material-symbols.css" />
|
||||
{% endblock %}
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
{% block content %}
|
||||
{# 주간 회의록 — 목표 표 월 머리를 누르면 열린다(/project/goals/{연도}/meetings/{월}?week=월요일).
|
||||
주(월~일)마다 회의록 하나: 머리(월 목표·지난주까지 누적·주당 필요 매출, 전주 목표·결과, 금주 목표·현재)
|
||||
+ 구역(목표 표 업무 영역)별 줄 — 이번주 할 일·목표 금액 | 전주 할 일·목표·결과·달성률·평가.
|
||||
+ 구역(목표 표 업무 영역)별 줄 — 이번주 할 일·정량 목표 | 전주 할 일·목표·결과·달성률·평가.
|
||||
전주 칸은 지난 회의록의 같은 줄(carry_from). 쇼핑몰 연결 줄의 결과·전주/금주 매출·누적은 실적 모듈에서 자동.
|
||||
입력은 관리자만(칸별 즉시 저장, project.js initGoalMeeting). DB: project_db 015 (goal_meetings·goal_meeting_items). #}
|
||||
<div class="pj-wrap pj-inbox-view pj-goal-view pj-meet-view">
|
||||
@@ -56,8 +56,7 @@
|
||||
{# 이 달 계획 — 연간 목표 표의 그 달 열 글(업무 영역별, router._month_plan) #}
|
||||
{% if month_plan is not none %}
|
||||
<section class="pj-meet-plan">
|
||||
<div class="pj-meet-plan-head"><span class="material-symbols-outlined">event_note</span>{{ goal_month }}월 계획
|
||||
<a href="/project/goals/{{ goal_year }}">목표 표에서 보기</a></div>
|
||||
<div class="pj-meet-plan-head"><span class="material-symbols-outlined">event_note</span>{{ goal_month }}월 계획</div>
|
||||
{% if month_plan %}
|
||||
<div class="pj-meet-plan-grid">
|
||||
{% for a in month_plan %}
|
||||
@@ -188,13 +187,13 @@
|
||||
<tr class="pj-meet-group">
|
||||
<th colspan="2"></th>
|
||||
<th colspan="2" class="is-this">이번주 ({{ week[5:] | replace('-', '/') }} ~ {{ week_end[5:] | replace('-', '/') }})</th>
|
||||
<th colspan="5" class="is-prev">지난주 리뷰</th>
|
||||
<th colspan="5" class="is-prev">지난주 리뷰 ({{ prev_week[5:] | replace('-', '/') }} ~ {{ prev_week_end[5:] | replace('-', '/') }})</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="pj-meet-c-sec">구역</th>
|
||||
<th class="pj-meet-c-label">항목</th>
|
||||
<th class="pj-meet-c-text">이번주 할 일 · 행사</th>
|
||||
<th class="pj-meet-c-amt">목표 금액</th>
|
||||
<th class="pj-meet-c-amt">정량 목표</th>
|
||||
<th class="pj-meet-c-text is-prev">지난주 할 일</th>
|
||||
<th class="pj-meet-c-amt is-prev">지난주 목표</th>
|
||||
<th class="pj-meet-c-amt is-prev">결과</th>
|
||||
@@ -278,5 +277,5 @@
|
||||
{% include "project/_side_modals.html" %}
|
||||
{% include "project/_member_tasks_modal.html" %}
|
||||
|
||||
<script src="/static/project.js?v=20261001w" defer></script>
|
||||
<script src="/static/project.js?v=20261001y" defer></script>
|
||||
{% endblock %}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{% extends "erp_base.html" %}
|
||||
|
||||
{% block head_extra %}
|
||||
<link rel="stylesheet" href="/static/project.css?v=20261001x" />
|
||||
<link rel="stylesheet" href="/static/project.css?v=20261001y" />
|
||||
<link rel="stylesheet" href="/static/vendor/material-symbols/material-symbols.css" />
|
||||
{% endblock %}
|
||||
|
||||
@@ -51,9 +51,10 @@
|
||||
{% else %}
|
||||
{% set sm = board.metrics.sales %}
|
||||
{% set rm = board.metrics.roas %}
|
||||
{# 월 칸은 pj-goal-m + data-h(1 = 상반기 1~6월, 2 = 하반기 7~12월) — 반기 접기(initGoals)가 이걸로 숨긴다 #}
|
||||
{# 월 칸은 pj-goal-m + data-h(분기 1~4) — 분기 접기(initGoals)가 이걸로 숨긴다.
|
||||
분기 칸 클래스는 예전 이름 pj-goal-half-col 그대로(연간 칸처럼 굵게·회색 합계) #}
|
||||
{% macro num_cell(metric, kind, labels, mo) -%}
|
||||
<td class="pj-goal-numtd pj-goal-m{% if mo == this_month %} is-now{% endif %}" data-h="{{ 1 if mo <= 6 else 2 }}">
|
||||
<td class="pj-goal-numtd pj-goal-m{% if mo == this_month %} is-now{% endif %}" data-h="{{ (mo - 1) // 3 + 1 }}">
|
||||
{%- if is_admin -%}
|
||||
<input type="text" class="pj-goal-num" inputmode="decimal" autocomplete="off"
|
||||
data-metric="{{ metric }}" data-kind="{{ kind }}" data-month="{{ mo }}"
|
||||
@@ -71,29 +72,29 @@
|
||||
{# 오른쪽 끝을 끌어 이름 칸 너비 조절 — 브라우저에 기억(localStorage pj_goal_col_w) #}
|
||||
<th class="pj-goal-c1"><span class="pj-goal-colresize" data-col="c1" title="끌어서 너비 조절"></span></th>
|
||||
<th class="pj-goal-c2"><span class="pj-goal-colresize" data-col="c2" title="끌어서 너비 조절"></span></th>
|
||||
{# 연간·월·반기 칸도 머리 칸 오른쪽 끝을 끌어 너비 조절(data-col: y · m1~m12 · h1 · h2) #}
|
||||
{# 연간·월·분기 칸도 머리 칸 오른쪽 끝을 끌어 너비 조절(data-col: y · m1~m12 · q1~q4) #}
|
||||
<th class="pj-goal-year-col" data-col="y">연간<span class="pj-goal-colresize" data-col="y" title="끌어서 너비 조절"></span></th>
|
||||
{% for h, hmonths, hm, hname in halves %}
|
||||
{% for h, hmonths, hm, hname in quarters %}
|
||||
{# 월 이름을 누르면 그 달 주간 회의록(/goals/{연도}/meetings/{월}) #}
|
||||
{% for mo in hmonths %}<th class="pj-goal-m{% if mo == this_month %} is-now{% endif %}" data-h="{{ h }}" data-col="m{{ mo }}"><a class="pj-goal-mlabel pj-goal-mlink" href="/project/goals/{{ goal_year }}/meetings/{{ mo }}" title="{{ mo }}월 주간 회의록">{{ mo }}월</a><span class="pj-goal-colresize" data-col="m{{ mo }}" title="끌어서 너비 조절"></span></th>{% endfor %}
|
||||
{# 반기 칸 — 버튼으로 그 반기의 월 칸을 접었다 편다(localStorage pj_goal_fold) #}
|
||||
<th class="pj-goal-half-col" data-h="{{ h }}" data-col="h{{ h }}">
|
||||
{# 분기 칸 — 버튼으로 그 분기의 월 칸을 접었다 편다(localStorage pj_goal_fold_q) #}
|
||||
<th class="pj-goal-half-col" data-h="{{ h }}" data-col="q{{ h }}">
|
||||
<button type="button" class="pj-goal-fold" data-h="{{ h }}" aria-expanded="true"
|
||||
data-label="{{ hmonths[0] }}~{{ hmonths[-1] }}월"
|
||||
title="{{ hmonths[0] }}~{{ hmonths[-1] }}월 접기"><span class="material-symbols-outlined">chevron_left</span></button>{{ hname }}
|
||||
<span class="pj-goal-colresize" data-col="h{{ h }}" title="끌어서 너비 조절"></span>
|
||||
<span class="pj-goal-colresize" data-col="q{{ h }}" title="끌어서 너비 조절"></span>
|
||||
</th>
|
||||
{% endfor %}
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
{# ── 숫자 지표 — 연간·반기 칸은 화면에서 계산(매출 합계·달성률, 로아스 매출 가중 평균), 로아스는 % 단위 ── #}
|
||||
{# ── 숫자 지표 — 연간·분기 칸은 화면에서 계산(매출 합계·달성률, 로아스 매출 가중 평균), 로아스는 % 단위 ── #}
|
||||
<tbody class="pj-goal-kpi">
|
||||
<tr>
|
||||
<th class="pj-goal-c1" rowspan="3">매출</th>
|
||||
<th class="pj-goal-c2">목표</th>
|
||||
<td class="pj-goal-sum pj-goal-year-col" data-metric="sales" data-kind="target" data-scope="0"></td>
|
||||
{% for h, hmonths, hm, hname in halves %}
|
||||
{% for h, hmonths, hm, hname in quarters %}
|
||||
{% for mo in hmonths %}{{ num_cell("sales", "target", sm.target_label, mo) }}{% endfor %}
|
||||
<td class="pj-goal-sum pj-goal-half-col" data-metric="sales" data-kind="target" data-scope="{{ hm }}"></td>
|
||||
{% endfor %}
|
||||
@@ -101,7 +102,7 @@
|
||||
<tr>
|
||||
<th class="pj-goal-c2">실적</th>
|
||||
<td class="pj-goal-sum pj-goal-year-col" data-metric="sales" data-kind="actual" data-scope="0"></td>
|
||||
{% for h, hmonths, hm, hname in halves %}
|
||||
{% for h, hmonths, hm, hname in quarters %}
|
||||
{% for mo in hmonths %}{{ num_cell("sales", "actual", sm.actual_label, mo) }}{% endfor %}
|
||||
<td class="pj-goal-sum pj-goal-half-col" data-metric="sales" data-kind="actual" data-scope="{{ hm }}"></td>
|
||||
{% endfor %}
|
||||
@@ -109,7 +110,7 @@
|
||||
<tr class="pj-goal-rate-row">
|
||||
<th class="pj-goal-c2">달성</th>
|
||||
<td class="pj-goal-rate pj-goal-year-col" data-month="0"></td>
|
||||
{% for h, hmonths, hm, hname in halves %}
|
||||
{% for h, hmonths, hm, hname in quarters %}
|
||||
{% for mo in hmonths %}<td class="pj-goal-rate pj-goal-m{% if mo == this_month %} is-now{% endif %}" data-h="{{ h }}" data-month="{{ mo }}"></td>{% endfor %}
|
||||
<td class="pj-goal-rate pj-goal-half-col" data-month="{{ hm }}"></td>
|
||||
{% endfor %}
|
||||
@@ -117,9 +118,9 @@
|
||||
<tr>
|
||||
<th class="pj-goal-c1" rowspan="2">로아스</th>
|
||||
<th class="pj-goal-c2">목표</th>
|
||||
{# 로아스 연간·반기 = 월 매출로 가중한 평균(광고비 = 매출 ÷ 로아스로 환산) — project.js recompute #}
|
||||
{# 로아스 연간·분기 = 월 매출로 가중한 평균(광고비 = 매출 ÷ 로아스로 환산) — project.js recompute #}
|
||||
<td class="pj-goal-sum pj-goal-year-col" data-metric="roas" data-kind="target" data-scope="0"></td>
|
||||
{% for h, hmonths, hm, hname in halves %}
|
||||
{% for h, hmonths, hm, hname in quarters %}
|
||||
{% for mo in hmonths %}{{ num_cell("roas", "target", rm.target_label, mo) }}{% endfor %}
|
||||
<td class="pj-goal-sum pj-goal-half-col" data-metric="roas" data-kind="target" data-scope="{{ hm }}"></td>
|
||||
{% endfor %}
|
||||
@@ -127,7 +128,7 @@
|
||||
<tr>
|
||||
<th class="pj-goal-c2">실적</th>
|
||||
<td class="pj-goal-sum pj-goal-year-col" data-metric="roas" data-kind="actual" data-scope="0"></td>
|
||||
{% for h, hmonths, hm, hname in halves %}
|
||||
{% for h, hmonths, hm, hname in quarters %}
|
||||
{% for mo in hmonths %}{{ num_cell("roas", "actual", rm.actual_label, mo) }}{% endfor %}
|
||||
<td class="pj-goal-sum pj-goal-half-col" data-metric="roas" data-kind="actual" data-scope="{{ hm }}"></td>
|
||||
{% endfor %}
|
||||
@@ -153,14 +154,14 @@
|
||||
{% endif %}
|
||||
{# 칸 배치는 router._goal_area_layout — 엑셀식 사각형 병합(colspan·rowspan), 가려진 칸은 없다 #}
|
||||
{% for c in row.layout %}
|
||||
{% set editable = is_admin and (c.kind != 'half' or board.halves) %}
|
||||
{% set editable = is_admin and (c.kind != 'quarter' or (board.halves and (c.m not in (15, 16) or board.quarters))) %}
|
||||
{% set merged = c.span > 1 or c.rspan > 1 %}
|
||||
<td class="pj-goal-texttd {{ 'pj-goal-m' if c.kind == 'month' else ('pj-goal-year-col' if c.kind == 'year' else 'pj-goal-half-col') }}{% if merged %} is-merged{% endif %}{% if c.now %} is-now{% endif %}"
|
||||
{% if c.kind == 'month' %}data-h="{{ c.h }}" {% endif %}data-month="{{ c.m }}" data-span="{{ c.span }}" data-rspan="{{ c.rspan }}"
|
||||
{%- if c.span > 1 %} colspan="{{ c.span }}" style="--span: {{ c.span }}"{% endif %}{% if c.rspan > 1 %} rowspan="{{ c.rspan }}"{% endif %}>
|
||||
{%- if editable -%}
|
||||
<textarea class="pj-goal-text" rows="1" data-row="{{ row.id }}" data-month="{{ c.m }}"
|
||||
placeholder="{{ '연간 목표' if c.m == 0 else ('상반기 목표' if c.m == 13 else ('하반기 목표' if c.m == 14 else '')) }}">{{ row.cells.get(c.m, '') }}</textarea>
|
||||
placeholder="{{ '연간 목표' if c.m == 0 else ((c.h ~ '분기 목표') if c.kind == 'quarter' else '') }}">{{ row.cells.get(c.m, '') }}</textarea>
|
||||
{%- else -%}
|
||||
<div class="pj-goal-text-ro">{{ row.cells.get(c.m, '') }}</div>
|
||||
{%- endif -%}
|
||||
@@ -189,5 +190,5 @@
|
||||
{% include "project/_side_modals.html" %}
|
||||
{% include "project/_member_tasks_modal.html" %}
|
||||
|
||||
<script src="/static/project.js?v=20261001w" defer></script>
|
||||
<script src="/static/project.js?v=20261001y" defer></script>
|
||||
{% endblock %}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{% extends "erp_base.html" %}
|
||||
|
||||
{% block head_extra %}
|
||||
<link rel="stylesheet" href="/static/project.css?v=20261001x" />
|
||||
<link rel="stylesheet" href="/static/project.css?v=20261001y" />
|
||||
<link rel="stylesheet" href="/static/project-help.css?v=20260926v" />
|
||||
<link rel="stylesheet" href="/static/vendor/material-symbols/material-symbols.css" />
|
||||
{% endblock %}
|
||||
@@ -90,14 +90,14 @@
|
||||
<li><b>휴지통</b> — 지운 작업을 3개월 보관합니다. 관리자에게만 보입니다. (<a href="#trash">19장</a>)</li>
|
||||
<li><b>목표</b> — 누르면 바로 아래에 연도가 펼쳐집니다. 연도를 누르면 오른쪽에 그해 전체 목표가 한 표로 나옵니다 —
|
||||
맨 위에 <b>매출</b>(목표·실적·달성률)과 <b>로아스</b>(목표·실적, 단위 %)를 달마다, 그 아래에 <b>업무 영역</b>(상품·마케팅·컨텐츠·유통 등)별로
|
||||
연간·반기·월별 계획을 적습니다. 6월 오른쪽에 <b>상반기</b>, 12월 오른쪽에 <b>하반기</b> 칸이 있고, 매출의 <b>연간·반기</b> 칸은 월 합계,
|
||||
<b>달성</b>은 실적÷목표(100% 이상 초록)로 저절로 계산됩니다. 반기 칸 머리의 <b>‹</b> 버튼을 누르면 그 반기의 월 칸(1~6월 또는 7~12월)이
|
||||
접히고, 다시 누르면 펼쳐집니다(접힌 상태는 내 브라우저에 기억).
|
||||
연간·분기·월별 계획을 적습니다. 3·6·9·12월 오른쪽에 <b>1~4분기</b> 칸이 있고, 매출의 <b>연간·분기</b> 칸은 월 합계,
|
||||
<b>달성</b>은 실적÷목표(100% 이상 초록)로 저절로 계산됩니다. 분기 칸 머리의 <b>‹</b> 버튼을 누르면 그 분기의 월 칸 3개가
|
||||
접히고, 다시 누르면 펼쳐집니다(접힌 상태는 내 브라우저에 기억). 월 이름을 누르면 그 달 <b>주간 회의록</b>이 열립니다.
|
||||
<b>입력은 관리자만</b> 할 수 있고(칸을 고치면 바로 저장), 다른 직원은 보기만 합니다. 관리자는 <b>+ 연도 추가</b>로 새해 목표를
|
||||
만들고(이전 연도의 업무 영역 구성을 그대로 가져옴), 영역·줄 이름은 <b>눌러서 그 자리에서 고치고</b>(Enter 저장, Esc 취소),
|
||||
이름 칸에 마우스를 올려 색·순서·줄 추가·삭제를 합니다. 업무 영역의 월 칸은 <b>병합</b>할 수 있습니다 — 한 칸을 누르고
|
||||
<b>Shift+클릭</b>으로 같은 줄의 다른 칸까지 고른 뒤 떠 있는 "병합" 버튼을 누르거나, 칸을 <b>우클릭</b>해 "오른쪽/왼쪽 칸과 병합"·"병합 해제".
|
||||
병합은 상반기·하반기 안에서만 되고, 칸들의 글은 월 순서대로 첫 칸에 모입니다.</li>
|
||||
구역·항목 칸을 <b>우클릭</b>해 색·순서·줄 추가·삭제를 합니다. 업무 영역 칸은 엑셀처럼 <b>병합</b>할 수 있습니다 — 칸을 마우스로
|
||||
끌어 여러 칸을 고른 뒤 우클릭 → "셀 병합", 병합된 칸은 우클릭 → "병합 해제"(글은 왼쪽 위 칸에 남음).
|
||||
가로 병합은 같은 분기의 월 칸끼리만(연간·분기 칸은 세로로만) 되고, 칸들의 글은 순서대로 첫 칸에 모입니다.</li>
|
||||
<li><b>프로젝트</b> — 내가 멤버인 프로젝트 목록입니다. 누르면 그 프로젝트 화면으로 갑니다. 완료한 프로젝트는 아래 <b>완료 프로젝트</b>에 흐리게 모입니다.</li>
|
||||
<li><b>전체 멤버</b> — 관리자에게만 보입니다. 사람 아이콘을 누르면 그 사람이 맡은 모든 작업을 한눈에 봅니다.</li>
|
||||
</ul>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{% extends "erp_base.html" %}
|
||||
|
||||
{% block head_extra %}
|
||||
<link rel="stylesheet" href="/static/project.css?v=20261001x" />
|
||||
<link rel="stylesheet" href="/static/project.css?v=20261001y" />
|
||||
<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=20261001w" defer></script>
|
||||
<script src="/static/project.js?v=20261001y" defer></script>
|
||||
{% endblock %}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{% extends "erp_base.html" %}
|
||||
|
||||
{% block head_extra %}
|
||||
<link rel="stylesheet" href="/static/project.css?v=20261001x" />
|
||||
<link rel="stylesheet" href="/static/project.css?v=20261001y" />
|
||||
<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=20261001w" defer></script>
|
||||
<script src="/static/project.js?v=20261001y" defer></script>
|
||||
{% endblock %}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{% extends "erp_base.html" %}
|
||||
|
||||
{% block head_extra %}
|
||||
<link rel="stylesheet" href="/static/project.css?v=20261001x" />
|
||||
<link rel="stylesheet" href="/static/project.css?v=20261001y" />
|
||||
<!-- 구글 머티리얼 심볼(담당자 아이콘 등) — 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=20261001w" defer></script>
|
||||
<script src="/static/project.js?v=20261001y" defer></script>
|
||||
{% endblock %}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{% extends "erp_base.html" %}
|
||||
|
||||
{% block head_extra %}
|
||||
<link rel="stylesheet" href="/static/project.css?v=20261001x" />
|
||||
<link rel="stylesheet" href="/static/project.css?v=20261001y" />
|
||||
<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=20261001w" defer></script>
|
||||
<script src="/static/project.js?v=20261001y" defer></script>
|
||||
{% endblock %}
|
||||
|
||||
Reference in New Issue
Block a user