@djb25/digit-ui-module-vendor 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.
@@ -199,6 +199,7 @@ const AddSurveyor = _ref => {
199
199
  surveyor: {
200
200
  tenantId: tenantId,
201
201
  description: (data === null || data === void 0 ? void 0 : data.description) || "",
202
+ correspondenceAddress: data === null || data === void 0 ? void 0 : data.correspondenceAddress,
202
203
  additionalDetails: {
203
204
  serviceType: "ekyc"
204
205
  },
@@ -210,8 +211,7 @@ const AddSurveyor = _ref => {
210
211
  gender: (data === null || data === void 0 ? void 0 : (_data$gender = data.gender) === null || _data$gender === void 0 ? void 0 : _data$gender.code) || "OTHERS",
211
212
  dob: data !== null && data !== void 0 && data.dob ? new Date(data.dob).getTime() : null,
212
213
  emailId: data === null || data === void 0 ? void 0 : data.emailId,
213
- mobileNumber: data === null || data === void 0 ? void 0 : data.mobileNumber,
214
- correspondenceAddress: data === null || data === void 0 ? void 0 : data.correspondenceAddress
214
+ mobileNumber: data === null || data === void 0 ? void 0 : data.mobileNumber
215
215
  }
216
216
  }
217
217
  };
@@ -632,7 +632,7 @@ const DropdownStatus = _ref => {
632
632
  };
633
633
 
634
634
  const RegisteredVendorSearch = _ref => {
635
- var _matchedRoles$wt, _matchedRoles$wt2, _matchedRoles$ekyc, _matchedRoles$ekyc2, _matchedRoles$wt3, _matchedRoles$ekyc3, _matchedRoles$wt4, _matchedRoles$wt5, _matchedRoles$ekyc4, _matchedRoles$ekyc5, _matchedRoles$ekyc6;
635
+ var _matchedRoles$wt, _matchedRoles$wt2, _matchedRoles$ekyc, _matchedRoles$ekyc2, _matchedRoles$wt3, _matchedRoles$ekyc3, _matchedRoles$wt4, _matchedRoles$wt5, _matchedRoles$ekyc4, _matchedRoles$ekyc5, _matchedRoles$ekyc6, _matchedRoles$ekyc7, _matchedRoles$ekyc8;
636
636
  let onSearch = _ref.onSearch,
637
637
  type = _ref.type,
638
638
  onClose = _ref.onClose,
@@ -796,13 +796,13 @@ const RegisteredVendorSearch = _ref => {
796
796
  clearSearch();
797
797
  onTabChange("DRIVER");
798
798
  }
799
- }, t("ES_FSM_REGISTRY_INBOX_TAB_DRIVER")), (matchedRoles === null || matchedRoles === void 0 ? void 0 : (_matchedRoles$ekyc4 = matchedRoles.ekyc) === null || _matchedRoles$ekyc4 === void 0 ? void 0 : _matchedRoles$ekyc4.includes("EKYC_VENDOR")) && /*#__PURE__*/React.createElement("button", {
799
+ }, t("ES_FSM_REGISTRY_INBOX_TAB_DRIVER")), ((matchedRoles === null || matchedRoles === void 0 ? void 0 : (_matchedRoles$ekyc4 = matchedRoles.ekyc) === null || _matchedRoles$ekyc4 === void 0 ? void 0 : _matchedRoles$ekyc4.includes("EKYC_VENDOR")) || (matchedRoles === null || matchedRoles === void 0 ? void 0 : (_matchedRoles$ekyc5 = matchedRoles.ekyc) === null || _matchedRoles$ekyc5 === void 0 ? void 0 : _matchedRoles$ekyc5.includes("EMPLOYEE"))) && /*#__PURE__*/React.createElement("button", {
800
800
  className: selectedTab === "SUPERVISOR" ? "search-tab-head-selected" : "search-tab-head",
801
801
  onClick: () => {
802
802
  clearSearch();
803
803
  onTabChange("SUPERVISOR");
804
804
  }
805
- }, t("ES_FSM_REGISTRY_INBOX_TAB_SUPERVISOR")), ((matchedRoles === null || matchedRoles === void 0 ? void 0 : (_matchedRoles$ekyc5 = matchedRoles.ekyc) === null || _matchedRoles$ekyc5 === void 0 ? void 0 : _matchedRoles$ekyc5.includes("EKYC_SUPERVISOR")) || (matchedRoles === null || matchedRoles === void 0 ? void 0 : (_matchedRoles$ekyc6 = matchedRoles.ekyc) === null || _matchedRoles$ekyc6 === void 0 ? void 0 : _matchedRoles$ekyc6.includes("EKYC_VENDOR"))) && /*#__PURE__*/React.createElement("button", {
805
+ }, t("ES_FSM_REGISTRY_INBOX_TAB_SUPERVISOR")), ((matchedRoles === null || matchedRoles === void 0 ? void 0 : (_matchedRoles$ekyc6 = matchedRoles.ekyc) === null || _matchedRoles$ekyc6 === void 0 ? void 0 : _matchedRoles$ekyc6.includes("EKYC_SUPERVISOR")) || (matchedRoles === null || matchedRoles === void 0 ? void 0 : (_matchedRoles$ekyc7 = matchedRoles.ekyc) === null || _matchedRoles$ekyc7 === void 0 ? void 0 : _matchedRoles$ekyc7.includes("EKYC_VENDOR")) || (matchedRoles === null || matchedRoles === void 0 ? void 0 : (_matchedRoles$ekyc8 = matchedRoles.ekyc) === null || _matchedRoles$ekyc8 === void 0 ? void 0 : _matchedRoles$ekyc8.includes("EMPLOYEE"))) && /*#__PURE__*/React.createElement("button", {
806
806
  className: selectedTab === "SURVEYOR" ? "search-tab-head-selected" : "search-tab-head",
807
807
  onClick: () => {
808
808
  clearSearch();
@@ -1513,12 +1513,12 @@ const VendorInbox = props => {
1513
1513
  });
1514
1514
  };
1515
1515
  const onSurveyorSupervisorSelect = (row, selectedSupervisor) => {
1516
- var _selectedSupervisor$o, _selectedSupervisor$o2, _formDetails$owner9, _formDetails$owner0, _formDetails$owner1, _formDetails$owner10;
1516
+ var _selectedSupervisor$o, _formDetails$owner9, _formDetails$owner0, _formDetails$owner1, _formDetails$owner10;
1517
1517
  let formDetails = row.original;
1518
1518
  const formData = {
1519
1519
  surveyor: _extends({}, formDetails, {
1520
- supervisorId: (selectedSupervisor === null || selectedSupervisor === void 0 ? void 0 : selectedSupervisor.name) || (selectedSupervisor === null || selectedSupervisor === void 0 ? void 0 : (_selectedSupervisor$o = selectedSupervisor.owner) === null || _selectedSupervisor$o === void 0 ? void 0 : _selectedSupervisor$o.name) || null,
1521
- supervisorName: (selectedSupervisor === null || selectedSupervisor === void 0 ? void 0 : selectedSupervisor.name) || (selectedSupervisor === null || selectedSupervisor === void 0 ? void 0 : (_selectedSupervisor$o2 = selectedSupervisor.owner) === null || _selectedSupervisor$o2 === void 0 ? void 0 : _selectedSupervisor$o2.name) || null,
1520
+ supervisorId: (selectedSupervisor === null || selectedSupervisor === void 0 ? void 0 : selectedSupervisor.id) || null,
1521
+ supervisorName: (selectedSupervisor === null || selectedSupervisor === void 0 ? void 0 : selectedSupervisor.name) || (selectedSupervisor === null || selectedSupervisor === void 0 ? void 0 : (_selectedSupervisor$o = selectedSupervisor.owner) === null || _selectedSupervisor$o === void 0 ? void 0 : _selectedSupervisor$o.name) || null,
1522
1522
  owner: _extends({}, formDetails === null || formDetails === void 0 ? void 0 : formDetails.owner, {
1523
1523
  gender: (formDetails === null || formDetails === void 0 ? void 0 : (_formDetails$owner9 = formDetails.owner) === null || _formDetails$owner9 === void 0 ? void 0 : _formDetails$owner9.gender) || "OTHERS",
1524
1524
  dob: (formDetails === null || formDetails === void 0 ? void 0 : (_formDetails$owner0 = formDetails.owner) === null || _formDetails$owner0 === void 0 ? void 0 : _formDetails$owner0.dob) || new Date("1/1/1970").getTime(),
@@ -2136,70 +2136,61 @@ const VendorInbox = props => {
2136
2136
  }];
2137
2137
  case "SURVEYOR":
2138
2138
  return [{
2139
- Header: t("ES_FSM_REGISTRY_INBOX_USERNAME"),
2139
+ Header: t("USER_ID"),
2140
2140
  exportAccessor: row => {
2141
2141
  var _row$owner5;
2142
2142
  return (row === null || row === void 0 ? void 0 : (_row$owner5 = row.owner) === null || _row$owner5 === void 0 ? void 0 : _row$owner5.userName) || "NA";
2143
2143
  }
2144
2144
  }, {
2145
- Header: t("ES_FSM_REGISTRY_INBOX_DRIVER_NAME"),
2145
+ Header: t("USER_NAME"),
2146
+ exportAccessor: row => (row === null || row === void 0 ? void 0 : row.name) || "NA"
2147
+ }, {
2148
+ Header: t("VENDOR_NAME"),
2146
2149
  exportAccessor: row => {
2147
- var _row$owner6;
2148
- return ((row === null || row === void 0 ? void 0 : row.name) || "NA") + " (" + ((row === null || row === void 0 ? void 0 : (_row$owner6 = row.owner) === null || _row$owner6 === void 0 ? void 0 : _row$owner6.mobileNumber) || "NA") + ")";
2150
+ var _row$vendorData0, _row$vendor0;
2151
+ return (row === null || row === void 0 ? void 0 : row.vendorName) || (row === null || row === void 0 ? void 0 : (_row$vendorData0 = row.vendorData) === null || _row$vendorData0 === void 0 ? void 0 : _row$vendorData0.name) || (row === null || row === void 0 ? void 0 : (_row$vendor0 = row.vendor) === null || _row$vendor0 === void 0 ? void 0 : _row$vendor0.name) || "NA";
2149
2152
  }
2150
2153
  }, {
2151
- Header: t("ES_FSM_REGISTRY_INBOX_SUPERVISOR_NAME"),
2154
+ Header: t("SUPERVISOR_NAME"),
2152
2155
  exportAccessor: row => {
2153
- var _selectedSupervisor$o3, _row$reportingManager2;
2156
+ var _selectedSupervisor$o2, _row$reportingManager2;
2154
2157
  const selectedSupervisor = getSelectedSupervisorOption(row, supervisors);
2155
- return selectedSupervisor ? selectedSupervisor.name || ((_selectedSupervisor$o3 = selectedSupervisor.owner) === null || _selectedSupervisor$o3 === void 0 ? void 0 : _selectedSupervisor$o3.name) : (row === null || row === void 0 ? void 0 : row.supervisorName) || (row === null || row === void 0 ? void 0 : (_row$reportingManager2 = row.reportingManager) === null || _row$reportingManager2 === void 0 ? void 0 : _row$reportingManager2.name) || "NA";
2158
+ return selectedSupervisor ? selectedSupervisor.name || ((_selectedSupervisor$o2 = selectedSupervisor.owner) === null || _selectedSupervisor$o2 === void 0 ? void 0 : _selectedSupervisor$o2.name) || "NA" : (row === null || row === void 0 ? void 0 : row.supervisorName) || (row === null || row === void 0 ? void 0 : (_row$reportingManager2 = row.reportingManager) === null || _row$reportingManager2 === void 0 ? void 0 : _row$reportingManager2.name) || "NA";
2156
2159
  }
2157
2160
  }, {
2158
- Header: t("ES_FSM_REGISTRY_INBOX_DATE_DRIVER_CREATION"),
2161
+ Header: t("CREATION_DATE"),
2159
2162
  exportAccessor: row => {
2160
2163
  var _row$auditDetails7, _row$auditDetails8;
2161
2164
  return row !== null && row !== void 0 && (_row$auditDetails7 = row.auditDetails) !== null && _row$auditDetails7 !== void 0 && _row$auditDetails7.createdTime ? Digit.DateUtils.ConvertEpochToDate(row === null || row === void 0 ? void 0 : (_row$auditDetails8 = row.auditDetails) === null || _row$auditDetails8 === void 0 ? void 0 : _row$auditDetails8.createdTime) : "";
2162
2165
  }
2163
- }, {
2164
- Header: t("ES_FSM_REGISTRY_INBOX_VENDOR_NAME"),
2165
- exportAccessor: row => {
2166
- var _row$vendorData0, _row$vendor0, _row$vendorData1, _row$vendorData10, _row$vendorData10$own, _row$vendor1, _row$vendor10, _row$vendor10$owner;
2167
- return ((row === null || row === void 0 ? void 0 : (_row$vendorData0 = row.vendorData) === null || _row$vendorData0 === void 0 ? void 0 : _row$vendorData0.name) || (row === null || row === void 0 ? void 0 : (_row$vendor0 = row.vendor) === null || _row$vendor0 === void 0 ? void 0 : _row$vendor0.name) || "NA") + " " + ((row === null || row === void 0 ? void 0 : (_row$vendorData1 = row.vendorData) === null || _row$vendorData1 === void 0 ? void 0 : _row$vendorData1.mobileNumber) || (row === null || row === void 0 ? void 0 : (_row$vendorData10 = row.vendorData) === null || _row$vendorData10 === void 0 ? void 0 : (_row$vendorData10$own = _row$vendorData10.owner) === null || _row$vendorData10$own === void 0 ? void 0 : _row$vendorData10$own.mobileNumber) || (row === null || row === void 0 ? void 0 : (_row$vendor1 = row.vendor) === null || _row$vendor1 === void 0 ? void 0 : _row$vendor1.mobileNumber) || (row === null || row === void 0 ? void 0 : (_row$vendor10 = row.vendor) === null || _row$vendor10 === void 0 ? void 0 : (_row$vendor10$owner = _row$vendor10.owner) === null || _row$vendor10$owner === void 0 ? void 0 : _row$vendor10$owner.mobileNumber) || "NA");
2168
- }
2169
2166
  }, {
2170
2167
  Header: t("ES_FSM_REGISTRY_INBOX_ENABLED"),
2171
2168
  exportAccessor: row => (row === null || row === void 0 ? void 0 : row.status) || "NA"
2172
2169
  }];
2173
2170
  case "SUPERVISOR":
2174
2171
  return [{
2175
- Header: t("ES_FSM_REGISTRY_INBOX_USERNAME"),
2172
+ Header: t("USER_ID"),
2176
2173
  exportAccessor: row => {
2177
- var _row$owner7;
2178
- return (row === null || row === void 0 ? void 0 : (_row$owner7 = row.owner) === null || _row$owner7 === void 0 ? void 0 : _row$owner7.userName) || "NA";
2174
+ var _row$owner6;
2175
+ return (row === null || row === void 0 ? void 0 : (_row$owner6 = row.owner) === null || _row$owner6 === void 0 ? void 0 : _row$owner6.userName) || "NA";
2179
2176
  }
2180
2177
  }, {
2181
- Header: t("ES_FSM_REGISTRY_INBOX_DRIVER_NAME"),
2182
- exportAccessor: row => {
2183
- var _row$owner8;
2184
- return ((row === null || row === void 0 ? void 0 : row.name) || "NA") + " (" + ((row === null || row === void 0 ? void 0 : (_row$owner8 = row.owner) === null || _row$owner8 === void 0 ? void 0 : _row$owner8.mobileNumber) || "NA") + ")";
2185
- }
2178
+ Header: t("USER_NAME"),
2179
+ exportAccessor: row => (row === null || row === void 0 ? void 0 : row.name) || "NA"
2186
2180
  }, {
2187
- Header: t("ES_FSM_REGISTRY_INBOX_DATE_DRIVER_CREATION"),
2188
- exportAccessor: row => {
2189
- var _row$auditDetails9, _row$auditDetails0;
2190
- return row !== null && row !== void 0 && (_row$auditDetails9 = row.auditDetails) !== null && _row$auditDetails9 !== void 0 && _row$auditDetails9.createdTime ? Digit.DateUtils.ConvertEpochToDate(row === null || row === void 0 ? void 0 : (_row$auditDetails0 = row.auditDetails) === null || _row$auditDetails0 === void 0 ? void 0 : _row$auditDetails0.createdTime) : "";
2191
- }
2181
+ Header: t("ZONE"),
2182
+ exportAccessor: row => (row === null || row === void 0 ? void 0 : row.assignedZoneId) || "NA"
2192
2183
  }, {
2193
- Header: t("ES_FSM_REGISTRY_INBOX_VENDOR_NAME"),
2184
+ Header: t("VENDOR_NAME"),
2194
2185
  exportAccessor: row => {
2195
- var _row$vendorData11, _row$vendor11, _row$vendorData12, _row$vendorData13, _row$vendorData13$own, _row$vendor12, _row$vendor13, _row$vendor13$owner;
2196
- return ((row === null || row === void 0 ? void 0 : (_row$vendorData11 = row.vendorData) === null || _row$vendorData11 === void 0 ? void 0 : _row$vendorData11.name) || (row === null || row === void 0 ? void 0 : (_row$vendor11 = row.vendor) === null || _row$vendor11 === void 0 ? void 0 : _row$vendor11.name) || "NA") + " " + ((row === null || row === void 0 ? void 0 : (_row$vendorData12 = row.vendorData) === null || _row$vendorData12 === void 0 ? void 0 : _row$vendorData12.mobileNumber) || (row === null || row === void 0 ? void 0 : (_row$vendorData13 = row.vendorData) === null || _row$vendorData13 === void 0 ? void 0 : (_row$vendorData13$own = _row$vendorData13.owner) === null || _row$vendorData13$own === void 0 ? void 0 : _row$vendorData13$own.mobileNumber) || (row === null || row === void 0 ? void 0 : (_row$vendor12 = row.vendor) === null || _row$vendor12 === void 0 ? void 0 : _row$vendor12.mobileNumber) || (row === null || row === void 0 ? void 0 : (_row$vendor13 = row.vendor) === null || _row$vendor13 === void 0 ? void 0 : (_row$vendor13$owner = _row$vendor13.owner) === null || _row$vendor13$owner === void 0 ? void 0 : _row$vendor13$owner.mobileNumber) || "NA");
2186
+ var _row$vendorData1, _row$vendor1;
2187
+ return (row === null || row === void 0 ? void 0 : row.vendorName) || (row === null || row === void 0 ? void 0 : (_row$vendorData1 = row.vendorData) === null || _row$vendorData1 === void 0 ? void 0 : _row$vendorData1.name) || (row === null || row === void 0 ? void 0 : (_row$vendor1 = row.vendor) === null || _row$vendor1 === void 0 ? void 0 : _row$vendor1.name) || "NA";
2197
2188
  }
2198
2189
  }, {
2199
- Header: t("ES_VENDOR_SUPERVISOR_AGENCY_NAME"),
2190
+ Header: t("CREATION_DATE"),
2200
2191
  exportAccessor: row => {
2201
- var _row$vendorData14, _row$vendor14, _row$vendorData15, _row$vendorData16, _row$vendorData16$own, _row$vendor15, _row$vendor16, _row$vendor16$owner;
2202
- return ((row === null || row === void 0 ? void 0 : (_row$vendorData14 = row.vendorData) === null || _row$vendorData14 === void 0 ? void 0 : _row$vendorData14.name) || (row === null || row === void 0 ? void 0 : (_row$vendor14 = row.vendor) === null || _row$vendor14 === void 0 ? void 0 : _row$vendor14.name) || "NA") + " " + ((row === null || row === void 0 ? void 0 : (_row$vendorData15 = row.vendorData) === null || _row$vendorData15 === void 0 ? void 0 : _row$vendorData15.mobileNumber) || (row === null || row === void 0 ? void 0 : (_row$vendorData16 = row.vendorData) === null || _row$vendorData16 === void 0 ? void 0 : (_row$vendorData16$own = _row$vendorData16.owner) === null || _row$vendorData16$own === void 0 ? void 0 : _row$vendorData16$own.mobileNumber) || (row === null || row === void 0 ? void 0 : (_row$vendor15 = row.vendor) === null || _row$vendor15 === void 0 ? void 0 : _row$vendor15.mobileNumber) || (row === null || row === void 0 ? void 0 : (_row$vendor16 = row.vendor) === null || _row$vendor16 === void 0 ? void 0 : (_row$vendor16$owner = _row$vendor16.owner) === null || _row$vendor16$owner === void 0 ? void 0 : _row$vendor16$owner.mobileNumber) || "NA");
2192
+ var _row$auditDetails9, _row$auditDetails0;
2193
+ return row !== null && row !== void 0 && (_row$auditDetails9 = row.auditDetails) !== null && _row$auditDetails9 !== void 0 && _row$auditDetails9.createdTime ? Digit.DateUtils.ConvertEpochToDate(row === null || row === void 0 ? void 0 : (_row$auditDetails0 = row.auditDetails) === null || _row$auditDetails0 === void 0 ? void 0 : _row$auditDetails0.createdTime) : "";
2203
2194
  }
2204
2195
  }, {
2205
2196
  Header: t("ES_FSM_REGISTRY_INBOX_ENABLED"),
@@ -2210,8 +2201,64 @@ const VendorInbox = props => {
2210
2201
  }
2211
2202
  }, [props.selectedTab, supervisors, t]);
2212
2203
  const getCSVExportData = React.useCallback(function () {
2213
- return Promise.resolve(tableData);
2214
- }, [tableData]);
2204
+ try {
2205
+ let _exit = false;
2206
+ function _temp8(_result) {
2207
+ let _exit2 = false;
2208
+ if (_exit) return _result;
2209
+ const _temp6 = function () {
2210
+ if (props.selectedTab === "SURVEYOR") {
2211
+ return _catch(function () {
2212
+ var _props$searchParams;
2213
+ return Promise.resolve(Digit.FSMService.surveyorSearch(tenantId, {
2214
+ status: "ACTIVE,DISABLED",
2215
+ name: (_props$searchParams = props.searchParams) === null || _props$searchParams === void 0 ? void 0 : _props$searchParams.name,
2216
+ limit: 100000,
2217
+ offset: 0
2218
+ })).then(function (response) {
2219
+ const _temp4 = (response === null || response === void 0 ? void 0 : response.surveyors) || (response === null || response === void 0 ? void 0 : response.surveyor) || [];
2220
+ _exit2 = true;
2221
+ return _temp4;
2222
+ });
2223
+ }, function (e) {
2224
+ console.error(e);
2225
+ const _temp5 = [];
2226
+ _exit2 = true;
2227
+ return _temp5;
2228
+ });
2229
+ }
2230
+ }();
2231
+ return _temp6 && _temp6.then ? _temp6.then(function (_result2) {
2232
+ return _exit2 ? _result2 : tableData;
2233
+ }) : _exit2 ? _temp6 : tableData;
2234
+ }
2235
+ const _temp7 = function () {
2236
+ if (props.selectedTab === "SUPERVISOR") {
2237
+ return _catch(function () {
2238
+ var _props$searchParams2;
2239
+ return Promise.resolve(Digit.FSMService.supervisorSearch(tenantId, {
2240
+ status: "ACTIVE,DISABLED",
2241
+ name: (_props$searchParams2 = props.searchParams) === null || _props$searchParams2 === void 0 ? void 0 : _props$searchParams2.name,
2242
+ limit: 100000,
2243
+ offset: 0
2244
+ })).then(function (response) {
2245
+ const _temp2 = (response === null || response === void 0 ? void 0 : response.supervisors) || (response === null || response === void 0 ? void 0 : response.supervisor) || [];
2246
+ _exit = true;
2247
+ return _temp2;
2248
+ });
2249
+ }, function (e) {
2250
+ console.error(e);
2251
+ const _temp3 = [];
2252
+ _exit = true;
2253
+ return _temp3;
2254
+ });
2255
+ }
2256
+ }();
2257
+ return Promise.resolve(_temp7 && _temp7.then ? _temp7.then(_temp8) : _temp8(_temp7));
2258
+ } catch (e) {
2259
+ return Promise.reject(e);
2260
+ }
2261
+ }, [props.selectedTab, props.searchParams, tenantId, tableData]);
2215
2262
  let result;
2216
2263
  if (props.isLoading || isAllFillingPointsLoading) {
2217
2264
  result = /*#__PURE__*/React.createElement("div", {
@@ -2281,7 +2328,8 @@ const VendorInbox = props => {
2281
2328
  }
2282
2329
  const ekycRoles = {
2283
2330
  ekycVendor: "EKYC_VENDOR",
2284
- supervisor: "EKYC_SUPERVISOR"
2331
+ supervisor: "EKYC_SUPERVISOR",
2332
+ employee: "EMPLOYEE"
2285
2333
  };
2286
2334
  const wtRoles = {
2287
2335
  wtVendor: "WT_VENDOR"
@@ -2379,7 +2427,7 @@ const SearchVendor = () => {
2379
2427
  const userInfo = Digit.UserService.getUser();
2380
2428
  const roles = ((_Digit$UserService$ge = Digit.UserService.getUser()) === null || _Digit$UserService$ge === void 0 ? void 0 : (_Digit$UserService$ge2 = _Digit$UserService$ge.info) === null || _Digit$UserService$ge2 === void 0 ? void 0 : (_Digit$UserService$ge3 = _Digit$UserService$ge2.roles) === null || _Digit$UserService$ge3 === void 0 ? void 0 : _Digit$UserService$ge3.map(r => r.code)) || [];
2381
2429
  const location = useLocation();
2382
- const initialPage = roles.includes("EKYC_VENDOR") || roles.includes("WT_VENDOR") ? "VENDOR" : roles.includes("EKYC_SUPERVISOR") ? "SURVEYOR" : roles.includes("EKYC_SURVEYOR") ? "SURVEYOR" : "";
2430
+ const initialPage = roles.includes("EKYC_VENDOR") || roles.includes("WT_VENDOR") ? "VENDOR" : roles.includes("EKYC_SUPERVISOR") ? "SURVEYOR" : roles.includes("EKYC_SURVEYOR") ? "SURVEYOR" : roles.includes("EMPLOYEE") ? "SUPERVISOR" : "";
2383
2431
  const _Digit$Hooks$useQuery = Digit.Hooks.useQueryParams(),
2384
2432
  selectedTabs = _Digit$Hooks$useQuery.selectedTabs;
2385
2433
  const _useState = useState(selectedTabs || initialPage),
@@ -2710,6 +2758,7 @@ const SearchVendor = () => {
2710
2758
  data: {
2711
2759
  table: tableData
2712
2760
  },
2761
+ searchParams: searchParams,
2713
2762
  isLoading: isLoading || isVendorLoading,
2714
2763
  onSort: handleSort,
2715
2764
  disableSort: false,
@@ -2892,6 +2941,9 @@ const SupervisorDetails = props => {
2892
2941
  }, {
2893
2942
  title: "ES_VENDOR_SUPERVISOR_EMAIL_ID",
2894
2943
  value: data === null || data === void 0 ? void 0 : (_data$owner2 = data.owner) === null || _data$owner2 === void 0 ? void 0 : _data$owner2.emailId
2944
+ }, {
2945
+ title: "ES_VENDOR_SUPERVISOR_ZONE",
2946
+ value: data === null || data === void 0 ? void 0 : data.assignedZoneId
2895
2947
  }, {
2896
2948
  title: "ES_VENDOR_SUPERVISOR_GENDER",
2897
2949
  value: data === null || data === void 0 ? void 0 : (_data$owner3 = data.owner) === null || _data$owner3 === void 0 ? void 0 : _data$owner3.gender
@@ -3278,10 +3330,17 @@ const SupervisorConfig = function (t, agencies, reportingManagers, disabled) {
3278
3330
  className: "payment-form-text-input-correction"
3279
3331
  }
3280
3332
  }, {
3281
- label: "ES_VENDOR_ZONE",
3333
+ label: t("ES_VENDOR_ZONE"),
3282
3334
  isMandatory: true,
3283
3335
  type: "component",
3284
3336
  key: "zoneIds",
3337
+ populators: {
3338
+ name: "zoneIds",
3339
+ validation: {
3340
+ required: true
3341
+ },
3342
+ className: "mb-16"
3343
+ },
3285
3344
  props: {
3286
3345
  isMultiSelect: false
3287
3346
  },
@@ -3371,6 +3430,7 @@ const AddSupervisor = _ref => {
3371
3430
  tenantId: tenantId,
3372
3431
  assignedZoneId: assignedZone,
3373
3432
  description: (data === null || data === void 0 ? void 0 : data.description) || "",
3433
+ correspondenceAddress: data === null || data === void 0 ? void 0 : data.correspondenceAddress,
3374
3434
  owner: {
3375
3435
  tenantId: tenantId,
3376
3436
  name: data === null || data === void 0 ? void 0 : data.fullName,
@@ -3379,8 +3439,7 @@ const AddSupervisor = _ref => {
3379
3439
  dob: data !== null && data !== void 0 && data.dob ? new Date(data.dob).getTime() : null,
3380
3440
  gender: (data === null || data === void 0 ? void 0 : (_data$gender = data.gender) === null || _data$gender === void 0 ? void 0 : _data$gender.code) || "OTHERS",
3381
3441
  mobileNumber: data === null || data === void 0 ? void 0 : data.mobileNumber,
3382
- emailId: data === null || data === void 0 ? void 0 : data.emailId,
3383
- correspondenceAddress: data === null || data === void 0 ? void 0 : data.correspondenceAddress
3442
+ emailId: data === null || data === void 0 ? void 0 : data.emailId
3384
3443
  }
3385
3444
  }
3386
3445
  };
@@ -5144,7 +5203,7 @@ const EditSupervisor = () => {
5144
5203
  i18nKey: "COMMON_GENDER_" + details.owner.gender
5145
5204
  } : null,
5146
5205
  dob: (details === null || details === void 0 ? void 0 : (_details$owner5 = details.owner) === null || _details$owner5 === void 0 ? void 0 : _details$owner5.dob) && Digit.DateUtils.ConvertTimestampToDate(details === null || details === void 0 ? void 0 : (_details$owner6 = details.owner) === null || _details$owner6 === void 0 ? void 0 : _details$owner6.dob, "yyyy-MM-dd"),
5147
- correspondenceAddress: details === null || details === void 0 ? void 0 : (_details$owner7 = details.owner) === null || _details$owner7 === void 0 ? void 0 : _details$owner7.correspondenceAddress,
5206
+ correspondenceAddress: (details === null || details === void 0 ? void 0 : details.correspondenceAddress) || (details === null || details === void 0 ? void 0 : (_details$owner7 = details.owner) === null || _details$owner7 === void 0 ? void 0 : _details$owner7.correspondenceAddress),
5148
5207
  description: details === null || details === void 0 ? void 0 : details.description,
5149
5208
  zoneIds: details === null || details === void 0 ? void 0 : details.assignedZoneId
5150
5209
  };
@@ -5174,7 +5233,7 @@ const EditSupervisor = () => {
5174
5233
  setShowToast(null);
5175
5234
  };
5176
5235
  const onSubmit = data => {
5177
- var _supervisorDetails$ow, _data$gender, _supervisorDetails$ow2, _supervisorDetails$ow3, _supervisorDetails$ow4, _supervisorDetails$ow5, _supervisorDetails$ow6;
5236
+ var _supervisorDetails$ow, _data$gender, _supervisorDetails$ow2, _supervisorDetails$ow3, _supervisorDetails$ow4, _supervisorDetails$ow5;
5178
5237
  const formData = {
5179
5238
  RequestInfo: {
5180
5239
  apiId: "Rainmaker",
@@ -5196,6 +5255,7 @@ const EditSupervisor = () => {
5196
5255
  supervisor: _extends({}, supervisorDetails, {
5197
5256
  description: (data === null || data === void 0 ? void 0 : data.description) || (supervisorDetails === null || supervisorDetails === void 0 ? void 0 : supervisorDetails.description) || "",
5198
5257
  assignedZoneId: (data === null || data === void 0 ? void 0 : data.zoneIds) || (supervisorDetails === null || supervisorDetails === void 0 ? void 0 : supervisorDetails.assignedZoneId) || null,
5258
+ correspondenceAddress: (data === null || data === void 0 ? void 0 : data.correspondenceAddress) || (supervisorDetails === null || supervisorDetails === void 0 ? void 0 : supervisorDetails.correspondenceAddress),
5199
5259
  owner: _extends({}, supervisorDetails.owner, {
5200
5260
  name: (data === null || data === void 0 ? void 0 : data.fullName) || ((_supervisorDetails$ow = supervisorDetails.owner) === null || _supervisorDetails$ow === void 0 ? void 0 : _supervisorDetails$ow.name),
5201
5261
  fatherOrHusbandName: "Static Father",
@@ -5203,8 +5263,7 @@ const EditSupervisor = () => {
5203
5263
  gender: (data === null || data === void 0 ? void 0 : (_data$gender = data.gender) === null || _data$gender === void 0 ? void 0 : _data$gender.code) || ((_supervisorDetails$ow2 = supervisorDetails.owner) === null || _supervisorDetails$ow2 === void 0 ? void 0 : _supervisorDetails$ow2.gender) || "OTHERS",
5204
5264
  dob: data !== null && data !== void 0 && data.dob ? new Date(data.dob).getTime() : (_supervisorDetails$ow3 = supervisorDetails.owner) === null || _supervisorDetails$ow3 === void 0 ? void 0 : _supervisorDetails$ow3.dob,
5205
5265
  emailId: (data === null || data === void 0 ? void 0 : data.emailId) || ((_supervisorDetails$ow4 = supervisorDetails.owner) === null || _supervisorDetails$ow4 === void 0 ? void 0 : _supervisorDetails$ow4.emailId),
5206
- mobileNumber: (data === null || data === void 0 ? void 0 : data.mobileNumber) || ((_supervisorDetails$ow5 = supervisorDetails.owner) === null || _supervisorDetails$ow5 === void 0 ? void 0 : _supervisorDetails$ow5.mobileNumber),
5207
- correspondenceAddress: (data === null || data === void 0 ? void 0 : data.correspondenceAddress) || ((_supervisorDetails$ow6 = supervisorDetails.owner) === null || _supervisorDetails$ow6 === void 0 ? void 0 : _supervisorDetails$ow6.correspondenceAddress)
5266
+ mobileNumber: (data === null || data === void 0 ? void 0 : data.mobileNumber) || ((_supervisorDetails$ow5 = supervisorDetails.owner) === null || _supervisorDetails$ow5 === void 0 ? void 0 : _supervisorDetails$ow5.mobileNumber)
5208
5267
  })
5209
5268
  })
5210
5269
  };
@@ -5325,7 +5384,7 @@ const EditSurveyor = () => {
5325
5384
  name: "ES_COMMON_RELATION_" + details.owner.relationship
5326
5385
  } : null,
5327
5386
  dob: (details === null || details === void 0 ? void 0 : (_details$owner7 = details.owner) === null || _details$owner7 === void 0 ? void 0 : _details$owner7.dob) && Digit.DateUtils.ConvertTimestampToDate(details === null || details === void 0 ? void 0 : (_details$owner8 = details.owner) === null || _details$owner8 === void 0 ? void 0 : _details$owner8.dob, "yyyy-MM-dd"),
5328
- correspondenceAddress: details === null || details === void 0 ? void 0 : (_details$owner9 = details.owner) === null || _details$owner9 === void 0 ? void 0 : _details$owner9.correspondenceAddress,
5387
+ correspondenceAddress: (details === null || details === void 0 ? void 0 : details.correspondenceAddress) || (details === null || details === void 0 ? void 0 : (_details$owner9 = details.owner) === null || _details$owner9 === void 0 ? void 0 : _details$owner9.correspondenceAddress),
5329
5388
  description: details === null || details === void 0 ? void 0 : details.description
5330
5389
  };
5331
5390
  setDefaultValues(values);
@@ -5354,7 +5413,7 @@ const EditSurveyor = () => {
5354
5413
  setShowToast(null);
5355
5414
  };
5356
5415
  const onSubmit = data => {
5357
- var _surveyorDetails$owne, _surveyorDetails$owne2, _data$relationship, _surveyorDetails$owne3, _data$gender, _surveyorDetails$owne4, _surveyorDetails$owne5, _surveyorDetails$owne6, _surveyorDetails$owne7, _surveyorDetails$owne8;
5416
+ var _surveyorDetails$owne, _surveyorDetails$owne2, _data$relationship, _surveyorDetails$owne3, _data$gender, _surveyorDetails$owne4, _surveyorDetails$owne5, _surveyorDetails$owne6, _surveyorDetails$owne7;
5358
5417
  const formData = {
5359
5418
  RequestInfo: {
5360
5419
  apiId: "Rainmaker",
@@ -5378,6 +5437,7 @@ const EditSurveyor = () => {
5378
5437
  name: (data === null || data === void 0 ? void 0 : data.fullName) || (surveyorDetails === null || surveyorDetails === void 0 ? void 0 : surveyorDetails.name),
5379
5438
  mobileNo: (data === null || data === void 0 ? void 0 : data.mobileNumber) || (surveyorDetails === null || surveyorDetails === void 0 ? void 0 : surveyorDetails.mobileNo),
5380
5439
  employeeId: (data === null || data === void 0 ? void 0 : data.employeeId) || (surveyorDetails === null || surveyorDetails === void 0 ? void 0 : surveyorDetails.employeeId),
5440
+ correspondenceAddress: (data === null || data === void 0 ? void 0 : data.correspondenceAddress) || (surveyorDetails === null || surveyorDetails === void 0 ? void 0 : surveyorDetails.correspondenceAddress),
5381
5441
  owner: _extends({}, surveyorDetails.owner, {
5382
5442
  name: (data === null || data === void 0 ? void 0 : data.fullName) || ((_surveyorDetails$owne = surveyorDetails.owner) === null || _surveyorDetails$owne === void 0 ? void 0 : _surveyorDetails$owne.name),
5383
5443
  fatherOrHusbandName: (data === null || data === void 0 ? void 0 : data.fatherOrHusbandName) || ((_surveyorDetails$owne2 = surveyorDetails.owner) === null || _surveyorDetails$owne2 === void 0 ? void 0 : _surveyorDetails$owne2.fatherOrHusbandName),
@@ -5385,8 +5445,7 @@ const EditSurveyor = () => {
5385
5445
  gender: (data === null || data === void 0 ? void 0 : (_data$gender = data.gender) === null || _data$gender === void 0 ? void 0 : _data$gender.code) || ((_surveyorDetails$owne4 = surveyorDetails.owner) === null || _surveyorDetails$owne4 === void 0 ? void 0 : _surveyorDetails$owne4.gender) || "OTHERS",
5386
5446
  dob: data !== null && data !== void 0 && data.dob ? new Date(data.dob).getTime() : (_surveyorDetails$owne5 = surveyorDetails.owner) === null || _surveyorDetails$owne5 === void 0 ? void 0 : _surveyorDetails$owne5.dob,
5387
5447
  emailId: (data === null || data === void 0 ? void 0 : data.emailId) || ((_surveyorDetails$owne6 = surveyorDetails.owner) === null || _surveyorDetails$owne6 === void 0 ? void 0 : _surveyorDetails$owne6.emailId),
5388
- mobileNumber: (data === null || data === void 0 ? void 0 : data.mobileNumber) || ((_surveyorDetails$owne7 = surveyorDetails.owner) === null || _surveyorDetails$owne7 === void 0 ? void 0 : _surveyorDetails$owne7.mobileNumber),
5389
- correspondenceAddress: (data === null || data === void 0 ? void 0 : data.correspondenceAddress) || ((_surveyorDetails$owne8 = surveyorDetails.owner) === null || _surveyorDetails$owne8 === void 0 ? void 0 : _surveyorDetails$owne8.correspondenceAddress)
5448
+ mobileNumber: (data === null || data === void 0 ? void 0 : data.mobileNumber) || ((_surveyorDetails$owne7 = surveyorDetails.owner) === null || _surveyorDetails$owne7 === void 0 ? void 0 : _surveyorDetails$owne7.mobileNumber)
5390
5449
  })
5391
5450
  })
5392
5451
  };
@@ -6552,7 +6611,9 @@ const VendorSelectAddress = _ref => {
6552
6611
  });
6553
6612
  }
6554
6613
  if (userType === "employee") {
6555
- return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, null, t("MYCITY_CODE_LABEL"), config.isMandatory ? " * " : null), /*#__PURE__*/React.createElement(Dropdown, {
6614
+ return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, null, t("MYCITY_CODE_LABEL"), config.isMandatory ? /*#__PURE__*/React.createElement("span", {
6615
+ className: "check-page-link-button"
6616
+ }, " * ") : null), /*#__PURE__*/React.createElement(Dropdown, {
6556
6617
  className: "",
6557
6618
  isMandatory: true,
6558
6619
  selected: (cities === null || cities === void 0 ? void 0 : cities.length) === 1 ? cities[0] : selectedCity,
@@ -6561,7 +6622,9 @@ const VendorSelectAddress = _ref => {
6561
6622
  select: selectCity,
6562
6623
  optionKey: "code",
6563
6624
  t: t
6564
- })), /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, null, t("ES_NEW_APPLICATION_LOCATION_WARD"), config.isMandatory ? " * " : null), /*#__PURE__*/React.createElement(Dropdown, {
6625
+ })), /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, null, t("ES_NEW_APPLICATION_LOCATION_WARD"), config.isMandatory ? /*#__PURE__*/React.createElement("span", {
6626
+ className: "check-page-link-button"
6627
+ }, " * ") : null), /*#__PURE__*/React.createElement(Dropdown, {
6565
6628
  className: "",
6566
6629
  isMandatory: true,
6567
6630
  selected: selectedWard,
@@ -6569,7 +6632,9 @@ const VendorSelectAddress = _ref => {
6569
6632
  select: selectWard,
6570
6633
  optionKey: "name",
6571
6634
  t: t
6572
- })), /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, null, t("ES_NEW_APPLICATION_LOCATION_MOHALLA"), config.isMandatory ? " * " : null), /*#__PURE__*/React.createElement(Dropdown, {
6635
+ })), /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, null, t("ES_NEW_APPLICATION_LOCATION_MOHALLA"), config.isMandatory ? /*#__PURE__*/React.createElement("span", {
6636
+ className: "check-page-link-button"
6637
+ }, " * ") : null), /*#__PURE__*/React.createElement(Dropdown, {
6573
6638
  className: "",
6574
6639
  isMandatory: true,
6575
6640
  selected: selectedLocality,
@@ -9349,7 +9414,9 @@ const SelectEkycZones = _ref => {
9349
9414
  }
9350
9415
  };
9351
9416
  if (isLoading) return /*#__PURE__*/React.createElement(Loader, null);
9352
- return /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, null, t(config.label), config.isMandatory ? " *" : ""), /*#__PURE__*/React.createElement("div", {
9417
+ return /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, null, t(config.label), config.isMandatory ? /*#__PURE__*/React.createElement("span", {
9418
+ className: "check-page-link-button"
9419
+ }, " * ") : ""), /*#__PURE__*/React.createElement("div", {
9353
9420
  className: "field",
9354
9421
  style: {
9355
9422
  position: "relative",