@djb25/digit-ui-module-vendor 1.0.68 → 1.0.70
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 +91 -29
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +91 -29
- package/dist/index.modern.js.map +1 -1
- package/package.json +1 -1
package/dist/index.modern.js
CHANGED
|
@@ -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/
|
|
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: {
|
|
@@ -2385,16 +2385,47 @@ const VendorInbox = props => {
|
|
|
2385
2385
|
const getCSVExportData = React.useCallback(function () {
|
|
2386
2386
|
try {
|
|
2387
2387
|
let _exit = false;
|
|
2388
|
-
function
|
|
2388
|
+
function _temp10(_result) {
|
|
2389
2389
|
let _exit2 = false;
|
|
2390
2390
|
if (_exit) return _result;
|
|
2391
|
-
|
|
2391
|
+
function _temp0(_result2) {
|
|
2392
|
+
let _exit3 = false;
|
|
2393
|
+
if (_exit2) return _result2;
|
|
2394
|
+
const _temp8 = function () {
|
|
2395
|
+
if (props.selectedTab === "VENDOR") {
|
|
2396
|
+
return _catch(function () {
|
|
2397
|
+
var _props$searchParams, _props$searchParams2;
|
|
2398
|
+
return Promise.resolve(Digit.FSMService.vendorSearch(tenantId, {
|
|
2399
|
+
status: "ACTIVE,DISABLED",
|
|
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,
|
|
2402
|
+
limit: 100000,
|
|
2403
|
+
offset: 0
|
|
2404
|
+
})).then(function (response) {
|
|
2405
|
+
const _temp6 = (response === null || response === void 0 ? void 0 : response.vendors) || (response === null || response === void 0 ? void 0 : response.vendor) || [];
|
|
2406
|
+
_exit3 = true;
|
|
2407
|
+
return _temp6;
|
|
2408
|
+
});
|
|
2409
|
+
}, function (e) {
|
|
2410
|
+
console.error(e);
|
|
2411
|
+
const _temp7 = [];
|
|
2412
|
+
_exit3 = true;
|
|
2413
|
+
return _temp7;
|
|
2414
|
+
});
|
|
2415
|
+
}
|
|
2416
|
+
}();
|
|
2417
|
+
return _temp8 && _temp8.then ? _temp8.then(function (_result3) {
|
|
2418
|
+
return _exit3 ? _result3 : tableData;
|
|
2419
|
+
}) : _exit3 ? _temp8 : tableData;
|
|
2420
|
+
}
|
|
2421
|
+
const _temp9 = function () {
|
|
2392
2422
|
if (props.selectedTab === "SURVEYOR") {
|
|
2393
2423
|
return _catch(function () {
|
|
2394
|
-
var _props$
|
|
2424
|
+
var _props$searchParams3, _props$searchParams4;
|
|
2395
2425
|
return Promise.resolve(Digit.FSMService.surveyorSearch(tenantId, {
|
|
2396
2426
|
status: "ACTIVE,DISABLED",
|
|
2397
|
-
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,
|
|
2398
2429
|
limit: 100000,
|
|
2399
2430
|
offset: 0
|
|
2400
2431
|
})).then(function (response) {
|
|
@@ -2410,17 +2441,16 @@ const VendorInbox = props => {
|
|
|
2410
2441
|
});
|
|
2411
2442
|
}
|
|
2412
2443
|
}();
|
|
2413
|
-
return
|
|
2414
|
-
return _exit2 ? _result2 : tableData;
|
|
2415
|
-
}) : _exit2 ? _temp6 : tableData;
|
|
2444
|
+
return _temp9 && _temp9.then ? _temp9.then(_temp0) : _temp0(_temp9);
|
|
2416
2445
|
}
|
|
2417
|
-
const
|
|
2446
|
+
const _temp1 = function () {
|
|
2418
2447
|
if (props.selectedTab === "SUPERVISOR") {
|
|
2419
2448
|
return _catch(function () {
|
|
2420
|
-
var _props$
|
|
2449
|
+
var _props$searchParams5, _props$searchParams6;
|
|
2421
2450
|
return Promise.resolve(Digit.FSMService.supervisorSearch(tenantId, {
|
|
2422
2451
|
status: "ACTIVE,DISABLED",
|
|
2423
|
-
name: (_props$
|
|
2452
|
+
name: (_props$searchParams5 = props.searchParams) === null || _props$searchParams5 === void 0 ? void 0 : _props$searchParams5.name,
|
|
2453
|
+
mobileNumber: ((_props$searchParams6 = props.searchParams) === null || _props$searchParams6 === void 0 ? void 0 : _props$searchParams6.mobileNumber) || undefined,
|
|
2424
2454
|
limit: 100000,
|
|
2425
2455
|
offset: 0
|
|
2426
2456
|
})).then(function (response) {
|
|
@@ -2436,7 +2466,7 @@ const VendorInbox = props => {
|
|
|
2436
2466
|
});
|
|
2437
2467
|
}
|
|
2438
2468
|
}();
|
|
2439
|
-
return Promise.resolve(
|
|
2469
|
+
return Promise.resolve(_temp1 && _temp1.then ? _temp1.then(_temp10) : _temp10(_temp1));
|
|
2440
2470
|
} catch (e) {
|
|
2441
2471
|
return Promise.reject(e);
|
|
2442
2472
|
}
|
|
@@ -2696,12 +2726,14 @@ const SearchVendor = () => {
|
|
|
2696
2726
|
}
|
|
2697
2727
|
}) : tab === "SUPERVISOR" ? Digit.Hooks.fsm.useSupervisorSearch(tenantId, _extends({}, paginationParms, {
|
|
2698
2728
|
status: "ACTIVE,DISABLED",
|
|
2699
|
-
name: searchParams === null || searchParams === void 0 ? void 0 : searchParams.name
|
|
2729
|
+
name: searchParams === null || searchParams === void 0 ? void 0 : searchParams.name,
|
|
2730
|
+
mobileNumber: (searchParams === null || searchParams === void 0 ? void 0 : searchParams.mobileNumber) || undefined
|
|
2700
2731
|
}), {
|
|
2701
2732
|
enabled: false
|
|
2702
2733
|
}) : tab === "SURVEYOR" ? Digit.Hooks.fsm.useSurveyorSearch(tenantId, _extends({}, paginationParms, {
|
|
2703
2734
|
status: "ACTIVE,DISABLED",
|
|
2704
|
-
name: searchParams === null || searchParams === void 0 ? void 0 : searchParams.name
|
|
2735
|
+
name: searchParams === null || searchParams === void 0 ? void 0 : searchParams.name,
|
|
2736
|
+
mobileNumber: (searchParams === null || searchParams === void 0 ? void 0 : searchParams.mobileNumber) || undefined
|
|
2705
2737
|
}), {
|
|
2706
2738
|
enabled: false
|
|
2707
2739
|
}) : Digit.Hooks.fsm.useVendorSearch({
|
|
@@ -2901,19 +2933,15 @@ const SearchVendor = () => {
|
|
|
2901
2933
|
label: t("ES_DRIVER_SEARCH_DRIVER_NAME"),
|
|
2902
2934
|
name: "name"
|
|
2903
2935
|
}] : 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
2936
|
label: tab === "SUPERVISOR" ? t("ES_SUPERVISOR_SEARCH_NAME") : t("ES_SURVEYOR_SEARCH_NAME"),
|
|
2916
2937
|
name: "name"
|
|
2938
|
+
}, {
|
|
2939
|
+
label: t("WT_MOBILE_NUMBER"),
|
|
2940
|
+
name: "mobileNumber",
|
|
2941
|
+
type: "text",
|
|
2942
|
+
pattern: "[0-9]{10}",
|
|
2943
|
+
maxLength: 10,
|
|
2944
|
+
title: t("ES_FSM_MOBILE_NUMBER_FORMAT_TIP") || "Enter 10-digit mobile number"
|
|
2917
2945
|
}] : [{
|
|
2918
2946
|
label: t("ES_VENDOR_SEARCH_VENDOR_NAME"),
|
|
2919
2947
|
name: "name"
|
|
@@ -4393,7 +4421,7 @@ const VendorDetails = () => {
|
|
|
4393
4421
|
}, safeVal));
|
|
4394
4422
|
})), /*#__PURE__*/React.createElement("div", {
|
|
4395
4423
|
className: "add-details-link hover-button",
|
|
4396
|
-
onClick: () => history.push("/digit-ui/" + userType + "/vendor/registry/additionaldetails/
|
|
4424
|
+
onClick: () => history.push("/digit-ui/" + userType + "/vendor/registry/additionaldetails/modify-details?vendorId=" + (dsoId || vendorId))
|
|
4397
4425
|
}, t("Edit Details"))) : userType !== "CITIZEN" && !isEkyc && /*#__PURE__*/React.createElement("div", {
|
|
4398
4426
|
onClick: () => history.push("/digit-ui/" + userType + "/vendor/registry/additionaldetails/modify-details?vendorId=" + (dsoId || vendorId)),
|
|
4399
4427
|
className: "add-details-link hover-button"
|
|
@@ -9616,13 +9644,47 @@ const SelectEkycZones = _ref => {
|
|
|
9616
9644
|
var _zroData$commonMaste, _zroData$MdmsRes, _zroData$MdmsRes$comm;
|
|
9617
9645
|
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
9646
|
if (Array.isArray(zroOfficeList)) {
|
|
9619
|
-
|
|
9647
|
+
let activeZros = zroOfficeList.filter(zro => zro && zro.active).map(zro => ({
|
|
9620
9648
|
code: zro.code,
|
|
9621
|
-
name: zro.code
|
|
9649
|
+
name: t(zro.code)
|
|
9622
9650
|
}));
|
|
9651
|
+
if (isEkycVendor && !isVendorPage) {
|
|
9652
|
+
if (!matchedVendor) {
|
|
9653
|
+
activeZros = [];
|
|
9654
|
+
} else {
|
|
9655
|
+
let vendorZoneCodes = [];
|
|
9656
|
+
if (Array.isArray(matchedVendor === null || matchedVendor === void 0 ? void 0 : matchedVendor.zoneIds) && matchedVendor.zoneIds.length > 0) {
|
|
9657
|
+
vendorZoneCodes = matchedVendor.zoneIds.map(z => z.trim().toUpperCase()).filter(Boolean);
|
|
9658
|
+
} else if (matchedVendor !== null && matchedVendor !== void 0 && matchedVendor.assignedZoneId) {
|
|
9659
|
+
vendorZoneCodes = matchedVendor.assignedZoneId.split(",").map(z => z.trim().toUpperCase()).filter(Boolean);
|
|
9660
|
+
}
|
|
9661
|
+
if (vendorZoneCodes.length > 0) {
|
|
9662
|
+
activeZros = activeZros.filter(zro => vendorZoneCodes.includes(zro.code.trim().toUpperCase()));
|
|
9663
|
+
} else {
|
|
9664
|
+
activeZros = [];
|
|
9665
|
+
}
|
|
9666
|
+
}
|
|
9667
|
+
}
|
|
9668
|
+
if (isEkycSupervisor) {
|
|
9669
|
+
if (!matchedSupervisor) {
|
|
9670
|
+
activeZros = [];
|
|
9671
|
+
} else {
|
|
9672
|
+
let supervisorZoneCodes = [];
|
|
9673
|
+
if (Array.isArray(matchedSupervisor === null || matchedSupervisor === void 0 ? void 0 : matchedSupervisor.zoneIds) && matchedSupervisor.zoneIds.length > 0) {
|
|
9674
|
+
supervisorZoneCodes = matchedSupervisor.zoneIds.map(z => z.trim().toUpperCase()).filter(Boolean);
|
|
9675
|
+
} else if (matchedSupervisor !== null && matchedSupervisor !== void 0 && matchedSupervisor.assignedZoneId) {
|
|
9676
|
+
supervisorZoneCodes = matchedSupervisor.assignedZoneId.split(",").map(z => z.trim().toUpperCase()).filter(Boolean);
|
|
9677
|
+
}
|
|
9678
|
+
if (supervisorZoneCodes.length > 0) {
|
|
9679
|
+
activeZros = activeZros.filter(zro => supervisorZoneCodes.includes(zro.code.trim().toUpperCase()));
|
|
9680
|
+
} else {
|
|
9681
|
+
activeZros = [];
|
|
9682
|
+
}
|
|
9683
|
+
}
|
|
9684
|
+
}
|
|
9623
9685
|
setZones(activeZros);
|
|
9624
9686
|
}
|
|
9625
|
-
}, [zroData]);
|
|
9687
|
+
}, [zroData, matchedVendor, matchedSupervisor, isEkycVendor, isEkycSupervisor, isVendorPage, t]);
|
|
9626
9688
|
useEffect(() => {
|
|
9627
9689
|
if (!zones.length || !(formData !== null && formData !== void 0 && formData.zoneIds)) return;
|
|
9628
9690
|
if (isMultiSelect) {
|