fix: [QA] 견적 엑셀 업로드 준비중 처리 + 단가 품목코드 표시 수정

- LocationListPanel: 양식다운로드/업로드 버튼 → "준비중입니다." toast
- pricing/actions: item 데이터 우선 사용으로 품목코드·품목명 정상 표시

fix: [production] 작업자 화면 빈 화면 버그 수정

- 공정 목록 API 실패 시 activeTab이 ''로 남아 탭 콘텐츠 미렌더링되는 문제 수정
- processTabs가 비어있을 때 'screen'으로 폴백 설정
This commit is contained in:
2026-03-19 11:39:22 +09:00
parent aa4e45df24
commit 05074a641d
2 changed files with 10 additions and 6 deletions

View File

@@ -88,14 +88,15 @@ interface PriceApiData {
* API 데이터 → 프론트엔드 타입 변환
*/
function transformApiToFrontend(apiData: PriceApiData): PricingData {
const item = (apiData as unknown as Record<string, unknown>).item as Record<string, unknown> | undefined;
const product = apiData.product;
const material = apiData.material;
const itemCode = product?.product_code || material?.item_code || `ITEM-${apiData.item_id}`;
const itemName = product?.product_name || material?.item_name || '품목명 없음';
const itemCode = (item?.code as string) || product?.product_code || material?.item_code || `ITEM-${apiData.item_id}`;
const itemName = (item?.name as string) || product?.product_name || material?.item_name || '품목명 없음';
const specification = product?.specification || material?.specification || undefined;
const unit = product?.unit || material?.unit || 'EA';
const itemType = product?.product_type || material?.product_type || 'PT';
const itemType = (item?.item_category as string) || product?.product_type || material?.product_type || 'PT';
// 리비전 변환
const revisions = apiData.revisions?.map((rev) => ({

View File

@@ -280,12 +280,15 @@ export default function WorkerScreen() {
return processListCache.filter((p) => p.status === '사용중');
}, [processListCache]);
// 공정 목록 로드 후 첫 번째 공정을 기본 선택
// 공정 목록 로드 후 첫 번째 공정을 기본 선택 (폴백: 'screen')
useEffect(() => {
if (processTabs.length > 0 && !activeTab) {
if (activeTab) return;
if (processTabs.length > 0) {
setActiveTab(processTabs[0].id);
} else if (!isLoading) {
setActiveTab('screen');
}
}, [processTabs, activeTab]);
}, [processTabs, activeTab, isLoading]);
// 선택된 공정의 ProcessTab 키 (mock 데이터 및 기존 로직 호환용)
const activeProcessTabKey: ProcessTab = useMemo(() => {