diff --git a/frontend/app/(main)/COMPANY_10/production/work-instruction/page.tsx b/frontend/app/(main)/COMPANY_10/production/work-instruction/page.tsx index 08ace7ec..ef7c2a39 100644 --- a/frontend/app/(main)/COMPANY_10/production/work-instruction/page.tsx +++ b/frontend/app/(main)/COMPANY_10/production/work-instruction/page.tsx @@ -349,7 +349,14 @@ export default function WorkInstructionPage() { const t = Number(o.total_qty || 0), c = Number(o.completed_qty || 0); return t === 0 ? 0 : Math.min(100, Math.round((c / t) * 100)); }; - const getProgressLabel = (o: any) => { const p = getProgress(o); if (o.progress_status) return o.progress_status; if (p >= 100) return "완료"; if (p > 0) return "진행중"; return "대기"; }; + const getProgressLabel = (o: any) => { + const p = getProgress(o); + if (o.progress_status) { + const map: Record = { completed: "완료", in_progress: "진행중", pending: "대기" }; + return map[o.progress_status] || o.progress_status; + } + if (p >= 100) return "완료"; if (p > 0) return "진행중"; return "대기"; + }; const totalRegPages = Math.max(1, Math.ceil(regTotalCount / regPageSize)); const getDisplayNo = (o: any) => { diff --git a/frontend/app/(main)/COMPANY_16/production/work-instruction/page.tsx b/frontend/app/(main)/COMPANY_16/production/work-instruction/page.tsx index 08ace7ec..ef7c2a39 100644 --- a/frontend/app/(main)/COMPANY_16/production/work-instruction/page.tsx +++ b/frontend/app/(main)/COMPANY_16/production/work-instruction/page.tsx @@ -349,7 +349,14 @@ export default function WorkInstructionPage() { const t = Number(o.total_qty || 0), c = Number(o.completed_qty || 0); return t === 0 ? 0 : Math.min(100, Math.round((c / t) * 100)); }; - const getProgressLabel = (o: any) => { const p = getProgress(o); if (o.progress_status) return o.progress_status; if (p >= 100) return "완료"; if (p > 0) return "진행중"; return "대기"; }; + const getProgressLabel = (o: any) => { + const p = getProgress(o); + if (o.progress_status) { + const map: Record = { completed: "완료", in_progress: "진행중", pending: "대기" }; + return map[o.progress_status] || o.progress_status; + } + if (p >= 100) return "완료"; if (p > 0) return "진행중"; return "대기"; + }; const totalRegPages = Math.max(1, Math.ceil(regTotalCount / regPageSize)); const getDisplayNo = (o: any) => { diff --git a/frontend/app/(main)/COMPANY_29/production/work-instruction/page.tsx b/frontend/app/(main)/COMPANY_29/production/work-instruction/page.tsx index 08ace7ec..ef7c2a39 100644 --- a/frontend/app/(main)/COMPANY_29/production/work-instruction/page.tsx +++ b/frontend/app/(main)/COMPANY_29/production/work-instruction/page.tsx @@ -349,7 +349,14 @@ export default function WorkInstructionPage() { const t = Number(o.total_qty || 0), c = Number(o.completed_qty || 0); return t === 0 ? 0 : Math.min(100, Math.round((c / t) * 100)); }; - const getProgressLabel = (o: any) => { const p = getProgress(o); if (o.progress_status) return o.progress_status; if (p >= 100) return "완료"; if (p > 0) return "진행중"; return "대기"; }; + const getProgressLabel = (o: any) => { + const p = getProgress(o); + if (o.progress_status) { + const map: Record = { completed: "완료", in_progress: "진행중", pending: "대기" }; + return map[o.progress_status] || o.progress_status; + } + if (p >= 100) return "완료"; if (p > 0) return "진행중"; return "대기"; + }; const totalRegPages = Math.max(1, Math.ceil(regTotalCount / regPageSize)); const getDisplayNo = (o: any) => { diff --git a/frontend/app/(main)/COMPANY_30/production/work-instruction/page.tsx b/frontend/app/(main)/COMPANY_30/production/work-instruction/page.tsx index 08ace7ec..ef7c2a39 100644 --- a/frontend/app/(main)/COMPANY_30/production/work-instruction/page.tsx +++ b/frontend/app/(main)/COMPANY_30/production/work-instruction/page.tsx @@ -349,7 +349,14 @@ export default function WorkInstructionPage() { const t = Number(o.total_qty || 0), c = Number(o.completed_qty || 0); return t === 0 ? 0 : Math.min(100, Math.round((c / t) * 100)); }; - const getProgressLabel = (o: any) => { const p = getProgress(o); if (o.progress_status) return o.progress_status; if (p >= 100) return "완료"; if (p > 0) return "진행중"; return "대기"; }; + const getProgressLabel = (o: any) => { + const p = getProgress(o); + if (o.progress_status) { + const map: Record = { completed: "완료", in_progress: "진행중", pending: "대기" }; + return map[o.progress_status] || o.progress_status; + } + if (p >= 100) return "완료"; if (p > 0) return "진행중"; return "대기"; + }; const totalRegPages = Math.max(1, Math.ceil(regTotalCount / regPageSize)); const getDisplayNo = (o: any) => { diff --git a/frontend/app/(main)/COMPANY_7/production/work-instruction/page.tsx b/frontend/app/(main)/COMPANY_7/production/work-instruction/page.tsx index 08ace7ec..ef7c2a39 100644 --- a/frontend/app/(main)/COMPANY_7/production/work-instruction/page.tsx +++ b/frontend/app/(main)/COMPANY_7/production/work-instruction/page.tsx @@ -349,7 +349,14 @@ export default function WorkInstructionPage() { const t = Number(o.total_qty || 0), c = Number(o.completed_qty || 0); return t === 0 ? 0 : Math.min(100, Math.round((c / t) * 100)); }; - const getProgressLabel = (o: any) => { const p = getProgress(o); if (o.progress_status) return o.progress_status; if (p >= 100) return "완료"; if (p > 0) return "진행중"; return "대기"; }; + const getProgressLabel = (o: any) => { + const p = getProgress(o); + if (o.progress_status) { + const map: Record = { completed: "완료", in_progress: "진행중", pending: "대기" }; + return map[o.progress_status] || o.progress_status; + } + if (p >= 100) return "완료"; if (p > 0) return "진행중"; return "대기"; + }; const totalRegPages = Math.max(1, Math.ceil(regTotalCount / regPageSize)); const getDisplayNo = (o: any) => { diff --git a/frontend/app/(main)/COMPANY_8/production/work-instruction/page.tsx b/frontend/app/(main)/COMPANY_8/production/work-instruction/page.tsx index 08ace7ec..ef7c2a39 100644 --- a/frontend/app/(main)/COMPANY_8/production/work-instruction/page.tsx +++ b/frontend/app/(main)/COMPANY_8/production/work-instruction/page.tsx @@ -349,7 +349,14 @@ export default function WorkInstructionPage() { const t = Number(o.total_qty || 0), c = Number(o.completed_qty || 0); return t === 0 ? 0 : Math.min(100, Math.round((c / t) * 100)); }; - const getProgressLabel = (o: any) => { const p = getProgress(o); if (o.progress_status) return o.progress_status; if (p >= 100) return "완료"; if (p > 0) return "진행중"; return "대기"; }; + const getProgressLabel = (o: any) => { + const p = getProgress(o); + if (o.progress_status) { + const map: Record = { completed: "완료", in_progress: "진행중", pending: "대기" }; + return map[o.progress_status] || o.progress_status; + } + if (p >= 100) return "완료"; if (p > 0) return "진행중"; return "대기"; + }; const totalRegPages = Math.max(1, Math.ceil(regTotalCount / regPageSize)); const getDisplayNo = (o: any) => { diff --git a/frontend/app/(main)/COMPANY_9/production/work-instruction/page.tsx b/frontend/app/(main)/COMPANY_9/production/work-instruction/page.tsx index 08ace7ec..ef7c2a39 100644 --- a/frontend/app/(main)/COMPANY_9/production/work-instruction/page.tsx +++ b/frontend/app/(main)/COMPANY_9/production/work-instruction/page.tsx @@ -349,7 +349,14 @@ export default function WorkInstructionPage() { const t = Number(o.total_qty || 0), c = Number(o.completed_qty || 0); return t === 0 ? 0 : Math.min(100, Math.round((c / t) * 100)); }; - const getProgressLabel = (o: any) => { const p = getProgress(o); if (o.progress_status) return o.progress_status; if (p >= 100) return "완료"; if (p > 0) return "진행중"; return "대기"; }; + const getProgressLabel = (o: any) => { + const p = getProgress(o); + if (o.progress_status) { + const map: Record = { completed: "완료", in_progress: "진행중", pending: "대기" }; + return map[o.progress_status] || o.progress_status; + } + if (p >= 100) return "완료"; if (p > 0) return "진행중"; return "대기"; + }; const totalRegPages = Math.max(1, Math.ceil(regTotalCount / regPageSize)); const getDisplayNo = (o: any) => {