From baabc72f5840bc882c1d7178129707a9ca1ea2ae Mon Sep 17 00:00:00 2001 From: YangJinSoo94 Date: Mon, 21 Jul 2025 15:29:08 +0900 Subject: [PATCH] =?UTF-8?q?=EB=B9=8C=EB=93=9C=EC=97=90=EB=9F=AC=EC=88=98?= =?UTF-8?q?=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../sdmMng/sdmInfoInsert/modalSimilar/page.tsx | 2 +- .../dm/app/pages/sdmMng/sdmInfoInsert/page.tsx | 3 ++- apps/dm/app/pages/sdmMng/sdmInsert/page.tsx | 6 ++++-- .../sdmInfoInsertForm/AccessibleFormField.tsx | 18 ++++++------------ 4 files changed, 13 insertions(+), 16 deletions(-) diff --git a/apps/dm/app/pages/sdmMng/sdmInfoInsert/modalSimilar/page.tsx b/apps/dm/app/pages/sdmMng/sdmInfoInsert/modalSimilar/page.tsx index aecedb807..8da2685da 100644 --- a/apps/dm/app/pages/sdmMng/sdmInfoInsert/modalSimilar/page.tsx +++ b/apps/dm/app/pages/sdmMng/sdmInfoInsert/modalSimilar/page.tsx @@ -123,7 +123,7 @@ export default function ModalSimilarPage({ sply = 0, usageCd = '', money = 0 }: className={`${head.align === 'right' ? 'text-right' : head.align === 'center' ? 'text-center' : typeof el[head.id as keyof SimilarCaseType] === 'number' ? 'text-right' : 'text-center'} cursor-pointer`} key={`similar-case-cell-${head.id}-${index}-${el.ruseBizNm}`} rowSpan={(head.id === 'businessName' || head.id ==='businessDuration' || head.id === 'money') ? rowSpans[index] : undefined} - style={(head.id === 'businessName' || head.id === 'businessDuration' || head.id === 'money') && index > 0 && similarCaseList[index - 1]?.businessName === el.businessName ? { display: 'none' } : undefined} + style={(head.id === 'businessName' || head.id === 'businessDuration' || head.id === 'money') && index > 0 && similarCaseList[index - 1]?.ruseBizNm === el.ruseBizNm ? { display: 'none' } : undefined} onClick={() => handleCellClick(index, head.id)} onKeyDown={(e) => { if (e.key === 'Enter' || e.key === ' ') { diff --git a/apps/dm/app/pages/sdmMng/sdmInfoInsert/page.tsx b/apps/dm/app/pages/sdmMng/sdmInfoInsert/page.tsx index e36d10781..119e1c487 100644 --- a/apps/dm/app/pages/sdmMng/sdmInfoInsert/page.tsx +++ b/apps/dm/app/pages/sdmMng/sdmInfoInsert/page.tsx @@ -185,7 +185,8 @@ function SdmInfoInsertContent() { dmdAplyPswd: "", index: 0, reqDt: "", - dmdInfoSn: 0 + dmdInfoSn: 0, + status : '', }; await insertSdmInfoData(apiData); diff --git a/apps/dm/app/pages/sdmMng/sdmInsert/page.tsx b/apps/dm/app/pages/sdmMng/sdmInsert/page.tsx index 89f6988a6..040304347 100644 --- a/apps/dm/app/pages/sdmMng/sdmInsert/page.tsx +++ b/apps/dm/app/pages/sdmMng/sdmInsert/page.tsx @@ -41,9 +41,11 @@ export default function MyForm() { }, [getDemandCompList]); const handleInsertSdmData = useCallback((data: import('@common/business_components/ui/sdmInsertForm/form').DemandCompType) => { - const convertedData: import('@/app/store/sdmMng').DemandCompType = { + const convertedData: DemandCompType = { ...data, - dmdInfoSn: '' + dmdInfoSn: '', + dmdInfoFk: '', + status: '', }; formDataRef.current = convertedData; insertSdmData(convertedData).catch(error => { diff --git a/apps/dm/components/ui/sdmInfoInsertForm/AccessibleFormField.tsx b/apps/dm/components/ui/sdmInfoInsertForm/AccessibleFormField.tsx index cfe985396..0c32db414 100644 --- a/apps/dm/components/ui/sdmInfoInsertForm/AccessibleFormField.tsx +++ b/apps/dm/components/ui/sdmInfoInsertForm/AccessibleFormField.tsx @@ -1,11 +1,10 @@ -import * as React from "react"; -import type { ReactNode } from "react"; -import type { ControllerRenderProps, FieldError, FieldValues } from "react-hook-form"; import { FormUi } from "@common/business_components/ui"; +import type { ReactNode } from "react"; +import type { ControllerRenderProps, FieldError, FieldValues, Path } from "react-hook-form"; interface AccessibleFormFieldProps { - field: ControllerRenderProps; + field: ControllerRenderProps>; label: string; required?: boolean; error?: FieldError; @@ -19,15 +18,10 @@ export function AccessibleFormField({ error, inputComponent, }: AccessibleFormFieldProps) { + const labelText = required ? `${label} *` : label; + return ( - - {label} - {required &&  *} - - } - > +
{inputComponent} {error?.message && Array.from(new Set(error.message.split('\n'))).map((msg, idx) => (