fix(project): keep sidebar on week navigation
This commit is contained in:
@@ -3159,7 +3159,7 @@ def _parse_attendees(text: str, members: list[dict[str, str]]) -> list[dict[str,
|
||||
|
||||
|
||||
@router.get("/goals/{year}/meetings/{month}", response_class=HTMLResponse)
|
||||
def goal_meeting_page(request: Request, year: int, month: int, week: str | None = None) -> HTMLResponse:
|
||||
def goal_meeting_page(request: Request, year: int, month: int, week: str | None = None, content: bool = False) -> HTMLResponse:
|
||||
"""주간 회의록 — 그 달과 겹치는 주(월~일) 탭, 주마다 회의록 하나. 입력은 관리자만(목표 표와 같음)."""
|
||||
from app.main import build_erp_nav, render_template # noqa: WPS433
|
||||
from app.store import has_module, is_admin # noqa: WPS433
|
||||
@@ -3180,7 +3180,7 @@ def goal_meeting_page(request: Request, year: int, month: int, week: str | None
|
||||
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()}",
|
||||
return RedirectResponse(url=f"/project/goals/{sel.year}/meetings/{sel.month}?week={sel.isoformat()}" + ("&content=1" if content else ""),
|
||||
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])
|
||||
@@ -3209,6 +3209,7 @@ def goal_meeting_page(request: Request, year: int, month: int, week: str | None
|
||||
"project_icons": list(store.PROJECT_ICONS),
|
||||
"goal_year": year,
|
||||
"goal_month": month,
|
||||
"meeting_embedded": content,
|
||||
"meetings_enabled": enabled,
|
||||
"weeks": [{"start": w.isoformat(), "end": e.isoformat(), "n": i + 1, "label": f"{w.month}/{w.day}~{e.month}/{e.day}",
|
||||
"has": w.isoformat() in existing, "now": w <= today <= e,
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
{# 오른쪽 회의록 전용 문서. 공통 메뉴를 다시 만들지 않고 회의록의 기존 편집 기능을 그대로 사용한다. #}
|
||||
<!doctype html>
|
||||
<html lang="ko" class="pj-meeting-content">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<title>{{ page_title or '주간 회의록' }}</title>
|
||||
<link rel="stylesheet" href="/static/erp.css?v=20260615b" />
|
||||
<link rel="stylesheet" href="/static/erp-dialog.css?v=20260930a" />
|
||||
{% block head_extra %}{% endblock %}
|
||||
<link rel="stylesheet" href="/static/project-goal-nav.css?v=20261004b" />
|
||||
<script>
|
||||
try { document.documentElement.dataset.pjFont = localStorage.getItem('pj_font') || 'system'; } catch (_) {}
|
||||
window.PJ_HOLIDAYS = {{ (pj_kr_holidays or {}) | tojson }};
|
||||
</script>
|
||||
<script src="/static/project-meeting-panel.js?v=20261004a" defer></script>
|
||||
</head>
|
||||
<body class="erp-body">
|
||||
<main class="erp-page">{% block content %}{% endblock %}</main>
|
||||
<script src="/static/erp-dialog.js?v=20260930a"></script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -17,8 +17,8 @@
|
||||
프로젝트 관리의 모든 화면에 들어가므로 여기서 한 번 넘긴다(main.py 의 Jinja 전역). #}
|
||||
<script>window.PJ_HOLIDAYS = {{ (pj_kr_holidays or {}) | tojson }};</script>
|
||||
{# 모든 프로젝트 화면에서 같은 회의록 트리를 사용한다. #}
|
||||
<link rel="stylesheet" href="/static/project-goal-nav.css?v=20261004a" />
|
||||
<script src="/static/project-goal-nav.js?v=20261004a" defer></script>
|
||||
<link rel="stylesheet" href="/static/project-goal-nav.css?v=20261004b" />
|
||||
<script src="/static/project-goal-nav.js?v=20261004b" defer></script>
|
||||
<aside class="pj-side" data-is-admin="{{ 'true' if is_admin else 'false' }}"
|
||||
data-is-super="{{ 'true' if user.is_super_admin else 'false' }}"
|
||||
data-me="{{ user.email }}">
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{% extends "erp_base.html" %}
|
||||
{% extends "project/_meeting_content_base.html" if meeting_embedded else "erp_base.html" %}
|
||||
|
||||
{% block head_extra %}
|
||||
<link rel="stylesheet" href="/static/project.css?v=20261004b" />
|
||||
@@ -18,7 +18,7 @@
|
||||
입력은 관리자만(칸별 즉시 저장, 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" data-me="{{ (user.email if user else '') | lower }}">
|
||||
<div class="pj-layout">
|
||||
{% with current_pid = 0, side_active = "goals" %}{% include "project/_side.html" %}{% endwith %}
|
||||
{% if not meeting_embedded %}{% with current_pid = 0, side_active = "goals" %}{% include "project/_side.html" %}{% endwith %}{% endif %}
|
||||
|
||||
<section class="pj-main">
|
||||
{# 머리 — 왼쪽: 제목·이전/다음 달·인쇄·회의록 삭제·주차 탭(한 줄) + 이 달 계획(달력 앞까지) / 오른쪽 위: 작은 달력 #}
|
||||
@@ -308,5 +308,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=20261003k" defer></script>
|
||||
<script src="/static/project.js?v=20261004c" defer></script>
|
||||
{% endblock %}
|
||||
|
||||
@@ -202,5 +202,5 @@
|
||||
{% include "project/_member_tasks_modal.html" %}
|
||||
|
||||
<script src="/static/project-goal-text.js?v=20261003d" defer></script>
|
||||
<script src="/static/project.js?v=20261003n" defer></script>
|
||||
<script src="/static/project.js?v=20261004c" defer></script>
|
||||
{% endblock %}
|
||||
|
||||
@@ -573,7 +573,7 @@
|
||||
<h3 id="meetings-week">회의록 열기와 주차 기준</h3>
|
||||
<ol class="pjh-steps">
|
||||
<li>왼쪽 <span class="pjh-ui">목표</span>에서 연도를 선택하고 표 머리의 <b>월 이름</b>을 누릅니다.</li>
|
||||
<li>이미 만든 회의록은 왼쪽 목표 연도 아래의 <b>월 폴더</b>에서도 열 수 있습니다. 폴더 아이콘과 월 이름을 눌러 접거나 펼치고, 주차·날짜 항목을 누르면 그 주 회의록으로 바로 이동합니다. 접기·펼치기는 이 브라우저에 기억됩니다.</li>
|
||||
<li>이미 만든 회의록은 왼쪽 목표 연도 아래의 <b>월 폴더</b>에서도 열 수 있습니다. 폴더 아이콘과 월 이름을 눌러 접거나 펼치고, 주차·날짜 항목을 누르면 오른쪽 회의록만 바뀝니다. 왼쪽 메뉴와 스크롤 위치는 유지됩니다. 입력한 칸은 이동 전에 저장하며, 저장에 실패하면 현재 회의록을 유지합니다. 접기·펼치기는 이 브라우저에 기억됩니다.</li>
|
||||
<li>위쪽 주차 탭 또는 오른쪽 작은 달력의 주 한 줄을 눌러 주를 고릅니다. 점은 회의록이 있는 주, <span class="pjh-ui">이번 주</span>는 현재 주입니다. 이전·다음 달 버튼으로 달을 바꿉니다.</li>
|
||||
<li>한 주는 <b>월요일~일요일</b>이고, 월요일이 속한 달의 회의록입니다. 1주차는 그 달 첫 월요일이 있는 주입니다. 예: 2026년 10월 1주차는 10/5~10/11이며, 9/28~10/4는 9월 회의록입니다.</li>
|
||||
<li>작은 달력의 흐린 앞 달 주를 누르면 그 달 회의록으로 갑니다. <span class="pjh-ui">해당 연도 목표</span> 버튼은 연간 목표 표로 돌아갑니다.</li>
|
||||
|
||||
@@ -104,5 +104,5 @@
|
||||
{% include "project/_side_modals.html" %}
|
||||
{% include "project/_member_tasks_modal.html" %}
|
||||
|
||||
<script src="/static/project.js?v=20261003h" defer></script>
|
||||
<script src="/static/project.js?v=20261004c" defer></script>
|
||||
{% endblock %}
|
||||
|
||||
@@ -100,5 +100,5 @@
|
||||
"today": {{ today | tojson }}
|
||||
}
|
||||
</script>
|
||||
<script src="/static/project.js?v=20261003h" defer></script>
|
||||
<script src="/static/project.js?v=20261004c" 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=20261004a" defer></script>
|
||||
<script src="/static/project.js?v=20261004c" defer></script>
|
||||
{% endblock %}
|
||||
|
||||
@@ -70,5 +70,5 @@
|
||||
{% include "project/_side_modals.html" %}
|
||||
{% include "project/_member_tasks_modal.html" %}
|
||||
|
||||
<script src="/static/project.js?v=20261003h" defer></script>
|
||||
<script src="/static/project.js?v=20261004c" defer></script>
|
||||
{% endblock %}
|
||||
|
||||
Reference in New Issue
Block a user