fix: [work-order] 기타 탭 제거
- TAB_OTHER 상수 및 관련 로직 삭제 - 보조공정/미배정 작업은 API에서 필터링
This commit is contained in:
@@ -47,7 +47,6 @@ const ITEMS_PER_PAGE = 20;
|
|||||||
|
|
||||||
// 특수 탭 상수
|
// 특수 탭 상수
|
||||||
const TAB_ALL = 'all'; // 전체
|
const TAB_ALL = 'all'; // 전체
|
||||||
const TAB_OTHER = 'other'; // 기타 (공정 미지정)
|
|
||||||
|
|
||||||
// 필터 설정: 공통 프리셋 사용 (상태 + 우선순위)
|
// 필터 설정: 공통 프리셋 사용 (상태 + 우선순위)
|
||||||
const filterConfig = [WORK_STATUS_FILTER, COMMON_PRIORITY_FILTER];
|
const filterConfig = [WORK_STATUS_FILTER, COMMON_PRIORITY_FILTER];
|
||||||
@@ -103,12 +102,9 @@ export function WorkOrderList() {
|
|||||||
const bp = result.data.byProcess;
|
const bp = result.data.byProcess;
|
||||||
const counts: Record<string, number> = {
|
const counts: Record<string, number> = {
|
||||||
[TAB_ALL]: result.data.total,
|
[TAB_ALL]: result.data.total,
|
||||||
[TAB_OTHER]: bp['none'] || 0,
|
|
||||||
};
|
};
|
||||||
for (const [processId, count] of Object.entries(bp)) {
|
for (const [processId, count] of Object.entries(bp)) {
|
||||||
if (processId !== 'none') {
|
counts[processId] = count;
|
||||||
counts[processId] = count;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
setTabCounts(counts);
|
setTabCounts(counts);
|
||||||
}
|
}
|
||||||
@@ -144,7 +140,6 @@ export function WorkOrderList() {
|
|||||||
label: `${p.processName} 공정`,
|
label: `${p.processName} 공정`,
|
||||||
count: tabCounts[String(p.id)],
|
count: tabCounts[String(p.id)],
|
||||||
})),
|
})),
|
||||||
{ value: TAB_OTHER, label: '기타', count: tabCounts[TAB_OTHER] },
|
|
||||||
],
|
],
|
||||||
[processList, tabCounts]
|
[processList, tabCounts]
|
||||||
);
|
);
|
||||||
@@ -215,9 +210,7 @@ export function WorkOrderList() {
|
|||||||
// 'all' → 필터 없음 (전체), 'other' → 'none' (미지정), 그 외 → 공정 ID
|
// 'all' → 필터 없음 (전체), 'other' → 'none' (미지정), 그 외 → 공정 ID
|
||||||
const processId = tabValue === TAB_ALL
|
const processId = tabValue === TAB_ALL
|
||||||
? ('all' as const)
|
? ('all' as const)
|
||||||
: tabValue === TAB_OTHER
|
: Number(tabValue);
|
||||||
? ('none' as const)
|
|
||||||
: Number(tabValue);
|
|
||||||
|
|
||||||
// 필터 값 추출
|
// 필터 값 추출
|
||||||
const statusFilter = params?.filters?.status as string | undefined;
|
const statusFilter = params?.filters?.status as string | undefined;
|
||||||
@@ -244,12 +237,9 @@ export function WorkOrderList() {
|
|||||||
const bp = statsResult.data.byProcess;
|
const bp = statsResult.data.byProcess;
|
||||||
const counts: Record<string, number> = {
|
const counts: Record<string, number> = {
|
||||||
[TAB_ALL]: statsResult.data.total,
|
[TAB_ALL]: statsResult.data.total,
|
||||||
[TAB_OTHER]: bp['none'] || 0,
|
|
||||||
};
|
};
|
||||||
for (const [processId, count] of Object.entries(bp)) {
|
for (const [processId, count] of Object.entries(bp)) {
|
||||||
if (processId !== 'none') {
|
counts[processId] = count;
|
||||||
counts[processId] = count;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
setTabCounts(counts);
|
setTabCounts(counts);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user