Files
sam-react-prod/src/components/production/WorkOrders/workOrderConfig.ts

65 lines
1.8 KiB
TypeScript
Raw Normal View History

'use client';
import { FileText } from 'lucide-react';
import type { DetailConfig } from '@/components/templates/IntegratedDetailTemplate/types';
/**
* Config
*
* 참고: config는 /
* WorkOrderDetail의 renderView에서
* ( , , , )
*
* :
* - view ( /edit )
* -
* - ( , , )
*/
export const workOrderConfig: DetailConfig = {
title: '작업지시 상세',
description: '작업지시 정보를 조회하고 관리합니다',
icon: FileText,
basePath: '/production/work-orders',
fields: [], // renderView 사용으로 필드 정의 불필요
gridColumns: 2,
actions: {
showBack: true,
showDelete: false, // 작업지시는 삭제 기능 없음
showEdit: true,
backLabel: '목록',
editLabel: '수정',
},
};
/**
* Config
* IntegratedDetailTemplate (2025-01-20)
*/
export const workOrderCreateConfig: DetailConfig = {
title: '작업지시 등록',
description: '새로운 작업지시를 등록합니다',
icon: FileText,
basePath: '/production/work-orders',
fields: [],
actions: {
showBack: true,
showEdit: false,
showDelete: false,
showSave: true,
submitLabel: '등록',
},
};
/**
* Config
*/
export const workOrderEditConfig: DetailConfig = {
...workOrderCreateConfig,
title: '작업지시 수정',
description: '작업지시 정보를 수정합니다',
actions: {
...workOrderCreateConfig.actions,
submitLabel: '저장',
},
};