@djb25/digit-ui-module-ekyc 1.0.50 → 1.0.52
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 +132 -38
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +132 -38
- package/dist/index.modern.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1689,12 +1689,6 @@ const VendorDetailsCard = () => {
|
|
|
1689
1689
|
const tenantId = Digit.ULBService.getCurrentTenantId() || "dl.djb";
|
|
1690
1690
|
const _useParams = reactRouterDom.useParams(),
|
|
1691
1691
|
vendorId = _useParams.vendorId;
|
|
1692
|
-
const _Digit$Hooks$ekyc$use = Digit.Hooks.ekyc.useEkycAssignmentProgress({
|
|
1693
|
-
enabled: !!tenantId,
|
|
1694
|
-
keepPreviousData: true
|
|
1695
|
-
}),
|
|
1696
|
-
isProgressLoading = _Digit$Hooks$ekyc$use.isLoading,
|
|
1697
|
-
progressData = _Digit$Hooks$ekyc$use.data;
|
|
1698
1692
|
const _Digit$Hooks$fsm$useD = Digit.Hooks.fsm.useDsoSearch(tenantId, {
|
|
1699
1693
|
status: "ACTIVE"
|
|
1700
1694
|
}, {
|
|
@@ -1744,6 +1738,16 @@ const VendorDetailsCard = () => {
|
|
|
1744
1738
|
return matchedMock || ekycMockData.vendors[0];
|
|
1745
1739
|
}
|
|
1746
1740
|
}, [vendorSearchResponse, vendorId, loggedInUser]);
|
|
1741
|
+
const targetVendorId = vendorId || (vendor === null || vendor === void 0 ? void 0 : vendor.id) || (vendor === null || vendor === void 0 ? void 0 : vendor.vendorId);
|
|
1742
|
+
const _Digit$Hooks$ekyc$use = Digit.Hooks.ekyc.useEkycAssignmentProgress(targetVendorId ? {
|
|
1743
|
+
vendorId: targetVendorId,
|
|
1744
|
+
vendorIds: [targetVendorId]
|
|
1745
|
+
} : {}, {
|
|
1746
|
+
enabled: !!tenantId,
|
|
1747
|
+
keepPreviousData: true
|
|
1748
|
+
}),
|
|
1749
|
+
isProgressLoading = _Digit$Hooks$ekyc$use.isLoading,
|
|
1750
|
+
progressData = _Digit$Hooks$ekyc$use.data;
|
|
1747
1751
|
const vendorSupervisors = React.useMemo(() => {
|
|
1748
1752
|
if (!(supervisorSearchResponse !== null && supervisorSearchResponse !== void 0 && supervisorSearchResponse.supervisors)) {
|
|
1749
1753
|
if (vendor && Array.isArray(ekycMockData.vendors)) {
|
|
@@ -1786,7 +1790,6 @@ const VendorDetailsCard = () => {
|
|
|
1786
1790
|
const vendorName = (vendor === null || vendor === void 0 ? void 0 : vendor.name) || "N/A";
|
|
1787
1791
|
const mobileNumber = (vendor === null || vendor === void 0 ? void 0 : vendor.mobileNumber) || (vendor === null || vendor === void 0 ? void 0 : (_vendor$owner = vendor.owner) === null || _vendor$owner === void 0 ? void 0 : _vendor$owner.mobileNumber) || "N/A";
|
|
1788
1792
|
const email = (vendor === null || vendor === void 0 ? void 0 : (_vendor$owner2 = vendor.owner) === null || _vendor$owner2 === void 0 ? void 0 : _vendor$owner2.emailId) || "N/A";
|
|
1789
|
-
const status = vendor ? "ACTIVE" : "N/A";
|
|
1790
1793
|
const jurisdictions = React.useMemo(() => {
|
|
1791
1794
|
if (Array.isArray(vendor === null || vendor === void 0 ? void 0 : vendor.jurisdictions)) {
|
|
1792
1795
|
return vendor.jurisdictions.join(", ");
|
|
@@ -1795,7 +1798,7 @@ const VendorDetailsCard = () => {
|
|
|
1795
1798
|
}, [vendor]);
|
|
1796
1799
|
const zoneIds = React.useMemo(() => {
|
|
1797
1800
|
var _vendor$zoneIds;
|
|
1798
|
-
return vendor !== null && vendor !== void 0 && (_vendor$zoneIds = vendor.zoneIds) !== null && _vendor$zoneIds !== void 0 && _vendor$zoneIds.length ? vendor.zoneIds.filter(Boolean).map(zone => String(zone).
|
|
1801
|
+
return vendor !== null && vendor !== void 0 && (_vendor$zoneIds = vendor.zoneIds) !== null && _vendor$zoneIds !== void 0 && _vendor$zoneIds.length ? vendor.zoneIds.filter(Boolean).map(zone => String(zone).trim().toUpperCase()) : [];
|
|
1799
1802
|
}, [vendor]);
|
|
1800
1803
|
const cards = React.useMemo(() => {
|
|
1801
1804
|
const hasRealData = vendorSupervisors.some(s => s.totalKnos > 0);
|
|
@@ -2170,18 +2173,24 @@ const VendorDetailsCard = () => {
|
|
|
2170
2173
|
}, t("EMAIL")), /*#__PURE__*/React__default.createElement("span", {
|
|
2171
2174
|
className: "value"
|
|
2172
2175
|
}, email)), /*#__PURE__*/React__default.createElement("div", {
|
|
2173
|
-
className: "detail-item"
|
|
2174
|
-
|
|
2175
|
-
|
|
2176
|
-
|
|
2177
|
-
className: "value"
|
|
2178
|
-
}, status)), /*#__PURE__*/React__default.createElement("div", {
|
|
2179
|
-
className: "detail-item"
|
|
2176
|
+
className: "detail-item",
|
|
2177
|
+
style: {
|
|
2178
|
+
gridColumn: "1 / -1"
|
|
2179
|
+
}
|
|
2180
2180
|
}, /*#__PURE__*/React__default.createElement("span", {
|
|
2181
2181
|
className: "label"
|
|
2182
2182
|
}, t("ASSIGNED_ZONES") || "Assigned Zones"), /*#__PURE__*/React__default.createElement("span", {
|
|
2183
2183
|
className: "value"
|
|
2184
|
-
}, zoneIds
|
|
2184
|
+
}, zoneIds.length > 0 ? /*#__PURE__*/React__default.createElement("div", {
|
|
2185
|
+
className: "selected-zones",
|
|
2186
|
+
style: {
|
|
2187
|
+
marginTop: "4px",
|
|
2188
|
+
width: "100%"
|
|
2189
|
+
}
|
|
2190
|
+
}, zoneIds.map(zone => /*#__PURE__*/React__default.createElement("span", {
|
|
2191
|
+
key: zone,
|
|
2192
|
+
className: "selected-zone-chip"
|
|
2193
|
+
}, t(zone) || zone))) : "N/A")))), /*#__PURE__*/React__default.createElement("div", {
|
|
2185
2194
|
className: "details-right"
|
|
2186
2195
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
2187
2196
|
className: "download-card"
|
|
@@ -2856,7 +2865,63 @@ const Inbox = _ref2 => {
|
|
|
2856
2865
|
isListLoading = _Digit$Hooks$ekyc$use.isLoading,
|
|
2857
2866
|
_Digit$Hooks$ekyc$use2 = _Digit$Hooks$ekyc$use.data,
|
|
2858
2867
|
listData = _Digit$Hooks$ekyc$use2 === void 0 ? {} : _Digit$Hooks$ekyc$use2;
|
|
2859
|
-
const _Digit$Hooks$
|
|
2868
|
+
const _Digit$Hooks$fsm$useD = Digit.Hooks.fsm.useDsoSearch(tenantId, {
|
|
2869
|
+
status: "ACTIVE"
|
|
2870
|
+
}, {
|
|
2871
|
+
enabled: !!tenantId,
|
|
2872
|
+
staleTime: 300000
|
|
2873
|
+
}),
|
|
2874
|
+
vendorSearchResponse = _Digit$Hooks$fsm$useD.data;
|
|
2875
|
+
const _useMemo = React.useMemo(() => {
|
|
2876
|
+
var _Digit$SessionStorage;
|
|
2877
|
+
if (!vendorSearchResponse || vendorSearchResponse.length === 0) {
|
|
2878
|
+
return {
|
|
2879
|
+
targetVendorId: null,
|
|
2880
|
+
allVendorIds: []
|
|
2881
|
+
};
|
|
2882
|
+
}
|
|
2883
|
+
const loggedInUser = (_Digit$SessionStorage = Digit.SessionStorage.get("User")) === null || _Digit$SessionStorage === void 0 ? void 0 : _Digit$SessionStorage.info;
|
|
2884
|
+
const userUuid = loggedInUser === null || loggedInUser === void 0 ? void 0 : loggedInUser.uuid;
|
|
2885
|
+
const userMobile = loggedInUser === null || loggedInUser === void 0 ? void 0 : loggedInUser.mobileNumber;
|
|
2886
|
+
const matchesUser = v => {
|
|
2887
|
+
var _v$owner, _v$owner2, _v$owner3;
|
|
2888
|
+
const ownerUuid = ((_v$owner = v.owner) === null || _v$owner === void 0 ? void 0 : _v$owner.uuid) || ((_v$owner2 = v.owner) === null || _v$owner2 === void 0 ? void 0 : _v$owner2.id);
|
|
2889
|
+
const ownerMobile = ((_v$owner3 = v.owner) === null || _v$owner3 === void 0 ? void 0 : _v$owner3.mobileNumber) || v.mobileNumber;
|
|
2890
|
+
return userUuid && ownerUuid === userUuid || userMobile && ownerMobile === userMobile;
|
|
2891
|
+
};
|
|
2892
|
+
const allIds = vendorSearchResponse.map(v => {
|
|
2893
|
+
const dso = v.dsoDetails || v;
|
|
2894
|
+
return dso.id || dso.vendorId || v.id || v.vendorId;
|
|
2895
|
+
}).filter(Boolean);
|
|
2896
|
+
const matched = vendorSearchResponse.find(v => matchesUser(v.dsoDetails || v));
|
|
2897
|
+
let matchedId = null;
|
|
2898
|
+
if (matched) {
|
|
2899
|
+
const dso = matched.dsoDetails || matched;
|
|
2900
|
+
matchedId = dso.id || dso.vendorId || matched.id || matched.vendorId;
|
|
2901
|
+
}
|
|
2902
|
+
return {
|
|
2903
|
+
targetVendorId: matchedId,
|
|
2904
|
+
allVendorIds: allIds
|
|
2905
|
+
};
|
|
2906
|
+
}, [vendorSearchResponse]),
|
|
2907
|
+
targetVendorId = _useMemo.targetVendorId,
|
|
2908
|
+
allVendorIds = _useMemo.allVendorIds;
|
|
2909
|
+
const progressParams = React.useMemo(() => {
|
|
2910
|
+
if (targetVendorId) {
|
|
2911
|
+
return {
|
|
2912
|
+
vendorId: targetVendorId,
|
|
2913
|
+
vendorIds: [targetVendorId]
|
|
2914
|
+
};
|
|
2915
|
+
}
|
|
2916
|
+
if (allVendorIds && allVendorIds.length > 0) {
|
|
2917
|
+
return {
|
|
2918
|
+
vendorId: allVendorIds[0],
|
|
2919
|
+
vendorIds: allVendorIds
|
|
2920
|
+
};
|
|
2921
|
+
}
|
|
2922
|
+
return {};
|
|
2923
|
+
}, [targetVendorId, allVendorIds]);
|
|
2924
|
+
const _Digit$Hooks$ekyc$use3 = Digit.Hooks.ekyc.useEkycAssignmentProgress(progressParams, {
|
|
2860
2925
|
enabled: !!tenantId,
|
|
2861
2926
|
keepPreviousData: true
|
|
2862
2927
|
}),
|
|
@@ -2919,8 +2984,8 @@ const Inbox = _ref2 => {
|
|
|
2919
2984
|
const _useTranslation = reactI18next.useTranslation(),
|
|
2920
2985
|
t = _useTranslation.t;
|
|
2921
2986
|
const supervisor = React.useMemo(() => {
|
|
2922
|
-
var _Digit$
|
|
2923
|
-
const loggedInUser = (_Digit$
|
|
2987
|
+
var _Digit$SessionStorage2, _loggedInUser$roles;
|
|
2988
|
+
const loggedInUser = (_Digit$SessionStorage2 = Digit.SessionStorage.get("User")) === null || _Digit$SessionStorage2 === void 0 ? void 0 : _Digit$SessionStorage2.info;
|
|
2924
2989
|
const roles = (loggedInUser === null || loggedInUser === void 0 ? void 0 : (_loggedInUser$roles = loggedInUser.roles) === null || _loggedInUser$roles === void 0 ? void 0 : _loggedInUser$roles.map(ele => ele.code)) || [];
|
|
2925
2990
|
if (roles.includes("EKYC_SUPERVISOR")) {
|
|
2926
2991
|
const targetId = loggedInUser === null || loggedInUser === void 0 ? void 0 : loggedInUser.uuid;
|
|
@@ -4801,8 +4866,18 @@ const AdminDashboard = () => {
|
|
|
4801
4866
|
}),
|
|
4802
4867
|
vendorSearchResponse = _Digit$Hooks$fsm$useD.data,
|
|
4803
4868
|
isVendorSearchLoading = _Digit$Hooks$fsm$useD.isLoading;
|
|
4804
|
-
const
|
|
4805
|
-
|
|
4869
|
+
const allVendorIds = React.useMemo(() => {
|
|
4870
|
+
if (!vendorSearchResponse) return [];
|
|
4871
|
+
return vendorSearchResponse.map(v => {
|
|
4872
|
+
const dso = v.dsoDetails || v;
|
|
4873
|
+
return dso.id || dso.vendorId || v.id || v.vendorId;
|
|
4874
|
+
}).filter(Boolean);
|
|
4875
|
+
}, [vendorSearchResponse]);
|
|
4876
|
+
const _Digit$Hooks$ekyc$use = Digit.Hooks.ekyc.useEkycAssignmentProgress(allVendorIds.length > 0 ? {
|
|
4877
|
+
vendorId: allVendorIds[0],
|
|
4878
|
+
vendorIds: allVendorIds
|
|
4879
|
+
} : {}, {
|
|
4880
|
+
enabled: !!tenantId && allVendorIds.length > 0,
|
|
4806
4881
|
keepPreviousData: true
|
|
4807
4882
|
}),
|
|
4808
4883
|
progressData = _Digit$Hooks$ekyc$use.data,
|
|
@@ -4914,12 +4989,6 @@ const SupervisorDetailsCard = () => {
|
|
|
4914
4989
|
const _useState = React.useState(false),
|
|
4915
4990
|
ekycDownloadLoading = _useState[0],
|
|
4916
4991
|
setEkycDownloadLoading = _useState[1];
|
|
4917
|
-
const _Digit$Hooks$ekyc$use = Digit.Hooks.ekyc.useEkycAssignmentProgress({
|
|
4918
|
-
enabled: !!tenantId,
|
|
4919
|
-
keepPreviousData: true
|
|
4920
|
-
}),
|
|
4921
|
-
isProgressLoading = _Digit$Hooks$ekyc$use.isLoading,
|
|
4922
|
-
progressData = _Digit$Hooks$ekyc$use.data;
|
|
4923
4992
|
const _Digit$Hooks$fsm$useS = Digit.Hooks.fsm.useSupervisorSearch(tenantId, {
|
|
4924
4993
|
status: "ACTIVE"
|
|
4925
4994
|
}, {
|
|
@@ -4928,6 +4997,24 @@ const SupervisorDetailsCard = () => {
|
|
|
4928
4997
|
}),
|
|
4929
4998
|
supervisorSearchResponse = _Digit$Hooks$fsm$useS.data,
|
|
4930
4999
|
isSupervisorSearchLoading = _Digit$Hooks$fsm$useS.isLoading;
|
|
5000
|
+
const targetVendorId = React.useMemo(() => {
|
|
5001
|
+
const targetId = supervisorId || (loggedInUser === null || loggedInUser === void 0 ? void 0 : loggedInUser.uuid);
|
|
5002
|
+
if (!targetId || !(supervisorSearchResponse !== null && supervisorSearchResponse !== void 0 && supervisorSearchResponse.supervisors)) return null;
|
|
5003
|
+
const matchedSup = supervisorSearchResponse.supervisors.find(s => {
|
|
5004
|
+
var _s$id, _s$owner, _s$owner$uuid;
|
|
5005
|
+
return ((_s$id = s.id) === null || _s$id === void 0 ? void 0 : _s$id.toLowerCase()) === (targetId === null || targetId === void 0 ? void 0 : targetId.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()) === (targetId === null || targetId === void 0 ? void 0 : targetId.toLowerCase());
|
|
5006
|
+
});
|
|
5007
|
+
return (matchedSup === null || matchedSup === void 0 ? void 0 : matchedSup.vendorId) || null;
|
|
5008
|
+
}, [supervisorId, loggedInUser, supervisorSearchResponse]);
|
|
5009
|
+
const _Digit$Hooks$ekyc$use = Digit.Hooks.ekyc.useEkycAssignmentProgress(targetVendorId ? {
|
|
5010
|
+
vendorId: targetVendorId,
|
|
5011
|
+
vendorIds: [targetVendorId]
|
|
5012
|
+
} : {}, {
|
|
5013
|
+
enabled: !!tenantId,
|
|
5014
|
+
keepPreviousData: true
|
|
5015
|
+
}),
|
|
5016
|
+
isProgressLoading = _Digit$Hooks$ekyc$use.isLoading,
|
|
5017
|
+
progressData = _Digit$Hooks$ekyc$use.data;
|
|
4931
5018
|
const _Digit$Hooks$fsm$useS2 = Digit.Hooks.fsm.useSurveyorSearch(tenantId, {
|
|
4932
5019
|
status: "ACTIVE"
|
|
4933
5020
|
}, {
|
|
@@ -4950,8 +5037,8 @@ const SupervisorDetailsCard = () => {
|
|
|
4950
5037
|
let resolvedSupervisorId = supervisorId;
|
|
4951
5038
|
if (!resolvedSupervisorId && supervisorSearchResponse !== null && supervisorSearchResponse !== void 0 && supervisorSearchResponse.supervisors && targetOwnerOrId) {
|
|
4952
5039
|
const selfSup = supervisorSearchResponse.supervisors.find(s => {
|
|
4953
|
-
var _s$
|
|
4954
|
-
return ((_s$
|
|
5040
|
+
var _s$owner2, _s$owner2$uuid, _s$id2;
|
|
5041
|
+
return ((_s$owner2 = s.owner) === null || _s$owner2 === void 0 ? void 0 : (_s$owner2$uuid = _s$owner2.uuid) === null || _s$owner2$uuid === void 0 ? void 0 : _s$owner2$uuid.toLowerCase()) === (targetOwnerOrId === null || targetOwnerOrId === void 0 ? void 0 : targetOwnerOrId.toLowerCase()) || ((_s$id2 = s.id) === null || _s$id2 === void 0 ? void 0 : _s$id2.toLowerCase()) === (targetOwnerOrId === null || targetOwnerOrId === void 0 ? void 0 : targetOwnerOrId.toLowerCase());
|
|
4955
5042
|
});
|
|
4956
5043
|
resolvedSupervisorId = selfSup === null || selfSup === void 0 ? void 0 : selfSup.id;
|
|
4957
5044
|
}
|
|
@@ -4959,15 +5046,15 @@ const SupervisorDetailsCard = () => {
|
|
|
4959
5046
|
let matchedSup = null;
|
|
4960
5047
|
if (supervisorSearchResponse !== null && supervisorSearchResponse !== void 0 && supervisorSearchResponse.supervisors) {
|
|
4961
5048
|
matchedSup = supervisorSearchResponse.supervisors.find(s => {
|
|
4962
|
-
var _s$
|
|
4963
|
-
return ((_s$
|
|
5049
|
+
var _s$id3, _s$owner3, _s$owner3$uuid;
|
|
5050
|
+
return ((_s$id3 = s.id) === null || _s$id3 === void 0 ? void 0 : _s$id3.toLowerCase()) === (targetId === null || targetId === void 0 ? void 0 : targetId.toLowerCase()) || ((_s$owner3 = s.owner) === null || _s$owner3 === void 0 ? void 0 : (_s$owner3$uuid = _s$owner3.uuid) === null || _s$owner3$uuid === void 0 ? void 0 : _s$owner3$uuid.toLowerCase()) === (targetId === null || targetId === void 0 ? void 0 : targetId.toLowerCase());
|
|
4964
5051
|
});
|
|
4965
5052
|
}
|
|
4966
5053
|
let progressReport = null;
|
|
4967
5054
|
if (progressData !== null && progressData !== void 0 && progressData.supervisorReport && targetId) {
|
|
4968
5055
|
progressReport = progressData.supervisorReport.find(s => {
|
|
4969
|
-
var _s$supervisorId, _s$
|
|
4970
|
-
return ((_s$supervisorId = s.supervisorId) === null || _s$supervisorId === void 0 ? void 0 : _s$supervisorId.toLowerCase()) === (targetId === null || targetId === void 0 ? void 0 : targetId.toLowerCase()) || ((_s$
|
|
5056
|
+
var _s$supervisorId, _s$id4;
|
|
5057
|
+
return ((_s$supervisorId = s.supervisorId) === null || _s$supervisorId === void 0 ? void 0 : _s$supervisorId.toLowerCase()) === (targetId === null || targetId === void 0 ? void 0 : targetId.toLowerCase()) || ((_s$id4 = s.id) === null || _s$id4 === void 0 ? void 0 : _s$id4.toLowerCase()) === (targetId === null || targetId === void 0 ? void 0 : targetId.toLowerCase());
|
|
4971
5058
|
});
|
|
4972
5059
|
}
|
|
4973
5060
|
if (matchedSup) {
|
|
@@ -4983,8 +5070,8 @@ const SupervisorDetailsCard = () => {
|
|
|
4983
5070
|
var _report$supervisorId, _matchedSup$id, _report$id, _matchedSup$id2, _report$surveyors;
|
|
4984
5071
|
if (((_report$supervisorId = report.supervisorId) === null || _report$supervisorId === void 0 ? void 0 : _report$supervisorId.toLowerCase()) !== ((_matchedSup$id = matchedSup.id) === null || _matchedSup$id === void 0 ? void 0 : _matchedSup$id.toLowerCase()) && ((_report$id = report.id) === null || _report$id === void 0 ? void 0 : _report$id.toLowerCase()) !== ((_matchedSup$id2 = matchedSup.id) === null || _matchedSup$id2 === void 0 ? void 0 : _matchedSup$id2.toLowerCase())) continue;
|
|
4985
5072
|
const matchedSurv = (_report$surveyors = report.surveyors) === null || _report$surveyors === void 0 ? void 0 : _report$surveyors.find(s => {
|
|
4986
|
-
var _s$surveyorId, _surv$id, _s$surveyorId2, _surv$owner, _surv$owner$uuid, _s$
|
|
4987
|
-
return s.surveyorId && (((_s$surveyorId = s.surveyorId) === null || _s$surveyorId === void 0 ? void 0 : _s$surveyorId.toLowerCase()) === ((_surv$id = surv.id) === null || _surv$id === void 0 ? void 0 : _surv$id.toLowerCase()) || ((_s$surveyorId2 = s.surveyorId) === null || _s$surveyorId2 === void 0 ? void 0 : _s$surveyorId2.toLowerCase()) === ((_surv$owner = surv.owner) === null || _surv$owner === void 0 ? void 0 : (_surv$owner$uuid = _surv$owner.uuid) === null || _surv$owner$uuid === void 0 ? void 0 : _surv$owner$uuid.toLowerCase())) || s.id && (((_s$
|
|
5073
|
+
var _s$surveyorId, _surv$id, _s$surveyorId2, _surv$owner, _surv$owner$uuid, _s$id5, _surv$id2, _s$id6, _surv$owner2, _surv$owner2$uuid;
|
|
5074
|
+
return s.surveyorId && (((_s$surveyorId = s.surveyorId) === null || _s$surveyorId === void 0 ? void 0 : _s$surveyorId.toLowerCase()) === ((_surv$id = surv.id) === null || _surv$id === void 0 ? void 0 : _surv$id.toLowerCase()) || ((_s$surveyorId2 = s.surveyorId) === null || _s$surveyorId2 === void 0 ? void 0 : _s$surveyorId2.toLowerCase()) === ((_surv$owner = surv.owner) === null || _surv$owner === void 0 ? void 0 : (_surv$owner$uuid = _surv$owner.uuid) === null || _surv$owner$uuid === void 0 ? void 0 : _surv$owner$uuid.toLowerCase())) || s.id && (((_s$id5 = s.id) === null || _s$id5 === void 0 ? void 0 : _s$id5.toLowerCase()) === ((_surv$id2 = surv.id) === null || _surv$id2 === void 0 ? void 0 : _surv$id2.toLowerCase()) || ((_s$id6 = s.id) === null || _s$id6 === void 0 ? void 0 : _s$id6.toLowerCase()) === ((_surv$owner2 = surv.owner) === null || _surv$owner2 === void 0 ? void 0 : (_surv$owner2$uuid = _surv$owner2.uuid) === null || _surv$owner2$uuid === void 0 ? void 0 : _surv$owner2$uuid.toLowerCase()));
|
|
4988
5075
|
});
|
|
4989
5076
|
if (matchedSurv) {
|
|
4990
5077
|
realStats = matchedSurv;
|
|
@@ -5029,8 +5116,8 @@ const SupervisorDetailsCard = () => {
|
|
|
5029
5116
|
const surveyorsMapped = progressReport.surveyors ? progressReport.surveyors.map(surv => {
|
|
5030
5117
|
var _surveyorSearchRespon, _matchedSurv$owner, _matchedSurv$owner2;
|
|
5031
5118
|
const matchedSurv = surveyorSearchResponse === null || surveyorSearchResponse === void 0 ? void 0 : (_surveyorSearchRespon = surveyorSearchResponse.surveyors) === null || _surveyorSearchRespon === void 0 ? void 0 : _surveyorSearchRespon.find(s => {
|
|
5032
|
-
var _s$
|
|
5033
|
-
return ((_s$
|
|
5119
|
+
var _s$id7, _surv$surveyorId, _s$owner4, _s$owner4$uuid, _surv$surveyorId2;
|
|
5120
|
+
return ((_s$id7 = s.id) === null || _s$id7 === void 0 ? void 0 : _s$id7.toLowerCase()) === ((_surv$surveyorId = surv.surveyorId) === null || _surv$surveyorId === void 0 ? void 0 : _surv$surveyorId.toLowerCase()) || ((_s$owner4 = s.owner) === null || _s$owner4 === void 0 ? void 0 : (_s$owner4$uuid = _s$owner4.uuid) === null || _s$owner4$uuid === void 0 ? void 0 : _s$owner4$uuid.toLowerCase()) === ((_surv$surveyorId2 = surv.surveyorId) === null || _surv$surveyorId2 === void 0 ? void 0 : _surv$surveyorId2.toLowerCase());
|
|
5034
5121
|
});
|
|
5035
5122
|
return {
|
|
5036
5123
|
surveyorId: surv.surveyorId || surv.id,
|
|
@@ -5474,7 +5561,14 @@ const SupervisorDetailsCard = () => {
|
|
|
5474
5561
|
className: "label"
|
|
5475
5562
|
}, t("ASSIGNED_ZONE") || "Assigned Zone"), /*#__PURE__*/React__default.createElement("span", {
|
|
5476
5563
|
className: "value"
|
|
5477
|
-
}, assignedZone
|
|
5564
|
+
}, assignedZone && assignedZone !== "N/A" ? /*#__PURE__*/React__default.createElement("div", {
|
|
5565
|
+
className: "selected-zones",
|
|
5566
|
+
style: {
|
|
5567
|
+
marginTop: "4px"
|
|
5568
|
+
}
|
|
5569
|
+
}, /*#__PURE__*/React__default.createElement("span", {
|
|
5570
|
+
className: "selected-zone-chip"
|
|
5571
|
+
}, t(assignedZone.trim().toUpperCase()) || assignedZone)) : assignedZone)), /*#__PURE__*/React__default.createElement("div", {
|
|
5478
5572
|
className: "detail-item"
|
|
5479
5573
|
}, /*#__PURE__*/React__default.createElement("span", {
|
|
5480
5574
|
className: "label"
|