@daeryun/dr_components 0.9.44 → 0.9.45

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -163,6 +163,7 @@ const StepTwo = () => {
163
163
  });
164
164
  const [centerCodes, setCenterCodes] = useState([]);
165
165
  const [fieldData, setFieldData] = useState({});
166
+ console.log('centerCodes :', centerCodes);
166
167
  const center_code = 'CT0001';
167
168
  const center_code2 = 'CT0025';
168
169
  const categories = [
@@ -680,6 +681,24 @@ const StepTwo = () => {
680
681
  </div>
681
682
  </div>
682
683
  )} */}
684
+ {centerCodes.map((centerCode, index) => {
685
+ var _a, _b;
686
+ const currentFieldData = fieldData[centerCode];
687
+ const categoryName = (_a = categories.find(item => item.code === centerCode)) === null || _a === void 0 ? void 0 : _a.code_name;
688
+ if (!((_b = currentFieldData === null || currentFieldData === void 0 ? void 0 : currentFieldData.data) === null || _b === void 0 ? void 0 : _b.length)) {
689
+ return null;
690
+ }
691
+ return (<div key={centerCode} className="sm:flex sm:flex-row sm:rounded-[16px] sm:border sm:border-solid sm:border-grayScale5 sm:p-[40px] lg:rounded-[20px]">
692
+ <p className="body_large1_mo sm:body_large1_tb lg:body_large1 sm:w-[150px] sm:flex-shrink-0">
693
+ {categoryName}
694
+ </p>
695
+ <div className="my-[12px] w-full bg-grayScale5 max-sm:h-[1px] sm:mx-[44px] sm:my-0 sm:h-auto sm:w-[1px] sm:flex-shrink-0 lg:gap-[80px]"/>
696
+
697
+ <div className={`flex flex-row flex-wrap gap-x-[8px] gap-y-[12px] sm:gap-[20px] lg:gap-x-[24px] ${index === 1 ? 'lg:gap-y-[32px]' : 'lg:gap-y-[24px]'}`}>
698
+ {currentFieldData.data.map(item => (<Box key={item.type_idx} type_idx={item.type_idx} tag_title={item.tag_title} selected={selectedList.includes(item.type_idx)} selectedList={selectedList} setSelectedList={setSelectedList} activeTooltipId={activeTooltipId} setActiveTooltipId={setActiveTooltipId} tooltipTimeoutRef={tooltipTimeoutRef}/>))}
699
+ </div>
700
+ </div>);
701
+ })}
683
702
  </div>
684
703
  <div className="mb-[56px] mt-[40px] flex flex-col items-center justify-center sm:mt-[60px] lg:mt-[79px]">
685
704
  <div className="flex w-full flex-row items-center justify-center gap-[8px]">
@@ -215,6 +215,8 @@ const StepTwo = () => {
215
215
  [key: string]: { result: boolean; data: { type_idx: number; tag_title: string }[] };
216
216
  }>({});
217
217
 
218
+ console.log('centerCodes :', centerCodes);
219
+
218
220
  const center_code = 'CT0001';
219
221
  const center_code2 = 'CT0025';
220
222
  const categories = [
@@ -772,6 +774,44 @@ const StepTwo = () => {
772
774
  </div>
773
775
  </div>
774
776
  )} */}
777
+ {centerCodes.map((centerCode, index) => {
778
+ const currentFieldData = fieldData[centerCode];
779
+ const categoryName = categories.find(item => item.code === centerCode)?.code_name;
780
+
781
+ if (!currentFieldData?.data?.length) {
782
+ return null;
783
+ }
784
+
785
+ return (
786
+ <div
787
+ key={centerCode}
788
+ className="sm:flex sm:flex-row sm:rounded-[16px] sm:border sm:border-solid sm:border-grayScale5 sm:p-[40px] lg:rounded-[20px]"
789
+ >
790
+ <p className="body_large1_mo sm:body_large1_tb lg:body_large1 sm:w-[150px] sm:flex-shrink-0">
791
+ {categoryName}
792
+ </p>
793
+ <div className="my-[12px] w-full bg-grayScale5 max-sm:h-[1px] sm:mx-[44px] sm:my-0 sm:h-auto sm:w-[1px] sm:flex-shrink-0 lg:gap-[80px]" />
794
+
795
+ <div
796
+ className={`flex flex-row flex-wrap gap-x-[8px] gap-y-[12px] sm:gap-[20px] lg:gap-x-[24px] ${index === 1 ? 'lg:gap-y-[32px]' : 'lg:gap-y-[24px]'}`}
797
+ >
798
+ {currentFieldData.data.map(item => (
799
+ <Box
800
+ key={item.type_idx}
801
+ type_idx={item.type_idx}
802
+ tag_title={item.tag_title}
803
+ selected={selectedList.includes(item.type_idx)}
804
+ selectedList={selectedList}
805
+ setSelectedList={setSelectedList}
806
+ activeTooltipId={activeTooltipId}
807
+ setActiveTooltipId={setActiveTooltipId}
808
+ tooltipTimeoutRef={tooltipTimeoutRef}
809
+ />
810
+ ))}
811
+ </div>
812
+ </div>
813
+ );
814
+ })}
775
815
  </div>
776
816
  <div className="mb-[56px] mt-[40px] flex flex-col items-center justify-center sm:mt-[60px] lg:mt-[79px]">
777
817
  <div className="flex w-full flex-row items-center justify-center gap-[8px]">