feat(project): 프로젝트 진입 시 기본 보기는 항상 보드

기억된 뷰(pj_view)는 달력 이전/다음달 이동(?y=&m= 새로고침) 때만 복원.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-09-23 22:38:03 +09:00
parent b74e5a4a04
commit 11fa0f6519
4 changed files with 13 additions and 10 deletions
@@ -1,7 +1,7 @@
{% extends "erp_base.html" %}
{% block head_extra %}
<link rel="stylesheet" href="/static/project.css?v=20260923i" />
<link rel="stylesheet" href="/static/project.css?v=20260923j" />
<link rel="stylesheet" href="/static/vendor/material-symbols/material-symbols.css" />
{% endblock %}
@@ -98,5 +98,5 @@
{% include "project/_member_tasks_modal.html" %}
<script src="/static/project.js?v=20260923i" defer></script>
<script src="/static/project.js?v=20260923j" defer></script>
{% endblock %}
@@ -1,7 +1,7 @@
{% extends "erp_base.html" %}
{% block head_extra %}
<link rel="stylesheet" href="/static/project.css?v=20260923i" />
<link rel="stylesheet" href="/static/project.css?v=20260923j" />
<link rel="stylesheet" href="/static/vendor/material-symbols/material-symbols.css" />
{% endblock %}
@@ -119,5 +119,5 @@
"today": {{ today | tojson }}
}
</script>
<script src="/static/project.js?v=20260923i" defer></script>
<script src="/static/project.js?v=20260923j" defer></script>
{% endblock %}
@@ -1,7 +1,7 @@
{% extends "erp_base.html" %}
{% block head_extra %}
<link rel="stylesheet" href="/static/project.css?v=20260923i" />
<link rel="stylesheet" href="/static/project.css?v=20260923j" />
<!-- 구글 머티리얼 심볼(담당자 아이콘 등) — self-host -->
<link rel="stylesheet" href="/static/vendor/material-symbols/material-symbols.css" />
<!-- 타임라인 vis-timeline — self-host -->
@@ -501,5 +501,5 @@
</script>
<script src="/static/vendor/vis-timeline/vis-timeline-graph2d.min.js"></script>
<script src="/static/project.js?v=20260923i" defer></script>
<script src="/static/project.js?v=20260923j" defer></script>
{% endblock %}
+7 -4
View File
@@ -1429,14 +1429,17 @@
}
let timeline = null;
// 마지막으로 보던 뷰를 기억한다 — 달력 이전/다음달 이동은 페이지를 통째로
// 새로고침하므로(?y=&m=), 기억이 없으면 달력을 보다가도 매번 기본값(보드)
// 으로 튕겨나간다.
// 기본 보기는 항상 보드(왼쪽 프로젝트 클릭 등으로 들어오면 보드).
// 예외: 달력 이전/다음달 이동은 페이지를 통째로 새로고침하므로(?y=&m=),
// 그때만 마지막으로 보던 뷰를 되살린다 — 안 그러면 달력을 넘기다가
// 보드로 튕겨나간다.
const VIEW_KEY = "pj_view";
let currentView = "board";
try {
const qs = new URLSearchParams(location.search);
const saved = localStorage.getItem(VIEW_KEY);
if (saved && ["board", "list", "calendar", "timeline", "dashboard"].indexOf(saved) >= 0) currentView = saved;
if ((qs.has("y") || qs.has("m")) && saved &&
["board", "list", "calendar", "timeline", "dashboard"].indexOf(saved) >= 0) currentView = saved;
} catch (_) {}
// ── 프로젝트 스코프 — 아사나처럼 기본은 "이 프로젝트만", "전체 프로젝트"로