feat(project): 프로젝트 색상·아이콘을 아사나식으로(16색 + 아이콘 42종)

- 색상표: 아사나 프로젝트 16색(8칸×2줄, 고른 색에 체크), 새 프로젝트 기본 파랑.
  예전 팔레트 색 프로젝트는 그대로 유지(수정 팝업이 첫 칸으로 바꾸지 않음)
- 아이콘: 아사나 프로젝트 아이콘과 같은 종류 42개(Material Symbols, self-host
  글꼴에 전부 있는 것 확인). 새 프로젝트·수정 팝업에 아이콘 격자(첫 칸 Aa=없음),
  사이드바 배지·프로젝트 제목에 흰 아이콘
- DB: projects.icon (scripts/sql/project_db_011_project_icon.sql). 아이콘은
  고르거나 바꿨을 때만 보내서 011 적용 전에도 다른 생성·수정은 그대로 동작,
  아이콘을 고르면 "마이그레이션 011 필요" 안내(503)
- 색상·아이콘 칸을 label 대신 div 로(글자를 누르면 첫 버튼이 눌리던 문제)
- 정적 파일 버전 20260926h

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-09-26 13:07:46 +09:00
parent 426febe5d5
commit c77ce8e151
14 changed files with 241 additions and 53 deletions
@@ -57,11 +57,11 @@
data-name="{{ p.name }}" data-desc="{{ p.description or '' }}"
data-start="{{ p.start_date or '' }}" data-due="{{ p.due_date or '' }}"
data-color="{{ p.color }}" data-status="{{ p.status or 'active' }}"
data-creator="{{ p.created_by or '' }}">
data-creator="{{ p.created_by or '' }}" data-icon="{{ p.icon or '' }}">
<div class="pj-tree-row {% if p.id == current_pid %}is-active{% endif %}">
{% if is_admin %}<span class="pj-tree-handle" title="드래그로 순서 변경">⣿</span>{% endif %}
<a class="pj-tree-link" href="/project/p/{{ p.id }}"{% if is_admin %} draggable="false"{% endif %}>
<span class="pj-tree-avatar" style="background: {{ p.color }}">{{ p.name[0] | upper }}</span>
<span class="pj-tree-avatar{% if p.icon %} has-icon{% endif %}" style="background: {{ p.color }}">{% if p.icon %}<span class="material-symbols-outlined pj-proj-ic">{{ p.icon }}</span>{% else %}{{ p.name[0] | upper }}{% endif %}</span>
<span class="pj-tree-name">{{ p.name }}</span>
</a>
{% if is_admin %}
@@ -1,9 +1,11 @@
{# ── 좌측 프로젝트 목록(project/_side.html)용 모달 (공용) ──────────────
"+" 새 프로젝트 / ✎ 프로젝트 수정 — 수신함·내 업무·휴지통·프로젝트 화면이
모두 include 한다(동작은 project.js 의 initSideTree). 관리자만 쓰므로
관리자에게만 그린다. 색상 원은 window.PJ_COLORS(color_palette). #}
관리자에게만 그린다. 색상 원은 window.PJ_COLORS(color_palette, 아사나 16색),
아이콘은 window.PJ_ICONS(project_icons — Material Symbols 이름). #}
<script>
window.PJ_COLORS = {{ color_palette | tojson }};
window.PJ_ICONS = {{ (project_icons or []) | tojson }};
</script>
{% if is_admin %}
<!-- 새 프로젝트 모달 — 좌측 프로젝트 목록의 + 버튼 -->
@@ -15,9 +17,13 @@
{# 날짜 칸은 project.js enhanceDateInput 이 아사나식 날짜 버튼으로 바꾼다(input 은 숨긴 값 저장소).
label 로 감싸지 않는다 — label 안의 버튼을 누르면 숨긴 input 이 다시 눌리는 문제가 생긴다. #}
<div class="pj-field-label">마감일<input type="date" id="pj-f-due" /></div>
<label>색상
{# 색상·아이콘은 label 로 감싸지 않는다 — label 글자를 누르면 첫 버튼이 눌린다. #}
<div class="pj-field-label">색상
<span class="pj-color-palette" id="pj-f-colors"></span>
</label>
</div>
<div class="pj-field-label">아이콘
<div class="pj-icon-palette" id="pj-f-icons"></div>
</div>
<div class="pj-field-label">멤버
<div class="pj-member-picker" id="pj-f-members">불러오는 중…</div>
</div>
@@ -40,9 +46,12 @@
<input type="date" id="pj-e-start" />
<input type="date" id="pj-e-due" />
</div>
<label>색상
<div class="pj-field-label">색상
<span class="pj-color-palette" id="pj-e-colors"></span>
</label>
</div>
<div class="pj-field-label">아이콘
<div class="pj-icon-palette" id="pj-e-icons"></div>
</div>
<label class="pj-time-toggle">
<input type="checkbox" id="pj-e-done" /> 프로젝트 완료 (목록 끝으로 이동·비활성)
</label>
@@ -1,7 +1,7 @@
{% extends "erp_base.html" %}
{% block head_extra %}
<link rel="stylesheet" href="/static/project.css?v=20260926g" />
<link rel="stylesheet" href="/static/project.css?v=20260926h" />
<link rel="stylesheet" href="/static/vendor/material-symbols/material-symbols.css" />
{% endblock %}
@@ -99,5 +99,5 @@
{% include "project/_side_modals.html" %}
{% include "project/_member_tasks_modal.html" %}
<script src="/static/project.js?v=20260926g" defer></script>
<script src="/static/project.js?v=20260926h" defer></script>
{% endblock %}
@@ -1,7 +1,7 @@
{% extends "erp_base.html" %}
{% block head_extra %}
<link rel="stylesheet" href="/static/project.css?v=20260926g" />
<link rel="stylesheet" href="/static/project.css?v=20260926h" />
<link rel="stylesheet" href="/static/vendor/material-symbols/material-symbols.css" />
{% endblock %}
@@ -98,5 +98,5 @@
"today": {{ today | tojson }}
}
</script>
<script src="/static/project.js?v=20260926g" defer></script>
<script src="/static/project.js?v=20260926h" defer></script>
{% endblock %}
@@ -1,7 +1,7 @@
{% extends "erp_base.html" %}
{% block head_extra %}
<link rel="stylesheet" href="/static/project.css?v=20260926g" />
<link rel="stylesheet" href="/static/project.css?v=20260926h" />
<!-- 구글 머티리얼 심볼(담당자 아이콘 등) — self-host -->
<link rel="stylesheet" href="/static/vendor/material-symbols/material-symbols.css" />
<!-- 타임라인 vis-timeline — self-host -->
@@ -48,7 +48,7 @@
같은 마크업으로 다시 그린다. -->
<div class="pj-title-wrap">
<h1 class="pj-project-title">
<span class="pj-project-title-pill" style="--pj-color: {{ project.color or '#4573d2' }}">{{ project.name }}</span>
<span class="pj-project-title-pill" style="--pj-color: {{ project.color or '#4573d2' }}">{% if project.icon %}<span class="material-symbols-outlined pj-pill-ic">{{ project.icon }}</span>{% endif %}{{ project.name }}</span>
</h1>
<div class="pj-title-members" id="pj-member-list">
{% for m in members %}
@@ -466,5 +466,5 @@
</script>
<script src="/static/vendor/vis-timeline/vis-timeline-graph2d.min.js"></script>
<script src="/static/project.js?v=20260926g" defer></script>
<script src="/static/project.js?v=20260926h" defer></script>
{% endblock %}
@@ -1,7 +1,7 @@
{% extends "erp_base.html" %}
{% block head_extra %}
<link rel="stylesheet" href="/static/project.css?v=20260926g" />
<link rel="stylesheet" href="/static/project.css?v=20260926h" />
<link rel="stylesheet" href="/static/vendor/material-symbols/material-symbols.css" />
{% endblock %}
@@ -68,5 +68,5 @@
{% include "project/_side_modals.html" %}
{% include "project/_member_tasks_modal.html" %}
<script src="/static/project.js?v=20260926g" defer></script>
<script src="/static/project.js?v=20260926h" defer></script>
{% endblock %}