feat(project): collapse meeting months by year
This commit is contained in:
@@ -8,7 +8,7 @@
|
||||
<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" />
|
||||
<link rel="stylesheet" href="/static/project-goal-nav.css?v=20261004d" />
|
||||
<script>
|
||||
try { document.documentElement.dataset.pjFont = localStorage.getItem('pj_font') || 'system'; } catch (_) {}
|
||||
window.PJ_HOLIDAYS = {{ (pj_kr_holidays or {}) | tojson }};
|
||||
|
||||
@@ -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=20261004b" />
|
||||
<script src="/static/project-goal-nav.js?v=20261004b" defer></script>
|
||||
<link rel="stylesheet" href="/static/project-goal-nav.css?v=20261004d" />
|
||||
<script src="/static/project-goal-nav.js?v=20261004d" 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 }}">
|
||||
@@ -66,9 +66,16 @@
|
||||
<div class="pj-side-goal-years" id="pj-side-goal-years"{% if not goal_open %} hidden{% endif %}>
|
||||
{% for y in (goal_years or []) %}
|
||||
<div class="pj-side-goal-branch" data-goal-year="{{ y }}">
|
||||
{# 화살표는 하위 월을 접고 펼치고, 연도 글자는 기존 목표 화면을 연다. #}
|
||||
<div class="pj-side-goal-year-row">
|
||||
<button type="button" class="pj-side-goal-year-toggle" aria-expanded="true"
|
||||
aria-controls="pj-side-meeting-months-{{ y }}" aria-label="{{ y }}년 하위 월 접기" title="하위 월 접기">
|
||||
<span class="material-symbols-outlined" aria-hidden="true">chevron_right</span>
|
||||
</button>
|
||||
<a class="pj-side-goal-year{% if side_active == 'goals' and y == goal_year_active %} is-active{% endif %}"
|
||||
href="/project/goals/{{ y }}">{{ y }}년</a>
|
||||
<div class="pj-side-meeting-months" data-current-week="{{ week if goal_month is defined else '' }}"></div>
|
||||
</div>
|
||||
<div class="pj-side-meeting-months" id="pj-side-meeting-months-{{ y }}" data-current-week="{{ week if goal_month is defined else '' }}"></div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
{% if is_admin %}
|
||||
|
||||
@@ -571,6 +571,7 @@
|
||||
<p class="pjh-lead">월 목표를 기준으로 지난주 결과를 리뷰하고 이번주 할 일과 금액 목표를 정하는 화면입니다. 연간 목표의 월 계획, 실적 모듈의 매출, 주별 결정 사항을 함께 확인합니다. 직원은 조회할 수 있고, 생성·입력·삭제는 관리자만 할 수 있습니다.</p>
|
||||
|
||||
<h3 id="meetings-week">회의록 열기와 주차 기준</h3>
|
||||
<p>왼쪽 연도 앞 화살표를 누르면 해당 연도의 하위 월 전체를 접거나 펼칠 수 있습니다. 연도 글자를 누르면 연간 목표를 엽니다. 연도와 월의 접기·펼치기 선택은 이 브라우저에 기억됩니다.</p>
|
||||
<ol class="pjh-steps">
|
||||
<li>왼쪽 <span class="pjh-ui">목표</span>에서 연도를 선택하고 표 머리의 <b>월 이름</b>을 누릅니다.</li>
|
||||
<li>이미 만든 회의록은 왼쪽 목표 연도 아래의 <b>월 폴더</b>에서도 열 수 있습니다. 폴더 아이콘과 월 이름을 눌러 접거나 펼치고, 주차·날짜 항목을 누르면 오른쪽 회의록만 바뀝니다. 왼쪽 메뉴와 스크롤 위치는 유지됩니다. 입력한 칸은 이동 전에 저장하며, 저장에 실패하면 현재 회의록을 유지합니다. 접기·펼치기는 이 브라우저에 기억됩니다.</li>
|
||||
|
||||
@@ -1,6 +1,15 @@
|
||||
/* 목표 연도 아래 월 폴더와 주간 회의록 — 좁은 왼쪽 메뉴에서도 글자는 한 줄로 표시한다. */
|
||||
.pj-side-goal-branch { min-width: 0; }
|
||||
.pj-side-goal-year-row { display: flex; align-items: center; min-width: 0; }
|
||||
.pj-side-goal-year-row .pj-side-goal-year { flex: 1; min-width: 0; }
|
||||
/* 연도 이동 링크와 접기 버튼은 따로 눌러 사용할 수 있다. */
|
||||
.pj-side-goal-year-toggle { display: flex; align-items: center; justify-content: center; flex: none; width: 24px; height: 30px; padding: 0; border: 0; border-radius: 6px; background: transparent; color: var(--pj-ink-soft); cursor: pointer; }
|
||||
.pj-side-goal-year-toggle:hover { background: #f1f2f4; }
|
||||
.pj-side-goal-year-toggle:focus-visible { outline: 2px solid var(--pj-accent); outline-offset: -2px; }
|
||||
.pj-side-goal-year-toggle .material-symbols-outlined { font-size: 18px; }
|
||||
.pj-side-goal-year-toggle[aria-expanded="true"] .material-symbols-outlined { transform: rotate(90deg); }
|
||||
.pj-side-meeting-months { padding-left: 8px; }
|
||||
.pj-side-meeting-months[hidden] { display: none; }
|
||||
.pj-side-meeting-month { min-width: 0; }
|
||||
.pj-side-meeting-month > summary {
|
||||
display: flex; align-items: center; gap: 5px; padding: 5px 4px;
|
||||
|
||||
@@ -6,6 +6,28 @@
|
||||
if (!branches.length) return;
|
||||
let loading = false, retry = null;
|
||||
const navigation = initMeetingNavigation();
|
||||
// 연도 접기는 월 폴더를 지우지 않고 숨겨서 각 월의 펼침 상태도 그대로 남긴다.
|
||||
branches.forEach(function (branch) {
|
||||
const button = branch.querySelector(".pj-side-goal-year-toggle");
|
||||
const list = branch.querySelector(".pj-side-meeting-months");
|
||||
if (!button || !list) return;
|
||||
const key = "pj_goal_year_open:" + branch.dataset.goalYear;
|
||||
function setOpen(open) {
|
||||
list.hidden = !open;
|
||||
button.setAttribute("aria-expanded", String(open));
|
||||
const action = open ? "하위 월 접기" : "하위 월 펼치기";
|
||||
button.setAttribute("aria-label", branch.dataset.goalYear + "년 " + action);
|
||||
button.title = action;
|
||||
}
|
||||
let saved = null;
|
||||
try { saved = localStorage.getItem(key); } catch (_) {}
|
||||
setOpen(saved !== "0");
|
||||
button.addEventListener("click", function () {
|
||||
const open = list.hidden;
|
||||
setOpen(open);
|
||||
try { localStorage.setItem(key, open ? "1" : "0"); } catch (_) {}
|
||||
});
|
||||
});
|
||||
|
||||
// 문자열을 HTML로 해석하지 않고 넣어 회의록 메뉴의 글자를 그대로 표시한다.
|
||||
function icon(name, cls) {
|
||||
|
||||
Reference in New Issue
Block a user