feat(project): 달력을 휴가 모듈식 월간 그리드로 교체
FullCalendar 제거. 휴가 모듈과 동일한 서버 렌더 월간 달력(구글식 bar 레인 배치)로 변경. 업무 start~due 기간을 bar 로 표시, 클릭 시 모달. ?y=&m= 로 월 이동, 프로젝트 색상 반영, 완료 업무는 회색+취소선. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -1,9 +1,8 @@
|
||||
{% extends "erp_base.html" %}
|
||||
|
||||
{% block head_extra %}
|
||||
<link rel="stylesheet" href="/static/project.css?v=20260625a" />
|
||||
<!-- FullCalendar (달력) · vis-timeline (타임라인) — 스켈레톤 단계는 CDN, 추후 self-host -->
|
||||
<link href="https://cdn.jsdelivr.net/npm/fullcalendar@6.1.15/index.global.min.css" rel="stylesheet" />
|
||||
<link rel="stylesheet" href="/static/project.css?v=20260625b" />
|
||||
<!-- 달력은 휴가 모듈과 동일한 서버 렌더 그리드(project.css). 타임라인만 vis(CDN, 추후 self-host) -->
|
||||
<link href="https://cdn.jsdelivr.net/npm/vis-timeline@7.7.3/styles/vis-timeline-graph2d.min.css" rel="stylesheet" />
|
||||
{% endblock %}
|
||||
|
||||
@@ -78,9 +77,49 @@
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
<!-- 달력 -->
|
||||
<!-- 달력 (휴가 모듈과 동일한 월간 그리드) -->
|
||||
<div class="pj-view" data-view="calendar">
|
||||
<div id="pj-calendar"></div>
|
||||
<div class="pj-cal-head">
|
||||
<a class="pj-btn pj-nav-btn" href="/project/p/{{ project.id }}?y={{ prev_y }}&m={{ prev_m }}">‹</a>
|
||||
<h2 class="pj-cal-title">{{ year }}년 {{ month }}월</h2>
|
||||
<a class="pj-btn pj-nav-btn" href="/project/p/{{ project.id }}?y={{ next_y }}&m={{ next_m }}">›</a>
|
||||
<a class="pj-btn pj-today-btn" href="/project/p/{{ project.id }}">오늘</a>
|
||||
</div>
|
||||
|
||||
<div class="pj-cal">
|
||||
<div class="pj-wd-row">
|
||||
{% for wd in weekdays %}
|
||||
<div class="pj-wd {% if loop.index0 == 0 %}pj-red{% elif loop.index0 == 6 %}pj-blue{% endif %}">{{ wd }}</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
|
||||
{% for week in weeks %}
|
||||
<div class="pj-week">
|
||||
<div class="pj-week-days">
|
||||
{% for cell in week.days %}
|
||||
<div class="pj-day {% if not cell.in_month %}pj-out{% endif %} {% if cell.is_today %}pj-today{% endif %}">
|
||||
<span class="pj-day-num
|
||||
{% if cell.is_sunday %}pj-red{% elif cell.is_saturday %}pj-blue{% endif %}">{{ cell.day }}</span>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
|
||||
<div class="pj-week-bars">
|
||||
{% for bar in week.bars %}
|
||||
<a class="pj-bar {% if bar.completed %}pj-bar-done{% endif %}
|
||||
{% if bar.continues_left %}pj-bar-l{% endif %}
|
||||
{% if bar.continues_right %}pj-bar-r{% endif %}"
|
||||
data-task-id="{{ bar.id }}"
|
||||
style="grid-column: {{ bar.start_col + 1 }} / span {{ bar.span }}; grid-row: {{ bar.lane + 1 }};
|
||||
background: {% if bar.completed %}#9aa5b1{% else %}{{ bar.color }}{% endif %};"
|
||||
title="{{ bar.label }}">
|
||||
<span class="pj-bar-label">{{ bar.label }}</span>
|
||||
</a>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
<!-- 타임라인 -->
|
||||
<div class="pj-view" data-view="timeline" hidden>
|
||||
@@ -160,7 +199,6 @@
|
||||
}
|
||||
</script>
|
||||
|
||||
<script src="https://cdn.jsdelivr.net/npm/fullcalendar@6.1.15/index.global.min.js"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/vis-timeline@7.7.3/standalone/umd/vis-timeline-graph2d.min.js"></script>
|
||||
<script src="/static/project.js?v=20260625a" defer></script>
|
||||
<script src="/static/project.js?v=20260625b" defer></script>
|
||||
{% endblock %}
|
||||
|
||||
Reference in New Issue
Block a user