@djb25/digit-ui-module-vendor 1.0.67 → 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 +67 -50
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +67 -50
- 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: {
|
|
@@ -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$
|
|
2421
|
+
var _props$searchParams3, _props$searchParams4;
|
|
2421
2422
|
return Promise.resolve(Digit.FSMService.supervisorSearch(tenantId, {
|
|
2422
2423
|
status: "ACTIVE,DISABLED",
|
|
2423
|
-
name: (_props$
|
|
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/
|
|
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"
|
|
@@ -9609,31 +9609,54 @@ const SelectEkycZones = _ref => {
|
|
|
9609
9609
|
return ((_s$id = s.id) === null || _s$id === void 0 ? void 0 : _s$id.toLowerCase()) === (loggedInUser === null || loggedInUser === void 0 ? void 0 : (_loggedInUser$uuid = loggedInUser.uuid) === null || _loggedInUser$uuid === void 0 ? void 0 : _loggedInUser$uuid.toLowerCase()) || ((_s$owner = s.owner) === null || _s$owner === void 0 ? void 0 : (_s$owner$uuid = _s$owner.uuid) === null || _s$owner$uuid === void 0 ? void 0 : _s$owner$uuid.toLowerCase()) === (loggedInUser === null || loggedInUser === void 0 ? void 0 : (_loggedInUser$uuid2 = loggedInUser.uuid) === null || _loggedInUser$uuid2 === void 0 ? void 0 : _loggedInUser$uuid2.toLowerCase()) || ((_s$owner2 = s.owner) === null || _s$owner2 === void 0 ? void 0 : _s$owner2.mobileNumber) === (loggedInUser === null || loggedInUser === void 0 ? void 0 : loggedInUser.mobileNumber) || s.mobileNo === (loggedInUser === null || loggedInUser === void 0 ? void 0 : loggedInUser.mobileNumber);
|
|
9610
9610
|
});
|
|
9611
9611
|
}, [supervisorSearchResponse, loggedInUser]);
|
|
9612
|
-
const _Digit$Hooks$useCommo = Digit.Hooks.useCommonMDMS("dl", "
|
|
9613
|
-
|
|
9612
|
+
const _Digit$Hooks$useCommo = Digit.Hooks.useCommonMDMS("dl", "common-masters", ["ZroOfficeList"]),
|
|
9613
|
+
zroData = _Digit$Hooks$useCommo.data,
|
|
9614
9614
|
isLoading = _Digit$Hooks$useCommo.isLoading;
|
|
9615
9615
|
useEffect(() => {
|
|
9616
|
-
var
|
|
9617
|
-
const
|
|
9618
|
-
|
|
9619
|
-
|
|
9620
|
-
|
|
9621
|
-
|
|
9622
|
-
|
|
9623
|
-
|
|
9624
|
-
|
|
9625
|
-
|
|
9626
|
-
|
|
9627
|
-
|
|
9616
|
+
var _zroData$commonMaste, _zroData$MdmsRes, _zroData$MdmsRes$comm;
|
|
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
|
+
if (Array.isArray(zroOfficeList)) {
|
|
9619
|
+
let activeZros = zroOfficeList.filter(zro => zro && zro.active).map(zro => ({
|
|
9620
|
+
code: zro.code,
|
|
9621
|
+
name: t(zro.code)
|
|
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 = [];
|
|
9628
9637
|
}
|
|
9629
9638
|
}
|
|
9630
|
-
|
|
9631
|
-
|
|
9632
|
-
|
|
9633
|
-
|
|
9634
|
-
|
|
9635
|
-
|
|
9636
|
-
|
|
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
|
+
}
|
|
9657
|
+
setZones(activeZros);
|
|
9658
|
+
}
|
|
9659
|
+
}, [zroData, matchedVendor, matchedSupervisor, isEkycVendor, isEkycSupervisor, isVendorPage, t]);
|
|
9637
9660
|
useEffect(() => {
|
|
9638
9661
|
if (!zones.length || !(formData !== null && formData !== void 0 && formData.zoneIds)) return;
|
|
9639
9662
|
if (isMultiSelect) {
|
|
@@ -9642,10 +9665,7 @@ const SelectEkycZones = _ref => {
|
|
|
9642
9665
|
setSelectedZones(formData.zoneIds.filter(Boolean));
|
|
9643
9666
|
return;
|
|
9644
9667
|
}
|
|
9645
|
-
const selected = zones.filter(zone => zone && formData.zoneIds.
|
|
9646
|
-
var _zone$code, _zone$name;
|
|
9647
|
-
return id && (id.toString().toUpperCase() === ((_zone$code = zone.code) === null || _zone$code === void 0 ? void 0 : _zone$code.toUpperCase()) || id.toString().toUpperCase() === ((_zone$name = zone.name) === null || _zone$name === void 0 ? void 0 : _zone$name.toUpperCase()));
|
|
9648
|
-
}));
|
|
9668
|
+
const selected = zones.filter(zone => zone && (formData.zoneIds.includes(zone.name) || formData.zoneIds.includes(zone.code)));
|
|
9649
9669
|
setSelectedZones(selected);
|
|
9650
9670
|
if (!initialized.current) {
|
|
9651
9671
|
initialized.current = true;
|
|
@@ -9660,10 +9680,7 @@ const SelectEkycZones = _ref => {
|
|
|
9660
9680
|
if (selectedVal && typeof selectedVal === "object") {
|
|
9661
9681
|
selectedVal = selectedVal.name || selectedVal.code || "";
|
|
9662
9682
|
}
|
|
9663
|
-
const selected = zones.find(zone =>
|
|
9664
|
-
var _zone$name2, _selectedVal, _zone$code2, _selectedVal2;
|
|
9665
|
-
return zone && (((_zone$name2 = zone.name) === null || _zone$name2 === void 0 ? void 0 : _zone$name2.toUpperCase()) === ((_selectedVal = selectedVal) === null || _selectedVal === void 0 ? void 0 : _selectedVal.toString().toUpperCase()) || ((_zone$code2 = zone.code) === null || _zone$code2 === void 0 ? void 0 : _zone$code2.toUpperCase()) === ((_selectedVal2 = selectedVal) === null || _selectedVal2 === void 0 ? void 0 : _selectedVal2.toString().toUpperCase()));
|
|
9666
|
-
});
|
|
9683
|
+
const selected = zones.find(zone => zone && (zone.name === selectedVal || zone.code === selectedVal));
|
|
9667
9684
|
setSelectedZones(selected ? [selected] : []);
|
|
9668
9685
|
if (!initialized.current && selected) {
|
|
9669
9686
|
initialized.current = true;
|
|
@@ -9682,7 +9699,7 @@ const SelectEkycZones = _ref => {
|
|
|
9682
9699
|
if (isMultiSelect) {
|
|
9683
9700
|
const selected = Array.isArray(value) ? value.map(v => Array.isArray(v) ? v[1] : v).filter(Boolean) : [];
|
|
9684
9701
|
setSelectedZones(selected);
|
|
9685
|
-
onSelect(config.key, selected
|
|
9702
|
+
onSelect(config.key, selected);
|
|
9686
9703
|
} else {
|
|
9687
9704
|
const selectedZone = Array.isArray(value) ? Array.isArray(value[0]) ? value[0][1] : value[0] : value;
|
|
9688
9705
|
setSelectedZones(selectedZone ? [selectedZone] : []);
|
|
@@ -9714,10 +9731,10 @@ const SelectEkycZones = _ref => {
|
|
|
9714
9731
|
disable: disable || isEkycSupervisor || ((_config$props = config.props) === null || _config$props === void 0 ? void 0 : _config$props.disable) || config.disable
|
|
9715
9732
|
})), isMultiSelect && selectedZones.length > 0 && /*#__PURE__*/React.createElement("div", {
|
|
9716
9733
|
className: "selected-zones"
|
|
9717
|
-
}, selectedZones.filter(zone => zone && zone.
|
|
9734
|
+
}, selectedZones.filter(zone => zone && zone.code).map(zone => /*#__PURE__*/React.createElement("span", {
|
|
9718
9735
|
key: zone.code,
|
|
9719
9736
|
className: "selected-zone-chip"
|
|
9720
|
-
}, zone.
|
|
9737
|
+
}, t(zone.code)))));
|
|
9721
9738
|
};
|
|
9722
9739
|
|
|
9723
9740
|
const SelectEkycClusters = _ref => {
|