feat(프로젝트): 메인 업무·세부 업무 추가 칸 날짜 팝업에도 [매일]
- POST tasks 의 repeat_daily: true = 만든 뒤 켬(033 미적용 503), 화면은 data-daily-ready(db.daily_ready)일 때만 버튼 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
+19
-11
@@ -3495,7 +3495,8 @@
|
||||
// 등급(2026-10-12) — isPro = Pro user 이상(프로젝트 수정·멤버 배정·전체 보기·담당자별 합계·남의 댓글 수정),
|
||||
// isPAdmin = Admin 이상(남이 만든 섹션도 삭제).
|
||||
const isPro = root.dataset.isPro === "true";
|
||||
const canAllView = root.dataset.allView === "true"; // 왼쪽 "전체 보기" 메뉴 — Project 옵션 대상자(서버 pj_all_view)
|
||||
const canAllView = root.dataset.allView === "true";
|
||||
const dailyReady = root.dataset.dailyReady === "1"; // 033 — 새 업무·세부 업무 추가 칸 날짜 팝업에도 [매일] // 왼쪽 "전체 보기" 메뉴 — Project 옵션 대상자(서버 pj_all_view)
|
||||
const isPAdmin = root.dataset.isPadmin === "true";
|
||||
// 시스템 Project 옵션(서버 project_options, 수퍼관리자·Admin 이 바꾸면 모든 사용자에게) — 보드 카드 표지 켬/끔.
|
||||
// 옵션 창에서 저장하면 pj-options-change 로 바로 바뀐다(아래).
|
||||
@@ -5118,9 +5119,10 @@
|
||||
av.title = draft.assignee ? idOf(draft.assignee) : "담당자 지정";
|
||||
}
|
||||
function paintDue() {
|
||||
const di = dueInfo(draft.due, false);
|
||||
due.innerHTML = di ? escapeHtml(di.text) : DUE_EMPTY_ICON_SVG;
|
||||
due.title = draft.due || "마감일 지정";
|
||||
const di = dueInfo(draft.due, false, draft.daily);
|
||||
due.innerHTML = !di ? DUE_EMPTY_ICON_SVG
|
||||
: draft.daily ? '<span class="pj-due-label is-daily">' + escapeHtml(di.text) + "</span>" : escapeHtml(di.text);
|
||||
due.title = draft.daily ? "매일 하는 업무" : draft.due || "마감일 지정";
|
||||
}
|
||||
function paintFol() {
|
||||
fol.innerHTML = followerIconHtml(draft.followers);
|
||||
@@ -5171,8 +5173,12 @@
|
||||
});
|
||||
due.addEventListener("click", function () {
|
||||
openDatePopover(due, {
|
||||
due: draft.due, allowStart: false,
|
||||
onChange: function (patch) { if (!current()) return; draft.due = patch.due_date || null; paintDue(); refocus(); },
|
||||
due: draft.due, allowStart: false, daily: !!draft.daily, allowDaily: dailyReady,
|
||||
onChange: function (patch) {
|
||||
if (!current()) return;
|
||||
draft.due = patch.due_date || null; draft.daily = !!patch.repeat_daily;
|
||||
paintDue(); refocus();
|
||||
},
|
||||
});
|
||||
});
|
||||
function close() {
|
||||
@@ -5194,6 +5200,7 @@
|
||||
assignee_email: draft.assignee, assignee_name: draft.assignee ? idOf(draft.assignee) : "",
|
||||
due_date: draft.due || null,
|
||||
followers: draft.followers,
|
||||
...(draft.daily ? { repeat_daily: true } : {}),
|
||||
});
|
||||
if (!current()) return;
|
||||
mergeTask(res.task);
|
||||
@@ -6031,7 +6038,7 @@
|
||||
if (!draft.followers) draft.followers = [];
|
||||
inp.value = draft.title;
|
||||
function paintDue() {
|
||||
const di = dueInfo(draft.due, false);
|
||||
const di = dueInfo(draft.due, false, draft.daily);
|
||||
dueEl.className = "pj-card-sub-due pj-card-subnew-due" + (di ? " " + di.cls : " is-empty");
|
||||
dueEl.innerHTML = di ? escapeHtml(di.text) : DUE_EMPTY_ICON_SVG;
|
||||
dueEl.dataset.tip = di ? dueTip(di) : "마감일 지정";
|
||||
@@ -6058,7 +6065,7 @@
|
||||
draft.focused = document.activeElement === inp;
|
||||
// 날짜 팝업·담당자 메뉴를 쓰는 중이면 닫지 않는다.
|
||||
if (draft.focused || datePopEl || ctxMenuEl) return;
|
||||
if (!draft.title.trim() && !draft.due && !draft.assignee && !draft.followers.length) closeDraft();
|
||||
if (!draft.title.trim() && !draft.due && !draft.daily && !draft.assignee && !draft.followers.length) closeDraft();
|
||||
}, 150);
|
||||
});
|
||||
inp.addEventListener("keydown", function (e) {
|
||||
@@ -6068,9 +6075,9 @@
|
||||
});
|
||||
dueEl.addEventListener("click", function () {
|
||||
openDatePopover(dueEl, {
|
||||
due: draft.due, allowStart: false,
|
||||
due: draft.due, allowStart: false, daily: !!draft.daily, allowDaily: dailyReady,
|
||||
// 날짜를 고르면 팝업이 닫히므로 이어서 이름을 칠 수 있게 입력칸으로 돌아간다.
|
||||
onChange: function (patch) { draft.due = patch.due_date || null; paintDue(); refocus(); },
|
||||
onChange: function (patch) { draft.due = patch.due_date || null; draft.daily = !!patch.repeat_daily; paintDue(); refocus(); },
|
||||
});
|
||||
});
|
||||
// 바깥을 누르면 Enter 와 같다 — 이름이 있으면 만들고 줄을 닫는다(아사나). 이름이 없으면
|
||||
@@ -6089,7 +6096,7 @@
|
||||
if (subDrafts[t.id] !== draft) return;
|
||||
if (inp.isConnected) draft.title = inp.value;
|
||||
if (draft.title.trim()) createFromDraft(false);
|
||||
else if (!draft.due && !draft.assignee && !draft.followers.length) closeDraft();
|
||||
else if (!draft.due && !draft.daily && !draft.assignee && !draft.followers.length) closeDraft();
|
||||
}, 0);
|
||||
}
|
||||
if (subOutsideDown[t.id]) document.removeEventListener("pointerdown", subOutsideDown[t.id], true);
|
||||
@@ -6138,6 +6145,7 @@
|
||||
assignee_email: draft.assignee || "",
|
||||
assignee_name: draft.assignee ? idOf(draft.assignee) : "",
|
||||
followers: draft.followers,
|
||||
...(draft.daily ? { repeat_daily: true } : {}),
|
||||
});
|
||||
const subs = subsCache[t.id] || (subsCache[t.id] = []);
|
||||
// 새 줄 협업자 아이콘 — 서버 자동 협업자와 같은 규칙(만든 사람·담당자·고른 협업자)
|
||||
|
||||
Reference in New Issue
Block a user