feat(project): 멤버 이름(이메일 아이디) 첫 글자를 대문자로 표기
- JS: idOf 가 capName 을 거쳐 King·Bj 처럼 표시(담당자·협업자·멤버 목록· 전체 멤버·@멘션 칩/토큰·대시보드 등 전부) - 서버: 캘린더 막대 라벨·휴지통 "삭제한 사람", 템플릿(수신함 작성자· 프로젝트 멤버 말풍선·담당자 선택지) - 저장값·API id·멘션/검색 기준(이메일)은 그대로, 화면에 그릴 때만 바꿈 - 정적 파일 버전 20260926f Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -484,6 +484,7 @@ def _build_task_calendar(
|
|||||||
seg_end = min(re_, w_end)
|
seg_end = min(re_, w_end)
|
||||||
# bar 라벨: [프로젝트명] 제목 · 담당자(아이디)
|
# bar 라벨: [프로젝트명] 제목 · 담당자(아이디)
|
||||||
assignee = (t.get("assignee_email") or "").split("@")[0]
|
assignee = (t.get("assignee_email") or "").split("@")[0]
|
||||||
|
assignee = assignee[:1].upper() + assignee[1:] # 멤버 이름은 첫 글자 대문자
|
||||||
proj = t.get("project_name") or ""
|
proj = t.get("project_name") or ""
|
||||||
parts = []
|
parts = []
|
||||||
if proj:
|
if proj:
|
||||||
@@ -2022,7 +2023,8 @@ def _trash_view_items(items: list[dict[str, Any]]) -> list[dict[str, Any]]:
|
|||||||
it["days_left"] = max(0, (expires - now).days)
|
it["days_left"] = max(0, (expires - now).days)
|
||||||
except (TypeError, ValueError):
|
except (TypeError, ValueError):
|
||||||
it["days_left"] = None
|
it["days_left"] = None
|
||||||
it["deleted_by_id"] = (it.get("deleted_by") or "").split("@")[0]
|
did = (it.get("deleted_by") or "").split("@")[0]
|
||||||
|
it["deleted_by_id"] = did[:1].upper() + did[1:] # 멤버 이름은 첫 글자 대문자
|
||||||
return items
|
return items
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{% extends "erp_base.html" %}
|
{% extends "erp_base.html" %}
|
||||||
|
|
||||||
{% block head_extra %}
|
{% block head_extra %}
|
||||||
<link rel="stylesheet" href="/static/project.css?v=20260926e" />
|
<link rel="stylesheet" href="/static/project.css?v=20260926f" />
|
||||||
<link rel="stylesheet" href="/static/vendor/material-symbols/material-symbols.css" />
|
<link rel="stylesheet" href="/static/vendor/material-symbols/material-symbols.css" />
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
@@ -45,7 +45,7 @@
|
|||||||
<span class="pj-inbox-proj" style="color: {{ t.project_color or '#4573d2' }}">● {{ t.project_name }}</span>
|
<span class="pj-inbox-proj" style="color: {{ t.project_color or '#4573d2' }}">● {{ t.project_name }}</span>
|
||||||
{% if t.stage_name %} · {{ t.stage_name }}{% endif %}
|
{% if t.stage_name %} · {{ t.stage_name }}{% endif %}
|
||||||
{% if t.due_label %} · 마감 {{ t.due_label }}{% endif %}
|
{% if t.due_label %} · 마감 {{ t.due_label }}{% endif %}
|
||||||
{% if t.mention_actor %} · {{ t.mention_actor.split('@')[0] }}님이 태그{% endif %}
|
{% if t.mention_actor %} · {% set nm = t.mention_actor.split('@')[0] %}{{ nm[:1]|upper }}{{ nm[1:] }}님이 태그{% endif %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<a class="pj-btn pj-inbox-go" href="/project/p/{{ t.project_id }}?task={{ t.id }}">열기</a>
|
<a class="pj-btn pj-inbox-go" href="/project/p/{{ t.project_id }}?task={{ t.id }}">열기</a>
|
||||||
@@ -79,7 +79,7 @@
|
|||||||
<div class="pj-inbox-title">{{ n.title }}</div>
|
<div class="pj-inbox-title">{{ n.title }}</div>
|
||||||
{% if n.body %}<div class="pj-inbox-sub">{{ n.body }}</div>{% endif %}
|
{% if n.body %}<div class="pj-inbox-sub">{{ n.body }}</div>{% endif %}
|
||||||
<div class="pj-inbox-meta">
|
<div class="pj-inbox-meta">
|
||||||
{% if n.actor_email %}{{ n.actor_email.split('@')[0] }} · {% endif %}{{ n.created_at[:16].replace('T',' ') }}
|
{% if n.actor_email %}{% set nm = n.actor_email.split('@')[0] %}{{ nm[:1]|upper }}{{ nm[1:] }} · {% endif %}{{ n.created_at[:16].replace('T',' ') }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{% if n.project_id %}
|
{% if n.project_id %}
|
||||||
@@ -99,5 +99,5 @@
|
|||||||
{% include "project/_side_modals.html" %}
|
{% include "project/_side_modals.html" %}
|
||||||
{% include "project/_member_tasks_modal.html" %}
|
{% include "project/_member_tasks_modal.html" %}
|
||||||
|
|
||||||
<script src="/static/project.js?v=20260926e" defer></script>
|
<script src="/static/project.js?v=20260926f" defer></script>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{% extends "erp_base.html" %}
|
{% extends "erp_base.html" %}
|
||||||
|
|
||||||
{% block head_extra %}
|
{% block head_extra %}
|
||||||
<link rel="stylesheet" href="/static/project.css?v=20260926e" />
|
<link rel="stylesheet" href="/static/project.css?v=20260926f" />
|
||||||
<link rel="stylesheet" href="/static/vendor/material-symbols/material-symbols.css" />
|
<link rel="stylesheet" href="/static/vendor/material-symbols/material-symbols.css" />
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
@@ -98,5 +98,5 @@
|
|||||||
"today": {{ today | tojson }}
|
"today": {{ today | tojson }}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
<script src="/static/project.js?v=20260926e" defer></script>
|
<script src="/static/project.js?v=20260926f" defer></script>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{% extends "erp_base.html" %}
|
{% extends "erp_base.html" %}
|
||||||
|
|
||||||
{% block head_extra %}
|
{% block head_extra %}
|
||||||
<link rel="stylesheet" href="/static/project.css?v=20260926e" />
|
<link rel="stylesheet" href="/static/project.css?v=20260926f" />
|
||||||
<!-- 구글 머티리얼 심볼(담당자 아이콘 등) — self-host -->
|
<!-- 구글 머티리얼 심볼(담당자 아이콘 등) — self-host -->
|
||||||
<link rel="stylesheet" href="/static/vendor/material-symbols/material-symbols.css" />
|
<link rel="stylesheet" href="/static/vendor/material-symbols/material-symbols.css" />
|
||||||
<!-- 타임라인 vis-timeline — self-host -->
|
<!-- 타임라인 vis-timeline — self-host -->
|
||||||
@@ -53,7 +53,7 @@
|
|||||||
<div class="pj-title-members" id="pj-member-list">
|
<div class="pj-title-members" id="pj-member-list">
|
||||||
{% for m in members %}
|
{% for m in members %}
|
||||||
<span class="pj-tmember" data-email="{{ m.user_email }}"
|
<span class="pj-tmember" data-email="{{ m.user_email }}"
|
||||||
data-tip="{{ m.user_email.split('@')[0] }}{% if m.role == 'manager' %} (관리){% endif %}">
|
data-tip="{{ m.user_email.split('@')[0][:1]|upper }}{{ m.user_email.split('@')[0][1:] }}{% if m.role == 'manager' %} (관리){% endif %}">
|
||||||
{% if avatars.get(m.user_email | lower) %}
|
{% if avatars.get(m.user_email | lower) %}
|
||||||
<img class="pj-avatar pj-tmember-av" src="{{ avatars[m.user_email | lower] }}" alt="" referrerpolicy="no-referrer" />
|
<img class="pj-avatar pj-tmember-av" src="{{ avatars[m.user_email | lower] }}" alt="" referrerpolicy="no-referrer" />
|
||||||
{% else %}
|
{% else %}
|
||||||
@@ -267,8 +267,9 @@
|
|||||||
<select id="pj-t-assignee">
|
<select id="pj-t-assignee">
|
||||||
<option value="">없음</option>
|
<option value="">없음</option>
|
||||||
{% for m in members %}
|
{% for m in members %}
|
||||||
<option value="{{ m.user_email }}" data-name="{{ m.user_email.split('@')[0] }}">
|
{% set nm = m.user_email.split('@')[0] %}
|
||||||
{{ m.user_email.split('@')[0] }}
|
<option value="{{ m.user_email }}" data-name="{{ nm[:1]|upper }}{{ nm[1:] }}">
|
||||||
|
{{ nm[:1]|upper }}{{ nm[1:] }}
|
||||||
</option>
|
</option>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</select>
|
</select>
|
||||||
@@ -465,5 +466,5 @@
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<script src="/static/vendor/vis-timeline/vis-timeline-graph2d.min.js"></script>
|
<script src="/static/vendor/vis-timeline/vis-timeline-graph2d.min.js"></script>
|
||||||
<script src="/static/project.js?v=20260926e" defer></script>
|
<script src="/static/project.js?v=20260926f" defer></script>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{% extends "erp_base.html" %}
|
{% extends "erp_base.html" %}
|
||||||
|
|
||||||
{% block head_extra %}
|
{% block head_extra %}
|
||||||
<link rel="stylesheet" href="/static/project.css?v=20260926e" />
|
<link rel="stylesheet" href="/static/project.css?v=20260926f" />
|
||||||
<link rel="stylesheet" href="/static/vendor/material-symbols/material-symbols.css" />
|
<link rel="stylesheet" href="/static/vendor/material-symbols/material-symbols.css" />
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
@@ -68,5 +68,5 @@
|
|||||||
{% include "project/_side_modals.html" %}
|
{% include "project/_side_modals.html" %}
|
||||||
{% include "project/_member_tasks_modal.html" %}
|
{% include "project/_member_tasks_modal.html" %}
|
||||||
|
|
||||||
<script src="/static/project.js?v=20260926e" defer></script>
|
<script src="/static/project.js?v=20260926f" defer></script>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|||||||
+13
-8
@@ -507,7 +507,7 @@
|
|||||||
: '<span class="material-symbols-outlined pj-gicon pj-member-pick-icon">account_circle</span>';
|
: '<span class="material-symbols-outlined pj-gicon pj-member-pick-icon">account_circle</span>';
|
||||||
return '<label class="pj-member-pick pj-member-pick-stacked">' +
|
return '<label class="pj-member-pick pj-member-pick-stacked">' +
|
||||||
'<span class="pj-member-pick-avatar">' + icon + "</span>" +
|
'<span class="pj-member-pick-avatar">' + icon + "</span>" +
|
||||||
'<span class="pj-member-pick-name">' + escapeHtml(u.id) + "</span>" +
|
'<span class="pj-member-pick-name">' + escapeHtml(capName(u.id)) + "</span>" +
|
||||||
'<input type="checkbox" value="' + u.email + '" data-name="' + escapeHtml(u.name) + '" />' +
|
'<input type="checkbox" value="' + u.email + '" data-name="' + escapeHtml(u.name) + '" />' +
|
||||||
"</label>";
|
"</label>";
|
||||||
}
|
}
|
||||||
@@ -788,8 +788,8 @@
|
|||||||
const icon = u.avatar
|
const icon = u.avatar
|
||||||
? '<img class="pj-avatar pj-member-pick-icon" src="' + escapeHtml(u.avatar) + '" alt="" referrerpolicy="no-referrer" />'
|
? '<img class="pj-avatar pj-member-pick-icon" src="' + escapeHtml(u.avatar) + '" alt="" referrerpolicy="no-referrer" />'
|
||||||
: '<span class="material-symbols-outlined pj-gicon pj-member-pick-icon">account_circle</span>';
|
: '<span class="material-symbols-outlined pj-gicon pj-member-pick-icon">account_circle</span>';
|
||||||
return '<button type="button" class="pj-allmember-item" data-email="' + escapeHtml(u.email) + '" data-name="' + escapeHtml(u.id) + '">' +
|
return '<button type="button" class="pj-allmember-item" data-email="' + escapeHtml(u.email) + '" data-name="' + escapeHtml(capName(u.id)) + '">' +
|
||||||
icon + '<span class="pj-allmember-name">' + escapeHtml(u.id) + "</span></button>";
|
icon + '<span class="pj-allmember-name">' + escapeHtml(capName(u.id)) + "</span></button>";
|
||||||
}).join("")
|
}).join("")
|
||||||
: "<span class='pj-empty-sm'>없음</span>";
|
: "<span class='pj-empty-sm'>없음</span>";
|
||||||
grid.querySelectorAll(".pj-allmember-item").forEach(function (btn) {
|
grid.querySelectorAll(".pj-allmember-item").forEach(function (btn) {
|
||||||
@@ -1468,7 +1468,7 @@
|
|||||||
(u.avatar
|
(u.avatar
|
||||||
? '<img class="pj-avatar pj-gicon-sm" src="' + escapeHtml(u.avatar) + '" alt="" referrerpolicy="no-referrer">'
|
? '<img class="pj-avatar pj-gicon-sm" src="' + escapeHtml(u.avatar) + '" alt="" referrerpolicy="no-referrer">'
|
||||||
: '<span class="material-symbols-outlined pj-gicon pj-gicon-sm">account_circle</span>') +
|
: '<span class="material-symbols-outlined pj-gicon pj-gicon-sm">account_circle</span>') +
|
||||||
"<span>" + escapeHtml(u.id || u.name || u.email) + "</span>";
|
"<span>" + escapeHtml(capName(u.id || u.name || u.email)) + "</span>";
|
||||||
b.addEventListener("click", function () { onPick(u); });
|
b.addEventListener("click", function () { onPick(u); });
|
||||||
menu.appendChild(b);
|
menu.appendChild(b);
|
||||||
});
|
});
|
||||||
@@ -1547,7 +1547,7 @@
|
|||||||
if (!ctx) { closeMentionMenu(); return; }
|
if (!ctx) { closeMentionMenu(); return; }
|
||||||
const users = filterMentionUsers(await mentionUsers(), ctx.query);
|
const users = filterMentionUsers(await mentionUsers(), ctx.query);
|
||||||
renderMentionMenu(users, input.getBoundingClientRect(), function (u) {
|
renderMentionMenu(users, input.getBoundingClientRect(), function (u) {
|
||||||
const token = "@" + (u.id || u.email.split("@")[0]);
|
const token = "@" + capName(u.id || u.email.split("@")[0]);
|
||||||
input.value = input.value.slice(0, ctx.start) + token + " " + input.value.slice(ctx.end);
|
input.value = input.value.slice(0, ctx.start) + token + " " + input.value.slice(ctx.end);
|
||||||
input._pjMentions[token] = u.email;
|
input._pjMentions[token] = u.email;
|
||||||
const caret = ctx.start + token.length + 1;
|
const caret = ctx.start + token.length + 1;
|
||||||
@@ -1610,7 +1610,7 @@
|
|||||||
chip.className = "pj-mention";
|
chip.className = "pj-mention";
|
||||||
chip.setAttribute("data-email", u.email);
|
chip.setAttribute("data-email", u.email);
|
||||||
chip.setAttribute("contenteditable", "false");
|
chip.setAttribute("contenteditable", "false");
|
||||||
chip.textContent = "@" + (u.id || u.email.split("@")[0]);
|
chip.textContent = "@" + capName(u.id || u.email.split("@")[0]);
|
||||||
const space = document.createTextNode("\u00a0");
|
const space = document.createTextNode("\u00a0");
|
||||||
range.insertNode(space);
|
range.insertNode(space);
|
||||||
range.insertNode(chip);
|
range.insertNode(chip);
|
||||||
@@ -4094,7 +4094,7 @@
|
|||||||
const byAssignee = {};
|
const byAssignee = {};
|
||||||
incomplete.forEach(function (t) {
|
incomplete.forEach(function (t) {
|
||||||
if (!t.start_date && !t.due_date) return;
|
if (!t.start_date && !t.due_date) return;
|
||||||
const k = t.assignee_email ? (t.assignee_name || idOf(t.assignee_email)) : "담당자 없음";
|
const k = t.assignee_email ? capName(t.assignee_name || idOf(t.assignee_email)) : "담당자 없음";
|
||||||
byAssignee[k] = (byAssignee[k] || 0) + 1;
|
byAssignee[k] = (byAssignee[k] || 0) + 1;
|
||||||
});
|
});
|
||||||
let assigneeEntries = Object.keys(byAssignee).map(function (k) { return { label: k, value: byAssignee[k] }; })
|
let assigneeEntries = Object.keys(byAssignee).map(function (k) { return { label: k, value: byAssignee[k] }; })
|
||||||
@@ -5506,8 +5506,13 @@
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 화면에 보이는 멤버 이름 = 이메일 아이디, 맨 앞 글자만 대문자(king → King).
|
||||||
|
function capName(s) {
|
||||||
|
s = String(s == null ? "" : s);
|
||||||
|
return s.charAt(0).toUpperCase() + s.slice(1);
|
||||||
|
}
|
||||||
function idOf(email) {
|
function idOf(email) {
|
||||||
return String(email == null ? "" : email).split("@")[0];
|
return capName(String(email == null ? "" : email).split("@")[0]);
|
||||||
}
|
}
|
||||||
|
|
||||||
// ════════════════════════════════════════════════════════════
|
// ════════════════════════════════════════════════════════════
|
||||||
|
|||||||
@@ -9,6 +9,8 @@
|
|||||||
목록(보기 탭, 예전 "리스트") · 캘린더(예전 "달력") · 수신함 · 첨부 파일 · 작업 링크 복사 ·
|
목록(보기 탭, 예전 "리스트") · 캘린더(예전 "달력") · 수신함 · 첨부 파일 · 작업 링크 복사 ·
|
||||||
프로젝트 칸 + "다른 프로젝트에 추가"(예전 "연결된 프로젝트") · 담당자 없음(예전 "(미지정)").
|
프로젝트 칸 + "다른 프로젝트에 추가"(예전 "연결된 프로젝트") · 담당자 없음(예전 "(미지정)").
|
||||||
"@태그"는 그대로 쓴다. 코드 식별자·DB 컬럼(`tasks`, `stage_id`, `task_followers` 등)과 코드 주석은 예전 이름 그대로다.
|
"@태그"는 그대로 쓴다. 코드 식별자·DB 컬럼(`tasks`, `stage_id`, `task_followers` 등)과 코드 주석은 예전 이름 그대로다.
|
||||||
|
**멤버 이름 표기** — 이메일 아이디의 첫 글자만 대문자(king → King). JS 는 `idOf(email)`/`capName(s)`,
|
||||||
|
템플릿은 `{{ nm[:1]|upper }}{{ nm[1:] }}` 로 화면에 그릴 때만 바꾼다(API `id`·DB 값은 그대로 — 멘션·검색은 이메일 기준).
|
||||||
|
|
||||||
## 1. 개요
|
## 1. 개요
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user