@djb25/digit-ui-module-ekyc 1.0.60 → 1.0.62
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 +70 -87
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +70 -87
- package/dist/index.modern.js.map +1 -1
- package/package.json +1 -1
package/dist/index.modern.js
CHANGED
|
@@ -5622,12 +5622,12 @@ const SupervisorDetailsCard = () => {
|
|
|
5622
5622
|
});
|
|
5623
5623
|
}
|
|
5624
5624
|
if (matchedSup) {
|
|
5625
|
-
var _progressReport, _progressReport2, _progressReport3, _matchedSup$owner2, _matchedSup$owner3, _matchedSup$owner4;
|
|
5625
|
+
var _progressReport, _progressReport2, _progressReport3, _matchedSup$owner2, _matchedSup$owner3, _matchedSup$owner4, _matchedSup$owner5, _matchedSup$owner6, _matchedSup$owner7;
|
|
5626
5626
|
const matchedSurveyors = surveyorSearchResponse !== null && surveyorSearchResponse !== void 0 && surveyorSearchResponse.surveyors ? surveyorSearchResponse.surveyors.filter(surv => {
|
|
5627
5627
|
var _matchedSup$owner;
|
|
5628
5628
|
return surv.supervisorId === (matchedSup.id || ((_matchedSup$owner = matchedSup.owner) === null || _matchedSup$owner === void 0 ? void 0 : _matchedSup$owner.uuid));
|
|
5629
5629
|
}).map(surv => {
|
|
5630
|
-
var _surv$owner3, _surv$owner4, _surv$owner5, _realStats, _realStats2, _realStats3, _realStats4;
|
|
5630
|
+
var _surv$owner3, _surv$owner4, _surv$owner5, _surv$owner6, _surv$owner7, _realStats, _realStats2, _realStats3, _realStats4;
|
|
5631
5631
|
let realStats = null;
|
|
5632
5632
|
if (progressData !== null && progressData !== void 0 && progressData.supervisorReport) {
|
|
5633
5633
|
for (const report of progressData.supervisorReport) {
|
|
@@ -5647,6 +5647,8 @@ const SupervisorDetailsCard = () => {
|
|
|
5647
5647
|
surveyorId: surv.id || ((_surv$owner3 = surv.owner) === null || _surv$owner3 === void 0 ? void 0 : _surv$owner3.uuid),
|
|
5648
5648
|
surveyorName: surv.name || ((_surv$owner4 = surv.owner) === null || _surv$owner4 === void 0 ? void 0 : _surv$owner4.name) || "N/A",
|
|
5649
5649
|
mobileNo: ((_surv$owner5 = surv.owner) === null || _surv$owner5 === void 0 ? void 0 : _surv$owner5.mobileNumber) || surv.mobileNo || "N/A",
|
|
5650
|
+
email: ((_surv$owner6 = surv.owner) === null || _surv$owner6 === void 0 ? void 0 : _surv$owner6.emailId) || "N/A",
|
|
5651
|
+
gender: ((_surv$owner7 = surv.owner) === null || _surv$owner7 === void 0 ? void 0 : _surv$owner7.gender) || "N/A",
|
|
5650
5652
|
status: surv.status || "ACTIVE",
|
|
5651
5653
|
totalKnos: ((_realStats = realStats) === null || _realStats === void 0 ? void 0 : _realStats.totalKnos) || 0,
|
|
5652
5654
|
submittedKnos: ((_realStats2 = realStats) === null || _realStats2 === void 0 ? void 0 : _realStats2.submittedKnos) || 0,
|
|
@@ -5662,6 +5664,8 @@ const SupervisorDetailsCard = () => {
|
|
|
5662
5664
|
supervisorId: matchedSup.id || ((_matchedSup$owner2 = matchedSup.owner) === null || _matchedSup$owner2 === void 0 ? void 0 : _matchedSup$owner2.uuid),
|
|
5663
5665
|
supervisorName: matchedSup.name || ((_matchedSup$owner3 = matchedSup.owner) === null || _matchedSup$owner3 === void 0 ? void 0 : _matchedSup$owner3.name) || "N/A",
|
|
5664
5666
|
mobileNo: ((_matchedSup$owner4 = matchedSup.owner) === null || _matchedSup$owner4 === void 0 ? void 0 : _matchedSup$owner4.mobileNumber) || matchedSup.mobileNo || "N/A",
|
|
5667
|
+
email: ((_matchedSup$owner5 = matchedSup.owner) === null || _matchedSup$owner5 === void 0 ? void 0 : _matchedSup$owner5.emailId) || ((_matchedSup$owner6 = matchedSup.owner) === null || _matchedSup$owner6 === void 0 ? void 0 : _matchedSup$owner6.email) || matchedSup.email || matchedSup.emailId || "N/A",
|
|
5668
|
+
gender: ((_matchedSup$owner7 = matchedSup.owner) === null || _matchedSup$owner7 === void 0 ? void 0 : _matchedSup$owner7.gender) || matchedSup.gender || "N/A",
|
|
5665
5669
|
status: matchedSup.status || "ACTIVE",
|
|
5666
5670
|
assignedZoneId: matchedSup.assignedZoneId || "N/A",
|
|
5667
5671
|
vendorId: matchedSup.vendorId,
|
|
@@ -5673,20 +5677,28 @@ const SupervisorDetailsCard = () => {
|
|
|
5673
5677
|
};
|
|
5674
5678
|
}
|
|
5675
5679
|
if (progressReport) {
|
|
5676
|
-
var _loggedInUser$uuid;
|
|
5680
|
+
var _loggedInUser$uuid, _supervisorSearchResp, _matchedSupForFallbac, _matchedSupForFallbac2, _matchedSupForFallbac3;
|
|
5677
5681
|
const isSelf = (targetId === null || targetId === void 0 ? void 0 : targetId.toLowerCase()) === (loggedInUser === null || loggedInUser === void 0 ? void 0 : (_loggedInUser$uuid = loggedInUser.uuid) === null || _loggedInUser$uuid === void 0 ? void 0 : _loggedInUser$uuid.toLowerCase());
|
|
5678
5682
|
const supervisorName = isSelf ? (loggedInUser === null || loggedInUser === void 0 ? void 0 : loggedInUser.name) || progressReport.supervisorName || "N/A" : progressReport.supervisorName || "N/A";
|
|
5679
5683
|
const mobileNo = isSelf ? (loggedInUser === null || loggedInUser === void 0 ? void 0 : loggedInUser.mobileNumber) || progressReport.mobileNo || "N/A" : progressReport.mobileNo || "N/A";
|
|
5684
|
+
const matchedSupForFallback = supervisorSearchResponse === null || supervisorSearchResponse === void 0 ? void 0 : (_supervisorSearchResp = supervisorSearchResponse.supervisors) === null || _supervisorSearchResp === void 0 ? void 0 : _supervisorSearchResp.find(s => {
|
|
5685
|
+
var _s$id7, _ref, _s$owner4, _s$owner4$uuid, _ref2;
|
|
5686
|
+
return ((_s$id7 = s.id) === null || _s$id7 === void 0 ? void 0 : _s$id7.toLowerCase()) === ((_ref = progressReport.supervisorId || progressReport.id) === null || _ref === void 0 ? void 0 : _ref.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()) === ((_ref2 = progressReport.supervisorId || progressReport.id) === null || _ref2 === void 0 ? void 0 : _ref2.toLowerCase());
|
|
5687
|
+
});
|
|
5688
|
+
const email = (matchedSupForFallback === null || matchedSupForFallback === void 0 ? void 0 : (_matchedSupForFallbac = matchedSupForFallback.owner) === null || _matchedSupForFallbac === void 0 ? void 0 : _matchedSupForFallbac.emailId) || (matchedSupForFallback === null || matchedSupForFallback === void 0 ? void 0 : (_matchedSupForFallbac2 = matchedSupForFallback.owner) === null || _matchedSupForFallbac2 === void 0 ? void 0 : _matchedSupForFallbac2.email) || (matchedSupForFallback === null || matchedSupForFallback === void 0 ? void 0 : matchedSupForFallback.email) || (isSelf ? loggedInUser === null || loggedInUser === void 0 ? void 0 : loggedInUser.emailId : null) || progressReport.email || "N/A";
|
|
5689
|
+
const gender = (matchedSupForFallback === null || matchedSupForFallback === void 0 ? void 0 : (_matchedSupForFallbac3 = matchedSupForFallback.owner) === null || _matchedSupForFallbac3 === void 0 ? void 0 : _matchedSupForFallbac3.gender) || (matchedSupForFallback === null || matchedSupForFallback === void 0 ? void 0 : matchedSupForFallback.gender) || (isSelf ? loggedInUser === null || loggedInUser === void 0 ? void 0 : loggedInUser.gender : null) || progressReport.gender || "N/A";
|
|
5680
5690
|
const surveyorsMapped = progressReport.surveyors ? progressReport.surveyors.map(surv => {
|
|
5681
|
-
var _surveyorSearchRespon, _matchedSurv$owner, _matchedSurv$owner2;
|
|
5691
|
+
var _surveyorSearchRespon, _matchedSurv$owner, _matchedSurv$owner2, _matchedSurv$owner3, _matchedSurv$owner4, _matchedSurv$owner5;
|
|
5682
5692
|
const matchedSurv = surveyorSearchResponse === null || surveyorSearchResponse === void 0 ? void 0 : (_surveyorSearchRespon = surveyorSearchResponse.surveyors) === null || _surveyorSearchRespon === void 0 ? void 0 : _surveyorSearchRespon.find(s => {
|
|
5683
|
-
var _s$
|
|
5684
|
-
return ((_s$
|
|
5693
|
+
var _s$id8, _surv$surveyorId, _s$owner5, _s$owner5$uuid, _surv$surveyorId2;
|
|
5694
|
+
return ((_s$id8 = s.id) === null || _s$id8 === void 0 ? void 0 : _s$id8.toLowerCase()) === ((_surv$surveyorId = surv.surveyorId) === null || _surv$surveyorId === void 0 ? void 0 : _surv$surveyorId.toLowerCase()) || ((_s$owner5 = s.owner) === null || _s$owner5 === void 0 ? void 0 : (_s$owner5$uuid = _s$owner5.uuid) === null || _s$owner5$uuid === void 0 ? void 0 : _s$owner5$uuid.toLowerCase()) === ((_surv$surveyorId2 = surv.surveyorId) === null || _surv$surveyorId2 === void 0 ? void 0 : _surv$surveyorId2.toLowerCase());
|
|
5685
5695
|
});
|
|
5686
5696
|
return {
|
|
5687
5697
|
surveyorId: surv.surveyorId || surv.id,
|
|
5688
5698
|
surveyorName: (matchedSurv === null || matchedSurv === void 0 ? void 0 : matchedSurv.name) || (matchedSurv === null || matchedSurv === void 0 ? void 0 : (_matchedSurv$owner = matchedSurv.owner) === null || _matchedSurv$owner === void 0 ? void 0 : _matchedSurv$owner.name) || surv.surveyorName || "N/A",
|
|
5689
5699
|
mobileNo: (matchedSurv === null || matchedSurv === void 0 ? void 0 : (_matchedSurv$owner2 = matchedSurv.owner) === null || _matchedSurv$owner2 === void 0 ? void 0 : _matchedSurv$owner2.mobileNumber) || (matchedSurv === null || matchedSurv === void 0 ? void 0 : matchedSurv.mobileNo) || surv.mobileNo || "N/A",
|
|
5700
|
+
email: (matchedSurv === null || matchedSurv === void 0 ? void 0 : (_matchedSurv$owner3 = matchedSurv.owner) === null || _matchedSurv$owner3 === void 0 ? void 0 : _matchedSurv$owner3.emailId) || (matchedSurv === null || matchedSurv === void 0 ? void 0 : (_matchedSurv$owner4 = matchedSurv.owner) === null || _matchedSurv$owner4 === void 0 ? void 0 : _matchedSurv$owner4.email) || (matchedSurv === null || matchedSurv === void 0 ? void 0 : matchedSurv.email) || surv.email || "N/A",
|
|
5701
|
+
gender: (matchedSurv === null || matchedSurv === void 0 ? void 0 : (_matchedSurv$owner5 = matchedSurv.owner) === null || _matchedSurv$owner5 === void 0 ? void 0 : _matchedSurv$owner5.gender) || (matchedSurv === null || matchedSurv === void 0 ? void 0 : matchedSurv.gender) || surv.gender || "N/A",
|
|
5690
5702
|
status: (matchedSurv === null || matchedSurv === void 0 ? void 0 : matchedSurv.status) || surv.status || "ACTIVE",
|
|
5691
5703
|
totalKnos: surv.totalKnos || 0,
|
|
5692
5704
|
submittedKnos: surv.submittedKnos || 0,
|
|
@@ -5698,6 +5710,8 @@ const SupervisorDetailsCard = () => {
|
|
|
5698
5710
|
supervisorId: progressReport.supervisorId || progressReport.id,
|
|
5699
5711
|
supervisorName,
|
|
5700
5712
|
mobileNo,
|
|
5713
|
+
email,
|
|
5714
|
+
gender,
|
|
5701
5715
|
status: progressReport.status || "ACTIVE",
|
|
5702
5716
|
assignedZoneId: progressReport.assignedZoneId || "N/A",
|
|
5703
5717
|
vendorId: progressReport.vendorId,
|
|
@@ -5712,8 +5726,8 @@ const SupervisorDetailsCard = () => {
|
|
|
5712
5726
|
}, [progressData, supervisorSearchResponse, surveyorSearchResponse, supervisorId, loggedInUser]);
|
|
5713
5727
|
const fullName = (supervisor === null || supervisor === void 0 ? void 0 : supervisor.supervisorName) || "N/A";
|
|
5714
5728
|
const mobileNumber = (supervisor === null || supervisor === void 0 ? void 0 : supervisor.mobileNo) || "N/A";
|
|
5715
|
-
const email = (loggedInUser === null || loggedInUser === void 0 ? void 0 : loggedInUser.emailId) || "N/A";
|
|
5716
|
-
const gender = (loggedInUser === null || loggedInUser === void 0 ? void 0 : loggedInUser.gender) || "N/A";
|
|
5729
|
+
const email = (supervisor === null || supervisor === void 0 ? void 0 : supervisor.email) || ((supervisor === null || supervisor === void 0 ? void 0 : supervisor.supervisorId) === (loggedInUser === null || loggedInUser === void 0 ? void 0 : loggedInUser.uuid) ? loggedInUser === null || loggedInUser === void 0 ? void 0 : loggedInUser.emailId : null) || "N/A";
|
|
5730
|
+
const gender = (supervisor === null || supervisor === void 0 ? void 0 : supervisor.gender) || ((supervisor === null || supervisor === void 0 ? void 0 : supervisor.supervisorId) === (loggedInUser === null || loggedInUser === void 0 ? void 0 : loggedInUser.uuid) ? loggedInUser === null || loggedInUser === void 0 ? void 0 : loggedInUser.gender : null) || "N/A";
|
|
5717
5731
|
const status = (supervisor === null || supervisor === void 0 ? void 0 : supervisor.status) || "N/A";
|
|
5718
5732
|
const assignedZone = (supervisor === null || supervisor === void 0 ? void 0 : supervisor.assignedZoneId) || "N/A";
|
|
5719
5733
|
const vendorName = useMemo(() => {
|
|
@@ -5769,9 +5783,9 @@ const SupervisorDetailsCard = () => {
|
|
|
5769
5783
|
const surveyorColumns = useMemo(() => [{
|
|
5770
5784
|
Header: t("SURVEYOR_NAME") || "Surveyor Name",
|
|
5771
5785
|
accessor: row => (row === null || row === void 0 ? void 0 : row.surveyorName) || "N/A",
|
|
5772
|
-
Cell:
|
|
5786
|
+
Cell: _ref3 => {
|
|
5773
5787
|
var _Digit$SessionStorage2, _Digit$SessionStorage3, _Digit$SessionStorage4, _row$original;
|
|
5774
|
-
let row =
|
|
5788
|
+
let row = _ref3.row;
|
|
5775
5789
|
const userType = ((_Digit$SessionStorage2 = Digit.SessionStorage.get("User")) === null || _Digit$SessionStorage2 === void 0 ? void 0 : (_Digit$SessionStorage3 = _Digit$SessionStorage2.info) === null || _Digit$SessionStorage3 === void 0 ? void 0 : (_Digit$SessionStorage4 = _Digit$SessionStorage3.type) === null || _Digit$SessionStorage4 === void 0 ? void 0 : _Digit$SessionStorage4.toLowerCase()) || "citizen";
|
|
5776
5790
|
const targetPath = "/digit-ui/" + userType + "/ekyc/surveyor-dashboard/" + row.original.surveyorId;
|
|
5777
5791
|
return /*#__PURE__*/React.createElement("a", {
|
|
@@ -5795,8 +5809,8 @@ const SupervisorDetailsCard = () => {
|
|
|
5795
5809
|
Header: t("STATUS") || "Status",
|
|
5796
5810
|
accessor: () => "ACTIVE",
|
|
5797
5811
|
id: "status",
|
|
5798
|
-
Cell:
|
|
5799
|
-
let value =
|
|
5812
|
+
Cell: _ref4 => {
|
|
5813
|
+
let value = _ref4.value;
|
|
5800
5814
|
return /*#__PURE__*/React.createElement("span", {
|
|
5801
5815
|
className: "status-badge verified"
|
|
5802
5816
|
}, t(value) || value);
|
|
@@ -6124,12 +6138,12 @@ const SupervisorDetailsCard = () => {
|
|
|
6124
6138
|
}
|
|
6125
6139
|
return null;
|
|
6126
6140
|
};
|
|
6127
|
-
const StatCard =
|
|
6128
|
-
let title =
|
|
6129
|
-
value =
|
|
6130
|
-
type =
|
|
6131
|
-
isLoading =
|
|
6132
|
-
icon =
|
|
6141
|
+
const StatCard = _ref5 => {
|
|
6142
|
+
let title = _ref5.title,
|
|
6143
|
+
value = _ref5.value,
|
|
6144
|
+
type = _ref5.type,
|
|
6145
|
+
isLoading = _ref5.isLoading,
|
|
6146
|
+
icon = _ref5.icon;
|
|
6133
6147
|
return /*#__PURE__*/React.createElement("div", {
|
|
6134
6148
|
className: "stat-card " + type
|
|
6135
6149
|
}, isLoading ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
@@ -6243,9 +6257,9 @@ const SupervisorDetailsCard = () => {
|
|
|
6243
6257
|
}, {
|
|
6244
6258
|
label: t("THIS_MONTH") || "This Month",
|
|
6245
6259
|
key: "month"
|
|
6246
|
-
}].map(
|
|
6247
|
-
let label =
|
|
6248
|
-
key =
|
|
6260
|
+
}].map(_ref6 => {
|
|
6261
|
+
let label = _ref6.label,
|
|
6262
|
+
key = _ref6.key;
|
|
6249
6263
|
return /*#__PURE__*/React.createElement("div", {
|
|
6250
6264
|
key: key,
|
|
6251
6265
|
className: "menu-item",
|
|
@@ -6296,7 +6310,7 @@ const SupervisorDetailsCard = () => {
|
|
|
6296
6310
|
className: "label"
|
|
6297
6311
|
}, t("GENDER")), /*#__PURE__*/React.createElement("span", {
|
|
6298
6312
|
className: "value"
|
|
6299
|
-
}, gender)), /*#__PURE__*/React.createElement("div", {
|
|
6313
|
+
}, t(gender) || gender)), /*#__PURE__*/React.createElement("div", {
|
|
6300
6314
|
className: "detail-item"
|
|
6301
6315
|
}, /*#__PURE__*/React.createElement("span", {
|
|
6302
6316
|
className: "label"
|
|
@@ -6400,14 +6414,6 @@ const AssignEkycModal = _ref => {
|
|
|
6400
6414
|
const _useState7 = useState(filters),
|
|
6401
6415
|
debouncedFilters = _useState7[0],
|
|
6402
6416
|
setDebouncedFilters = _useState7[1];
|
|
6403
|
-
const _Digit$Hooks$ws$useWS = Digit.Hooks.ws.useWSConfigMDMS.ZROLocation(tenantId),
|
|
6404
|
-
zroLocationsData = _Digit$Hooks$ws$useWS.data;
|
|
6405
|
-
const mappedZROLocation = useMemo(() => {
|
|
6406
|
-
return (zroLocationsData || []).map(item => ({
|
|
6407
|
-
code: item.code,
|
|
6408
|
-
name: item.name
|
|
6409
|
-
}));
|
|
6410
|
-
}, [zroLocationsData]);
|
|
6411
6417
|
const _Digit$Hooks$useCommo = Digit.Hooks.useCommonMDMS(tenantId, "egov-location", ["TenantBoundary"]),
|
|
6412
6418
|
egovLocationData = _Digit$Hooks$useCommo.data;
|
|
6413
6419
|
const boundaryData = useMemo(() => {
|
|
@@ -6420,38 +6426,6 @@ const AssignEkycModal = _ref => {
|
|
|
6420
6426
|
const boundary = (revenueData === null || revenueData === void 0 ? void 0 : revenueData.boundary) || [];
|
|
6421
6427
|
return Array.isArray(boundary) ? boundary : [boundary];
|
|
6422
6428
|
}, [egovLocationData]);
|
|
6423
|
-
const _useMemo = useMemo(() => {
|
|
6424
|
-
const assemblies = new Map();
|
|
6425
|
-
const wards = new Map();
|
|
6426
|
-
const boundaries = Array.isArray(boundaryData) ? boundaryData : boundaryData ? [boundaryData] : [];
|
|
6427
|
-
const traverse = node => {
|
|
6428
|
-
if (!node) return;
|
|
6429
|
-
if (node.label === "Ward" || node.label === "WARD" || node.label === "Block" || node.label === "BLOCK") {
|
|
6430
|
-
const code = node.code || node.localname || node.name;
|
|
6431
|
-
const name = node.name || node.localname || code;
|
|
6432
|
-
if (code) wards.set(code, {
|
|
6433
|
-
code,
|
|
6434
|
-
name: name
|
|
6435
|
-
});
|
|
6436
|
-
}
|
|
6437
|
-
if (node.label === "Assembly Constituency" || node.label === "ASSEMBLY_CONSTITUENCY") {
|
|
6438
|
-
const code = node.code || node.localname || node.name;
|
|
6439
|
-
const name = node.name || node.localname || code;
|
|
6440
|
-
if (code) assemblies.set(code, {
|
|
6441
|
-
code,
|
|
6442
|
-
name: name
|
|
6443
|
-
});
|
|
6444
|
-
}
|
|
6445
|
-
if (node.children && node.children.length > 0) {
|
|
6446
|
-
node.children.forEach(traverse);
|
|
6447
|
-
}
|
|
6448
|
-
};
|
|
6449
|
-
boundaries.forEach(traverse);
|
|
6450
|
-
return {
|
|
6451
|
-
assemblyOptions: Array.from(assemblies.values()).sort((a, b) => a.name.localeCompare(b.name)),
|
|
6452
|
-
wardOptions: Array.from(wards.values()).sort((a, b) => a.name.localeCompare(b.name))
|
|
6453
|
-
};
|
|
6454
|
-
}, [boundaryData]);
|
|
6455
6429
|
const structuredLocalityData = useMemo(() => {
|
|
6456
6430
|
let localities = [];
|
|
6457
6431
|
const boundaries = Array.isArray(boundaryData) ? boundaryData : boundaryData ? [boundaryData] : [];
|
|
@@ -6661,12 +6635,6 @@ const AssignEkycModal = _ref => {
|
|
|
6661
6635
|
const start = currentPage * pageSize;
|
|
6662
6636
|
return allData.slice(start, start + pageSize);
|
|
6663
6637
|
}, [allData, currentPage, pageSize]);
|
|
6664
|
-
useEffect(() => {
|
|
6665
|
-
if (filters.mrkey && (allData === null || allData === void 0 ? void 0 : allData.length) > 0) {
|
|
6666
|
-
const mrKnos = allData.map(item => item.kno).filter(Boolean);
|
|
6667
|
-
setSelectedKnos(mrKnos);
|
|
6668
|
-
}
|
|
6669
|
-
}, [filters.mrkey, allData]);
|
|
6670
6638
|
const handleAssign = () => {
|
|
6671
6639
|
const payload = {
|
|
6672
6640
|
tenantId: tenantId,
|
|
@@ -6682,22 +6650,36 @@ const AssignEkycModal = _ref => {
|
|
|
6682
6650
|
}
|
|
6683
6651
|
activeMutation.mutate(payload);
|
|
6684
6652
|
};
|
|
6685
|
-
const
|
|
6686
|
-
|
|
6687
|
-
|
|
6688
|
-
|
|
6653
|
+
const handleSelect = kno => {
|
|
6654
|
+
setSelectedKnos(prev => prev.includes(kno) ? prev.filter(item => item !== kno) : [...prev, kno]);
|
|
6655
|
+
};
|
|
6656
|
+
const handleSelectAll = e => {
|
|
6657
|
+
e === null || e === void 0 ? void 0 : e.stopPropagation();
|
|
6658
|
+
const allMatchingKnos = allData.map(item => item.kno).filter(Boolean);
|
|
6659
|
+
if (allMatchingKnos.length === 0) return;
|
|
6660
|
+
const isAllSelected = allMatchingKnos.length > 0 && allMatchingKnos.every(kno => selectedKnos.includes(kno));
|
|
6661
|
+
setSelectedKnos(isAllSelected ? [] : allMatchingKnos);
|
|
6689
6662
|
};
|
|
6690
6663
|
const handleFilterChange = (key, value) => {
|
|
6691
6664
|
setFilters(prev => _extends({}, prev, {
|
|
6692
6665
|
[key]: value
|
|
6693
6666
|
}));
|
|
6667
|
+
setCurrentPage(0);
|
|
6694
6668
|
};
|
|
6695
6669
|
const columns = useMemo(() => [{
|
|
6696
|
-
Header: () =>
|
|
6697
|
-
|
|
6698
|
-
|
|
6699
|
-
|
|
6700
|
-
|
|
6670
|
+
Header: () => {
|
|
6671
|
+
const allMatchingKnos = allData.map(item => item.kno).filter(Boolean);
|
|
6672
|
+
const isAllChecked = allMatchingKnos.length > 0 && allMatchingKnos.every(kno => selectedKnos.includes(kno));
|
|
6673
|
+
return /*#__PURE__*/React.createElement("input", {
|
|
6674
|
+
type: "checkbox",
|
|
6675
|
+
checked: isAllChecked,
|
|
6676
|
+
onChange: e => {
|
|
6677
|
+
e.stopPropagation();
|
|
6678
|
+
handleSelectAll(e);
|
|
6679
|
+
},
|
|
6680
|
+
onClick: e => e.stopPropagation()
|
|
6681
|
+
});
|
|
6682
|
+
},
|
|
6701
6683
|
id: "selection",
|
|
6702
6684
|
Cell: _ref2 => {
|
|
6703
6685
|
let row = _ref2.row;
|
|
@@ -6705,7 +6687,11 @@ const AssignEkycModal = _ref => {
|
|
|
6705
6687
|
return /*#__PURE__*/React.createElement("input", {
|
|
6706
6688
|
type: "checkbox",
|
|
6707
6689
|
checked: selectedKnos.includes(kno),
|
|
6708
|
-
onChange:
|
|
6690
|
+
onChange: e => {
|
|
6691
|
+
e.stopPropagation();
|
|
6692
|
+
handleSelect(kno);
|
|
6693
|
+
},
|
|
6694
|
+
onClick: e => e.stopPropagation()
|
|
6709
6695
|
});
|
|
6710
6696
|
}
|
|
6711
6697
|
}, {
|
|
@@ -6740,10 +6726,7 @@ const AssignEkycModal = _ref => {
|
|
|
6740
6726
|
className: "ekyc-status-tag " + status
|
|
6741
6727
|
}, t(status)) : "-";
|
|
6742
6728
|
}
|
|
6743
|
-
}], [selectedKnos, paginatedData]);
|
|
6744
|
-
const handleSelect = kno => {
|
|
6745
|
-
setSelectedKnos(prev => prev.includes(kno) ? prev.filter(item => item !== kno) : [...prev, kno]);
|
|
6746
|
-
};
|
|
6729
|
+
}], [selectedKnos, paginatedData, allData]);
|
|
6747
6730
|
return /*#__PURE__*/React.createElement(Modal, {
|
|
6748
6731
|
headerBarMain: isReassign ? "Reassign KNOs to " + (surveyor === null || surveyor === void 0 ? void 0 : surveyor.name) : "Assign KNOs to " + (surveyor === null || surveyor === void 0 ? void 0 : surveyor.name),
|
|
6749
6732
|
headerBarEnd: /*#__PURE__*/React.createElement(Close, {
|
|
@@ -6764,9 +6747,10 @@ const AssignEkycModal = _ref => {
|
|
|
6764
6747
|
value: filters.kno,
|
|
6765
6748
|
onChange: e => handleFilterChange("kno", e.target.value)
|
|
6766
6749
|
}), /*#__PURE__*/React.createElement("select", {
|
|
6767
|
-
className: "form-control",
|
|
6750
|
+
className: "form-control disabled",
|
|
6768
6751
|
value: filters.pincode,
|
|
6769
|
-
onChange: e => handleFilterChange("pincode", e.target.value)
|
|
6752
|
+
onChange: e => handleFilterChange("pincode", e.target.value),
|
|
6753
|
+
disabled: true
|
|
6770
6754
|
}, /*#__PURE__*/React.createElement("option", {
|
|
6771
6755
|
value: ""
|
|
6772
6756
|
}, "Select Pincode"), pincodeOptions.map(pin => /*#__PURE__*/React.createElement("option", {
|
|
@@ -7259,7 +7243,6 @@ const SurveyorDetailsDashboard = () => {
|
|
|
7259
7243
|
meterPhotoFileStoreId: t("METER_PHOTO_FILESTORE_ID"),
|
|
7260
7244
|
modifiedBy: t("MODIFIED_BY"),
|
|
7261
7245
|
emailId: t("EMAIL_ID"),
|
|
7262
|
-
fatherOrHusbandName: t("FATHER_HUSBUND_NAME"),
|
|
7263
7246
|
dob: t("DOB"),
|
|
7264
7247
|
consumerType: t("CONSUMER_TYPE"),
|
|
7265
7248
|
createdTime: t("CREATED_TIME"),
|
|
@@ -8102,7 +8085,7 @@ const breadcrumb = (userType, listLabel, listPath, detailLabel) => [{
|
|
|
8102
8085
|
}, {
|
|
8103
8086
|
label: detailLabel
|
|
8104
8087
|
}];
|
|
8105
|
-
const getEkycRoutes = userType => [{
|
|
8088
|
+
const getEkycRoutes = (userType, t) => [{
|
|
8106
8089
|
path: "/dashboard",
|
|
8107
8090
|
component: Dashboard,
|
|
8108
8091
|
layout: "normal",
|
|
@@ -8159,7 +8142,7 @@ const getEkycRoutes = userType => [{
|
|
|
8159
8142
|
path: ["/vendors/:vendorId", "/vendors"],
|
|
8160
8143
|
component: VendorDetailsCard,
|
|
8161
8144
|
layout: "normal",
|
|
8162
|
-
breadcrumb: breadcrumb(userType, "EKYC_VENDORS", "
|
|
8145
|
+
breadcrumb: breadcrumb(userType, "EKYC_VENDORS", "admin-dashboard", "EKYC_VENDOR_DETAILS")
|
|
8163
8146
|
}, {
|
|
8164
8147
|
path: ["/supervisor-dashboard/:id", "/supervisor-dashboard"],
|
|
8165
8148
|
component: SupervisorDetailsCard,
|