From 714698c20f6e7109c096563ae1275cc4dc1f6568 Mon Sep 17 00:00:00 2001 From: hjjeong Date: Mon, 5 Jan 2026 17:08:47 +0900 Subject: [PATCH] =?UTF-8?q?=EA=B5=AC=EB=A7=A4=EA=B4=80=EB=A6=AC=5F?= =?UTF-8?q?=EB=B0=9C=EC=A3=BC=EA=B4=80=EB=A6=AC=20=EC=A0=80=EC=9E=A5=20?= =?UTF-8?q?=EC=8B=9C=20=EB=A7=88=EC=8A=A4=ED=84=B0=EC=A0=95=EB=B3=B4=20?= =?UTF-8?q?=ED=92=88=EB=AA=A9=EC=97=90=20=EC=A0=84=EB=8B=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/lib/utils/buttonActions.ts | 34 +++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) 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 ๊ฒฝ๊ณ  ๋ฌด์‹œ - ์˜๋„์ ์œผ๋กœ ๋ถ„๋ฆฌ)