@djb25/digit-ui-module-vendor 1.0.22 → 1.0.24

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.
@@ -1,7 +1,7 @@
1
1
  import React, { useEffect, useMemo, useCallback, useState } from 'react';
2
2
  import { useTranslation } from 'react-i18next';
3
3
  import { useParams, useLocation, Switch, useHistory, Link, useRouteMatch, Route, Redirect } from 'react-router-dom';
4
- import { Header, SearchForm, SearchField, Dropdown as Dropdown$2, MobileNumber, CardLabelError, DatePicker as DatePicker$3, SubmitBar, Card, Table, Loader, Toast, AppContainer, ModuleHeader, ArrowLeft, PrivateRoute, LayoutWrapper, HomeIcon, PropertyHouse, EmployeeModuleCard, VerticalTimeline, FormComposer, FormStep, LabelFieldPair, CardLabel, Tooltip, TextInput, UploadFile, CardSubHeader, CardText, RadioOrSelect, ShippingTruck, CheckBox, RadioButtons, CloseSvg, Localities, RemoveableTag, ActionBar, ApplyFilterBar, AddIcon, Menu, LinkLabel, ToggleSwitch, CardSectionHeader, Row, EditIcon, DeleteIcon, Modal, InfoIcon, CardHeader, StatusTable, LinkButton, Banner } from '@djb25/digit-ui-react-components';
4
+ import { Header, SearchForm, SearchField, Dropdown as Dropdown$2, MobileNumber, CardLabelError, DatePicker as DatePicker$3, SubmitBar, Card, Table, Loader, Toast, AppContainer, ModuleHeader, ArrowLeft, PrivateRoute, LayoutWrapper, HomeIcon, PropertyHouse, EmployeeModuleCard, VerticalTimeline, FormComposer, FormStep, LabelFieldPair, CardLabel, Tooltip, TextInput, UploadFile, ActionBar, RadioOrSelect, ShippingTruck, CheckBox, RadioButtons, CloseSvg, Localities, RemoveableTag, ApplyFilterBar, AddIcon, Menu, LinkLabel, ToggleSwitch, CardSectionHeader, Row, EditIcon, DeleteIcon, Modal, CardText, InfoIcon, CardHeader, CardSubHeader, StatusTable, LinkButton, Banner } from '@djb25/digit-ui-react-components';
5
5
  import { useForm, Controller } from 'react-hook-form';
6
6
  import { useQueryClient } from 'react-query';
7
7
 
@@ -404,11 +404,14 @@ const EmployeeApp = ({
404
404
  })))
405
405
  }), /*#__PURE__*/React.createElement(PrivateRoute, {
406
406
  path: `${path}/registry/additionaldetails`,
407
- component: props => /*#__PURE__*/React.createElement(LayoutWrapper, {
408
- layoutClass: "normal"
409
- }, /*#__PURE__*/React.createElement(VendorCreate, Object.assign({}, props, {
410
- parentRoute: path
411
- })))
407
+ component: props => {
408
+ const isInfoPage = props.location.pathname.includes("/info");
409
+ return /*#__PURE__*/React.createElement(LayoutWrapper, {
410
+ layoutClass: isInfoPage ? "action" : "normal"
411
+ }, /*#__PURE__*/React.createElement(VendorCreate, Object.assign({}, props, {
412
+ parentRoute: path
413
+ })));
414
+ }
412
415
  }), /*#__PURE__*/React.createElement(PrivateRoute, {
413
416
  path: `${path}/registry/driver-details/:id`,
414
417
  component: props => /*#__PURE__*/React.createElement(LayoutWrapper, {
@@ -1577,7 +1580,6 @@ const ServiceDoc = ({
1577
1580
  onSelect
1578
1581
  }) => {
1579
1582
  var _Documentsob$ASSET;
1580
- const tenantId = Digit.ULBService.getCurrentTenantId();
1581
1583
  const stateId = Digit.ULBService.getStateId();
1582
1584
  const docType = config !== null && config !== void 0 && config.isMutation ? ["MutationDocuments"] : "Documents";
1583
1585
  const {
@@ -1585,12 +1587,9 @@ const ServiceDoc = ({
1585
1587
  data: Documentsob = {}
1586
1588
  } = Digit.Hooks.asset.useAssetDocumentsMDMS(stateId, "ASSET", docType);
1587
1589
  let docs = Documentsob === null || Documentsob === void 0 ? void 0 : (_Documentsob$ASSET = Documentsob.ASSET) === null || _Documentsob$ASSET === void 0 ? void 0 : _Documentsob$ASSET.Documents;
1588
- return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Card, null, /*#__PURE__*/React.createElement(CardSubHeader, null, t("AST_REQ_SCREEN_LABEL")), /*#__PURE__*/React.createElement(CardText, {
1589
- style: {
1590
- color: "red",
1591
- marginBottom: "20px"
1592
- }
1593
- }, t("AST_DOCUMENT_ACCEPTED_PDF_JPG_PNG"))), isLoading && /*#__PURE__*/React.createElement(Loader, null), Array.isArray(docs) && docs.map(({
1590
+ return /*#__PURE__*/React.createElement("div", {
1591
+ className: "employee-form-content"
1592
+ }, isLoading && /*#__PURE__*/React.createElement(Loader, null), Array.isArray(docs) && docs.map(({
1594
1593
  code,
1595
1594
  dropdownData
1596
1595
  }, index) => /*#__PURE__*/React.createElement(Card, {
@@ -1606,10 +1605,10 @@ const ServiceDoc = ({
1606
1605
  marginBottom: "6px",
1607
1606
  fontSize: "14px"
1608
1607
  }
1609
- }, dropdownIndex + 1, ". ", t(stringReplaceAll(dropdownData === null || dropdownData === void 0 ? void 0 : dropdownData.code, ".", "_")))))), /*#__PURE__*/React.createElement(SubmitBar, {
1608
+ }, dropdownIndex + 1, ". ", t(stringReplaceAll(dropdownData === null || dropdownData === void 0 ? void 0 : dropdownData.code, ".", "_")))))), /*#__PURE__*/React.createElement(ActionBar, null, /*#__PURE__*/React.createElement(SubmitBar, {
1610
1609
  label: t("COMMON_NEXT"),
1611
1610
  onSubmit: onSelect
1612
- }));
1611
+ })));
1613
1612
  };
1614
1613
 
1615
1614
  const VendorSelectAddress = ({
@@ -8180,8 +8179,9 @@ const getFillingPointIdentifiers = fillingPoint => {
8180
8179
  return [fillingPoint === null || fillingPoint === void 0 ? void 0 : fillingPoint.id, fillingPoint === null || fillingPoint === void 0 ? void 0 : fillingPoint.fillingStationId, fillingPoint === null || fillingPoint === void 0 ? void 0 : fillingPoint.bookingId, fillingPoint === null || fillingPoint === void 0 ? void 0 : fillingPoint.fillingPointId, fillingPoint === null || fillingPoint === void 0 ? void 0 : fillingPoint.uuid, fillingPoint === null || fillingPoint === void 0 ? void 0 : (_fillingPoint$filling = fillingPoint.fillingpointmetadata) === null || _fillingPoint$filling === void 0 ? void 0 : _fillingPoint$filling.fillingPointId].filter(value => value !== undefined && value !== null && value !== "").map(String);
8181
8180
  };
8182
8181
  const getRowFillingPointIdentifiers = (row = {}) => {
8183
- var _row$dsoDetails, _row$fillingpointmeta, _row$dsoDetails2;
8184
- return Array.from(new Set([...[row === null || row === void 0 ? void 0 : row.fillingPointId, row === null || row === void 0 ? void 0 : (_row$dsoDetails = row.dsoDetails) === null || _row$dsoDetails === void 0 ? void 0 : _row$dsoDetails.fillingPointId, row === null || row === void 0 ? void 0 : (_row$fillingpointmeta = row.fillingpointmetadata) === null || _row$fillingpointmeta === void 0 ? void 0 : _row$fillingpointmeta.fillingPointId, row === null || row === void 0 ? void 0 : row.fillingPtName, row === null || row === void 0 ? void 0 : row.filling_pt_name].filter(value => value !== undefined && value !== null && value !== "").map(String), ...getFillingPointIdentifiers(row === null || row === void 0 ? void 0 : row.fillingPoint), ...getFillingPointIdentifiers(row === null || row === void 0 ? void 0 : (_row$dsoDetails2 = row.dsoDetails) === null || _row$dsoDetails2 === void 0 ? void 0 : _row$dsoDetails2.fillingPoint), ...getFillingPointIdentifiers(row === null || row === void 0 ? void 0 : row.fillingPointDetail)]));
8182
+ var _row$dsoDetails, _row$fillingpointmeta, _row$fillingPoint, _row$dsoDetails2;
8183
+ const getIdentifiers = fp => Array.isArray(fp) ? fp.flatMap(getFillingPointIdentifiers) : getFillingPointIdentifiers(fp);
8184
+ return Array.from(new Set([...[row === null || row === void 0 ? void 0 : row.fillingPointId, row === null || row === void 0 ? void 0 : (_row$dsoDetails = row.dsoDetails) === null || _row$dsoDetails === void 0 ? void 0 : _row$dsoDetails.fillingPointId, row === null || row === void 0 ? void 0 : (_row$fillingpointmeta = row.fillingpointmetadata) === null || _row$fillingpointmeta === void 0 ? void 0 : _row$fillingpointmeta.fillingPointId, row === null || row === void 0 ? void 0 : row.fillingPtName, row === null || row === void 0 ? void 0 : row.filling_pt_name, row === null || row === void 0 ? void 0 : (_row$fillingPoint = row.fillingPoint) === null || _row$fillingPoint === void 0 ? void 0 : _row$fillingPoint.fillingPointId].filter(value => value !== undefined && value !== null && value !== "").map(String), ...getIdentifiers(row === null || row === void 0 ? void 0 : row.fillingPoint), ...getIdentifiers(row === null || row === void 0 ? void 0 : (_row$dsoDetails2 = row.dsoDetails) === null || _row$dsoDetails2 === void 0 ? void 0 : _row$dsoDetails2.fillingPoint), ...getIdentifiers(row === null || row === void 0 ? void 0 : row.fillingPointDetail)]));
8185
8185
  };
8186
8186
  const getSelectedFillingPointOption = (row, fillingPoints = []) => {
8187
8187
  const rowFillingPointIdentifiers = getRowFillingPointIdentifiers(row);
@@ -8189,8 +8189,12 @@ const getSelectedFillingPointOption = (row, fillingPoints = []) => {
8189
8189
  return fillingPoints.find(fillingPoint => getFillingPointIdentifiers(fillingPoint).some(identifier => rowFillingPointIdentifiers.includes(identifier))) || null;
8190
8190
  };
8191
8191
  const getFillingPointDisplayValue = (row = {}) => {
8192
- var _row$fillingPoint, _row$dsoDetails3, _row$dsoDetails3$fill, _row$dsoDetails4, _row$dsoDetails5, _row$dsoDetails6, _row$dsoDetails7, _row$fillingpointmeta2;
8193
- return (row === null || row === void 0 ? void 0 : (_row$fillingPoint = row.fillingPoint) === null || _row$fillingPoint === void 0 ? void 0 : _row$fillingPoint.fillingPointName) || (row === null || row === void 0 ? void 0 : (_row$dsoDetails3 = row.dsoDetails) === null || _row$dsoDetails3 === void 0 ? void 0 : (_row$dsoDetails3$fill = _row$dsoDetails3.fillingPoint) === null || _row$dsoDetails3$fill === void 0 ? void 0 : _row$dsoDetails3$fill.fillingPointName) || (row === null || row === void 0 ? void 0 : row.fillingPointName) || (row === null || row === void 0 ? void 0 : (_row$dsoDetails4 = row.dsoDetails) === null || _row$dsoDetails4 === void 0 ? void 0 : _row$dsoDetails4.fillingPointName) || (row === null || row === void 0 ? void 0 : row.fillingPointId) || (row === null || row === void 0 ? void 0 : (_row$dsoDetails5 = row.dsoDetails) === null || _row$dsoDetails5 === void 0 ? void 0 : _row$dsoDetails5.fillingPointId) || (typeof (row === null || row === void 0 ? void 0 : row.fillingPoint) === "string" ? row === null || row === void 0 ? void 0 : row.fillingPoint : null) || (typeof (row === null || row === void 0 ? void 0 : (_row$dsoDetails6 = row.dsoDetails) === null || _row$dsoDetails6 === void 0 ? void 0 : _row$dsoDetails6.fillingPoint) === "string" ? row === null || row === void 0 ? void 0 : (_row$dsoDetails7 = row.dsoDetails) === null || _row$dsoDetails7 === void 0 ? void 0 : _row$dsoDetails7.fillingPoint : null) || (row === null || row === void 0 ? void 0 : (_row$fillingpointmeta2 = row.fillingpointmetadata) === null || _row$fillingpointmeta2 === void 0 ? void 0 : _row$fillingpointmeta2.fillingPointId) || (row === null || row === void 0 ? void 0 : row.filling_pt_name) || (row === null || row === void 0 ? void 0 : row.fillingPtName) || "NA";
8192
+ var _row$fillingPoint2, _row$dsoDetails3, _row$dsoDetails3$fill, _row$dsoDetails4, _row$dsoDetails5, _row$dsoDetails6, _row$dsoDetails7, _row$fillingpointmeta2;
8193
+ if (Array.isArray(row === null || row === void 0 ? void 0 : row.fillingPoint)) {
8194
+ const list = row.fillingPoint.map(fp => (fp === null || fp === void 0 ? void 0 : fp.fillingPointName) || (fp === null || fp === void 0 ? void 0 : fp.fillingPointId)).filter(Boolean);
8195
+ if (list.length > 0) return list.join(", ");
8196
+ }
8197
+ return (row === null || row === void 0 ? void 0 : (_row$fillingPoint2 = row.fillingPoint) === null || _row$fillingPoint2 === void 0 ? void 0 : _row$fillingPoint2.fillingPointName) || (row === null || row === void 0 ? void 0 : (_row$dsoDetails3 = row.dsoDetails) === null || _row$dsoDetails3 === void 0 ? void 0 : (_row$dsoDetails3$fill = _row$dsoDetails3.fillingPoint) === null || _row$dsoDetails3$fill === void 0 ? void 0 : _row$dsoDetails3$fill.fillingPointName) || (row === null || row === void 0 ? void 0 : row.fillingPointName) || (row === null || row === void 0 ? void 0 : (_row$dsoDetails4 = row.dsoDetails) === null || _row$dsoDetails4 === void 0 ? void 0 : _row$dsoDetails4.fillingPointName) || (row === null || row === void 0 ? void 0 : row.fillingPointId) || (row === null || row === void 0 ? void 0 : (_row$dsoDetails5 = row.dsoDetails) === null || _row$dsoDetails5 === void 0 ? void 0 : _row$dsoDetails5.fillingPointId) || (typeof (row === null || row === void 0 ? void 0 : row.fillingPoint) === "string" ? row === null || row === void 0 ? void 0 : row.fillingPoint : null) || (typeof (row === null || row === void 0 ? void 0 : (_row$dsoDetails6 = row.dsoDetails) === null || _row$dsoDetails6 === void 0 ? void 0 : _row$dsoDetails6.fillingPoint) === "string" ? row === null || row === void 0 ? void 0 : (_row$dsoDetails7 = row.dsoDetails) === null || _row$dsoDetails7 === void 0 ? void 0 : _row$dsoDetails7.fillingPoint : null) || (row === null || row === void 0 ? void 0 : (_row$fillingpointmeta2 = row.fillingpointmetadata) === null || _row$fillingpointmeta2 === void 0 ? void 0 : _row$fillingpointmeta2.fillingPointId) || (row === null || row === void 0 ? void 0 : row.filling_pt_name) || (row === null || row === void 0 ? void 0 : row.fillingPtName) || "NA";
8194
8198
  };
8195
8199
  const getSelectedVendorOption = (row = {}, vendors = []) => {
8196
8200
  var _row$vendor, _row$vendorData;
@@ -8199,7 +8203,7 @@ const getSelectedVendorOption = (row = {}, vendors = []) => {
8199
8203
  return vendors.find(vendor => (vendor === null || vendor === void 0 ? void 0 : vendor.id) === selectedVendorId) || (row === null || row === void 0 ? void 0 : row.vendor) || (row === null || row === void 0 ? void 0 : row.vendorData) || null;
8200
8204
  };
8201
8205
  const getVendorFillingPoints = (vendor = {}) => {
8202
- const fillingPointOptions = [vendor === null || vendor === void 0 ? void 0 : vendor.fillingPoint, ...(Array.isArray(vendor === null || vendor === void 0 ? void 0 : vendor.fillingPoints) ? vendor.fillingPoints : [])].filter(Boolean);
8206
+ const fillingPointOptions = [...(Array.isArray(vendor === null || vendor === void 0 ? void 0 : vendor.fillingPoint) ? vendor.fillingPoint : [vendor === null || vendor === void 0 ? void 0 : vendor.fillingPoint]), ...(Array.isArray(vendor === null || vendor === void 0 ? void 0 : vendor.fillingPoints) ? vendor.fillingPoints : [vendor === null || vendor === void 0 ? void 0 : vendor.fillingPoints])].filter(Boolean);
8203
8207
  const uniqueFillingPoints = new Map();
8204
8208
  fillingPointOptions.forEach(fillingPoint => {
8205
8209
  const identifier = getFillingPointIdentifiers(fillingPoint)[0] || (fillingPoint === null || fillingPoint === void 0 ? void 0 : fillingPoint.fillingPointName) || (fillingPoint === null || fillingPoint === void 0 ? void 0 : fillingPoint.id);
@@ -8246,7 +8250,6 @@ const VendorInbox = props => {
8246
8250
  t
8247
8251
  } = useTranslation();
8248
8252
  const history = useHistory();
8249
- const DSO = Digit.UserService.hasAccess(["FSM_DSO"]) || false;
8250
8253
  const GetCell = value => /*#__PURE__*/React.createElement("span", {
8251
8254
  className: "cell-text"
8252
8255
  }, value);
@@ -8679,37 +8682,6 @@ const VendorInbox = props => {
8679
8682
  enabled: true
8680
8683
  });
8681
8684
  const allFillingPoints = (allFillingPointsData === null || allFillingPointsData === void 0 ? void 0 : allFillingPointsData.fillingPoints) || [];
8682
- const {
8683
- mutate: mapFixedFilling
8684
- } = Digit.Hooks.wt.useVendorFillingMap(tenantId);
8685
- const onFillingPointSelect = (row, value) => {
8686
- const payload = {
8687
- mappings: [{
8688
- tenantId: tenantId,
8689
- fillingPointId: (value === null || value === void 0 ? void 0 : value.id) || (value === null || value === void 0 ? void 0 : value.bookingId) || (value === null || value === void 0 ? void 0 : value.fillingPointId),
8690
- vendorId: row.original.id
8691
- }]
8692
- };
8693
- mapFixedFilling(payload, {
8694
- onSuccess: () => {
8695
- setShowToast({
8696
- key: "success",
8697
- label: "WT_FIXED_FILLING_MAPPING_SUCCESS"
8698
- });
8699
- props.refetchData();
8700
- props.refetchVendor && props.refetchVendor();
8701
- setTimeout(closeToast, 5000);
8702
- },
8703
- onError: err => {
8704
- var _err$response, _err$response$data, _err$response$data$Er, _err$response$data$Er2;
8705
- setShowToast({
8706
- key: "error",
8707
- label: (err === null || err === void 0 ? void 0 : (_err$response = err.response) === null || _err$response === void 0 ? void 0 : (_err$response$data = _err$response.data) === null || _err$response$data === void 0 ? void 0 : (_err$response$data$Er = _err$response$data.Errors) === null || _err$response$data$Er === void 0 ? void 0 : (_err$response$data$Er2 = _err$response$data$Er[0]) === null || _err$response$data$Er2 === void 0 ? void 0 : _err$response$data$Er2.message) || "WT_FIXED_FILLING_MAPPING_FAIL"
8708
- });
8709
- setTimeout(closeToast, 5000);
8710
- }
8711
- });
8712
- };
8713
8685
  const columns = React.useMemo(() => {
8714
8686
  switch (props.selectedTab) {
8715
8687
  case "VENDOR":
@@ -8734,28 +8706,6 @@ const VendorInbox = props => {
8734
8706
  var _row$original4, _row$original4$auditD, _row$original5, _row$original5$auditD;
8735
8707
  return GetCell((_row$original4 = row.original) !== null && _row$original4 !== void 0 && (_row$original4$auditD = _row$original4.auditDetails) !== null && _row$original4$auditD !== void 0 && _row$original4$auditD.createdTime ? Digit.DateUtils.ConvertEpochToDate((_row$original5 = row.original) === null || _row$original5 === void 0 ? void 0 : (_row$original5$auditD = _row$original5.auditDetails) === null || _row$original5$auditD === void 0 ? void 0 : _row$original5$auditD.createdTime) : "");
8736
8708
  }
8737
- }, {
8738
- Header: t("WT_FILLING_POINT"),
8739
- accessor: row => getFillingPointDisplayValue(row),
8740
- id: "fillingPoint",
8741
- minWidth: 250,
8742
- Cell: ({
8743
- row
8744
- }) => {
8745
- return /*#__PURE__*/React.createElement(Dropdown$2, {
8746
- className: "fsm-registry-dropdown",
8747
- selected: getSelectedFillingPointOption(row.original, allFillingPoints),
8748
- option: allFillingPoints,
8749
- select: value => onFillingPointSelect(row, value),
8750
- style: {
8751
- textAlign: "left",
8752
- width: "100%",
8753
- minWidth: "250px"
8754
- },
8755
- optionKey: "fillingPointName",
8756
- t: t
8757
- });
8758
- }
8759
8709
  }, {
8760
8710
  Header: t("ES_VENDOR_INBOX_SERVICE_TYPE"),
8761
8711
  id: "serviceType",
@@ -8814,15 +8764,12 @@ const VendorInbox = props => {
8814
8764
  Cell: ({
8815
8765
  row
8816
8766
  }) => {
8817
- var _row$original7, _additionalVendorData;
8767
+ var _row$original7, _row$original8;
8818
8768
  const vendorId = (_row$original7 = row.original) === null || _row$original7 === void 0 ? void 0 : _row$original7.id;
8819
8769
  if (!additionalVendorData) {
8820
8770
  return /*#__PURE__*/React.createElement("span", null, "Loading...");
8821
8771
  }
8822
- const hasDetails = additionalVendorData === null || additionalVendorData === void 0 ? void 0 : (_additionalVendorData = additionalVendorData.VendorDetails) === null || _additionalVendorData === void 0 ? void 0 : _additionalVendorData.some(item => {
8823
- var _item$vendorAdditiona;
8824
- return (item === null || item === void 0 ? void 0 : (_item$vendorAdditiona = item.vendorAdditionalDetails) === null || _item$vendorAdditiona === void 0 ? void 0 : _item$vendorAdditiona.vendorId) === vendorId;
8825
- });
8772
+ const hasDetails = ((_row$original8 = row.original) === null || _row$original8 === void 0 ? void 0 : _row$original8.vendorAdditionalDetails) !== null;
8826
8773
  return /*#__PURE__*/React.createElement(Link, {
8827
8774
  to: hasDetails ? "/digit-ui/employee/vendor/registry/additionaldetails/info?vendorId=" + vendorId : "/digit-ui/employee/vendor/registry/additionaldetails/vendor-details?vendorId=" + vendorId
8828
8775
  }, /*#__PURE__*/React.createElement("button", {
@@ -8853,8 +8800,8 @@ const VendorInbox = props => {
8853
8800
  Cell: ({
8854
8801
  row
8855
8802
  }) => {
8856
- var _row$original8, _row$original8$auditD, _row$original9, _row$original9$auditD;
8857
- return GetCell((_row$original8 = row.original) !== null && _row$original8 !== void 0 && (_row$original8$auditD = _row$original8.auditDetails) !== null && _row$original8$auditD !== void 0 && _row$original8$auditD.createdTime ? Digit.DateUtils.ConvertEpochToDate((_row$original9 = row.original) === null || _row$original9 === void 0 ? void 0 : (_row$original9$auditD = _row$original9.auditDetails) === null || _row$original9$auditD === void 0 ? void 0 : _row$original9$auditD.createdTime) : "");
8803
+ var _row$original9, _row$original9$auditD, _row$original0, _row$original0$auditD;
8804
+ return GetCell((_row$original9 = row.original) !== null && _row$original9 !== void 0 && (_row$original9$auditD = _row$original9.auditDetails) !== null && _row$original9$auditD !== void 0 && _row$original9$auditD.createdTime ? Digit.DateUtils.ConvertEpochToDate((_row$original0 = row.original) === null || _row$original0 === void 0 ? void 0 : (_row$original0$auditD = _row$original0.auditDetails) === null || _row$original0$auditD === void 0 ? void 0 : _row$original0$auditD.createdTime) : "");
8858
8805
  }
8859
8806
  }, {
8860
8807
  Header: "Map Vendor",
@@ -8970,13 +8917,13 @@ const VendorInbox = props => {
8970
8917
  Cell: ({
8971
8918
  row
8972
8919
  }) => {
8973
- var _row$original0;
8920
+ var _row$original1;
8974
8921
  return /*#__PURE__*/React.createElement(ToggleSwitch, {
8975
8922
  style: {
8976
8923
  display: "flex",
8977
8924
  justifyContent: "left"
8978
8925
  },
8979
- value: ((_row$original0 = row.original) === null || _row$original0 === void 0 ? void 0 : _row$original0.status) === "DISABLED" ? false : true,
8926
+ value: ((_row$original1 = row.original) === null || _row$original1 === void 0 ? void 0 : _row$original1.status) === "DISABLED" ? false : true,
8980
8927
  onChange: () => onVehicleUpdate(row),
8981
8928
  name: `switch-${row.id}`
8982
8929
  });
@@ -9018,8 +8965,8 @@ const VendorInbox = props => {
9018
8965
  Cell: ({
9019
8966
  row
9020
8967
  }) => {
9021
- var _row$original1, _row$original1$auditD, _row$original10, _row$original10$audit;
9022
- return GetCell((_row$original1 = row.original) !== null && _row$original1 !== void 0 && (_row$original1$auditD = _row$original1.auditDetails) !== null && _row$original1$auditD !== void 0 && _row$original1$auditD.createdTime ? Digit.DateUtils.ConvertEpochToDate((_row$original10 = row.original) === null || _row$original10 === void 0 ? void 0 : (_row$original10$audit = _row$original10.auditDetails) === null || _row$original10$audit === void 0 ? void 0 : _row$original10$audit.createdTime) : "");
8968
+ var _row$original10, _row$original10$audit, _row$original11, _row$original11$audit;
8969
+ return GetCell((_row$original10 = row.original) !== null && _row$original10 !== void 0 && (_row$original10$audit = _row$original10.auditDetails) !== null && _row$original10$audit !== void 0 && _row$original10$audit.createdTime ? Digit.DateUtils.ConvertEpochToDate((_row$original11 = row.original) === null || _row$original11 === void 0 ? void 0 : (_row$original11$audit = _row$original11.auditDetails) === null || _row$original11$audit === void 0 ? void 0 : _row$original11$audit.createdTime) : "");
9023
8970
  }
9024
8971
  }, {
9025
8972
  Header: t("ES_FSM_REGISTRY_INBOX_VENDOR_NAME"),
@@ -9056,13 +9003,13 @@ const VendorInbox = props => {
9056
9003
  Cell: ({
9057
9004
  row
9058
9005
  }) => {
9059
- var _row$original11;
9006
+ var _row$original12;
9060
9007
  return /*#__PURE__*/React.createElement(ToggleSwitch, {
9061
9008
  style: {
9062
9009
  display: "flex",
9063
9010
  justifyContent: "left"
9064
9011
  },
9065
- value: ((_row$original11 = row.original) === null || _row$original11 === void 0 ? void 0 : _row$original11.status) === "DISABLED" ? false : true,
9012
+ value: ((_row$original12 = row.original) === null || _row$original12 === void 0 ? void 0 : _row$original12.status) === "DISABLED" ? false : true,
9066
9013
  onChange: () => onDriverUpdate(row),
9067
9014
  name: `switch-${row.id}`
9068
9015
  });
@@ -9171,7 +9118,21 @@ const VendorInbox = props => {
9171
9118
  const getCSVExportData = React.useCallback(async () => tableData, [tableData]);
9172
9119
  let result;
9173
9120
  if (props.isLoading || isAllFillingPointsLoading) {
9174
- result = /*#__PURE__*/React.createElement(Loader, null);
9121
+ result = /*#__PURE__*/React.createElement("div", {
9122
+ style: {
9123
+ zIndex: 10,
9124
+ position: "relative",
9125
+ padding: "10px",
9126
+ backgroundColor: "#fff",
9127
+ width: "75px",
9128
+ height: "75px",
9129
+ borderRadius: "12px",
9130
+ display: "flex",
9131
+ justifyContent: "center",
9132
+ alignItems: "center",
9133
+ margin: "auto"
9134
+ }
9135
+ }, /*#__PURE__*/React.createElement(Loader, null));
9175
9136
  } else if (tableData.length === 0) {
9176
9137
  let emptyCardText = "";
9177
9138
  let emptyButtonText = "";
@@ -9299,7 +9260,6 @@ const SearchVendor = () => {
9299
9260
  const [vehicleIds, setVehicleIds] = useState("");
9300
9261
  const [driverIds, setDriverIds] = useState("");
9301
9262
  const [tableData, setTableData] = useState([]);
9302
- const userInfo = Digit.UserService.getUser();
9303
9263
  let paginationParms = {
9304
9264
  limit: pageSize,
9305
9265
  offset: pageOffset,
@@ -9308,9 +9268,9 @@ const SearchVendor = () => {
9308
9268
  };
9309
9269
  const {
9310
9270
  data: dsoData,
9311
- isLoading: isLoading,
9312
- isSuccess: isDsoSuccess,
9313
- error: dsoError,
9271
+ isLoading,
9272
+ isSuccess,
9273
+ error,
9314
9274
  refetch
9315
9275
  } = tab === "VEHICLE" ? Digit.Hooks.fsm.useVehiclesSearch({
9316
9276
  tenantId,
@@ -9370,6 +9330,7 @@ const SearchVendor = () => {
9370
9330
  const inboxTotalCount = (dsoData === null || dsoData === void 0 ? void 0 : dsoData.totalCount) || 50;
9371
9331
  useEffect(() => {
9372
9332
  refetch();
9333
+ refetchVendor();
9373
9334
  }, []);
9374
9335
  useEffect(() => {
9375
9336
  refetch();
@@ -9377,17 +9338,13 @@ const SearchVendor = () => {
9377
9338
  useEffect(() => {
9378
9339
  if (dsoData !== null && dsoData !== void 0 && dsoData.vehicle && tab === "VEHICLE") {
9379
9340
  let vehicleIds = "";
9380
- dsoData.vehicle.map(data => {
9381
- vehicleIds += `${data.id},`;
9382
- });
9341
+ dsoData.vehicle.map(data => vehicleIds += `${data.id},`);
9383
9342
  setVehicleIds(vehicleIds);
9384
9343
  setTableData(dsoData.vehicle);
9385
9344
  }
9386
9345
  if (dsoData !== null && dsoData !== void 0 && dsoData.driver && tab === "DRIVER") {
9387
9346
  let driverIds = "";
9388
- dsoData.driver.map(data => {
9389
- driverIds += `${data.id},`;
9390
- });
9347
+ dsoData.driver.map(data => driverIds += `${data.id},`);
9391
9348
  setDriverIds(driverIds);
9392
9349
  setTableData(dsoData === null || dsoData === void 0 ? void 0 : dsoData.driver);
9393
9350
  }
@@ -9403,6 +9360,8 @@ const SearchVendor = () => {
9403
9360
  activeDrivers: (_dso$drivers = dso.drivers) === null || _dso$drivers === void 0 ? void 0 : _dso$drivers.filter(driver => driver.status === "ACTIVE"),
9404
9361
  allVehicles: dso.vehicles,
9405
9362
  dsoDetails: dso,
9363
+ vendorAdditionalDetails: dso.vendorAdditionalDetails,
9364
+ fillingPoint: dso.fillingPoint,
9406
9365
  vehicles: (_dso$vehicles = dso.vehicles) === null || _dso$vehicles === void 0 ? void 0 : (_dso$vehicles$filter = _dso$vehicles.filter(vehicle => vehicle.status === "ACTIVE")) === null || _dso$vehicles$filter === void 0 ? void 0 : _dso$vehicles$filter.map(vehicle => ({
9407
9366
  id: vehicle.id,
9408
9367
  registrationNumber: vehicle === null || vehicle === void 0 ? void 0 : vehicle.registrationNumber,
@@ -9497,10 +9456,6 @@ const SearchVendor = () => {
9497
9456
  const refetchVendorData = () => {
9498
9457
  refetchVendor();
9499
9458
  };
9500
- useEffect(() => {
9501
- refetch();
9502
- refetchVendor();
9503
- }, []);
9504
9459
  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
9505
9460
  className: "employee-form-content"
9506
9461
  }, /*#__PURE__*/React.createElement(VendorInbox, {