From a0e58968f5855d034826fd36951408de25075378 Mon Sep 17 00:00:00 2001 From: Savien/Woo Jun Han <49388937+MrMirror21@users.noreply.github.com> Date: Thu, 24 Oct 2024 17:06:04 +0900 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20feat:=20=EA=B3=A0=EC=9A=A9=EC=A3=BC?= =?UTF-8?q?=20=EC=A0=95=EB=B3=B4=20section=20=EC=BB=B4=ED=8F=AC=EB=84=8C?= =?UTF-8?q?=ED=8A=B8=20=EC=9E=91=EC=84=B1=20#31?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Document/write/EmployerInfoSection.tsx | 92 +++++++++++++++++++ 1 file changed, 92 insertions(+) create mode 100644 src/components/Document/write/EmployerInfoSection.tsx diff --git a/src/components/Document/write/EmployerInfoSection.tsx b/src/components/Document/write/EmployerInfoSection.tsx new file mode 100644 index 00000000..50af6d3e --- /dev/null +++ b/src/components/Document/write/EmployerInfoSection.tsx @@ -0,0 +1,92 @@ +import { PartTimeEmployPermitEmployerInfo } from '@/constants/documents'; +import { + EmployerInfoProperty, + EmployerInformation, +} from '@/types/api/document'; +import { Address } from '@/types/api/users'; +import { Map, MapMarker } from 'react-kakao-maps-sdk'; + +const renderMap = (address: Address) => { + return ( + <> +
+
{address.address_name}
+
+
+ + + +
+ + ); +}; + +const EmployerInfoSection = ({ employ }: { employ: EmployerInformation }) => { + return ( +
+
+
+ {Object.entries(employ).map(([key, value]) => ( + <> +
+
+
+
+ { + PartTimeEmployPermitEmployerInfo[ + key as EmployerInfoProperty + ].name + } +
+
+
+ {/* .textfield1 */} + {key !== 'address' && ( +
+
+ {value as string} +
+
+ )} + {key === 'address' && renderMap(value as Address)} +
+ {key === 'address' && ( +
+
+
+
+ Detailed Address +
+
+
+ {/* .textfield1 */} + {key === 'address' && ( +
+
+ {typeof value !== 'string' && value.address_detail as string} +
+
+ )} +
+ )} + + ))} +
+
+
+ ); +}; + +export default EmployerInfoSection;