@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.modern.js
CHANGED
|
@@ -1686,12 +1686,6 @@ const VendorDetailsCard = () => {
|
|
|
1686
1686
|
const tenantId = Digit.ULBService.getCurrentTenantId() || "dl.djb";
|
|
1687
1687
|
const _useParams = useParams(),
|
|
1688
1688
|
vendorId = _useParams.vendorId;
|
|
1689
|
-
const _Digit$Hooks$ekyc$use = Digit.Hooks.ekyc.useEkycAssignmentProgress({
|
|
1690
|
-
enabled: !!tenantId,
|
|
1691
|
-
keepPreviousData: true
|
|
1692
|
-
}),
|
|
1693
|
-
isProgressLoading = _Digit$Hooks$ekyc$use.isLoading,
|
|
1694
|
-
progressData = _Digit$Hooks$ekyc$use.data;
|
|
1695
1689
|
const _Digit$Hooks$fsm$useD = Digit.Hooks.fsm.useDsoSearch(tenantId, {
|
|
1696
1690
|
status: "ACTIVE"
|
|
1697
1691
|
}, {
|
|
@@ -1741,6 +1735,16 @@ const VendorDetailsCard = () => {
|
|
|
1741
1735
|
return matchedMock || ekycMockData.vendors[0];
|
|
1742
1736
|
}
|
|
1743
1737
|
}, [vendorSearchResponse, vendorId, loggedInUser]);
|
|
1738
|
+
const targetVendorId = vendorId || (vendor === null || vendor === void 0 ? void 0 : vendor.id) || (vendor === null || vendor === void 0 ? void 0 : vendor.vendorId);
|
|
1739
|
+
const _Digit$Hooks$ekyc$use = Digit.Hooks.ekyc.useEkycAssignmentProgress(targetVendorId ? {
|
|
1740
|
+
vendorId: targetVendorId,
|
|
1741
|
+
vendorIds: [targetVendorId]
|
|
1742
|
+
} : {}, {
|
|
1743
|
+
enabled: !!tenantId,
|
|
1744
|
+
keepPreviousData: true
|
|
1745
|
+
}),
|
|
1746
|
+
isProgressLoading = _Digit$Hooks$ekyc$use.isLoading,
|
|
1747
|
+
progressData = _Digit$Hooks$ekyc$use.data;
|
|
1744
1748
|
const vendorSupervisors = useMemo(() => {
|
|
1745
1749
|
if (!(supervisorSearchResponse !== null && supervisorSearchResponse !== void 0 && supervisorSearchResponse.supervisors)) {
|
|
1746
1750
|
if (vendor && Array.isArray(ekycMockData.vendors)) {
|
|
@@ -1783,7 +1787,6 @@ const VendorDetailsCard = () => {
|
|
|
1783
1787
|
const vendorName = (vendor === null || vendor === void 0 ? void 0 : vendor.name) || "N/A";
|
|
1784
1788
|
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";
|
|
1785
1789
|
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";
|
|
1786
|
-
const status = vendor ? "ACTIVE" : "N/A";
|
|
1787
1790
|
const jurisdictions = useMemo(() => {
|
|
1788
1791
|
if (Array.isArray(vendor === null || vendor === void 0 ? void 0 : vendor.jurisdictions)) {
|
|
1789
1792
|
return vendor.jurisdictions.join(", ");
|
|
@@ -1792,7 +1795,7 @@ const VendorDetailsCard = () => {
|
|
|
1792
1795
|
}, [vendor]);
|
|
1793
1796
|
const zoneIds = useMemo(() => {
|
|
1794
1797
|
var _vendor$zoneIds;
|
|
1795
|
-
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).
|
|
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).trim().toUpperCase()) : [];
|
|
1796
1799
|
}, [vendor]);
|
|
1797
1800
|
const cards = useMemo(() => {
|
|
1798
1801
|
const hasRealData = vendorSupervisors.some(s => s.totalKnos > 0);
|
|
@@ -2167,18 +2170,24 @@ const VendorDetailsCard = () => {
|
|
|
2167
2170
|
}, t("EMAIL")), /*#__PURE__*/React.createElement("span", {
|
|
2168
2171
|
className: "value"
|
|
2169
2172
|
}, email)), /*#__PURE__*/React.createElement("div", {
|
|
2170
|
-
className: "detail-item"
|
|
2171
|
-
|
|
2172
|
-
|
|
2173
|
-
|
|
2174
|
-
className: "value"
|
|
2175
|
-
}, status)), /*#__PURE__*/React.createElement("div", {
|
|
2176
|
-
className: "detail-item"
|
|
2173
|
+
className: "detail-item",
|
|
2174
|
+
style: {
|
|
2175
|
+
gridColumn: "1 / -1"
|
|
2176
|
+
}
|
|
2177
2177
|
}, /*#__PURE__*/React.createElement("span", {
|
|
2178
2178
|
className: "label"
|
|
2179
2179
|
}, t("ASSIGNED_ZONES") || "Assigned Zones"), /*#__PURE__*/React.createElement("span", {
|
|
2180
2180
|
className: "value"
|
|
2181
|
-
}, zoneIds
|
|
2181
|
+
}, zoneIds.length > 0 ? /*#__PURE__*/React.createElement("div", {
|
|
2182
|
+
className: "selected-zones",
|
|
2183
|
+
style: {
|
|
2184
|
+
marginTop: "4px",
|
|
2185
|
+
width: "100%"
|
|
2186
|
+
}
|
|
2187
|
+
}, zoneIds.map(zone => /*#__PURE__*/React.createElement("span", {
|
|
2188
|
+
key: zone,
|
|
2189
|
+
className: "selected-zone-chip"
|
|
2190
|
+
}, t(zone) || zone))) : "N/A")))), /*#__PURE__*/React.createElement("div", {
|
|
2182
2191
|
className: "details-right"
|
|
2183
2192
|
}, /*#__PURE__*/React.createElement("div", {
|
|
2184
2193
|
className: "download-card"
|
|
@@ -2853,7 +2862,63 @@ const Inbox = _ref2 => {
|
|
|
2853
2862
|
isListLoading = _Digit$Hooks$ekyc$use.isLoading,
|
|
2854
2863
|
_Digit$Hooks$ekyc$use2 = _Digit$Hooks$ekyc$use.data,
|
|
2855
2864
|
listData = _Digit$Hooks$ekyc$use2 === void 0 ? {} : _Digit$Hooks$ekyc$use2;
|
|
2856
|
-
const _Digit$Hooks$
|
|
2865
|
+
const _Digit$Hooks$fsm$useD = Digit.Hooks.fsm.useDsoSearch(tenantId, {
|
|
2866
|
+
status: "ACTIVE"
|
|
2867
|
+
}, {
|
|
2868
|
+
enabled: !!tenantId,
|
|
2869
|
+
staleTime: 300000
|
|
2870
|
+
}),
|
|
2871
|
+
vendorSearchResponse = _Digit$Hooks$fsm$useD.data;
|
|
2872
|
+
const _useMemo = useMemo(() => {
|
|
2873
|
+
var _Digit$SessionStorage;
|
|
2874
|
+
if (!vendorSearchResponse || vendorSearchResponse.length === 0) {
|
|
2875
|
+
return {
|
|
2876
|
+
targetVendorId: null,
|
|
2877
|
+
allVendorIds: []
|
|
2878
|
+
};
|
|
2879
|
+
}
|
|
2880
|
+
const loggedInUser = (_Digit$SessionStorage = Digit.SessionStorage.get("User")) === null || _Digit$SessionStorage === void 0 ? void 0 : _Digit$SessionStorage.info;
|
|
2881
|
+
const userUuid = loggedInUser === null || loggedInUser === void 0 ? void 0 : loggedInUser.uuid;
|
|
2882
|
+
const userMobile = loggedInUser === null || loggedInUser === void 0 ? void 0 : loggedInUser.mobileNumber;
|
|
2883
|
+
const matchesUser = v => {
|
|
2884
|
+
var _v$owner, _v$owner2, _v$owner3;
|
|
2885
|
+
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);
|
|
2886
|
+
const ownerMobile = ((_v$owner3 = v.owner) === null || _v$owner3 === void 0 ? void 0 : _v$owner3.mobileNumber) || v.mobileNumber;
|
|
2887
|
+
return userUuid && ownerUuid === userUuid || userMobile && ownerMobile === userMobile;
|
|
2888
|
+
};
|
|
2889
|
+
const allIds = vendorSearchResponse.map(v => {
|
|
2890
|
+
const dso = v.dsoDetails || v;
|
|
2891
|
+
return dso.id || dso.vendorId || v.id || v.vendorId;
|
|
2892
|
+
}).filter(Boolean);
|
|
2893
|
+
const matched = vendorSearchResponse.find(v => matchesUser(v.dsoDetails || v));
|
|
2894
|
+
let matchedId = null;
|
|
2895
|
+
if (matched) {
|
|
2896
|
+
const dso = matched.dsoDetails || matched;
|
|
2897
|
+
matchedId = dso.id || dso.vendorId || matched.id || matched.vendorId;
|
|
2898
|
+
}
|
|
2899
|
+
return {
|
|
2900
|
+
targetVendorId: matchedId,
|
|
2901
|
+
allVendorIds: allIds
|
|
2902
|
+
};
|
|
2903
|
+
}, [vendorSearchResponse]),
|
|
2904
|
+
targetVendorId = _useMemo.targetVendorId,
|
|
2905
|
+
allVendorIds = _useMemo.allVendorIds;
|
|
2906
|
+
const progressParams = useMemo(() => {
|
|
2907
|
+
if (targetVendorId) {
|
|
2908
|
+
return {
|
|
2909
|
+
vendorId: targetVendorId,
|
|
2910
|
+
vendorIds: [targetVendorId]
|
|
2911
|
+
};
|
|
2912
|
+
}
|
|
2913
|
+
if (allVendorIds && allVendorIds.length > 0) {
|
|
2914
|
+
return {
|
|
2915
|
+
vendorId: allVendorIds[0],
|
|
2916
|
+
vendorIds: allVendorIds
|
|
2917
|
+
};
|
|
2918
|
+
}
|
|
2919
|
+
return {};
|
|
2920
|
+
}, [targetVendorId, allVendorIds]);
|
|
2921
|
+
const _Digit$Hooks$ekyc$use3 = Digit.Hooks.ekyc.useEkycAssignmentProgress(progressParams, {
|
|
2857
2922
|
enabled: !!tenantId,
|
|
2858
2923
|
keepPreviousData: true
|
|
2859
2924
|
}),
|
|
@@ -2916,8 +2981,8 @@ const Inbox = _ref2 => {
|
|
|
2916
2981
|
const _useTranslation = useTranslation(),
|
|
2917
2982
|
t = _useTranslation.t;
|
|
2918
2983
|
const supervisor = useMemo(() => {
|
|
2919
|
-
var _Digit$
|
|
2920
|
-
const loggedInUser = (_Digit$
|
|
2984
|
+
var _Digit$SessionStorage2, _loggedInUser$roles;
|
|
2985
|
+
const loggedInUser = (_Digit$SessionStorage2 = Digit.SessionStorage.get("User")) === null || _Digit$SessionStorage2 === void 0 ? void 0 : _Digit$SessionStorage2.info;
|
|
2921
2986
|
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)) || [];
|
|
2922
2987
|
if (roles.includes("EKYC_SUPERVISOR")) {
|
|
2923
2988
|
const targetId = loggedInUser === null || loggedInUser === void 0 ? void 0 : loggedInUser.uuid;
|
|
@@ -4798,8 +4863,18 @@ const AdminDashboard = () => {
|
|
|
4798
4863
|
}),
|
|
4799
4864
|
vendorSearchResponse = _Digit$Hooks$fsm$useD.data,
|
|
4800
4865
|
isVendorSearchLoading = _Digit$Hooks$fsm$useD.isLoading;
|
|
4801
|
-
const
|
|
4802
|
-
|
|
4866
|
+
const allVendorIds = useMemo(() => {
|
|
4867
|
+
if (!vendorSearchResponse) return [];
|
|
4868
|
+
return vendorSearchResponse.map(v => {
|
|
4869
|
+
const dso = v.dsoDetails || v;
|
|
4870
|
+
return dso.id || dso.vendorId || v.id || v.vendorId;
|
|
4871
|
+
}).filter(Boolean);
|
|
4872
|
+
}, [vendorSearchResponse]);
|
|
4873
|
+
const _Digit$Hooks$ekyc$use = Digit.Hooks.ekyc.useEkycAssignmentProgress(allVendorIds.length > 0 ? {
|
|
4874
|
+
vendorId: allVendorIds[0],
|
|
4875
|
+
vendorIds: allVendorIds
|
|
4876
|
+
} : {}, {
|
|
4877
|
+
enabled: !!tenantId && allVendorIds.length > 0,
|
|
4803
4878
|
keepPreviousData: true
|
|
4804
4879
|
}),
|
|
4805
4880
|
progressData = _Digit$Hooks$ekyc$use.data,
|
|
@@ -4911,12 +4986,6 @@ const SupervisorDetailsCard = () => {
|
|
|
4911
4986
|
const _useState = useState(false),
|
|
4912
4987
|
ekycDownloadLoading = _useState[0],
|
|
4913
4988
|
setEkycDownloadLoading = _useState[1];
|
|
4914
|
-
const _Digit$Hooks$ekyc$use = Digit.Hooks.ekyc.useEkycAssignmentProgress({
|
|
4915
|
-
enabled: !!tenantId,
|
|
4916
|
-
keepPreviousData: true
|
|
4917
|
-
}),
|
|
4918
|
-
isProgressLoading = _Digit$Hooks$ekyc$use.isLoading,
|
|
4919
|
-
progressData = _Digit$Hooks$ekyc$use.data;
|
|
4920
4989
|
const _Digit$Hooks$fsm$useS = Digit.Hooks.fsm.useSupervisorSearch(tenantId, {
|
|
4921
4990
|
status: "ACTIVE"
|
|
4922
4991
|
}, {
|
|
@@ -4925,6 +4994,24 @@ const SupervisorDetailsCard = () => {
|
|
|
4925
4994
|
}),
|
|
4926
4995
|
supervisorSearchResponse = _Digit$Hooks$fsm$useS.data,
|
|
4927
4996
|
isSupervisorSearchLoading = _Digit$Hooks$fsm$useS.isLoading;
|
|
4997
|
+
const targetVendorId = useMemo(() => {
|
|
4998
|
+
const targetId = supervisorId || (loggedInUser === null || loggedInUser === void 0 ? void 0 : loggedInUser.uuid);
|
|
4999
|
+
if (!targetId || !(supervisorSearchResponse !== null && supervisorSearchResponse !== void 0 && supervisorSearchResponse.supervisors)) return null;
|
|
5000
|
+
const matchedSup = supervisorSearchResponse.supervisors.find(s => {
|
|
5001
|
+
var _s$id, _s$owner, _s$owner$uuid;
|
|
5002
|
+
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());
|
|
5003
|
+
});
|
|
5004
|
+
return (matchedSup === null || matchedSup === void 0 ? void 0 : matchedSup.vendorId) || null;
|
|
5005
|
+
}, [supervisorId, loggedInUser, supervisorSearchResponse]);
|
|
5006
|
+
const _Digit$Hooks$ekyc$use = Digit.Hooks.ekyc.useEkycAssignmentProgress(targetVendorId ? {
|
|
5007
|
+
vendorId: targetVendorId,
|
|
5008
|
+
vendorIds: [targetVendorId]
|
|
5009
|
+
} : {}, {
|
|
5010
|
+
enabled: !!tenantId,
|
|
5011
|
+
keepPreviousData: true
|
|
5012
|
+
}),
|
|
5013
|
+
isProgressLoading = _Digit$Hooks$ekyc$use.isLoading,
|
|
5014
|
+
progressData = _Digit$Hooks$ekyc$use.data;
|
|
4928
5015
|
const _Digit$Hooks$fsm$useS2 = Digit.Hooks.fsm.useSurveyorSearch(tenantId, {
|
|
4929
5016
|
status: "ACTIVE"
|
|
4930
5017
|
}, {
|
|
@@ -4947,8 +5034,8 @@ const SupervisorDetailsCard = () => {
|
|
|
4947
5034
|
let resolvedSupervisorId = supervisorId;
|
|
4948
5035
|
if (!resolvedSupervisorId && supervisorSearchResponse !== null && supervisorSearchResponse !== void 0 && supervisorSearchResponse.supervisors && targetOwnerOrId) {
|
|
4949
5036
|
const selfSup = supervisorSearchResponse.supervisors.find(s => {
|
|
4950
|
-
var _s$
|
|
4951
|
-
return ((_s$
|
|
5037
|
+
var _s$owner2, _s$owner2$uuid, _s$id2;
|
|
5038
|
+
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());
|
|
4952
5039
|
});
|
|
4953
5040
|
resolvedSupervisorId = selfSup === null || selfSup === void 0 ? void 0 : selfSup.id;
|
|
4954
5041
|
}
|
|
@@ -4956,15 +5043,15 @@ const SupervisorDetailsCard = () => {
|
|
|
4956
5043
|
let matchedSup = null;
|
|
4957
5044
|
if (supervisorSearchResponse !== null && supervisorSearchResponse !== void 0 && supervisorSearchResponse.supervisors) {
|
|
4958
5045
|
matchedSup = supervisorSearchResponse.supervisors.find(s => {
|
|
4959
|
-
var _s$
|
|
4960
|
-
return ((_s$
|
|
5046
|
+
var _s$id3, _s$owner3, _s$owner3$uuid;
|
|
5047
|
+
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());
|
|
4961
5048
|
});
|
|
4962
5049
|
}
|
|
4963
5050
|
let progressReport = null;
|
|
4964
5051
|
if (progressData !== null && progressData !== void 0 && progressData.supervisorReport && targetId) {
|
|
4965
5052
|
progressReport = progressData.supervisorReport.find(s => {
|
|
4966
|
-
var _s$supervisorId, _s$
|
|
4967
|
-
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$
|
|
5053
|
+
var _s$supervisorId, _s$id4;
|
|
5054
|
+
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());
|
|
4968
5055
|
});
|
|
4969
5056
|
}
|
|
4970
5057
|
if (matchedSup) {
|
|
@@ -4980,8 +5067,8 @@ const SupervisorDetailsCard = () => {
|
|
|
4980
5067
|
var _report$supervisorId, _matchedSup$id, _report$id, _matchedSup$id2, _report$surveyors;
|
|
4981
5068
|
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;
|
|
4982
5069
|
const matchedSurv = (_report$surveyors = report.surveyors) === null || _report$surveyors === void 0 ? void 0 : _report$surveyors.find(s => {
|
|
4983
|
-
var _s$surveyorId, _surv$id, _s$surveyorId2, _surv$owner, _surv$owner$uuid, _s$
|
|
4984
|
-
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$
|
|
5070
|
+
var _s$surveyorId, _surv$id, _s$surveyorId2, _surv$owner, _surv$owner$uuid, _s$id5, _surv$id2, _s$id6, _surv$owner2, _surv$owner2$uuid;
|
|
5071
|
+
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()));
|
|
4985
5072
|
});
|
|
4986
5073
|
if (matchedSurv) {
|
|
4987
5074
|
realStats = matchedSurv;
|
|
@@ -5026,8 +5113,8 @@ const SupervisorDetailsCard = () => {
|
|
|
5026
5113
|
const surveyorsMapped = progressReport.surveyors ? progressReport.surveyors.map(surv => {
|
|
5027
5114
|
var _surveyorSearchRespon, _matchedSurv$owner, _matchedSurv$owner2;
|
|
5028
5115
|
const matchedSurv = surveyorSearchResponse === null || surveyorSearchResponse === void 0 ? void 0 : (_surveyorSearchRespon = surveyorSearchResponse.surveyors) === null || _surveyorSearchRespon === void 0 ? void 0 : _surveyorSearchRespon.find(s => {
|
|
5029
|
-
var _s$
|
|
5030
|
-
return ((_s$
|
|
5116
|
+
var _s$id7, _surv$surveyorId, _s$owner4, _s$owner4$uuid, _surv$surveyorId2;
|
|
5117
|
+
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());
|
|
5031
5118
|
});
|
|
5032
5119
|
return {
|
|
5033
5120
|
surveyorId: surv.surveyorId || surv.id,
|
|
@@ -5471,7 +5558,14 @@ const SupervisorDetailsCard = () => {
|
|
|
5471
5558
|
className: "label"
|
|
5472
5559
|
}, t("ASSIGNED_ZONE") || "Assigned Zone"), /*#__PURE__*/React.createElement("span", {
|
|
5473
5560
|
className: "value"
|
|
5474
|
-
}, assignedZone
|
|
5561
|
+
}, assignedZone && assignedZone !== "N/A" ? /*#__PURE__*/React.createElement("div", {
|
|
5562
|
+
className: "selected-zones",
|
|
5563
|
+
style: {
|
|
5564
|
+
marginTop: "4px"
|
|
5565
|
+
}
|
|
5566
|
+
}, /*#__PURE__*/React.createElement("span", {
|
|
5567
|
+
className: "selected-zone-chip"
|
|
5568
|
+
}, t(assignedZone.trim().toUpperCase()) || assignedZone)) : assignedZone)), /*#__PURE__*/React.createElement("div", {
|
|
5475
5569
|
className: "detail-item"
|
|
5476
5570
|
}, /*#__PURE__*/React.createElement("span", {
|
|
5477
5571
|
className: "label"
|