Merge branch 'feat/fill-toggle-file-drop'

This commit is contained in:
2026-10-19 14:41:27 +09:00
21 changed files with 188 additions and 38 deletions
+1
View File
@@ -10,6 +10,7 @@
- 본사 → 공장 제품 제작 발주(발주서 `PO-YYMMDD-NN`). 제품 = `itemcode_db.single_items` 단품만, 검색 `GET /inout/api/items`·저장 때 서버 재확인.
- 물류 입고를 여러 번 나눠 입력, 품목별 발주·입고·미입고.
- 미입고 현황(제품별 합계·발주별·지연).
- [남은 수량 모두 채우기]를 한 번 더 누르면(= [채운 수량 되돌리기]) 채우기 전 값으로(2026-10-19, `inout.js`).
- 초과 입고는 확인 화면 후 허용(트랜잭션 안에서 발주서 잠그고 판단, `confirm_over`).
- **전체 입고 완료(모든 품목 입고 ≥ 발주, 상태 done·over)면 더 입고 못 함**(2026-10-19) — 화면은 입고 칸·[입고 저장]·사진·[남은 수량 채우기]를 흐리게 disabled, 서버 `_add_receipt` 도 잠근 뒤 거절. 입고 기록을 지우면 다시 열림.
- 잔량 종결·취소(취소는 입고 없을 때만).
+2 -2
View File
@@ -1,6 +1,6 @@
{% extends "erp_base.html" %}
{% from "inout/_macros.html" import order_badge, progress, due, n, ymd %}
{% block head_extra %}<link rel="stylesheet" href="/static/inout.css?v=20261019e" />{% endblock %}
{% block head_extra %}<link rel="stylesheet" href="/static/inout.css?v=20261019f" />{% endblock %}
{% block content %}
<section class="io">
@@ -68,4 +68,4 @@
</div>
</section>
{% endblock %}
{% block scripts %}<script src="/static/inout.js?v=20261019a" defer></script>{% endblock %}
{% block scripts %}<script src="/static/inout.js?v=20261019b" defer></script>{% endblock %}
@@ -20,7 +20,7 @@
</footer>
</dialog>
{%- endmacro -%}
{% block head_extra %}<link rel="stylesheet" href="/static/inout.css?v=20261019e" />{% endblock %}
{% block head_extra %}<link rel="stylesheet" href="/static/inout.css?v=20261019f" />{% endblock %}
{% block content %}
{% set active = order.status in ('open', 'partial') %}
@@ -253,4 +253,4 @@
{% endif %}
</section>
{% endblock %}
{% block scripts %}<script src="/static/inout.js?v=20261019a" defer></script>{% endblock %}
{% block scripts %}<script src="/static/inout.js?v=20261019b" defer></script>{% endblock %}
@@ -1,5 +1,5 @@
{% extends "erp_base.html" %}
{% block head_extra %}<link rel="stylesheet" href="/static/inout.css?v=20261019e" />{% endblock %}
{% block head_extra %}<link rel="stylesheet" href="/static/inout.css?v=20261019f" />{% endblock %}
{% block content %}
<section class="io">
@@ -80,4 +80,4 @@
</form>
</section>
{% endblock %}
{% block scripts %}<script src="/static/inout.js?v=20261019a" defer></script>{% endblock %}
{% block scripts %}<script src="/static/inout.js?v=20261019b" defer></script>{% endblock %}
@@ -1,6 +1,6 @@
{% extends "erp_base.html" %}
{% from "inout/_macros.html" import due, n, ymd %}
{% block head_extra %}<link rel="stylesheet" href="/static/inout.css?v=20261019e" />{% endblock %}
{% block head_extra %}<link rel="stylesheet" href="/static/inout.css?v=20261019f" />{% endblock %}
{% block content %}
<section class="io">
@@ -88,4 +88,4 @@
{% endif %}
</section>
{% endblock %}
{% block scripts %}<script src="/static/inout.js?v=20261019a" defer></script>{% endblock %}
{% block scripts %}<script src="/static/inout.js?v=20261019b" defer></script>{% endblock %}
@@ -2,7 +2,7 @@
{% block head_extra %}
{# 프로젝트 화면 부품(설명 편집기·날짜 팝업·멤버 고르기)을 그대로 쓴다 — project.js 는 PJ_LIB_ONLY 로 부품만 #}
<link rel="stylesheet" href="/static/project.css?v=20261019c" />
<link rel="stylesheet" href="/static/project.css?v=20261019d" />
<link rel="stylesheet" href="/static/vendor/material-symbols/material-symbols.css" />
<script>window.PJ_LIB_ONLY = true; window.PJ_HOLIDAYS = {{ (pj_kr_holidays or {}) | tojson }};</script>
{% endblock %}
@@ -64,7 +64,7 @@
</section>
</div>
<script>window.NTC_PEOPLE = {{ people | tojson }};</script>
<script src="/static/project.js?v=20261019c" defer></script>
<script src="/static/project.js?v=20261019d" defer></script>
<script src="/static/erp-notice-admin.js?v=20261012b" defer></script>
{% endif %}
{% endblock %}
+1
View File
@@ -56,6 +56,7 @@
## 업무 창 / 댓글 / 협업자
- 작업 창은 **저장 버튼 없이 실시간 저장**(칸별 PUT, `saveField`/`saveChain`, 새 작업은 제목이 생기는 순간 생성).
- **파일 끌어 놓기 = 첨부**(2026-10-19): 업무 창 아무 곳(`.pj-task-modal-card`, 설명칸 포함)·보드 메인 업무 카드에 파일을 놓으면 `POST /project/api/tasks/{id}/attachments`(여러 개 차례로, `uploadTaskFiles`). 종류 "Files" 로 카드·세부 업무 끌기와 구분, 받는 곳 밖에 놓친 파일은 document 가 막아 화면이 파일로 넘어가지 않음.
- 설명란 서식 도구에 글자 색·크기(서버는 span style 의 color·font-size 만 허용, `desc_inline_style`). 주소 붙여넣기 시 자동 링크. 설명란 이미지 더블클릭 = 별도 창 이미지 보기(확대·축소·끌어 이동).
- 설명란·댓글에서 @로 멤버 태그(`task_mentions`, 마이그레이션 006) → 수신함에 그 작업이 쌓임. 댓글 `@아이디` 는 아이콘+이름 칩.
- 댓글·답글 입력칸은 Enter 등록·Shift+Enter 줄바꿈(textarea).
@@ -1,7 +1,7 @@
{% extends "project/_meeting_content_base.html" if meeting_embedded else "erp_base.html" %}
{% block head_extra %}
<link rel="stylesheet" href="/static/project.css?v=20261019c" />
<link rel="stylesheet" href="/static/project.css?v=20261019d" />
<link rel="stylesheet" href="/static/vendor/material-symbols/material-symbols.css" />
{% endblock %}
@@ -298,5 +298,5 @@
<script src="/static/project-goal-text.js?v=20261003d" defer></script>
<script src="/static/project-meeting-cells.js?v=20261012a" defer></script>
<script src="/static/project.js?v=20261019c" defer></script>
<script src="/static/project.js?v=20261019d" defer></script>
{% endblock %}
@@ -1,7 +1,7 @@
{% extends "erp_base.html" %}
{% block head_extra %}
<link rel="stylesheet" href="/static/project.css?v=20261019c" />
<link rel="stylesheet" href="/static/project.css?v=20261019d" />
<link rel="stylesheet" href="/static/vendor/material-symbols/material-symbols.css" />
{% endblock %}
@@ -207,5 +207,5 @@
{% include "project/_member_tasks_modal.html" %}
<script src="/static/project-goal-text.js?v=20261003d" defer></script>
<script src="/static/project.js?v=20261019c" defer></script>
<script src="/static/project.js?v=20261019d" defer></script>
{% endblock %}
@@ -1,7 +1,7 @@
{% extends "erp_base.html" %}
{% block head_extra %}
<link rel="stylesheet" href="/static/project.css?v=20261019c" />
<link rel="stylesheet" href="/static/project.css?v=20261019d" />
<link rel="stylesheet" href="/static/project-help.css?v=20261003a" />
<link rel="stylesheet" href="/static/vendor/material-symbols/material-symbols.css" />
{% endblock %}
@@ -278,6 +278,7 @@
<li><b>열기</b> — 카드를 누르면 오른쪽에 업무 편집 창이 열립니다. (<a href="#task">8장</a>)</li>
<li><b>완료 체크</b> — 카드 제목 왼쪽의 원형 체크 버튼을 누르면 완료됩니다. 완료된 업무는 <b>녹색 원 안 흰 체크</b>와 흐린 회색 제목으로 표시되며 취소선은 없습니다. 다시 누르면 완료를 취소합니다. 읽기 전용 업무는 상태만 표시합니다.</li>
<li><b>담당자·마감일 바로 바꾸기</b> — 카드의 사람 아이콘이나 날짜를 누르면 그 자리에서 바꿉니다. 비어 있으면 카드에 마우스를 올렸을 때 점선 원 아이콘이 나타납니다.</li>
<li><b>파일 첨부</b> — 컴퓨터의 파일을 카드 위로 끌어 오면 카드에 점선과 <span class="pjh-ui">놓으면 이 업무에 첨부</span>가 보이고, 놓으면 그 업무의 첨부 파일로 올라갑니다(여러 개 가능).</li>
<li><b>옮기기</b> — 카드를 끌어 다른 섹션에 놓으면 섹션이 바뀌고, 같은 섹션 안에서 위아래로 놓으면 순서가 바뀝니다.
끄는 동안 카드는 살짝 기울어진 모양으로 마우스를 따라오고, 카드 사이를 지나는 순간 <b>점선 자리</b>가 그 사이로 옮겨 가며 다른 카드가 미끄러지듯 비켜납니다 — 놓으면 그 자리에 그대로 들어갑니다(다른 섹션도 같음). 섹션 밖에 놓으면 원래 자리로 돌아갑니다.</li>
<li><b>우클릭 메뉴</b> — <span class="pjh-ui">열기 · 업무 링크 복사 · 완료로 표시 · 삭제</span></li>
@@ -355,6 +356,7 @@
</ul>
<h3>첨부 파일</h3>
<p><span class="pjh-ui">파일 추가</span>로 파일을 올립니다(한 파일 최대 20MB). 파일 이름 옆에 이미지·엑셀·텍스트·PPT·문서·PDF 형식별 아이콘이 표시됩니다. 파일 이름을 누르면 내려받고, <span class="pjh-ui">×</span>로 지웁니다.</p>
<p><b>끌어 놓기</b> — 컴퓨터의 파일을 업무 창 <b>아무 곳에나</b> 끌어 오면 창 전체에 점선 안내가 뜨고, 놓으면 첨부 파일로 올라갑니다(여러 개 한꺼번에, 설명칸에 놓아도 첨부). 아직 제목을 쓰지 않은 새 업무·읽기 전용 업무에는 첨부되지 않습니다. 보드의 메인 업무 카드에 파일을 놓아도 그 업무에 첨부됩니다.</p>
<h3>프로젝트 (다른 프로젝트에 추가)</h3>
<p>업무 하나를 <b>여러 프로젝트의 보드에 동시에</b> 보이게 합니다. 예) 신상품 프로젝트의 업무를 디자인 프로젝트 보드에도 올리기. 협업자 아래의 프로젝트 줄에 연결 목록·프로젝트 선택·섹션 선택·추가 버튼이 한 줄로 표시됩니다. 창이 좁으면 이 줄을 좌우로 스크롤할 수 있습니다.</p>
<ol class="pjh-steps">
@@ -1,7 +1,7 @@
{% extends "erp_base.html" %}
{% block head_extra %}
<link rel="stylesheet" href="/static/project.css?v=20261019c" />
<link rel="stylesheet" href="/static/project.css?v=20261019d" />
<link rel="stylesheet" href="/static/vendor/material-symbols/material-symbols.css" />
{% endblock %}
@@ -106,5 +106,5 @@
{% include "project/_side_modals.html" %}
{% include "project/_member_tasks_modal.html" %}
<script src="/static/project.js?v=20261019c" defer></script>
<script src="/static/project.js?v=20261019d" defer></script>
{% endblock %}
@@ -1,7 +1,7 @@
{% extends "erp_base.html" %}
{% block head_extra %}
<link rel="stylesheet" href="/static/project.css?v=20261019c" />
<link rel="stylesheet" href="/static/project.css?v=20261019d" />
<link rel="stylesheet" href="/static/vendor/material-symbols/material-symbols.css" />
{% endblock %}
@@ -100,5 +100,5 @@
"today": {{ today | tojson }}
}
</script>
<script src="/static/project.js?v=20261019c" defer></script>
<script src="/static/project.js?v=20261019d" defer></script>
{% endblock %}
@@ -1,7 +1,7 @@
{% extends "erp_base.html" %}
{% block head_extra %}
<link rel="stylesheet" href="/static/project.css?v=20261019c" />
<link rel="stylesheet" href="/static/project.css?v=20261019d" />
<link rel="stylesheet" href="/static/vendor/material-symbols/material-symbols.css" />
{% endblock %}
@@ -108,5 +108,5 @@
});
})();
</script>
<script src="/static/project.js?v=20261019c" defer></script>
<script src="/static/project.js?v=20261019d" defer></script>
{% endblock %}
@@ -1,7 +1,7 @@
{% extends "erp_base.html" %}
{% block head_extra %}
<link rel="stylesheet" href="/static/project.css?v=20261019c" />
<link rel="stylesheet" href="/static/project.css?v=20261019d" />
<!-- 구글 머티리얼 심볼(담당자 아이콘 등) — self-host -->
<link rel="stylesheet" href="/static/vendor/material-symbols/material-symbols.css" />
<!-- 타임라인 vis-timeline — self-host -->
@@ -379,7 +379,7 @@
<div class="pj-extra-head">
<span class="material-symbols-outlined pj-gicon pj-gicon-sm">attach_file</span> 첨부 파일
<label class="pj-upload-btn">
파일 추가<input type="file" id="pj-attach-input" hidden />
파일 추가<input type="file" id="pj-attach-input" multiple hidden />
</label>
</div>
<ul class="pj-attach-list" id="pj-attach-list"></ul>
@@ -472,5 +472,5 @@
</script>
<script src="/static/vendor/vis-timeline/vis-timeline-graph2d.min.js"></script>
<script src="/static/project.js?v=20261019c" defer></script>
<script src="/static/project.js?v=20261019d" defer></script>
{% endblock %}
@@ -1,7 +1,7 @@
{% extends "erp_base.html" %}
{% block head_extra %}
<link rel="stylesheet" href="/static/project.css?v=20261019c" />
<link rel="stylesheet" href="/static/project.css?v=20261019d" />
<link rel="stylesheet" href="/static/vendor/material-symbols/material-symbols.css" />
{% endblock %}
@@ -70,5 +70,5 @@
{% include "project/_side_modals.html" %}
{% include "project/_member_tasks_modal.html" %}
<script src="/static/project.js?v=20261019c" defer></script>
<script src="/static/project.js?v=20261019d" defer></script>
{% endblock %}
+2
View File
@@ -317,3 +317,5 @@
.io-ordercc-form { margin: 0 0 14px; max-width: 640px; }
.io-ordercc-row { display: flex; gap: 8px; align-items: center; }
.io-ordercc-row .io-in { flex: 1 1 auto; }
/* [남은 수량 모두 채우기] 를 누른 뒤 = 되돌리기 모드 */
.io-receipt-bar #io-fill-remaining.is-filled { border-color: #1e7a34; color: #1e7a34; background: #f3fbf5; }
+25 -4
View File
@@ -242,11 +242,32 @@
if (total) total.textContent = t ? "(" + fmt(t) + "개)" : "";
};
recvForm.addEventListener("input", paintTotal);
// [남은 수량 모두 채우기] — 한 번 더 누르면 채우기 전 값으로 되돌린다(2026-10-19). 채운 뒤 손으로 고친 칸도 되돌림.
const fill = document.getElementById("io-fill-remaining");
if (fill) fill.addEventListener("click", function () {
inputs.forEach(function (i) { if (!i.value.trim() && num(i.dataset.remaining)) i.value = i.dataset.remaining; });
paintTotal();
});
if (fill) {
const fillLabel = fill.textContent;
let before = null; // 채우기 직전 칸 값들 — 있으면 다음 클릭은 되돌리기
const setMode = function (filled) {
before = filled ? before : null;
fill.textContent = filled ? "채운 수량 되돌리기" : fillLabel;
fill.setAttribute("aria-pressed", filled ? "true" : "false");
fill.classList.toggle("is-filled", filled);
};
fill.addEventListener("click", function () {
if (before) {
inputs.forEach(function (i, k) { i.value = before[k]; });
setMode(false);
} else {
const snap = inputs.map(function (i) { return i.value; });
let changed = false;
inputs.forEach(function (i) {
if (!i.value.trim() && num(i.dataset.remaining)) { i.value = i.dataset.remaining; changed = true; }
});
if (changed) { before = snap; setMode(true); }
}
paintTotal();
});
}
paintTotal();
}
+17
View File
@@ -466,6 +466,23 @@ html.pj-side-resizing, html.pj-side-resizing * { cursor: col-resize !important;
.pj-card-sub.pj-sub-drop-before { box-shadow: inset 0 2px var(--pj-accent); }
.pj-card-sub.pj-sub-drop-after { box-shadow: inset 0 -2px var(--pj-accent); }
.pj-card.is-sub-drop { outline: 2px solid var(--pj-accent); outline-offset: -2px; background: var(--pj-accent-tint); }
/* 파일을 카드에 끌어 놓기 = 이 업무에 첨부(2026-10-19) — 점선 + "놓으면 첨부" 안내, 올리는 동안 흐리게 */
.pj-card.is-file-drop { position: relative; outline: 2px dashed var(--pj-accent); outline-offset: -2px; background: var(--pj-accent-tint); }
.pj-card.is-file-drop::after {
content: "놓으면 이 업무에 첨부"; position: absolute; right: 8px; bottom: 6px; padding: 2px 8px; border-radius: 999px;
background: var(--pj-accent); color: #fff; font-size: 11px; font-weight: 700; pointer-events: none;
}
.pj-card.is-file-uploading { opacity: .6; animation: pj-file-up 1s ease-in-out infinite alternate; }
@keyframes pj-file-up { from { opacity: .45; } to { opacity: .8; } }
/* 업무 창 아무 곳에 파일 끌어 놓기 — 창 전체 점선 안내(읽기 전용·저장 전 새 업무는 회색 안내) */
.pj-task-modal-card.is-file-over::after {
content: "여기에 놓으면 첨부 파일로 올라갑니다"; position: absolute; inset: 8px; z-index: 60; pointer-events: none;
display: flex; align-items: center; justify-content: center; border: 3px dashed var(--pj-accent); border-radius: 12px;
background: rgba(241, 238, 255, .88); color: var(--pj-accent); font-size: 16px; font-weight: 700;
}
.pj-task-modal-card.is-file-over.is-file-blocked::after {
content: "이 업무에는 지금 첨부할 수 없습니다(저장 전·읽기 전용)"; border-color: #9ca3af; color: #6b7280; background: rgba(243, 244, 246, .9);
}
.pj-card.is-done .pj-card-title { color: #9aa1a9; }
.pj-card-title { font-size: var(--pj-text-size); font-weight: 400; color: var(--pj-ink); line-height: var(--pj-text-leading); }
.pj-card-meta { display: flex; align-items: center; gap: 6px; margin-top: 10px; }
+102 -8
View File
@@ -6251,6 +6251,36 @@
e.preventDefault();
showContextMenu(e.clientX, e.clientY, taskContextItems(t));
});
// 파일을 카드에 끌어 놓으면 이 업무에 첨부(2026-10-19) — 카드 끌기(text/plain)·세부 업무 끌기와는 종류("Files")로 구분
let fileDepth = 0;
card.addEventListener("dragenter", function (e) {
if (!dragHasFiles(e)) return;
e.preventDefault();
fileDepth++;
card.classList.add("is-file-drop");
});
card.addEventListener("dragover", function (e) {
if (!dragHasFiles(e)) return;
e.preventDefault();
e.stopPropagation();
e.dataTransfer.dropEffect = "copy";
});
card.addEventListener("dragleave", function (e) {
if (!dragHasFiles(e)) return;
if (--fileDepth <= 0) { fileDepth = 0; card.classList.remove("is-file-drop"); }
});
card.addEventListener("drop", async function (e) {
if (!dragHasFiles(e)) return;
e.preventDefault();
e.stopPropagation();
fileDepth = 0;
card.classList.remove("is-file-drop");
card.classList.add("is-file-uploading");
const out = await uploadTaskFiles(t.id, e.dataTransfer.files);
card.classList.remove("is-file-uploading");
reportUpload(out, t.title || "");
if (currentTaskId === t.id && !taskModal.hidden) loadAttachments(t.id); // 열려 있는 업무 창도 바로
});
}
return card;
}
@@ -7768,18 +7798,82 @@
});
} catch (e) { ul.innerHTML = "<li class='pj-empty-sm'>불러오기 실패</li>"; }
}
// 업무에 파일 올리기(여러 개는 하나씩 차례로) — [파일 추가]·업무 창에 끌어 놓기·보드 카드에 끌어 놓기 공용.
// 반환 { ok: 올린 수, errors: ["파일 이름: 이유"] }
async function uploadTaskFiles(taskId, files) {
const out = { ok: 0, errors: [] };
for (const f of Array.prototype.slice.call(files || [])) {
const fd = new FormData();
fd.append("file", f);
try {
const res = await fetch("/project/api/tasks/" + taskId + "/attachments", { method: "POST", body: fd });
if (!res.ok) { let m = res.statusText; try { m = (await res.json()).detail; } catch (_) {} throw new Error(m); }
out.ok++;
} catch (e) { out.errors.push(f.name + ": " + e.message); }
}
return out;
}
function reportUpload(out, where) {
if (out.ok) showToast((where ? "‘" + where + "’에 " : "") + "파일 " + out.ok + "개를 첨부했습니다.");
if (out.errors.length) showToast("업로드 실패 — " + out.errors.join(" / "), "error");
}
// 끌고 있는 것이 "파일"인가(카드 끌기·글자 끌기와 구분)
function dragHasFiles(e) {
return !!(e.dataTransfer && Array.prototype.indexOf.call(e.dataTransfer.types || [], "Files") >= 0);
}
const attachInput = el("pj-attach-input");
if (attachInput) attachInput.addEventListener("change", async function () {
if (!currentTaskId || !attachInput.files.length) return;
const fd = new FormData();
fd.append("file", attachInput.files[0]);
try {
const res = await fetch("/project/api/tasks/" + currentTaskId + "/attachments", { method: "POST", body: fd });
if (!res.ok) { let m = res.statusText; try { m = (await res.json()).detail; } catch (_) {} throw new Error(m); }
attachInput.value = "";
loadAttachments(currentTaskId);
} catch (e) { alert("업로드 실패: " + e.message); }
const out = await uploadTaskFiles(currentTaskId, attachInput.files);
attachInput.value = "";
if (out.errors.length) alert("업로드 실패: " + out.errors.join("\n"));
loadAttachments(currentTaskId);
});
// ── 업무 창 아무 곳에나 파일을 끌어 놓으면 첨부(2026-10-19) — 창 전체에 점선 안내가 뜨고, 놓으면 [첨부 파일]에 올라간다.
// 설명칸에 놓아도 글에 끼워 넣지 않고 첨부로. 아직 저장 전인 새 업무·읽기 전용이면 안내만.
(function wireTaskFileDrop() {
const card = taskModal && taskModal.querySelector(".pj-task-modal-card");
if (!card) return;
let depth = 0;
const clear = function () { depth = 0; card.classList.remove("is-file-over"); };
card.addEventListener("dragenter", function (e) {
if (!dragHasFiles(e)) return;
e.preventDefault();
depth++;
card.classList.add("is-file-over");
card.classList.toggle("is-file-blocked", !currentTaskId || !canManage || taskReadOnly);
});
card.addEventListener("dragover", function (e) {
if (!dragHasFiles(e)) return;
e.preventDefault();
e.stopPropagation();
e.dataTransfer.dropEffect = (!currentTaskId || !canManage || taskReadOnly) ? "none" : "copy";
});
card.addEventListener("dragleave", function (e) {
if (!dragHasFiles(e)) return;
if (--depth <= 0) clear();
});
card.addEventListener("drop", async function (e) {
if (!dragHasFiles(e)) return;
e.preventDefault();
e.stopPropagation();
clear();
if (!canManage || taskReadOnly) { showToast("이 업무에는 파일을 첨부할 수 없습니다(읽기 전용).", "error"); return; }
if (!currentTaskId) { showToast("업무 이름을 먼저 넣어 업무를 만든 뒤 파일을 끌어 놓으세요.", "error"); return; }
const taskId = currentTaskId;
const out = await uploadTaskFiles(taskId, e.dataTransfer.files);
reportUpload(out, "");
if (currentTaskId === taskId) loadAttachments(taskId);
});
window.addEventListener("dragend", clear);
})();
// 파일을 받는 곳(업무 창·보드 카드) 밖에 놓쳐도 브라우저가 그 파일을 열어 화면을 떠나지 않게 — 받는 곳은 위에서 stopPropagation
document.addEventListener("dragover", function (e) {
if (!dragHasFiles(e) || e.defaultPrevented) return;
e.preventDefault();
e.dataTransfer.dropEffect = "none";
});
document.addEventListener("drop", function (e) { if (dragHasFiles(e) && !e.defaultPrevented) e.preventDefault(); });
// ── 댓글 ──
// 댓글 목록(아사나식) — 댓글·완료 이력을 시간순으로, 답글은 원 댓글 아래 들여쓰기.
+2
View File
@@ -31,6 +31,8 @@
- **초과 입고**: 입고 저장 때 발주를 넘는 품목이 있으면 저장하지 않고 확인 화면(409, 넣은 숫자 유지) → [초과 입고로 저장](`confirm_over=1`).
판단은 DB 트랜잭션 안에서 발주서 행을 잠그고(`FOR UPDATE`) 누적 입고를 다시 읽어 한다 — 동시에 입고해도 확인을 건너뛰지 않음.
Enter 키는 숨은 기본 버튼(일반 저장)으로 가게 해 확인 없이 초과가 저장되지 않게 했다.
- **[남은 수량 모두 채우기] 되돌리기**(2026-10-19 요청): 누르면 빈 칸만 남은 수량으로 채우고 버튼이 [채운 수량 되돌리기](초록)로 바뀐다 —
한 번 더 누르면 채우기 직전 값으로 모두 되돌림(채운 뒤 손으로 고친 칸도). 채울 칸이 없으면 그대로.
- **전체 입고 완료 뒤 입고 막기**(2026-10-19 요청): 모든 품목이 입고완료·초과(발주서 done·over)면 품목 머리에 "✓ 전체 입고 완료 — 더 입고할 수 없습니다",
이번 입고 칸·입고일·메모·사진·[남은 수량 모두 채우기]·[입고 저장]·숨은 기본 버튼을 `disabled` + 흐리게(`.io-receipt-bar.is-locked`).
서버도 `_add_receipt` 에서 발주서를 잠근 뒤 모든 품목 누적 입고 ≥ 발주면 ValueError(초과 확인을 해도) — 두 창에서 동시에 넣어도 막힘.
+10
View File
@@ -1404,6 +1404,16 @@ Windows 트레이 프로그램 **DBX 알림**(`desktop/notifier/`, C# .NET Frame
구역 안 가로선은 **항목과 항목 사이 = 검정**(`.is-item-end` — 칸 바로 아래 줄이 항목 칸이 있는 새 항목 줄), **같은 항목 안 하위 줄 사이 = 회색 `#bfc3c9`**(세로선은 검정 그대로, 같은 날 세 번째 요청). 칸은 오른쪽·아래 선만 그리므로 구역 끝에 닿는 칸(마지막 줄 + 거기까지 내려오는 구분·항목·병합 칸)은
`markMeetSecEnds`(초기·`pj-meet-rows`·끌기 중 순서 바뀔 때)가 `.is-sec-end` 를 달아 아래선을 지운다 — 회색선과 굵은 선이 겹치지 않게. 표 머리 바로 아래 첫 구역은 머리 아래선 1px + 1px.
## 6-24. 파일 끌어 놓기로 첨부 — 업무 창·보드 카드 (2026-10-19, 마이그레이션 없음)
- **업무 창**: `.pj-task-modal-card` 에 dragenter/over/leave/drop(종류 `Files` 일 때만). 들어오면 창 전체 점선 안내(`.is-file-over::after`),
저장 전 새 업무(`currentTaskId` 없음)·읽기 전용·관리 권한 없음이면 회색 안내(`.is-file-blocked`, dropEffect none). 놓으면 `uploadTaskFiles(id, files)` —
기존 `POST /project/api/tasks/{id}/attachments`(`file` 하나씩, 여러 개는 차례로) → 토스트 + `loadAttachments`. 설명칸(contenteditable)에 놓아도
글에 끼우지 않고 첨부(창에서 preventDefault). [파일 추가]도 같은 함수(여러 개 선택 가능).
- **보드 카드**(`taskCard`, 관리 권한): 같은 방식으로 그 업무에 첨부 — 카드 점선 + "놓으면 이 업무에 첨부", 올리는 동안 흐리게. 카드 끌기(`text/plain`)·
세부 업무 끌기(`application/x-pj-subtask`)와는 dataTransfer 종류로 구분해 서로 안 섞인다. 그 업무 창이 열려 있으면 목록도 바로 다시 받음.
- 받는 곳 밖에 파일을 놓쳤을 때 브라우저가 파일을 열어 화면을 떠나지 않게 document dragover(dropEffect none)·drop 에서 막는다(받는 곳은 stopPropagation).
## 7. 추후 단계
작업 라벨(태그 분류) · 반복 작업 · 템플릿 · 작업 의존성.