@djb25/digit-ui-module-vendor 1.0.68 → 1.0.69

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.
@@ -1863,7 +1863,7 @@ const VendorInbox = props => {
1863
1863
  }
1864
1864
  const hasDetails = ((_row$original8 = row.original) === null || _row$original8 === void 0 ? void 0 : _row$original8.vendorAdditionalDetails) !== null;
1865
1865
  return /*#__PURE__*/React.createElement(Link, {
1866
- to: !hasDetails ? "/digit-ui/" + userType + "/vendor/registry/additionaldetails/info?vendorId=" + vendorId : "/digit-ui/" + userType + "/vendor/registry/vendor-details/" + vendorId
1866
+ to: !hasDetails ? "/digit-ui/" + userType + "/vendor/registry/additionaldetails/modify-details?vendorId=" + vendorId : "/digit-ui/" + userType + "/vendor/registry/vendor-details/" + vendorId
1867
1867
  }, /*#__PURE__*/React.createElement("button", {
1868
1868
  className: "submit-bar",
1869
1869
  style: {
@@ -2391,10 +2391,11 @@ const VendorInbox = props => {
2391
2391
  const _temp6 = function () {
2392
2392
  if (props.selectedTab === "SURVEYOR") {
2393
2393
  return _catch(function () {
2394
- var _props$searchParams;
2394
+ var _props$searchParams, _props$searchParams2;
2395
2395
  return Promise.resolve(Digit.FSMService.surveyorSearch(tenantId, {
2396
2396
  status: "ACTIVE,DISABLED",
2397
2397
  name: (_props$searchParams = props.searchParams) === null || _props$searchParams === void 0 ? void 0 : _props$searchParams.name,
2398
+ mobileNumber: ((_props$searchParams2 = props.searchParams) === null || _props$searchParams2 === void 0 ? void 0 : _props$searchParams2.mobileNumber) || undefined,
2398
2399
  limit: 100000,
2399
2400
  offset: 0
2400
2401
  })).then(function (response) {
@@ -2417,10 +2418,11 @@ const VendorInbox = props => {
2417
2418
  const _temp7 = function () {
2418
2419
  if (props.selectedTab === "SUPERVISOR") {
2419
2420
  return _catch(function () {
2420
- var _props$searchParams2;
2421
+ var _props$searchParams3, _props$searchParams4;
2421
2422
  return Promise.resolve(Digit.FSMService.supervisorSearch(tenantId, {
2422
2423
  status: "ACTIVE,DISABLED",
2423
- name: (_props$searchParams2 = props.searchParams) === null || _props$searchParams2 === void 0 ? void 0 : _props$searchParams2.name,
2424
+ name: (_props$searchParams3 = props.searchParams) === null || _props$searchParams3 === void 0 ? void 0 : _props$searchParams3.name,
2425
+ mobileNumber: ((_props$searchParams4 = props.searchParams) === null || _props$searchParams4 === void 0 ? void 0 : _props$searchParams4.mobileNumber) || undefined,
2424
2426
  limit: 100000,
2425
2427
  offset: 0
2426
2428
  })).then(function (response) {
@@ -2696,12 +2698,14 @@ const SearchVendor = () => {
2696
2698
  }
2697
2699
  }) : tab === "SUPERVISOR" ? Digit.Hooks.fsm.useSupervisorSearch(tenantId, _extends({}, paginationParms, {
2698
2700
  status: "ACTIVE,DISABLED",
2699
- name: searchParams === null || searchParams === void 0 ? void 0 : searchParams.name
2701
+ name: searchParams === null || searchParams === void 0 ? void 0 : searchParams.name,
2702
+ mobileNumber: (searchParams === null || searchParams === void 0 ? void 0 : searchParams.mobileNumber) || undefined
2700
2703
  }), {
2701
2704
  enabled: false
2702
2705
  }) : tab === "SURVEYOR" ? Digit.Hooks.fsm.useSurveyorSearch(tenantId, _extends({}, paginationParms, {
2703
2706
  status: "ACTIVE,DISABLED",
2704
- name: searchParams === null || searchParams === void 0 ? void 0 : searchParams.name
2707
+ name: searchParams === null || searchParams === void 0 ? void 0 : searchParams.name,
2708
+ mobileNumber: (searchParams === null || searchParams === void 0 ? void 0 : searchParams.mobileNumber) || undefined
2705
2709
  }), {
2706
2710
  enabled: false
2707
2711
  }) : Digit.Hooks.fsm.useVendorSearch({
@@ -2901,19 +2905,15 @@ const SearchVendor = () => {
2901
2905
  label: t("ES_DRIVER_SEARCH_DRIVER_NAME"),
2902
2906
  name: "name"
2903
2907
  }] : tab === "SUPERVISOR" || tab === "SURVEYOR" ? [{
2904
- label: t("ES_VENDOR_SEARCH_VENDOR_NAME"),
2905
- name: "vendor",
2906
- type: "dropdown",
2907
- options: allVendors === null || allVendors === void 0 ? void 0 : allVendors.map(data => {
2908
- var _data$dsoDetails$owne3;
2909
- return _extends({}, data.dsoDetails, {
2910
- displayName: data.dsoDetails.name + " (" + (data.dsoDetails.mobileNumber || ((_data$dsoDetails$owne3 = data.dsoDetails.owner) === null || _data$dsoDetails$owne3 === void 0 ? void 0 : _data$dsoDetails$owne3.mobileNumber) || "N/A") + ")"
2911
- });
2912
- }),
2913
- optionsKey: "displayName"
2914
- }, {
2915
2908
  label: tab === "SUPERVISOR" ? t("ES_SUPERVISOR_SEARCH_NAME") : t("ES_SURVEYOR_SEARCH_NAME"),
2916
2909
  name: "name"
2910
+ }, {
2911
+ label: t("WT_MOBILE_NUMBER"),
2912
+ name: "mobileNumber",
2913
+ type: "text",
2914
+ pattern: "[0-9]{10}",
2915
+ maxLength: 10,
2916
+ title: t("ES_FSM_MOBILE_NUMBER_FORMAT_TIP") || "Enter 10-digit mobile number"
2917
2917
  }] : [{
2918
2918
  label: t("ES_VENDOR_SEARCH_VENDOR_NAME"),
2919
2919
  name: "name"
@@ -4393,7 +4393,7 @@ const VendorDetails = () => {
4393
4393
  }, safeVal));
4394
4394
  })), /*#__PURE__*/React.createElement("div", {
4395
4395
  className: "add-details-link hover-button",
4396
- onClick: () => history.push("/digit-ui/" + userType + "/vendor/registry/additionaldetails/info?vendorId=" + (dsoId || vendorId))
4396
+ onClick: () => history.push("/digit-ui/" + userType + "/vendor/registry/additionaldetails/modify-details?vendorId=" + (dsoId || vendorId))
4397
4397
  }, t("Edit Details"))) : userType !== "CITIZEN" && !isEkyc && /*#__PURE__*/React.createElement("div", {
4398
4398
  onClick: () => history.push("/digit-ui/" + userType + "/vendor/registry/additionaldetails/modify-details?vendorId=" + (dsoId || vendorId)),
4399
4399
  className: "add-details-link hover-button"
@@ -9616,13 +9616,47 @@ const SelectEkycZones = _ref => {
9616
9616
  var _zroData$commonMaste, _zroData$MdmsRes, _zroData$MdmsRes$comm;
9617
9617
  const zroOfficeList = (zroData === null || zroData === void 0 ? void 0 : (_zroData$commonMaste = zroData["common-masters"]) === null || _zroData$commonMaste === void 0 ? void 0 : _zroData$commonMaste.ZroOfficeList) || (zroData === null || zroData === void 0 ? void 0 : (_zroData$MdmsRes = zroData.MdmsRes) === null || _zroData$MdmsRes === void 0 ? void 0 : (_zroData$MdmsRes$comm = _zroData$MdmsRes["common-masters"]) === null || _zroData$MdmsRes$comm === void 0 ? void 0 : _zroData$MdmsRes$comm.ZroOfficeList) || [];
9618
9618
  if (Array.isArray(zroOfficeList)) {
9619
- const activeZros = zroOfficeList.filter(zro => zro && zro.active).map(zro => ({
9619
+ let activeZros = zroOfficeList.filter(zro => zro && zro.active).map(zro => ({
9620
9620
  code: zro.code,
9621
- name: zro.code
9621
+ name: t(zro.code)
9622
9622
  }));
9623
+ if (isEkycVendor && !isVendorPage) {
9624
+ if (!matchedVendor) {
9625
+ activeZros = [];
9626
+ } else {
9627
+ let vendorZoneCodes = [];
9628
+ if (Array.isArray(matchedVendor === null || matchedVendor === void 0 ? void 0 : matchedVendor.zoneIds) && matchedVendor.zoneIds.length > 0) {
9629
+ vendorZoneCodes = matchedVendor.zoneIds.map(z => z.trim().toUpperCase()).filter(Boolean);
9630
+ } else if (matchedVendor !== null && matchedVendor !== void 0 && matchedVendor.assignedZoneId) {
9631
+ vendorZoneCodes = matchedVendor.assignedZoneId.split(",").map(z => z.trim().toUpperCase()).filter(Boolean);
9632
+ }
9633
+ if (vendorZoneCodes.length > 0) {
9634
+ activeZros = activeZros.filter(zro => vendorZoneCodes.includes(zro.code.trim().toUpperCase()));
9635
+ } else {
9636
+ activeZros = [];
9637
+ }
9638
+ }
9639
+ }
9640
+ if (isEkycSupervisor) {
9641
+ if (!matchedSupervisor) {
9642
+ activeZros = [];
9643
+ } else {
9644
+ let supervisorZoneCodes = [];
9645
+ if (Array.isArray(matchedSupervisor === null || matchedSupervisor === void 0 ? void 0 : matchedSupervisor.zoneIds) && matchedSupervisor.zoneIds.length > 0) {
9646
+ supervisorZoneCodes = matchedSupervisor.zoneIds.map(z => z.trim().toUpperCase()).filter(Boolean);
9647
+ } else if (matchedSupervisor !== null && matchedSupervisor !== void 0 && matchedSupervisor.assignedZoneId) {
9648
+ supervisorZoneCodes = matchedSupervisor.assignedZoneId.split(",").map(z => z.trim().toUpperCase()).filter(Boolean);
9649
+ }
9650
+ if (supervisorZoneCodes.length > 0) {
9651
+ activeZros = activeZros.filter(zro => supervisorZoneCodes.includes(zro.code.trim().toUpperCase()));
9652
+ } else {
9653
+ activeZros = [];
9654
+ }
9655
+ }
9656
+ }
9623
9657
  setZones(activeZros);
9624
9658
  }
9625
- }, [zroData]);
9659
+ }, [zroData, matchedVendor, matchedSupervisor, isEkycVendor, isEkycSupervisor, isVendorPage, t]);
9626
9660
  useEffect(() => {
9627
9661
  if (!zones.length || !(formData !== null && formData !== void 0 && formData.zoneIds)) return;
9628
9662
  if (isMultiSelect) {