sales-frontend-components 0.0.92 → 0.0.94
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.
- package/dist/index.cjs.js +28 -9
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.esm.js +29 -10
- package/dist/index.esm.js.map +1 -1
- package/package.json +12 -12
package/dist/index.cjs.js
CHANGED
|
@@ -101,12 +101,15 @@ const FormDateRangePicker = ({
|
|
|
101
101
|
});
|
|
102
102
|
const [selected, setSelected] = React.useState();
|
|
103
103
|
React.useEffect(() => {
|
|
104
|
-
|
|
105
|
-
|
|
104
|
+
const fieldValue = field.value;
|
|
105
|
+
if (!fieldValue) {
|
|
106
|
+
setSelected(void 0);
|
|
107
|
+
return;
|
|
106
108
|
}
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
109
|
+
const isStartDateDifferent = fieldValue.startDate?.getTime() !== selected?.startDate?.getTime();
|
|
110
|
+
const isEndDateDifferent = fieldValue.endDate?.getTime() !== selected?.endDate?.getTime();
|
|
111
|
+
if (!selected || isStartDateDifferent || isEndDateDifferent) {
|
|
112
|
+
setSelected(fieldValue);
|
|
110
113
|
}
|
|
111
114
|
}, [field.value]);
|
|
112
115
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -686,6 +689,15 @@ function useJobSearchModal() {
|
|
|
686
689
|
setActiveTab("jobName");
|
|
687
690
|
openModal();
|
|
688
691
|
};
|
|
692
|
+
const closeModalWithCheck = () => {
|
|
693
|
+
if (!selectedJob) {
|
|
694
|
+
salesFrontendDesignSystem.ModalUtils.alert("\uC9C1\uC885\uC744 \uC120\uD0DD\uD558\uC9C0 \uC54A\uC558\uC2B5\uB2C8\uB2E4. \uC9C1\uC885 \uC120\uD0DD \uD6C4 \uB2E4\uC2DC \uC2DC\uB3C4\uD574\uC8FC\uC138\uC694.", "\uC9C1\uC885\uC744 \uC120\uD0DD\uD574\uC8FC\uC138\uC694.", {
|
|
695
|
+
modalId: "job-search-alert-no-selected"
|
|
696
|
+
});
|
|
697
|
+
return;
|
|
698
|
+
}
|
|
699
|
+
closeModal();
|
|
700
|
+
};
|
|
689
701
|
return {
|
|
690
702
|
JobSearchModal: /* @__PURE__ */ jsxRuntime.jsxs(salesFrontendDesignSystem.Modal.Root, { isOpen, onClose: closeModal, modalSize: "xlarge", children: [
|
|
691
703
|
/* @__PURE__ */ jsxRuntime.jsx(salesFrontendDesignSystem.Modal.Overlay, {}),
|
|
@@ -718,8 +730,7 @@ function useJobSearchModal() {
|
|
|
718
730
|
size: "medium",
|
|
719
731
|
appearance: "filled",
|
|
720
732
|
width: "full",
|
|
721
|
-
onClick:
|
|
722
|
-
disabled: !selectedJob,
|
|
733
|
+
onClick: closeModalWithCheck,
|
|
723
734
|
children: "\uD655\uC778"
|
|
724
735
|
}
|
|
725
736
|
) })
|
|
@@ -2723,7 +2734,7 @@ function useJobVehicleSearchModal() {
|
|
|
2723
2734
|
hospitalizationGrade,
|
|
2724
2735
|
resetJobVehicleSearch
|
|
2725
2736
|
} = useJobVehicleSearch();
|
|
2726
|
-
const { isOpen, openModal, closeModal } = salesFrontendDesignSystem.useModalState(
|
|
2737
|
+
const { isOpen, openModal, closeModal } = salesFrontendDesignSystem.useModalState();
|
|
2727
2738
|
const validate = () => {
|
|
2728
2739
|
if (!selectedJob && !selectedVehicle) {
|
|
2729
2740
|
return salesFrontendDesignSystem.ModalUtils.alert(
|
|
@@ -2756,6 +2767,7 @@ function useJobVehicleSearchModal() {
|
|
|
2756
2767
|
riskGrade,
|
|
2757
2768
|
hospitalizationGrade,
|
|
2758
2769
|
openJobVehicleModal: openInitModal,
|
|
2770
|
+
closeJobVehicleModal: closeModal,
|
|
2759
2771
|
JobVehicleSearchModalComponent: /* @__PURE__ */ jsxRuntime.jsxs(salesFrontendDesignSystem.Modal.Root, { isOpen, onClose: closeModal, modalSize: "xlarge", children: [
|
|
2760
2772
|
/* @__PURE__ */ jsxRuntime.jsx(salesFrontendDesignSystem.Modal.Overlay, {}),
|
|
2761
2773
|
/* @__PURE__ */ jsxRuntime.jsxs(salesFrontendDesignSystem.Modal.Content, { style: { height: "697px" }, children: [
|
|
@@ -3179,7 +3191,7 @@ const useRemoteIdentityVerification = ({
|
|
|
3179
3191
|
case VERIFICATION_CODES.ATTEMPT_EXCEEDED:
|
|
3180
3192
|
case VERIFICATION_CODES.SERVER_ERROR:
|
|
3181
3193
|
console.log("=====\uBE44\uB300\uBA74\uC778\uC99D \uC2E4\uD328!=====", { result, code });
|
|
3182
|
-
onError?.({ result, code });
|
|
3194
|
+
onError?.({ result, code }, { rivsRqstId });
|
|
3183
3195
|
cleanup?.();
|
|
3184
3196
|
break;
|
|
3185
3197
|
case VERIFICATION_CODES.SUCCESS:
|
|
@@ -3231,6 +3243,13 @@ const useRemoteIdentityVerificationIframe = (config) => {
|
|
|
3231
3243
|
} catch (error) {
|
|
3232
3244
|
console.error("openRivIframe error::", error);
|
|
3233
3245
|
await salesFrontendDesignSystem.ModalUtils.alert("\uBE44\uB300\uBA74 \uC778\uC99D URL \uC0DD\uC131\uC5D0 \uC2E4\uD328\uD588\uC2B5\uB2C8\uB2E4. \uB2E4\uC2DC \uC2DC\uB3C4\uD574\uC8FC\uC138\uC694.");
|
|
3246
|
+
config.onError?.(
|
|
3247
|
+
{
|
|
3248
|
+
result: "N",
|
|
3249
|
+
code: VERIFICATION_CODES.TOKEN_ERROR
|
|
3250
|
+
},
|
|
3251
|
+
{ rivsRqstId: "" }
|
|
3252
|
+
);
|
|
3234
3253
|
}
|
|
3235
3254
|
};
|
|
3236
3255
|
const closeRivIframe = () => {
|