@djb25/digit-ui-module-vendor 1.0.52 → 1.0.53
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 +18 -46
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +19 -47
- package/dist/index.modern.js.map +1 -1
- package/package.json +1 -1
package/dist/index.modern.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React, { useState, useEffect, useCallback, useReducer, useMemo } from 'react';
|
|
2
2
|
import { useHistory, Link, useLocation, useParams, Switch, useRouteMatch, Redirect, Route } from 'react-router-dom';
|
|
3
|
-
import { VerticalTimeline, FormComposer, Toast, Card, ShippingTruck, Table, CheckBox, Loader, RadioButtons, CloseSvg, Localities, RemoveableTag, ActionBar, ApplyFilterBar, Dropdown, AddIcon, Menu, LinkLabel, SubmitBar, TextInput, DatePicker as DatePicker$4, ViewsIcon, ToggleSwitch, Modal, MdClose, CardSectionHeader,
|
|
3
|
+
import { VerticalTimeline, FormComposer, Toast, Card, ShippingTruck, Table, CheckBox, Loader, RadioButtons, CloseSvg, Localities, RemoveableTag, ActionBar, ApplyFilterBar, Dropdown, AddIcon, Menu, LinkLabel, SubmitBar, TextInput, DatePicker as DatePicker$4, ViewsIcon, ToggleSwitch, Modal, MdClose, CardSectionHeader, CardText, Row, EditIcon, DeleteIcon, AppContainer, ModuleHeader, ArrowLeft, PrivateRoute, LayoutWrapper, HomeIcon, PropertyHouse, EmployeeModuleCard, FormStep, LabelFieldPair, CardLabel, CustomTooltip, MobileNumber, UploadFile, RadioOrSelect, Header, SearchForm, SearchField, CardLabelError, MultiSelectDropdown, CitizenHomeCard, CardHeader, CardSubHeader, StatusTable, LinkButton, Banner, InfoIcon } from '@djb25/digit-ui-react-components';
|
|
4
4
|
import { useTranslation } from 'react-i18next';
|
|
5
5
|
import { useQueryClient } from 'react-query';
|
|
6
6
|
import { useForm, Controller } from 'react-hook-form';
|
|
@@ -1107,6 +1107,8 @@ const VendorInbox = props => {
|
|
|
1107
1107
|
mutateVehicle = _Digit$Hooks$fsm$useU.mutate;
|
|
1108
1108
|
const _Digit$Hooks$fsm$useD3 = Digit.Hooks.fsm.useDriverUpdate(tenantId),
|
|
1109
1109
|
mutateDriver = _Digit$Hooks$fsm$useD3.mutate;
|
|
1110
|
+
const _Digit$Hooks$fsm$useS = Digit.Hooks.fsm.useSupervisorUpdate(tenantId);
|
|
1111
|
+
const _Digit$Hooks$fsm$useS2 = Digit.Hooks.fsm.useSurveyorUpdate(tenantId);
|
|
1110
1112
|
useEffect(() => {
|
|
1111
1113
|
var _props$data;
|
|
1112
1114
|
setTableData((props === null || props === void 0 ? void 0 : (_props$data = props.data) === null || _props$data === void 0 ? void 0 : _props$data.table) || []);
|
|
@@ -1872,28 +1874,28 @@ const VendorInbox = props => {
|
|
|
1872
1874
|
Header: t("ES_FSM_REGISTRY_INBOX_SUPERVISOR_NAME"),
|
|
1873
1875
|
accessor: row => {
|
|
1874
1876
|
var _row$reportingManager;
|
|
1875
|
-
return ((_row$reportingManager = row.reportingManager) === null || _row$reportingManager === void 0 ? void 0 : _row$reportingManager.name) || "NA";
|
|
1877
|
+
return row.supervisorName || ((_row$reportingManager = row.reportingManager) === null || _row$reportingManager === void 0 ? void 0 : _row$reportingManager.name) || "NA";
|
|
1876
1878
|
},
|
|
1877
1879
|
Cell: _ref28 => {
|
|
1878
|
-
var _row$original15, _row$
|
|
1880
|
+
var _row$original15, _row$original16, _row$original16$repor;
|
|
1879
1881
|
let row = _ref28.row;
|
|
1880
|
-
return /*#__PURE__*/React.createElement("div", null, ((_row$original15 = row.original) === null || _row$original15 === void 0 ? void 0 :
|
|
1882
|
+
return /*#__PURE__*/React.createElement("div", null, ((_row$original15 = row.original) === null || _row$original15 === void 0 ? void 0 : _row$original15.supervisorName) || ((_row$original16 = row.original) === null || _row$original16 === void 0 ? void 0 : (_row$original16$repor = _row$original16.reportingManager) === null || _row$original16$repor === void 0 ? void 0 : _row$original16$repor.name) || "NA");
|
|
1881
1883
|
}
|
|
1882
1884
|
}] : []), {
|
|
1883
1885
|
Header: t("WT_MOBILE_NUMBER"),
|
|
1884
1886
|
accessor: "mobileNumber",
|
|
1885
1887
|
Cell: _ref29 => {
|
|
1886
|
-
var _row$
|
|
1888
|
+
var _row$original17, _row$original17$owner;
|
|
1887
1889
|
let row = _ref29.row;
|
|
1888
|
-
return /*#__PURE__*/React.createElement("div", null, ((_row$
|
|
1890
|
+
return /*#__PURE__*/React.createElement("div", null, ((_row$original17 = row.original) === null || _row$original17 === void 0 ? void 0 : (_row$original17$owner = _row$original17.owner) === null || _row$original17$owner === void 0 ? void 0 : _row$original17$owner.mobileNumber) || "N/A");
|
|
1889
1891
|
}
|
|
1890
1892
|
}, {
|
|
1891
1893
|
Header: t("ES_FSM_REGISTRY_INBOX_DATE_CREATION"),
|
|
1892
1894
|
accessor: "createdTime",
|
|
1893
1895
|
Cell: _ref30 => {
|
|
1894
|
-
var _row$
|
|
1896
|
+
var _row$original18, _row$original18$audit, _row$original19, _row$original19$audit;
|
|
1895
1897
|
let row = _ref30.row;
|
|
1896
|
-
return GetCell((_row$
|
|
1898
|
+
return GetCell((_row$original18 = row.original) !== null && _row$original18 !== void 0 && (_row$original18$audit = _row$original18.auditDetails) !== null && _row$original18$audit !== void 0 && _row$original18$audit.createdTime ? Digit.DateUtils.ConvertEpochToDate((_row$original19 = row.original) === null || _row$original19 === void 0 ? void 0 : (_row$original19$audit = _row$original19.auditDetails) === null || _row$original19$audit === void 0 ? void 0 : _row$original19$audit.createdTime) : "");
|
|
1897
1899
|
}
|
|
1898
1900
|
}];
|
|
1899
1901
|
default:
|
|
@@ -2012,7 +2014,7 @@ const VendorInbox = props => {
|
|
|
2012
2014
|
Header: t("ES_FSM_REGISTRY_INBOX_SUPERVISOR_NAME"),
|
|
2013
2015
|
exportAccessor: row => {
|
|
2014
2016
|
var _row$reportingManager2;
|
|
2015
|
-
return (row === null || row === void 0 ? void 0 : (_row$reportingManager2 = row.reportingManager) === null || _row$reportingManager2 === void 0 ? void 0 : _row$reportingManager2.name) || "NA";
|
|
2017
|
+
return (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";
|
|
2016
2018
|
}
|
|
2017
2019
|
}, {
|
|
2018
2020
|
Header: t("ES_FSM_REGISTRY_INBOX_DATE_DRIVER_CREATION"),
|
|
@@ -2767,9 +2769,6 @@ const SupervisorDetails = props => {
|
|
|
2767
2769
|
}, {
|
|
2768
2770
|
title: "ES_VENDOR_SUPERVISOR_EMAIL_ID",
|
|
2769
2771
|
value: data === null || data === void 0 ? void 0 : (_data$owner2 = data.owner) === null || _data$owner2 === void 0 ? void 0 : _data$owner2.emailId
|
|
2770
|
-
}, {
|
|
2771
|
-
title: "ES_VENDOR_SUPERVISOR_STAFF_CODE",
|
|
2772
|
-
value: (data === null || data === void 0 ? void 0 : data.employeeId) || "N/A"
|
|
2773
2772
|
}, {
|
|
2774
2773
|
title: "ES_VENDOR_SUPERVISOR_GENDER",
|
|
2775
2774
|
value: data === null || data === void 0 ? void 0 : (_data$owner3 = data.owner) === null || _data$owner3 === void 0 ? void 0 : _data$owner3.gender
|
|
@@ -3141,21 +3140,7 @@ const SupervisorDetails = props => {
|
|
|
3141
3140
|
}
|
|
3142
3141
|
}, /*#__PURE__*/React.createElement(AddIcon, {
|
|
3143
3142
|
fill: "#a82227"
|
|
3144
|
-
})), value.value !== "ES_FSM_REGISTRY_DETAILS_ADD_VENDOR" && /*#__PURE__*/React.createElement(React.Fragment, null
|
|
3145
|
-
className: "add-details-link hover-button",
|
|
3146
|
-
onClick: () => setSelectedAction("EDIT_VENDOR"),
|
|
3147
|
-
style: {
|
|
3148
|
-
cursor: "pointer"
|
|
3149
|
-
}
|
|
3150
|
-
}, /*#__PURE__*/React.createElement(EditIcon, null)), /*#__PURE__*/React.createElement("div", {
|
|
3151
|
-
className: "add-details-link hover-button",
|
|
3152
|
-
onClick: () => setSelectedAction("DELETE_VENDOR"),
|
|
3153
|
-
style: {
|
|
3154
|
-
cursor: "pointer"
|
|
3155
|
-
}
|
|
3156
|
-
}, /*#__PURE__*/React.createElement(DeleteIcon, {
|
|
3157
|
-
fill: "#a82227"
|
|
3158
|
-
}))))) : /*#__PURE__*/React.createElement(React.Fragment, {
|
|
3143
|
+
})), value.value !== "ES_FSM_REGISTRY_DETAILS_ADD_VENDOR" && /*#__PURE__*/React.createElement(React.Fragment, null))) : /*#__PURE__*/React.createElement(React.Fragment, {
|
|
3159
3144
|
key: index
|
|
3160
3145
|
}, /*#__PURE__*/React.createElement("div", {
|
|
3161
3146
|
className: "additional-label"
|
|
@@ -3295,12 +3280,13 @@ const SurveyorDetails = props => {
|
|
|
3295
3280
|
var _surveyorSearchRespon;
|
|
3296
3281
|
if (!(surveyorSearchResponse !== null && surveyorSearchResponse !== void 0 && (_surveyorSearchRespon = surveyorSearchResponse.surveyors) !== null && _surveyorSearchRespon !== void 0 && _surveyorSearchRespon.length)) return [];
|
|
3297
3282
|
return surveyorSearchResponse.surveyors.map(data => {
|
|
3298
|
-
var _mappedVendor$dsoDeta, _data$owner, _data$owner2, _data$owner3;
|
|
3283
|
+
var _mappedVendor$dsoDeta, _data$reportingManage, _data$owner, _data$owner2, _data$owner3;
|
|
3299
3284
|
const mappedVendor = vendorData === null || vendorData === void 0 ? void 0 : vendorData.find(v => {
|
|
3300
3285
|
var _v$dsoDetails, _v$dsoDetails2;
|
|
3301
3286
|
return ((_v$dsoDetails = v.dsoDetails) === null || _v$dsoDetails === void 0 ? void 0 : _v$dsoDetails.id) === data.vendorId || ((_v$dsoDetails2 = v.dsoDetails) === null || _v$dsoDetails2 === void 0 ? void 0 : _v$dsoDetails2.vendorId) === data.vendorId;
|
|
3302
3287
|
});
|
|
3303
|
-
const vendorName = (mappedVendor === null || mappedVendor === void 0 ? void 0 : (_mappedVendor$dsoDeta = mappedVendor.dsoDetails) === null || _mappedVendor$dsoDeta === void 0 ? void 0 : _mappedVendor$dsoDeta.name) || data.vendorId || "ES_FSM_REGISTRY_DETAILS_ADD_VENDOR";
|
|
3288
|
+
const vendorName = data.vendorName || (mappedVendor === null || mappedVendor === void 0 ? void 0 : (_mappedVendor$dsoDeta = mappedVendor.dsoDetails) === null || _mappedVendor$dsoDeta === void 0 ? void 0 : _mappedVendor$dsoDeta.name) || data.vendorId || "ES_FSM_REGISTRY_DETAILS_ADD_VENDOR";
|
|
3289
|
+
const supervisorName = data.supervisorName || ((_data$reportingManage = data.reportingManager) === null || _data$reportingManage === void 0 ? void 0 : _data$reportingManage.name) || "N/A";
|
|
3304
3290
|
return {
|
|
3305
3291
|
surveyorData: data,
|
|
3306
3292
|
vendorDetails: {
|
|
@@ -3317,12 +3303,12 @@ const SurveyorDetails = props => {
|
|
|
3317
3303
|
}, {
|
|
3318
3304
|
title: "ES_VENDOR_SURVEYOR_EMAIL_ID",
|
|
3319
3305
|
value: data === null || data === void 0 ? void 0 : (_data$owner2 = data.owner) === null || _data$owner2 === void 0 ? void 0 : _data$owner2.emailId
|
|
3320
|
-
}, {
|
|
3321
|
-
title: "ES_VENDOR_SURVEYOR_STAFF_CODE",
|
|
3322
|
-
value: (data === null || data === void 0 ? void 0 : data.employeeId) || "N/A"
|
|
3323
3306
|
}, {
|
|
3324
3307
|
title: "ES_VENDOR_SURVEYOR_GENDER",
|
|
3325
3308
|
value: data === null || data === void 0 ? void 0 : (_data$owner3 = data.owner) === null || _data$owner3 === void 0 ? void 0 : _data$owner3.gender
|
|
3309
|
+
}, {
|
|
3310
|
+
title: "ES_FSM_REGISTRY_INBOX_SUPERVISOR_NAME",
|
|
3311
|
+
value: supervisorName
|
|
3326
3312
|
}, {
|
|
3327
3313
|
title: "ES_VENDOR_SURVEYOR_AGENCY_NAME",
|
|
3328
3314
|
value: vendorName,
|
|
@@ -3573,21 +3559,7 @@ const SurveyorDetails = props => {
|
|
|
3573
3559
|
}
|
|
3574
3560
|
}, /*#__PURE__*/React.createElement(AddIcon, {
|
|
3575
3561
|
fill: "#a82227"
|
|
3576
|
-
})), value.value !== "ES_FSM_REGISTRY_DETAILS_ADD_VENDOR" && /*#__PURE__*/React.createElement(React.Fragment, null
|
|
3577
|
-
className: "add-details-link hover-button",
|
|
3578
|
-
onClick: () => setSelectedAction("EDIT_VENDOR"),
|
|
3579
|
-
style: {
|
|
3580
|
-
cursor: "pointer"
|
|
3581
|
-
}
|
|
3582
|
-
}, /*#__PURE__*/React.createElement(EditIcon, null)), /*#__PURE__*/React.createElement("div", {
|
|
3583
|
-
className: "add-details-link hover-button",
|
|
3584
|
-
onClick: () => setSelectedAction("DELETE_VENDOR"),
|
|
3585
|
-
style: {
|
|
3586
|
-
cursor: "pointer"
|
|
3587
|
-
}
|
|
3588
|
-
}, /*#__PURE__*/React.createElement(DeleteIcon, {
|
|
3589
|
-
fill: "#a82227"
|
|
3590
|
-
}))))) : /*#__PURE__*/React.createElement(React.Fragment, {
|
|
3562
|
+
})), value.value !== "ES_FSM_REGISTRY_DETAILS_ADD_VENDOR" && /*#__PURE__*/React.createElement(React.Fragment, null))) : /*#__PURE__*/React.createElement(React.Fragment, {
|
|
3591
3563
|
key: index
|
|
3592
3564
|
}, /*#__PURE__*/React.createElement("div", {
|
|
3593
3565
|
className: "additional-label"
|