feat: Implement BOM Excel upload and download functionality
- Added endpoints for uploading BOM data from Excel and downloading BOM data in Excel format. - Developed the `createBomFromExcel` function to handle Excel uploads, including validation and error handling. - Implemented the `downloadBomExcelData` function to retrieve BOM data for Excel downloads. - Created a new `BomExcelUploadModal` component for the frontend to facilitate Excel file uploads. - Updated BOM routes to include new Excel upload and download routes, enhancing BOM management capabilities.
This commit is contained in:
@@ -1242,8 +1242,8 @@ export const EditModal: React.FC<EditModalProps> = ({ className }) => {
|
||||
}
|
||||
} else {
|
||||
// UPDATE 모드 - PUT (전체 업데이트)
|
||||
// originalData 비교 없이 formData 전체를 보냄
|
||||
const recordId = formData.id;
|
||||
// VIEW에서 온 데이터의 경우 master_id를 우선 사용 (마스터-디테일 구조)
|
||||
const recordId = formData.master_id || formData.id;
|
||||
|
||||
if (!recordId) {
|
||||
console.error("[EditModal] UPDATE 실패: formData에 id가 없습니다.", {
|
||||
@@ -1296,15 +1296,6 @@ export const EditModal: React.FC<EditModalProps> = ({ className }) => {
|
||||
if (response.success) {
|
||||
toast.success("데이터가 수정되었습니다.");
|
||||
|
||||
// 부모 컴포넌트의 onSave 콜백 실행 (테이블 새로고침)
|
||||
if (modalState.onSave) {
|
||||
try {
|
||||
modalState.onSave();
|
||||
} catch (callbackError) {
|
||||
console.error("onSave 콜백 에러:", callbackError);
|
||||
}
|
||||
}
|
||||
|
||||
// 🆕 저장 후 제어로직 실행 (버튼의 After 타이밍 제어)
|
||||
// 우선순위: 모달 내부 저장 버튼 설정(saveButtonConfig) > 수정 버튼에서 전달받은 설정(buttonConfig)
|
||||
try {
|
||||
@@ -1375,6 +1366,10 @@ export const EditModal: React.FC<EditModalProps> = ({ className }) => {
|
||||
console.error("❌ [EditModal] repeaterSave 오류:", repeaterError);
|
||||
}
|
||||
|
||||
// 리피터 저장 완료 후 메인 테이블 새로고침
|
||||
if (modalState.onSave) {
|
||||
try { modalState.onSave(); } catch {}
|
||||
}
|
||||
handleClose();
|
||||
} else {
|
||||
throw new Error(response.message || "수정에 실패했습니다.");
|
||||
|
||||
Reference in New Issue
Block a user