From 88dbf6f360934e57db1aeb4f25fbbe695760ab9c Mon Sep 17 00:00:00 2001 From: KimDoHyun Date: Tue, 8 Jul 2025 20:09:31 +0900 Subject: [PATCH 1/2] =?UTF-8?q?fix:=20management=20=EA=B0=9D=EC=B2=B4,=20?= =?UTF-8?q?=EA=B4=80=EB=A6=AC=EB=B2=88=ED=98=B8,=20=EA=B8=89=EA=B2=BD?= =?UTF-8?q?=EC=82=AC=EC=A7=80=EB=AA=85=20null=20safety=EC=B2=98=EB=A6=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../StepSlope/components/table/coloums.ts | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/pages/ManagePage/StepSlope/components/table/coloums.ts b/src/pages/ManagePage/StepSlope/components/table/coloums.ts index 95cfce8..e55c89b 100644 --- a/src/pages/ManagePage/StepSlope/components/table/coloums.ts +++ b/src/pages/ManagePage/StepSlope/components/table/coloums.ts @@ -33,16 +33,18 @@ export const getSlopeColumns = () => [ }, size: 40, }), - columnHelper.accessor('managementNo', { + columnHelper.accessor((row) => row.managementNo || '', { + id: 'managementNo', header: '관리번호', size: 120, }), - columnHelper.accessor('name', { + columnHelper.accessor((row) => row.name || '', { + id: 'name', header: '급경사지명', size: 150, }), columnHelper.accessor( - (row) => row.slopeInspectionHistory.historyNumber || '', + (row) => row.slopeInspectionHistory?.historyNumber || '', { id: 'historyNumber', header: 'SMC번호', @@ -78,17 +80,17 @@ export const getSlopeColumns = () => [ size: 40, } ), - columnHelper.accessor((row) => row.management.organization || '', { + columnHelper.accessor((row) => row.management?.organization || '', { id: 'organization', header: '시행청명', size: 120, }), - columnHelper.accessor((row) => row.management.authority || '', { + columnHelper.accessor((row) => row.management?.authority || '', { id: 'authority', header: '관리주체구분코드', size: 150, }), - columnHelper.accessor((row) => row.management.department || '', { + columnHelper.accessor((row) => row.management?.department || '', { id: 'department', header: '소관부서명', size: 150, From aaf035aa1b1b98e7d6e6175feed08fc0698c16bb Mon Sep 17 00:00:00 2001 From: KimDoHyun Date: Wed, 9 Jul 2025 18:07:00 +0900 Subject: [PATCH 2/2] =?UTF-8?q?fix:=20=EC=88=98=EC=A0=95=20=EB=B0=8F=20?= =?UTF-8?q?=EC=83=9D=EC=84=B1=ED=8F=BC=EC=97=90=EC=84=9C=EB=8F=84=20manage?= =?UTF-8?q?ment=20=EA=B0=9D=EC=B2=B4=20nullsafety=EC=B2=98=EB=A6=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ManagePage/StepSlope/components/SlopeForm.tsx | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/pages/ManagePage/StepSlope/components/SlopeForm.tsx b/src/pages/ManagePage/StepSlope/components/SlopeForm.tsx index 76c34fb..12478b3 100644 --- a/src/pages/ManagePage/StepSlope/components/SlopeForm.tsx +++ b/src/pages/ManagePage/StepSlope/components/SlopeForm.tsx @@ -64,12 +64,12 @@ const SlopeForm = ({ setFormData({ ...formData, management: { - ...formData.management, + ...(formData.management || {}), organization: e.target.value, }, }) @@ -80,12 +80,12 @@ const SlopeForm = ({ setFormData({ ...formData, management: { - ...formData.management, + ...(formData.management || {}), authority: e.target.value, }, }) @@ -96,12 +96,12 @@ const SlopeForm = ({ setFormData({ ...formData, management: { - ...formData.management, + ...(formData.management || {}), department: e.target.value, }, })