@djb25/digit-ui-module-vendor 1.0.60 → 1.0.61
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 +100 -51
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +100 -51
- package/dist/index.modern.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -202,6 +202,7 @@ const AddSurveyor = _ref => {
|
|
|
202
202
|
surveyor: {
|
|
203
203
|
tenantId: tenantId,
|
|
204
204
|
description: (data === null || data === void 0 ? void 0 : data.description) || "",
|
|
205
|
+
correspondenceAddress: data === null || data === void 0 ? void 0 : data.correspondenceAddress,
|
|
205
206
|
additionalDetails: {
|
|
206
207
|
serviceType: "ekyc"
|
|
207
208
|
},
|
|
@@ -213,8 +214,7 @@ const AddSurveyor = _ref => {
|
|
|
213
214
|
gender: (data === null || data === void 0 ? void 0 : (_data$gender = data.gender) === null || _data$gender === void 0 ? void 0 : _data$gender.code) || "OTHERS",
|
|
214
215
|
dob: data !== null && data !== void 0 && data.dob ? new Date(data.dob).getTime() : null,
|
|
215
216
|
emailId: data === null || data === void 0 ? void 0 : data.emailId,
|
|
216
|
-
mobileNumber: data === null || data === void 0 ? void 0 : data.mobileNumber
|
|
217
|
-
correspondenceAddress: data === null || data === void 0 ? void 0 : data.correspondenceAddress
|
|
217
|
+
mobileNumber: data === null || data === void 0 ? void 0 : data.mobileNumber
|
|
218
218
|
}
|
|
219
219
|
}
|
|
220
220
|
};
|
|
@@ -635,7 +635,7 @@ const DropdownStatus = _ref => {
|
|
|
635
635
|
};
|
|
636
636
|
|
|
637
637
|
const RegisteredVendorSearch = _ref => {
|
|
638
|
-
var _matchedRoles$wt, _matchedRoles$wt2, _matchedRoles$ekyc, _matchedRoles$ekyc2, _matchedRoles$wt3, _matchedRoles$ekyc3, _matchedRoles$wt4, _matchedRoles$wt5, _matchedRoles$ekyc4, _matchedRoles$ekyc5, _matchedRoles$ekyc6;
|
|
638
|
+
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;
|
|
639
639
|
let onSearch = _ref.onSearch,
|
|
640
640
|
type = _ref.type,
|
|
641
641
|
onClose = _ref.onClose,
|
|
@@ -799,13 +799,13 @@ const RegisteredVendorSearch = _ref => {
|
|
|
799
799
|
clearSearch();
|
|
800
800
|
onTabChange("DRIVER");
|
|
801
801
|
}
|
|
802
|
-
}, 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__default.createElement("button", {
|
|
802
|
+
}, 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__default.createElement("button", {
|
|
803
803
|
className: selectedTab === "SUPERVISOR" ? "search-tab-head-selected" : "search-tab-head",
|
|
804
804
|
onClick: () => {
|
|
805
805
|
clearSearch();
|
|
806
806
|
onTabChange("SUPERVISOR");
|
|
807
807
|
}
|
|
808
|
-
}, t("ES_FSM_REGISTRY_INBOX_TAB_SUPERVISOR")), ((matchedRoles === null || matchedRoles === void 0 ? void 0 : (_matchedRoles$
|
|
808
|
+
}, 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__default.createElement("button", {
|
|
809
809
|
className: selectedTab === "SURVEYOR" ? "search-tab-head-selected" : "search-tab-head",
|
|
810
810
|
onClick: () => {
|
|
811
811
|
clearSearch();
|
|
@@ -2139,70 +2139,61 @@ const VendorInbox = props => {
|
|
|
2139
2139
|
}];
|
|
2140
2140
|
case "SURVEYOR":
|
|
2141
2141
|
return [{
|
|
2142
|
-
Header: t("
|
|
2142
|
+
Header: t("USER_ID"),
|
|
2143
2143
|
exportAccessor: row => {
|
|
2144
2144
|
var _row$owner5;
|
|
2145
2145
|
return (row === null || row === void 0 ? void 0 : (_row$owner5 = row.owner) === null || _row$owner5 === void 0 ? void 0 : _row$owner5.userName) || "NA";
|
|
2146
2146
|
}
|
|
2147
2147
|
}, {
|
|
2148
|
-
Header: t("
|
|
2148
|
+
Header: t("USER_NAME"),
|
|
2149
|
+
exportAccessor: row => (row === null || row === void 0 ? void 0 : row.name) || "NA"
|
|
2150
|
+
}, {
|
|
2151
|
+
Header: t("VENDOR_NAME"),
|
|
2149
2152
|
exportAccessor: row => {
|
|
2150
|
-
var _row$
|
|
2151
|
-
return (
|
|
2153
|
+
var _row$vendorData0, _row$vendor0;
|
|
2154
|
+
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";
|
|
2152
2155
|
}
|
|
2153
2156
|
}, {
|
|
2154
|
-
Header: t("
|
|
2157
|
+
Header: t("SUPERVISOR_NAME"),
|
|
2155
2158
|
exportAccessor: row => {
|
|
2156
2159
|
var _selectedSupervisor$o3, _row$reportingManager2;
|
|
2157
2160
|
const selectedSupervisor = getSelectedSupervisorOption(row, supervisors);
|
|
2158
|
-
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";
|
|
2161
|
+
return selectedSupervisor ? selectedSupervisor.name || ((_selectedSupervisor$o3 = selectedSupervisor.owner) === null || _selectedSupervisor$o3 === void 0 ? void 0 : _selectedSupervisor$o3.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";
|
|
2159
2162
|
}
|
|
2160
2163
|
}, {
|
|
2161
|
-
Header: t("
|
|
2164
|
+
Header: t("CREATION_DATE"),
|
|
2162
2165
|
exportAccessor: row => {
|
|
2163
2166
|
var _row$auditDetails7, _row$auditDetails8;
|
|
2164
2167
|
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) : "";
|
|
2165
2168
|
}
|
|
2166
|
-
}, {
|
|
2167
|
-
Header: t("ES_FSM_REGISTRY_INBOX_VENDOR_NAME"),
|
|
2168
|
-
exportAccessor: row => {
|
|
2169
|
-
var _row$vendorData0, _row$vendor0, _row$vendorData1, _row$vendorData10, _row$vendorData10$own, _row$vendor1, _row$vendor10, _row$vendor10$owner;
|
|
2170
|
-
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");
|
|
2171
|
-
}
|
|
2172
2169
|
}, {
|
|
2173
2170
|
Header: t("ES_FSM_REGISTRY_INBOX_ENABLED"),
|
|
2174
2171
|
exportAccessor: row => (row === null || row === void 0 ? void 0 : row.status) || "NA"
|
|
2175
2172
|
}];
|
|
2176
2173
|
case "SUPERVISOR":
|
|
2177
2174
|
return [{
|
|
2178
|
-
Header: t("
|
|
2175
|
+
Header: t("USER_ID"),
|
|
2179
2176
|
exportAccessor: row => {
|
|
2180
|
-
var _row$
|
|
2181
|
-
return (row === null || row === void 0 ? void 0 : (_row$
|
|
2177
|
+
var _row$owner6;
|
|
2178
|
+
return (row === null || row === void 0 ? void 0 : (_row$owner6 = row.owner) === null || _row$owner6 === void 0 ? void 0 : _row$owner6.userName) || "NA";
|
|
2182
2179
|
}
|
|
2183
2180
|
}, {
|
|
2184
|
-
Header: t("
|
|
2185
|
-
exportAccessor: row =>
|
|
2186
|
-
var _row$owner8;
|
|
2187
|
-
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") + ")";
|
|
2188
|
-
}
|
|
2181
|
+
Header: t("USER_NAME"),
|
|
2182
|
+
exportAccessor: row => (row === null || row === void 0 ? void 0 : row.name) || "NA"
|
|
2189
2183
|
}, {
|
|
2190
|
-
Header: t("
|
|
2191
|
-
exportAccessor: row =>
|
|
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) : "";
|
|
2194
|
-
}
|
|
2184
|
+
Header: t("ZONE"),
|
|
2185
|
+
exportAccessor: row => (row === null || row === void 0 ? void 0 : row.assignedZoneId) || "NA"
|
|
2195
2186
|
}, {
|
|
2196
|
-
Header: t("
|
|
2187
|
+
Header: t("VENDOR_NAME"),
|
|
2197
2188
|
exportAccessor: row => {
|
|
2198
|
-
var _row$
|
|
2199
|
-
return (
|
|
2189
|
+
var _row$vendorData1, _row$vendor1;
|
|
2190
|
+
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";
|
|
2200
2191
|
}
|
|
2201
2192
|
}, {
|
|
2202
|
-
Header: t("
|
|
2193
|
+
Header: t("CREATION_DATE"),
|
|
2203
2194
|
exportAccessor: row => {
|
|
2204
|
-
var _row$
|
|
2205
|
-
return
|
|
2195
|
+
var _row$auditDetails9, _row$auditDetails0;
|
|
2196
|
+
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) : "";
|
|
2206
2197
|
}
|
|
2207
2198
|
}, {
|
|
2208
2199
|
Header: t("ES_FSM_REGISTRY_INBOX_ENABLED"),
|
|
@@ -2213,8 +2204,64 @@ const VendorInbox = props => {
|
|
|
2213
2204
|
}
|
|
2214
2205
|
}, [props.selectedTab, supervisors, t]);
|
|
2215
2206
|
const getCSVExportData = React__default.useCallback(function () {
|
|
2216
|
-
|
|
2217
|
-
|
|
2207
|
+
try {
|
|
2208
|
+
let _exit = false;
|
|
2209
|
+
function _temp8(_result) {
|
|
2210
|
+
let _exit2 = false;
|
|
2211
|
+
if (_exit) return _result;
|
|
2212
|
+
const _temp6 = function () {
|
|
2213
|
+
if (props.selectedTab === "SURVEYOR") {
|
|
2214
|
+
return _catch(function () {
|
|
2215
|
+
var _props$searchParams;
|
|
2216
|
+
return Promise.resolve(Digit.FSMService.surveyorSearch(tenantId, {
|
|
2217
|
+
status: "ACTIVE,DISABLED",
|
|
2218
|
+
name: (_props$searchParams = props.searchParams) === null || _props$searchParams === void 0 ? void 0 : _props$searchParams.name,
|
|
2219
|
+
limit: 100000,
|
|
2220
|
+
offset: 0
|
|
2221
|
+
})).then(function (response) {
|
|
2222
|
+
const _temp4 = (response === null || response === void 0 ? void 0 : response.surveyors) || (response === null || response === void 0 ? void 0 : response.surveyor) || [];
|
|
2223
|
+
_exit2 = true;
|
|
2224
|
+
return _temp4;
|
|
2225
|
+
});
|
|
2226
|
+
}, function (e) {
|
|
2227
|
+
console.error(e);
|
|
2228
|
+
const _temp5 = [];
|
|
2229
|
+
_exit2 = true;
|
|
2230
|
+
return _temp5;
|
|
2231
|
+
});
|
|
2232
|
+
}
|
|
2233
|
+
}();
|
|
2234
|
+
return _temp6 && _temp6.then ? _temp6.then(function (_result2) {
|
|
2235
|
+
return _exit2 ? _result2 : tableData;
|
|
2236
|
+
}) : _exit2 ? _temp6 : tableData;
|
|
2237
|
+
}
|
|
2238
|
+
const _temp7 = function () {
|
|
2239
|
+
if (props.selectedTab === "SUPERVISOR") {
|
|
2240
|
+
return _catch(function () {
|
|
2241
|
+
var _props$searchParams2;
|
|
2242
|
+
return Promise.resolve(Digit.FSMService.supervisorSearch(tenantId, {
|
|
2243
|
+
status: "ACTIVE,DISABLED",
|
|
2244
|
+
name: (_props$searchParams2 = props.searchParams) === null || _props$searchParams2 === void 0 ? void 0 : _props$searchParams2.name,
|
|
2245
|
+
limit: 100000,
|
|
2246
|
+
offset: 0
|
|
2247
|
+
})).then(function (response) {
|
|
2248
|
+
const _temp2 = (response === null || response === void 0 ? void 0 : response.supervisors) || (response === null || response === void 0 ? void 0 : response.supervisor) || [];
|
|
2249
|
+
_exit = true;
|
|
2250
|
+
return _temp2;
|
|
2251
|
+
});
|
|
2252
|
+
}, function (e) {
|
|
2253
|
+
console.error(e);
|
|
2254
|
+
const _temp3 = [];
|
|
2255
|
+
_exit = true;
|
|
2256
|
+
return _temp3;
|
|
2257
|
+
});
|
|
2258
|
+
}
|
|
2259
|
+
}();
|
|
2260
|
+
return Promise.resolve(_temp7 && _temp7.then ? _temp7.then(_temp8) : _temp8(_temp7));
|
|
2261
|
+
} catch (e) {
|
|
2262
|
+
return Promise.reject(e);
|
|
2263
|
+
}
|
|
2264
|
+
}, [props.selectedTab, props.searchParams, tenantId, tableData]);
|
|
2218
2265
|
let result;
|
|
2219
2266
|
if (props.isLoading || isAllFillingPointsLoading) {
|
|
2220
2267
|
result = /*#__PURE__*/React__default.createElement("div", {
|
|
@@ -2284,7 +2331,8 @@ const VendorInbox = props => {
|
|
|
2284
2331
|
}
|
|
2285
2332
|
const ekycRoles = {
|
|
2286
2333
|
ekycVendor: "EKYC_VENDOR",
|
|
2287
|
-
supervisor: "EKYC_SUPERVISOR"
|
|
2334
|
+
supervisor: "EKYC_SUPERVISOR",
|
|
2335
|
+
employee: "EMPLOYEE"
|
|
2288
2336
|
};
|
|
2289
2337
|
const wtRoles = {
|
|
2290
2338
|
wtVendor: "WT_VENDOR"
|
|
@@ -2382,7 +2430,7 @@ const SearchVendor = () => {
|
|
|
2382
2430
|
const userInfo = Digit.UserService.getUser();
|
|
2383
2431
|
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)) || [];
|
|
2384
2432
|
const location = reactRouterDom.useLocation();
|
|
2385
|
-
const initialPage = roles.includes("EKYC_VENDOR") || roles.includes("WT_VENDOR") ? "VENDOR" : roles.includes("EKYC_SUPERVISOR") ? "SURVEYOR" : roles.includes("EKYC_SURVEYOR") ? "SURVEYOR" : "";
|
|
2433
|
+
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" : "";
|
|
2386
2434
|
const _Digit$Hooks$useQuery = Digit.Hooks.useQueryParams(),
|
|
2387
2435
|
selectedTabs = _Digit$Hooks$useQuery.selectedTabs;
|
|
2388
2436
|
const _useState = React.useState(selectedTabs || initialPage),
|
|
@@ -2713,6 +2761,7 @@ const SearchVendor = () => {
|
|
|
2713
2761
|
data: {
|
|
2714
2762
|
table: tableData
|
|
2715
2763
|
},
|
|
2764
|
+
searchParams: searchParams,
|
|
2716
2765
|
isLoading: isLoading || isVendorLoading,
|
|
2717
2766
|
onSort: handleSort,
|
|
2718
2767
|
disableSort: false,
|
|
@@ -3374,6 +3423,7 @@ const AddSupervisor = _ref => {
|
|
|
3374
3423
|
tenantId: tenantId,
|
|
3375
3424
|
assignedZoneId: assignedZone,
|
|
3376
3425
|
description: (data === null || data === void 0 ? void 0 : data.description) || "",
|
|
3426
|
+
correspondenceAddress: data === null || data === void 0 ? void 0 : data.correspondenceAddress,
|
|
3377
3427
|
owner: {
|
|
3378
3428
|
tenantId: tenantId,
|
|
3379
3429
|
name: data === null || data === void 0 ? void 0 : data.fullName,
|
|
@@ -3382,8 +3432,7 @@ const AddSupervisor = _ref => {
|
|
|
3382
3432
|
dob: data !== null && data !== void 0 && data.dob ? new Date(data.dob).getTime() : null,
|
|
3383
3433
|
gender: (data === null || data === void 0 ? void 0 : (_data$gender = data.gender) === null || _data$gender === void 0 ? void 0 : _data$gender.code) || "OTHERS",
|
|
3384
3434
|
mobileNumber: data === null || data === void 0 ? void 0 : data.mobileNumber,
|
|
3385
|
-
emailId: data === null || data === void 0 ? void 0 : data.emailId
|
|
3386
|
-
correspondenceAddress: data === null || data === void 0 ? void 0 : data.correspondenceAddress
|
|
3435
|
+
emailId: data === null || data === void 0 ? void 0 : data.emailId
|
|
3387
3436
|
}
|
|
3388
3437
|
}
|
|
3389
3438
|
};
|
|
@@ -5147,7 +5196,7 @@ const EditSupervisor = () => {
|
|
|
5147
5196
|
i18nKey: "COMMON_GENDER_" + details.owner.gender
|
|
5148
5197
|
} : null,
|
|
5149
5198
|
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"),
|
|
5150
|
-
correspondenceAddress: details === null || details === void 0 ? void 0 : (_details$owner7 = details.owner) === null || _details$owner7 === void 0 ? void 0 : _details$owner7.correspondenceAddress,
|
|
5199
|
+
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),
|
|
5151
5200
|
description: details === null || details === void 0 ? void 0 : details.description,
|
|
5152
5201
|
zoneIds: details === null || details === void 0 ? void 0 : details.assignedZoneId
|
|
5153
5202
|
};
|
|
@@ -5177,7 +5226,7 @@ const EditSupervisor = () => {
|
|
|
5177
5226
|
setShowToast(null);
|
|
5178
5227
|
};
|
|
5179
5228
|
const onSubmit = data => {
|
|
5180
|
-
var _supervisorDetails$ow, _data$gender, _supervisorDetails$ow2, _supervisorDetails$ow3, _supervisorDetails$ow4, _supervisorDetails$ow5
|
|
5229
|
+
var _supervisorDetails$ow, _data$gender, _supervisorDetails$ow2, _supervisorDetails$ow3, _supervisorDetails$ow4, _supervisorDetails$ow5;
|
|
5181
5230
|
const formData = {
|
|
5182
5231
|
RequestInfo: {
|
|
5183
5232
|
apiId: "Rainmaker",
|
|
@@ -5199,6 +5248,7 @@ const EditSupervisor = () => {
|
|
|
5199
5248
|
supervisor: _extends({}, supervisorDetails, {
|
|
5200
5249
|
description: (data === null || data === void 0 ? void 0 : data.description) || (supervisorDetails === null || supervisorDetails === void 0 ? void 0 : supervisorDetails.description) || "",
|
|
5201
5250
|
assignedZoneId: (data === null || data === void 0 ? void 0 : data.zoneIds) || (supervisorDetails === null || supervisorDetails === void 0 ? void 0 : supervisorDetails.assignedZoneId) || null,
|
|
5251
|
+
correspondenceAddress: (data === null || data === void 0 ? void 0 : data.correspondenceAddress) || (supervisorDetails === null || supervisorDetails === void 0 ? void 0 : supervisorDetails.correspondenceAddress),
|
|
5202
5252
|
owner: _extends({}, supervisorDetails.owner, {
|
|
5203
5253
|
name: (data === null || data === void 0 ? void 0 : data.fullName) || ((_supervisorDetails$ow = supervisorDetails.owner) === null || _supervisorDetails$ow === void 0 ? void 0 : _supervisorDetails$ow.name),
|
|
5204
5254
|
fatherOrHusbandName: "Static Father",
|
|
@@ -5206,8 +5256,7 @@ const EditSupervisor = () => {
|
|
|
5206
5256
|
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",
|
|
5207
5257
|
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,
|
|
5208
5258
|
emailId: (data === null || data === void 0 ? void 0 : data.emailId) || ((_supervisorDetails$ow4 = supervisorDetails.owner) === null || _supervisorDetails$ow4 === void 0 ? void 0 : _supervisorDetails$ow4.emailId),
|
|
5209
|
-
mobileNumber: (data === null || data === void 0 ? void 0 : data.mobileNumber) || ((_supervisorDetails$ow5 = supervisorDetails.owner) === null || _supervisorDetails$ow5 === void 0 ? void 0 : _supervisorDetails$ow5.mobileNumber)
|
|
5210
|
-
correspondenceAddress: (data === null || data === void 0 ? void 0 : data.correspondenceAddress) || ((_supervisorDetails$ow6 = supervisorDetails.owner) === null || _supervisorDetails$ow6 === void 0 ? void 0 : _supervisorDetails$ow6.correspondenceAddress)
|
|
5259
|
+
mobileNumber: (data === null || data === void 0 ? void 0 : data.mobileNumber) || ((_supervisorDetails$ow5 = supervisorDetails.owner) === null || _supervisorDetails$ow5 === void 0 ? void 0 : _supervisorDetails$ow5.mobileNumber)
|
|
5211
5260
|
})
|
|
5212
5261
|
})
|
|
5213
5262
|
};
|
|
@@ -5328,7 +5377,7 @@ const EditSurveyor = () => {
|
|
|
5328
5377
|
name: "ES_COMMON_RELATION_" + details.owner.relationship
|
|
5329
5378
|
} : null,
|
|
5330
5379
|
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"),
|
|
5331
|
-
correspondenceAddress: details === null || details === void 0 ? void 0 : (_details$owner9 = details.owner) === null || _details$owner9 === void 0 ? void 0 : _details$owner9.correspondenceAddress,
|
|
5380
|
+
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),
|
|
5332
5381
|
description: details === null || details === void 0 ? void 0 : details.description
|
|
5333
5382
|
};
|
|
5334
5383
|
setDefaultValues(values);
|
|
@@ -5357,7 +5406,7 @@ const EditSurveyor = () => {
|
|
|
5357
5406
|
setShowToast(null);
|
|
5358
5407
|
};
|
|
5359
5408
|
const onSubmit = data => {
|
|
5360
|
-
var _surveyorDetails$owne, _surveyorDetails$owne2, _data$relationship, _surveyorDetails$owne3, _data$gender, _surveyorDetails$owne4, _surveyorDetails$owne5, _surveyorDetails$owne6, _surveyorDetails$owne7
|
|
5409
|
+
var _surveyorDetails$owne, _surveyorDetails$owne2, _data$relationship, _surveyorDetails$owne3, _data$gender, _surveyorDetails$owne4, _surveyorDetails$owne5, _surveyorDetails$owne6, _surveyorDetails$owne7;
|
|
5361
5410
|
const formData = {
|
|
5362
5411
|
RequestInfo: {
|
|
5363
5412
|
apiId: "Rainmaker",
|
|
@@ -5381,6 +5430,7 @@ const EditSurveyor = () => {
|
|
|
5381
5430
|
name: (data === null || data === void 0 ? void 0 : data.fullName) || (surveyorDetails === null || surveyorDetails === void 0 ? void 0 : surveyorDetails.name),
|
|
5382
5431
|
mobileNo: (data === null || data === void 0 ? void 0 : data.mobileNumber) || (surveyorDetails === null || surveyorDetails === void 0 ? void 0 : surveyorDetails.mobileNo),
|
|
5383
5432
|
employeeId: (data === null || data === void 0 ? void 0 : data.employeeId) || (surveyorDetails === null || surveyorDetails === void 0 ? void 0 : surveyorDetails.employeeId),
|
|
5433
|
+
correspondenceAddress: (data === null || data === void 0 ? void 0 : data.correspondenceAddress) || (surveyorDetails === null || surveyorDetails === void 0 ? void 0 : surveyorDetails.correspondenceAddress),
|
|
5384
5434
|
owner: _extends({}, surveyorDetails.owner, {
|
|
5385
5435
|
name: (data === null || data === void 0 ? void 0 : data.fullName) || ((_surveyorDetails$owne = surveyorDetails.owner) === null || _surveyorDetails$owne === void 0 ? void 0 : _surveyorDetails$owne.name),
|
|
5386
5436
|
fatherOrHusbandName: (data === null || data === void 0 ? void 0 : data.fatherOrHusbandName) || ((_surveyorDetails$owne2 = surveyorDetails.owner) === null || _surveyorDetails$owne2 === void 0 ? void 0 : _surveyorDetails$owne2.fatherOrHusbandName),
|
|
@@ -5388,8 +5438,7 @@ const EditSurveyor = () => {
|
|
|
5388
5438
|
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",
|
|
5389
5439
|
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,
|
|
5390
5440
|
emailId: (data === null || data === void 0 ? void 0 : data.emailId) || ((_surveyorDetails$owne6 = surveyorDetails.owner) === null || _surveyorDetails$owne6 === void 0 ? void 0 : _surveyorDetails$owne6.emailId),
|
|
5391
|
-
mobileNumber: (data === null || data === void 0 ? void 0 : data.mobileNumber) || ((_surveyorDetails$owne7 = surveyorDetails.owner) === null || _surveyorDetails$owne7 === void 0 ? void 0 : _surveyorDetails$owne7.mobileNumber)
|
|
5392
|
-
correspondenceAddress: (data === null || data === void 0 ? void 0 : data.correspondenceAddress) || ((_surveyorDetails$owne8 = surveyorDetails.owner) === null || _surveyorDetails$owne8 === void 0 ? void 0 : _surveyorDetails$owne8.correspondenceAddress)
|
|
5441
|
+
mobileNumber: (data === null || data === void 0 ? void 0 : data.mobileNumber) || ((_surveyorDetails$owne7 = surveyorDetails.owner) === null || _surveyorDetails$owne7 === void 0 ? void 0 : _surveyorDetails$owne7.mobileNumber)
|
|
5393
5442
|
})
|
|
5394
5443
|
})
|
|
5395
5444
|
};
|