diff --git a/public/assets/images/sub/refresh.png b/public/assets/images/sub/refresh.png new file mode 100644 index 0000000..d5ee1a0 Binary files /dev/null and b/public/assets/images/sub/refresh.png differ diff --git a/src/components/survey-sale/detail/BasicForm.tsx b/src/components/survey-sale/detail/BasicForm.tsx index 185f406..ff284b1 100644 --- a/src/components/survey-sale/detail/BasicForm.tsx +++ b/src/components/survey-sale/detail/BasicForm.tsx @@ -30,6 +30,15 @@ export default function BasicForm({ basicInfo, setBasicInfo, mode, session }: Ba resetAddressData() }, [addressData]) + const handleAddressInitiate = () => { + setBasicInfo({ + ...basicInfo, + postCode: null, + address: null, + addressDetail: null, + }) + } + return ( <>
@@ -87,12 +96,12 @@ export default function BasicForm({ basicInfo, setBasicInfo, mode, session }: Ba id="investigationDate" type="date" className="date-frame" - defaultValue={basicInfo?.investigationDate?.toString()} + value={basicInfo?.investigationDate?.toString()} onChange={(e) => setBasicInfo({ ...basicInfo, investigationDate: e.target.value })} />
) : ( - + )}
@@ -102,7 +111,7 @@ export default function BasicForm({ basicInfo, setBasicInfo, mode, session }: Ba type="text" className="input-frame" readOnly={mode === 'READ'} - defaultValue={basicInfo?.buildingName ?? ''} + value={basicInfo?.buildingName ?? ''} onChange={(e) => setBasicInfo({ ...basicInfo, buildingName: e.target.value })} />
@@ -113,7 +122,7 @@ export default function BasicForm({ basicInfo, setBasicInfo, mode, session }: Ba type="text" className="input-frame" readOnly={mode === 'READ'} - defaultValue={basicInfo?.customerName ?? ''} + value={basicInfo?.customerName ?? ''} onChange={(e) => setBasicInfo({ ...basicInfo, customerName: e.target.value })} /> @@ -122,26 +131,39 @@ export default function BasicForm({ basicInfo, setBasicInfo, mode, session }: Ba
{/* 우편번호 */}
- +
{/* 도도부현 */}
- + setBasicInfo({ ...basicInfo, address: e.target.value })} + />
{/* 주소 */} {mode !== 'READ' && ( -
+
+
)}
市区町村名, 以後の住所
- + setBasicInfo({ ...basicInfo, addressDetail: e.target.value })} + />
diff --git a/src/styles/components/_sub.scss b/src/styles/components/_sub.scss index 8f551bb..4899ac6 100644 --- a/src/styles/components/_sub.scss +++ b/src/styles/components/_sub.scss @@ -688,4 +688,14 @@ width: 100%; } } +} +.form-flex { + .reset { + flex: none; + width: 40px; + background-image: url(/assets/images/sub/refresh.png); + background-size: 24px 24px; + background-position: center; + background-repeat: no-repeat; + } } \ No newline at end of file