From 7d6bff49aa7d737fb6bb6fa78490b99b2d595a0f Mon Sep 17 00:00:00 2001 From: kjs Date: Tue, 30 Dec 2025 15:36:28 +0900 Subject: [PATCH 1/2] =?UTF-8?q?=ED=8F=BC=20=EC=B1=84=EB=B2=88=20=EC=98=A4?= =?UTF-8?q?=EC=9E=91=EB=8F=99=20=EB=AC=B8=EC=A0=9C=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/lib/utils/buttonActions.ts | 60 +++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) diff --git a/frontend/lib/utils/buttonActions.ts b/frontend/lib/utils/buttonActions.ts index 9a6a606e..944f7126 100644 --- a/frontend/lib/utils/buttonActions.ts +++ b/frontend/lib/utils/buttonActions.ts @@ -1608,6 +1608,66 @@ export class ButtonActionExecutor { return { handled: false, success: false }; } + // ๐ŸŽฏ ์ฑ„๋ฒˆ ๊ทœ์น™ ํ• ๋‹น ์ฒ˜๋ฆฌ (์ €์žฅ ์‹œ์ ์— ์‹ค์ œ ์ˆœ๋ฒˆ ์ฆ๊ฐ€) + console.log("๐Ÿ” [handleUniversalFormModalTableSectionSave] ์ฑ„๋ฒˆ ๊ทœ์น™ ํ• ๋‹น ์ฒดํฌ ์‹œ์ž‘"); + + const fieldsWithNumbering: Record = {}; + + // commonFieldsData์™€ modalData์—์„œ ์ฑ„๋ฒˆ ๊ทœ์น™์ด ์„ค์ •๋œ ํ•„๋“œ ์ฐพ๊ธฐ + for (const [key, value] of Object.entries(modalData)) { + if (key.endsWith("_numberingRuleId") && value) { + const fieldName = key.replace("_numberingRuleId", ""); + fieldsWithNumbering[fieldName] = value as string; + console.log(`๐ŸŽฏ [handleUniversalFormModalTableSectionSave] ์ฑ„๋ฒˆ ํ•„๋“œ ๋ฐœ๊ฒฌ: ${fieldName} โ†’ ๊ทœ์น™ ${value}`); + } + } + + // formData์—์„œ๋„ ํ™•์ธ (๋ชจ๋‹ฌ ์™ธ๋ถ€์— ์žˆ์„ ์ˆ˜ ์žˆ์Œ) + for (const [key, value] of Object.entries(formData)) { + if (key.endsWith("_numberingRuleId") && value && !fieldsWithNumbering[key.replace("_numberingRuleId", "")]) { + const fieldName = key.replace("_numberingRuleId", ""); + fieldsWithNumbering[fieldName] = value as string; + console.log( + `๐ŸŽฏ [handleUniversalFormModalTableSectionSave] ์ฑ„๋ฒˆ ํ•„๋“œ ๋ฐœ๊ฒฌ (formData): ${fieldName} โ†’ ๊ทœ์น™ ${value}`, + ); + } + } + + console.log("๐Ÿ“‹ [handleUniversalFormModalTableSectionSave] ์ฑ„๋ฒˆ ๊ทœ์น™์ด ์„ค์ •๋œ ํ•„๋“œ:", fieldsWithNumbering); + + // ๐Ÿ”ฅ ์ €์žฅ ์‹œ์ ์— allocateCode ํ˜ธ์ถœํ•˜์—ฌ ์‹ค์ œ ์ˆœ๋ฒˆ ์ฆ๊ฐ€ + if (Object.keys(fieldsWithNumbering).length > 0) { + console.log("๐ŸŽฏ [handleUniversalFormModalTableSectionSave] ์ฑ„๋ฒˆ ๊ทœ์น™ ํ• ๋‹น ์‹œ์ž‘ (allocateCode ํ˜ธ์ถœ)"); + const { allocateNumberingCode } = await import("@/lib/api/numberingRule"); + + for (const [fieldName, ruleId] of Object.entries(fieldsWithNumbering)) { + try { + console.log( + `๐Ÿ”„ [handleUniversalFormModalTableSectionSave] ${fieldName} ํ•„๋“œ์— ๋Œ€ํ•ด allocateCode ํ˜ธ์ถœ: ${ruleId}`, + ); + const allocateResult = await allocateNumberingCode(ruleId); + + if (allocateResult.success && allocateResult.data?.generatedCode) { + const newCode = allocateResult.data.generatedCode; + console.log( + `โœ… [handleUniversalFormModalTableSectionSave] ${fieldName} ์ƒˆ ์ฝ”๋“œ ํ• ๋‹น: ${commonFieldsData[fieldName]} โ†’ ${newCode}`, + ); + commonFieldsData[fieldName] = newCode; + } else { + console.warn( + `โš ๏ธ [handleUniversalFormModalTableSectionSave] ${fieldName} ์ฝ”๋“œ ํ• ๋‹น ์‹คํŒจ, ๊ธฐ์กด ๊ฐ’ ์œ ์ง€:`, + allocateResult.error, + ); + } + } catch (allocateError) { + console.error(`โŒ [handleUniversalFormModalTableSectionSave] ${fieldName} ์ฝ”๋“œ ํ• ๋‹น ์˜ค๋ฅ˜:`, allocateError); + // ์˜ค๋ฅ˜ ์‹œ ๊ธฐ์กด ๊ฐ’ ์œ ์ง€ + } + } + } + + console.log("โœ… [handleUniversalFormModalTableSectionSave] ์ฑ„๋ฒˆ ๊ทœ์น™ ํ• ๋‹น ์™„๋ฃŒ"); + try { // ์‚ฌ์šฉ์ž ์ •๋ณด ์ถ”๊ฐ€ if (!context.userId) { From bd49db16c6c55c226a28151491864797ae777203 Mon Sep 17 00:00:00 2001 From: kjs Date: Tue, 30 Dec 2025 17:45:38 +0900 Subject: [PATCH 2/2] 1 --- frontend/app/(main)/admin/systemMng/dataflow/page.tsx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/frontend/app/(main)/admin/systemMng/dataflow/page.tsx b/frontend/app/(main)/admin/systemMng/dataflow/page.tsx index 87d937ec..d55a6cf1 100644 --- a/frontend/app/(main)/admin/systemMng/dataflow/page.tsx +++ b/frontend/app/(main)/admin/systemMng/dataflow/page.tsx @@ -51,17 +51,17 @@ export default function DataFlowPage() { // ์—๋””ํ„ฐ ๋ชจ๋“œ์ผ ๋•Œ๋Š” ๋ ˆ์ด์•„์›ƒ ์—†์ด ์ „์ฒด ํ™”๋ฉด ์‚ฌ์šฉ if (isEditorMode) { return ( -
+
{/* ์—๋””ํ„ฐ ํ—ค๋” */} -
+

๋…ธ๋“œ ํ”Œ๋กœ์šฐ ์—๋””ํ„ฐ

-

+

๋“œ๋ž˜๊ทธ ์•ค ๋“œ๋กญ์œผ๋กœ ๋ฐ์ดํ„ฐ ์ œ์–ด ํ”Œ๋กœ์šฐ๋ฅผ ์‹œ๊ฐ์ ์œผ๋กœ ์„ค๊ณ„ํ•ฉ๋‹ˆ๋‹ค

@@ -77,12 +77,12 @@ export default function DataFlowPage() { } return ( -
+
{/* ํŽ˜์ด์ง€ ํ—ค๋” */}

์ œ์–ด ๊ด€๋ฆฌ

-

๋…ธ๋“œ ๊ธฐ๋ฐ˜ ๋ฐ์ดํ„ฐ ํ”Œ๋กœ์šฐ๋ฅผ ์‹œ๊ฐ์ ์œผ๋กœ ์„ค๊ณ„ํ•˜๊ณ  ๊ด€๋ฆฌํ•ฉ๋‹ˆ๋‹ค

+

๋…ธ๋“œ ๊ธฐ๋ฐ˜ ๋ฐ์ดํ„ฐ ํ”Œ๋กœ์šฐ๋ฅผ ์‹œ๊ฐ์ ์œผ๋กœ ์„ค๊ณ„ํ•˜๊ณ  ๊ด€๋ฆฌํ•ฉ๋‹ˆ๋‹ค

{/* ํ”Œ๋กœ์šฐ ๋ชฉ๋ก */}