From 8bc629698a8aa394637acf7f683344e4b476d70b Mon Sep 17 00:00:00 2001 From: keyy1315 Date: Fri, 9 May 2025 17:41:26 +0900 Subject: [PATCH] feat: implement SurveyDetail page for roof-information MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 조사매물 지붕정보 상세페이지 구현 --- prisma/schema.prisma | 4 +- src/app/survey-sale/[id]/page.tsx | 1 - .../survey-sale/detail/RoofDetailForm.tsx | 232 +++++++++++++++++- .../survey-sale/detail/form/MultiCheckEtc.tsx | 4 +- .../survey-sale/detail/form/RadioEtc.tsx | 26 +- .../survey-sale/detail/form/SelectBoxEtc.tsx | 4 +- 6 files changed, 261 insertions(+), 10 deletions(-) diff --git a/prisma/schema.prisma b/prisma/schema.prisma index 3a511a3..5fef0a2 100644 --- a/prisma/schema.prisma +++ b/prisma/schema.prisma @@ -79,13 +79,13 @@ model SD_SERVEY_SALES_DETAIL_INFO { id Int @id @default(autoincrement()) contract_capacity String? @db.VarChar(20) retail_company String? @db.VarChar(100) - supplementary_facilities Int? + supplementary_facilities String? @db.VarChar(20) supplementary_facilities_etc String? @db.VarChar(200) installation_system Int? installation_system_etc String? @db.VarChar(200) construction_year Int? construction_year_etc String? @db.VarChar(200) - roof_material Int? + roof_material String? @db.VarChar(20) roof_material_etc String? @db.VarChar(200) roof_shape Int? roof_shape_etc String? @db.VarChar(200) diff --git a/src/app/survey-sale/[id]/page.tsx b/src/app/survey-sale/[id]/page.tsx index cfc35d3..5ecf1a7 100644 --- a/src/app/survey-sale/[id]/page.tsx +++ b/src/app/survey-sale/[id]/page.tsx @@ -5,7 +5,6 @@ export default function page() { return ( <> - {/* */} ) } diff --git a/src/components/survey-sale/detail/RoofDetailForm.tsx b/src/components/survey-sale/detail/RoofDetailForm.tsx index e88c938..5677264 100644 --- a/src/components/survey-sale/detail/RoofDetailForm.tsx +++ b/src/components/survey-sale/detail/RoofDetailForm.tsx @@ -1,5 +1,8 @@ -import { SurveyBasicInfo } from '@/types/Survey' +import { SurveyBasicInfo, SurveyDetailInfo } from '@/types/Survey' import DetailButton from './DetailButton' +import { roof_material, supplementary_facilities } from './form/MultiCheckEtc' +import { selectBoxOptions } from './form/SelectBoxEtc' +import { radioEtcData } from './form/RadioEtc' export default function RoofDetailForm({ surveyDetail, @@ -8,6 +11,15 @@ export default function RoofDetailForm({ surveyDetail: SurveyBasicInfo | null isLoadingSurveyDetail: boolean }) { + console.log(surveyDetail) + + const makeNumArr = (value: string) => { + return value + .split(',') + .map((v) => v.trim()) + .filter((v) => v.length > 0) + } + if (isLoadingSurveyDetail) { return
Loading...
} @@ -15,8 +27,173 @@ export default function RoofDetailForm({ <>
+
+ {/* 전기 계약 용량 */} +
電気契約容量
+ +
+ {/* 전기 소매 회사 */} +
+
電気小売会社
+ +
+ {/* 전기 부대 설비 */} +
+
電気附属設備
+
+ {supplementary_facilities.map((item) => ( +
+ + +
+ ))} +
+ + +
+
+
+ +
+
+ {/* 설치 희망 시스템 */} +
+
設置希望システム
+ +
+ {/* 건축 연수 */} +
+
建築年数
+ +
+ {/* 지붕재 */}
屋根材
+
+ {roof_material.map((item) => ( +
+ + +
+ ))} +
+ + +
+
+
+ +
+
+ {/* 지붕 모양 */} +
+
屋根の形状
+ +
+ {/* 지붕 경사도 */} +
+
屋根の斜面
+
+ + +
+
+ {/* 주택 구조 */} +
+
住宅構造
+ +
+ {/* 서까래 재질 */} +
+
垂木の材質
+ +
+ {/* 서까래 크기 */} +
+
垂木の大きさ
+ +
+ {/* 서까래 피치 */} +
+
垂木のピッチ
+ +
+ {/* 서까래 방향 */} +
+
垂木の方向
+ +
+ {/* 노지판 종류 */} +
+
路地板の種類
+ +
+ {/* 노지판 두께 */} +
+
路地板厚
+
+ + mm +
+
+ {/* 누수 흔적 */} +
+
水漏れの痕跡
+ +
+ {/* 방수재 종류 */} +
+
防水材の種類
+ +
+ {/* 단열재 유무 */} +
+
断熱材の有無
+ +
+ {/* 구조 순서 */} +
+
屋根構造の順序
+ +
+ {/* 설치 가능 여부 */} +
+
設置可能な場合
+ +
+ {/* 메모 */} +
+
メモ
+
+