Enhance Work Instruction and Production Plan Functionality

- Added automatic migration to include a new column `batch_use` in the `item_info` table, allowing for batch usage management.
- Implemented logic to prevent deletion of work instructions that are in progress or completed, ensuring data integrity.
- Enhanced the `getBomBaseQtyMap` function to return batch usage status for items, defaulting to 'Y' if not specified.
- Introduced warnings for overdue items and insufficient production time in the production plan management, allowing users to proceed with caution.

(TASK: ERP-node-074, ERP-node-075, ERP-node-076)
This commit is contained in:
kjs
2026-05-19 16:12:44 +09:00
parent 6731ca4183
commit ffd5ffc4c0
14 changed files with 387 additions and 39 deletions

View File

@@ -300,8 +300,12 @@ export default function TimelineScheduler({
laneMap.set(ev.id, 0);
continue;
}
const evStart = parseDate(ev.startDate).getTime();
const evEnd = parseDate(ev.endDate).getTime();
// 잘못된/누락 날짜 가드: NaN이면 lane 계산이 무너져 박스가 겹침.
// start 무효 → 0, end 무효 또는 start 미만 → start 로 보정 (end >= start 보장).
const sRaw = parseDate(ev.startDate).getTime();
const eRaw = parseDate(ev.endDate).getTime();
const evStart = Number.isFinite(sRaw) ? sRaw : 0;
const evEnd = Number.isFinite(eRaw) ? Math.max(eRaw, evStart) : evStart;
let placed = false;
for (let l = 0; l < lanes.length; l++) {
if (evStart > lanes[l].endTime) {
@@ -337,7 +341,8 @@ export default function TimelineScheduler({
// ── 가상 스크롤 (리소스 행) ──
// 대량 리소스(수천~만 단위) 환경에서 보이는 행만 DOM 마운트하여 성능 확보
const barHeight = 24;
const barGap = 2;
// 세로 스택 시 박스 간 간격 — 좁으면 라벨 숫자끼리 붙어 보임. 명확히 분리.
const barGap = 6;
const getRowHeight = useCallback((idx: number) => {
const res = resources[idx];
if (!res) return rowHeight;