diff --git a/frontend/lib/utils/buttonActions.ts b/frontend/lib/utils/buttonActions.ts index 5587fc1a..681e9a3f 100644 --- a/frontend/lib/utils/buttonActions.ts +++ b/frontend/lib/utils/buttonActions.ts @@ -995,6 +995,40 @@ export class ButtonActionExecutor { console.log("๐Ÿ“‹ [handleSave] ๋ฒ”์šฉ ํผ ๋ชจ๋‹ฌ ๊ณตํ†ต ํ•„๋“œ:", commonFields); } + // ๐Ÿ†• ๋ฃจํŠธ ๋ ˆ๋ฒจ formData์—์„œ RepeaterFieldGroup์— ์ „๋‹ฌํ•  ๊ณตํ†ต ํ•„๋“œ ์ถ”์ถœ + // ์ฃผ๋ฌธ๋ฒˆํ˜ธ, ๋ฐœ์ฃผ๋ฒˆํ˜ธ ๋“ฑ ๋งˆ์Šคํ„ฐ-๋””ํ…Œ์ผ ๊ด€๊ณ„์—์„œ ํ•„์š”ํ•œ ํ•„๋“œ๋งŒ ๋ช…์‹œ์ ์œผ๋กœ ์ง€์ • + const masterDetailFields = [ + // ๋ฒˆํ˜ธ ํ•„๋“œ + "order_no", // ๋ฐœ์ฃผ๋ฒˆํ˜ธ + "sales_order_no", // ์ˆ˜์ฃผ๋ฒˆํ˜ธ + "shipment_no", // ์ถœํ•˜๋ฒˆํ˜ธ + "receipt_no", // ์ž…๊ณ ๋ฒˆํ˜ธ + "work_order_no", // ์ž‘์—…์ง€์‹œ๋ฒˆํ˜ธ + // ๊ฑฐ๋ž˜์ฒ˜ ํ•„๋“œ + "supplier_code", // ๊ณต๊ธ‰์ฒ˜ ์ฝ”๋“œ + "supplier_name", // ๊ณต๊ธ‰์ฒ˜ ์ด๋ฆ„ + "customer_code", // ๊ณ ๊ฐ ์ฝ”๋“œ + "customer_name", // ๊ณ ๊ฐ ์ด๋ฆ„ + // ๋‚ ์งœ ํ•„๋“œ + "order_date", // ๋ฐœ์ฃผ์ผ + "sales_date", // ์ˆ˜์ฃผ์ผ + "shipment_date", // ์ถœํ•˜์ผ + "receipt_date", // ์ž…๊ณ ์ผ + "due_date", // ๋‚ฉ๊ธฐ์ผ + // ๋‹ด๋‹น์ž/๋ฉ”๋ชจ ํ•„๋“œ + "manager", // ๋‹ด๋‹น์ž + "memo", // ๋ฉ”๋ชจ + "remark", // ๋น„๊ณ  + ]; + + for (const fieldName of masterDetailFields) { + const value = context.formData[fieldName]; + if (value !== undefined && value !== "" && value !== null && !(fieldName in commonFields)) { + commonFields[fieldName] = value; + } + } + console.log("๐Ÿ“‹ [handleSave] ์ตœ์ข… ๊ณตํ†ต ํ•„๋“œ (๋งˆ์Šคํ„ฐ-๋””ํ…Œ์ผ ํ•„๋“œ ํฌํ•จ):", commonFields); + for (const item of parsedData) { // ๋ฉ”ํƒ€ ํ•„๋“œ ์ œ๊ฑฐ (eslint ๊ฒฝ๊ณ  ๋ฌด์‹œ - ์˜๋„์ ์œผ๋กœ ๋ถ„๋ฆฌ)