fix: TypeScript 타입 오류 수정 및 설정 페이지 추가

- BOMItem Omit 타입 시그니처 통일 (useTemplateManagement, SectionsTab, ItemMasterContext)
- HeadersInit → Record<string, string> 타입 변경
- Zustand useShallow 마이그레이션 (zustand/react/shallow)
- DataTable, ListPageTemplate 제네릭 타입 제약 추가
- 설정 관리 페이지 추가 (직급, 직책, 휴가정책, 근무일정, 권한)
- HR 관리 페이지 추가 (급여, 휴가)
- 단가관리 페이지 리팩토링

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
byeongcheolryu
2025-12-09 18:07:47 +09:00
parent 48dbba0e5f
commit ded0bc2439
98 changed files with 10608 additions and 1204 deletions

View File

@@ -65,6 +65,7 @@ interface PricingFormClientProps {
itemInfo?: ItemInfo;
initialData?: PricingData;
onSave?: (data: PricingData, isRevision?: boolean, revisionReason?: string) => Promise<void>;
onFinalize?: (id: string) => Promise<void>;
}
export function PricingFormClient({
@@ -72,6 +73,7 @@ export function PricingFormClient({
itemInfo,
initialData,
onSave,
onFinalize,
}: PricingFormClientProps) {
const router = useRouter();
const isEditMode = mode === 'edit';
@@ -264,30 +266,9 @@ export function PricingFormClient({
setIsSaving(true);
try {
const finalizedData: PricingData = {
...initialData,
effectiveDate,
receiveDate: receiveDate || undefined,
author: author || undefined,
purchasePrice: purchasePrice || undefined,
processingCost: processingCost || undefined,
loss: loss || undefined,
roundingRule: roundingRule || undefined,
roundingUnit: roundingUnit || undefined,
marginRate: marginRate || undefined,
salesPrice: salesPrice || undefined,
supplier: supplier || undefined,
note: note || undefined,
isFinal: true,
finalizedDate: new Date().toISOString(),
finalizedBy: '관리자',
status: 'finalized',
updatedAt: new Date().toISOString(),
updatedBy: '관리자',
};
if (onSave) {
await onSave(finalizedData);
if (onFinalize) {
// 서버 액션으로 확정 처리
await onFinalize(initialData.id);
}
toast.success('단가가 최종 확정되었습니다.');
@@ -295,6 +276,7 @@ export function PricingFormClient({
router.push('/sales/pricing-management');
} catch (error) {
toast.error('확정 중 오류가 발생했습니다.');
console.error(error);
} finally {
setIsSaving(false);
}