sales-frontend-components 0.0.93 → 0.0.95

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 CHANGED
@@ -689,6 +689,15 @@ function useJobSearchModal() {
689
689
  setActiveTab("jobName");
690
690
  openModal();
691
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
+ };
692
701
  return {
693
702
  JobSearchModal: /* @__PURE__ */ jsxRuntime.jsxs(salesFrontendDesignSystem.Modal.Root, { isOpen, onClose: closeModal, modalSize: "xlarge", children: [
694
703
  /* @__PURE__ */ jsxRuntime.jsx(salesFrontendDesignSystem.Modal.Overlay, {}),
@@ -721,8 +730,7 @@ function useJobSearchModal() {
721
730
  size: "medium",
722
731
  appearance: "filled",
723
732
  width: "full",
724
- onClick: closeModal,
725
- disabled: !selectedJob,
733
+ onClick: closeModalWithCheck,
726
734
  children: "\uD655\uC778"
727
735
  }
728
736
  ) })
@@ -2726,7 +2734,7 @@ function useJobVehicleSearchModal() {
2726
2734
  hospitalizationGrade,
2727
2735
  resetJobVehicleSearch
2728
2736
  } = useJobVehicleSearch();
2729
- const { isOpen, openModal, closeModal } = salesFrontendDesignSystem.useModalState({ initialValue: true });
2737
+ const { isOpen, openModal, closeModal } = salesFrontendDesignSystem.useModalState();
2730
2738
  const validate = () => {
2731
2739
  if (!selectedJob && !selectedVehicle) {
2732
2740
  return salesFrontendDesignSystem.ModalUtils.alert(
@@ -2759,6 +2767,7 @@ function useJobVehicleSearchModal() {
2759
2767
  riskGrade,
2760
2768
  hospitalizationGrade,
2761
2769
  openJobVehicleModal: openInitModal,
2770
+ closeJobVehicleModal: closeModal,
2762
2771
  JobVehicleSearchModalComponent: /* @__PURE__ */ jsxRuntime.jsxs(salesFrontendDesignSystem.Modal.Root, { isOpen, onClose: closeModal, modalSize: "xlarge", children: [
2763
2772
  /* @__PURE__ */ jsxRuntime.jsx(salesFrontendDesignSystem.Modal.Overlay, {}),
2764
2773
  /* @__PURE__ */ jsxRuntime.jsxs(salesFrontendDesignSystem.Modal.Content, { style: { height: "697px" }, children: [
@@ -3182,7 +3191,7 @@ const useRemoteIdentityVerification = ({
3182
3191
  case VERIFICATION_CODES.ATTEMPT_EXCEEDED:
3183
3192
  case VERIFICATION_CODES.SERVER_ERROR:
3184
3193
  console.log("=====\uBE44\uB300\uBA74\uC778\uC99D \uC2E4\uD328!=====", { result, code });
3185
- onError?.({ result, code });
3194
+ onError?.({ result, code }, { rivsRqstId });
3186
3195
  cleanup?.();
3187
3196
  break;
3188
3197
  case VERIFICATION_CODES.SUCCESS:
@@ -3234,6 +3243,13 @@ const useRemoteIdentityVerificationIframe = (config) => {
3234
3243
  } catch (error) {
3235
3244
  console.error("openRivIframe error::", error);
3236
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
+ );
3237
3253
  }
3238
3254
  };
3239
3255
  const closeRivIframe = () => {