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