@djb25/digit-ui-module-vendor 1.0.13 → 1.0.15

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, Fragment as Fragment$1 } from 'react';
2
2
  import { useTranslation } from 'react-i18next';
3
3
  import { useParams, useLocation, Switch, Link, useHistory, 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, HomeIcon, PropertyHouse, EmployeeModuleCard, Stepper, FormComposer, TickMark, FormStep, CardLabel, TextInput, LabelFieldPair, UploadFile, CardSubHeader, CardText, RadioOrSelect, ShippingTruck, CheckBox, RadioButtons, CloseSvg, Localities, RemoveableTag, ActionBar, ApplyFilterBar, AddIcon, Menu, Label, LinkLabel, ToggleSwitch, CardSectionHeader, StatusTable, Row, EditIcon, DeleteIcon, Modal, InfoIcon, CardHeader, 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, HomeIcon, PropertyHouse, EmployeeModuleCard, VerticalTimeline, FormComposer, FormStep, CardLabel, TextInput, LabelFieldPair, UploadFile, CardSubHeader, CardText, RadioOrSelect, ShippingTruck, CheckBox, RadioButtons, CloseSvg, Localities, RemoveableTag, ActionBar, ApplyFilterBar, AddIcon, Menu, Label, LinkLabel, ToggleSwitch, CardSectionHeader, Row, EditIcon, DeleteIcon, Modal, InfoIcon, CardHeader, 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
 
@@ -390,12 +390,12 @@ const EmployeeApp = ({
390
390
  path: `${path}/registry/new-driver`,
391
391
  component: renderWithLayout(props => /*#__PURE__*/React.createElement(AddDriver, Object.assign({}, props, {
392
392
  parentRoute: path
393
- })), layouts.normal)
393
+ })), layouts.action)
394
394
  }), /*#__PURE__*/React.createElement(PrivateRoute, {
395
395
  path: `${path}/registry/new-vehicle`,
396
396
  component: renderWithLayout(props => /*#__PURE__*/React.createElement(AddVehicle, Object.assign({}, props, {
397
397
  parentRoute: path
398
- })), layouts.normal)
398
+ })), layouts.action)
399
399
  }), /*#__PURE__*/React.createElement(PrivateRoute, {
400
400
  path: `${path}/registry/additionaldetails`,
401
401
  component: renderWithLayout(props => /*#__PURE__*/React.createElement(VendorCreate, Object.assign({}, props, {
@@ -732,11 +732,6 @@ const AddVendor = ({
732
732
  };
733
733
  const vendorStepConfig = Config.filter(config => config.head === "ES_VRNDOR_NEW_VENDOR_DETAILS");
734
734
  const addressStepConfig = Config.filter(config => config.head === "ES_FSM_REGISTRY_NEW_ADDRESS_DETAILS");
735
- const steps = [{
736
- label: "ES_VRNDOR_NEW_VENDOR_DETAILS"
737
- }, {
738
- label: "ES_FSM_REGISTRY_NEW_ADDRESS_DETAILS"
739
- }];
740
735
  const onFormValueChange = (setValue, formData) => {
741
736
  var _formData$serviceType;
742
737
  if (formData !== null && formData !== void 0 && formData.vendorName && formData !== null && formData !== void 0 && formData.phone && formData !== null && formData !== void 0 && (_formData$serviceType = formData.serviceType) !== null && _formData$serviceType !== void 0 && _formData$serviceType.code) {
@@ -843,11 +838,22 @@ const AddVendor = ({
843
838
  }
844
839
  });
845
840
  };
846
- return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Stepper, {
847
- steps: steps,
848
- currentStep: currentStep - 1,
849
- onStepClick: () => {},
850
- t: t
841
+ return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(VerticalTimeline, {
842
+ config: [{
843
+ route: "vendor-details",
844
+ timeLine: [{
845
+ actions: "New Vendor Details",
846
+ currentStep: 1
847
+ }]
848
+ }, {
849
+ route: "address-details",
850
+ timeLine: [{
851
+ actions: "Address Details",
852
+ currentStep: 2
853
+ }]
854
+ }],
855
+ currentActiveIndex: currentStep - 1,
856
+ showFinalStep: false
851
857
  }), /*#__PURE__*/React.createElement("div", {
852
858
  style: {
853
859
  flex: "1",
@@ -884,40 +890,6 @@ const AddVendor = ({
884
890
  })));
885
891
  };
886
892
 
887
- const Timeline = ({
888
- steps: _steps = [],
889
- currentStep: _currentStep = 1
890
- }) => {
891
- const {
892
- t
893
- } = useTranslation();
894
- return /*#__PURE__*/React.createElement("div", {
895
- className: "custom-stepper-card"
896
- }, _steps.map((label, index) => {
897
- const stepNumber = index + 1;
898
- const isActive = stepNumber === _currentStep;
899
- const isCompleted = stepNumber < _currentStep;
900
- return /*#__PURE__*/React.createElement("div", {
901
- className: "stepper-row-vendor",
902
- key: index
903
- }, /*#__PURE__*/React.createElement("div", {
904
- className: "stepper-left"
905
- }, /*#__PURE__*/React.createElement("div", {
906
- className: `step-circle
907
- ${isActive ? "active" : ""}
908
- ${isCompleted ? "completed" : ""}`
909
- }, isCompleted ? /*#__PURE__*/React.createElement(TickMark, {
910
- fillColor: "#fff"
911
- }) : stepNumber), index !== _steps.length - 1 && /*#__PURE__*/React.createElement("div", {
912
- className: `step-line ${isCompleted ? "completed-line" : ""}`
913
- })), /*#__PURE__*/React.createElement("div", {
914
- className: `step-label
915
- ${isActive ? "active-text" : ""}
916
- ${isCompleted ? "completed-text" : ""}`
917
- }, t(label)));
918
- }));
919
- };
920
-
921
893
  const VendorDetails = ({
922
894
  t,
923
895
  config,
@@ -926,11 +898,8 @@ const VendorDetails = ({
926
898
  formData,
927
899
  ownerIndex
928
900
  }) => {
929
- const location = useLocation();
930
- console.log(formData, "oiuyt");
931
901
  let index = 0;
932
902
  let validation = {};
933
- const steps = ["VENDOR_ADDITIONAL_DETAILS", "VENDOR_DOCUMENT_DETAILS", "VENDOR_SUMMARY"];
934
903
  const [VendorCompany, setVendorCompany] = useState("");
935
904
  const [VendorPhone, setVendorPhone] = useState("");
936
905
  const [VendorAddress, setVendorAddress] = useState("");
@@ -1030,7 +999,6 @@ const VendorDetails = ({
1030
999
  setContactPerson(e.target.value);
1031
1000
  }
1032
1001
  const tenantId = Digit.ULBService.getCurrentTenantId();
1033
- const stateId = Digit.ULBService.getStateId();
1034
1002
  const {
1035
1003
  control
1036
1004
  } = useForm();
@@ -1101,15 +1069,25 @@ const VendorDetails = ({
1101
1069
  goNext();
1102
1070
  }
1103
1071
  }, [VendorCompany, VendorPhone, VendorAddress, VendorCategory, VendorEmail, VendorId, userName, Bank, BankbranchName, IFSC, AccountNo, PanNo, GstNo, GstState, RegistrationNo, EpfNo, EsiNo, VendorType, Status, micrNo, PhoneNo, ContactPerson, Company, goNext, userType]);
1104
- return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
1105
- style: {
1106
- display: "flex",
1107
- width: "100%",
1108
- gap: "24px"
1109
- }
1110
- }, /*#__PURE__*/React.createElement(Timeline, {
1111
- steps: steps,
1112
- currentStep: 1
1072
+ return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(VerticalTimeline, {
1073
+ config: [{
1074
+ timeLine: [{
1075
+ actions: t("VENDOR_ADDITIONAL_DETAILS"),
1076
+ currentStep: 1
1077
+ }]
1078
+ }, {
1079
+ timeLine: [{
1080
+ actions: t("VENDOR_DOCUMENT_DETAILS"),
1081
+ currentStep: 2
1082
+ }]
1083
+ }, {
1084
+ timeLine: [{
1085
+ actions: t("VENDOR_SUMMARY"),
1086
+ currentStep: 3
1087
+ }]
1088
+ }],
1089
+ currentActiveIndex: 0,
1090
+ showFinalStep: false
1113
1091
  }), /*#__PURE__*/React.createElement("div", {
1114
1092
  style: {
1115
1093
  flex: "1",
@@ -1461,7 +1439,7 @@ const VendorDetails = ({
1461
1439
  placeholder: "Select",
1462
1440
  t: t
1463
1441
  })
1464
- }))))));
1442
+ })))));
1465
1443
  };
1466
1444
 
1467
1445
  const VendorDocuments = ({
@@ -1475,7 +1453,6 @@ const VendorDocuments = ({
1475
1453
  const [uploadedFiles, setUploadedFiles] = useState([null]);
1476
1454
  const [error, setError] = useState(null);
1477
1455
  const [ind, setInd] = useState(1);
1478
- const steps = ["VENDOR_ADDITIONAL_DETAILS", "VENDOR_DOCUMENT_DETAILS", "VENDOR_SUMMARY"];
1479
1456
  const tenantId = Digit.ULBService.getStateId();
1480
1457
  const stateId = Digit.ULBService.getStateId();
1481
1458
  const [documents, setDocuments] = useState((formData === null || formData === void 0 ? void 0 : (_formData$documents = formData.documents) === null || _formData$documents === void 0 ? void 0 : _formData$documents.documents) || []);
@@ -1532,21 +1509,26 @@ const VendorDocuments = ({
1532
1509
  });
1533
1510
  handleFileUpload(file, index);
1534
1511
  };
1535
- return /*#__PURE__*/React.createElement("div", {
1536
- style: {
1537
- display: "flex",
1538
- width: "100%",
1539
- gap: "24px"
1540
- }
1541
- }, /*#__PURE__*/React.createElement(Timeline, {
1542
- steps: steps,
1543
- currentStep: 2
1544
- }), /*#__PURE__*/React.createElement("div", {
1545
- style: {
1546
- flex: "1",
1547
- overflowY: "auto"
1548
- }
1549
- }, /*#__PURE__*/React.createElement(FormStep, {
1512
+ return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(VerticalTimeline, {
1513
+ config: [{
1514
+ timeLine: [{
1515
+ actions: t("VENDOR_ADDITIONAL_DETAILS"),
1516
+ currentStep: 1
1517
+ }]
1518
+ }, {
1519
+ timeLine: [{
1520
+ actions: t("VENDOR_DOCUMENT_DETAILS"),
1521
+ currentStep: 2
1522
+ }]
1523
+ }, {
1524
+ timeLine: [{
1525
+ actions: t("VENDOR_SUMMARY"),
1526
+ currentStep: 3
1527
+ }]
1528
+ }],
1529
+ currentActiveIndex: 1,
1530
+ showFinalStep: false
1531
+ }), /*#__PURE__*/React.createElement(FormStep, {
1550
1532
  t: t,
1551
1533
  config: config,
1552
1534
  onSelect: handleSubmit,
@@ -1585,7 +1567,7 @@ const VendorDocuments = ({
1585
1567
  label: error,
1586
1568
  onClose: () => setError(null),
1587
1569
  error: true
1588
- }))));
1570
+ })));
1589
1571
  };
1590
1572
 
1591
1573
  const ServiceDoc = ({
@@ -8030,10 +8012,7 @@ const SearchApplication = ({
8030
8012
  const mobileViewStyles = mobileView ? {
8031
8013
  margin: 0,
8032
8014
  display: "inline"
8033
- } : {
8034
- marginTop: "40px",
8035
- marginLeft: "16px"
8036
- };
8015
+ } : {};
8037
8016
  return /*#__PURE__*/React.createElement(LinkLabel, {
8038
8017
  style: {
8039
8018
  ...mobileViewStyles
@@ -8149,21 +8128,24 @@ const SearchApplication = ({
8149
8128
  style: {
8150
8129
  display: "grid",
8151
8130
  width: "100%",
8152
- gridTemplateColumns: "33.33% 66.66% 0%"
8131
+ gridTemplateColumns: "33.33% 66.66% 0%",
8132
+ gap: "16px"
8153
8133
  }
8154
8134
  }, searchFields === null || searchFields === void 0 ? void 0 : searchFields.map((input, index) => /*#__PURE__*/React.createElement("span", {
8155
8135
  key: index,
8156
8136
  className: index === 0 ? "complaint-input" : "mobile-input"
8157
8137
  }, /*#__PURE__*/React.createElement(Label, null, input.label), getFields(input), " ")), /*#__PURE__*/React.createElement("div", {
8158
8138
  style: {
8159
- display: "flex"
8139
+ display: "flex",
8140
+ alignItems: "end",
8141
+ gap: "16px"
8160
8142
  }
8161
8143
  }, type === "desktop" && !mobileView && /*#__PURE__*/React.createElement(SubmitBar, {
8162
8144
  className: "submit-bar-search",
8163
8145
  label: t("ES_COMMON_SEARCH"),
8164
8146
  submit: true
8165
8147
  }), type === "desktop" && !mobileView && /*#__PURE__*/React.createElement("span", {
8166
- className: "clear-search"
8148
+ className: "clear-search generic-button"
8167
8149
  }, clearAll()))), error ? /*#__PURE__*/React.createElement(CardLabelError, {
8168
8150
  className: "search-error-label"
8169
8151
  }, t("ES_SEARCH_APPLICATION_ERROR")) : null))));
@@ -8185,7 +8167,7 @@ const VendorInbox = props => {
8185
8167
  const [vendors, setVendors] = useState([]);
8186
8168
  const [drivers, setDrivers] = useState([]);
8187
8169
  const queryClient = useQueryClient();
8188
- const [address, setAddress] = useState();
8170
+ const [toast, setToast] = useState(null);
8189
8171
  const {
8190
8172
  data: vendorData,
8191
8173
  isLoading: isVendorLoading,
@@ -8451,12 +8433,54 @@ const VendorInbox = props => {
8451
8433
  }, {
8452
8434
  enabled: (vendorIds === null || vendorIds === void 0 ? void 0 : vendorIds.length) > 0
8453
8435
  });
8436
+ const {
8437
+ data: allFillingPointsData,
8438
+ isLoading: isAllFillingPointsLoading
8439
+ } = Digit.Hooks.wt.useFillPointSearch({
8440
+ tenantId,
8441
+ filters: {
8442
+ limit: 1000
8443
+ }
8444
+ }, {
8445
+ enabled: true
8446
+ });
8447
+ const allFillingPoints = (allFillingPointsData === null || allFillingPointsData === void 0 ? void 0 : allFillingPointsData.fillingPoints) || [];
8448
+ const {
8449
+ mutate: mapFixedFilling
8450
+ } = Digit.Hooks.wt.useVendorFillingMap(tenantId);
8451
+ const onFillingPointSelect = (row, value) => {
8452
+ const payload = {
8453
+ mappings: [{
8454
+ tenantId: tenantId,
8455
+ 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),
8456
+ vendorId: row.original.id
8457
+ }]
8458
+ };
8459
+ mapFixedFilling(payload, {
8460
+ onSuccess: () => {
8461
+ setToast({
8462
+ label: t("WT_FIXED_FILLING_MAPPING_SUCCESS")
8463
+ });
8464
+ props.refetchData();
8465
+ props.refetchVendor && props.refetchVendor();
8466
+ setTimeout(closeToast, 5000);
8467
+ },
8468
+ onError: err => {
8469
+ var _err$response, _err$response$data, _err$response$data$Er, _err$response$data$Er2;
8470
+ setToast({
8471
+ 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) || t("WT_FIXED_FILLING_MAPPING_FAIL"),
8472
+ error: true
8473
+ });
8474
+ setTimeout(closeToast, 5000);
8475
+ }
8476
+ });
8477
+ };
8454
8478
  const columns = React.useMemo(() => {
8455
8479
  switch (props.selectedTab) {
8456
8480
  case "VENDOR":
8457
8481
  return [{
8458
8482
  Header: t("ES_VENDOR_INBOX_VENDOR_NAME"),
8459
- disableSortBy: true,
8483
+ accessor: "name",
8460
8484
  Cell: ({
8461
8485
  row
8462
8486
  }) => {
@@ -8464,7 +8488,7 @@ const VendorInbox = props => {
8464
8488
  className: "link"
8465
8489
  }, /*#__PURE__*/React.createElement(Link, {
8466
8490
  to: "/digit-ui/employee/vendor/registry/vendor-details/" + row.original["id"]
8467
- }, /*#__PURE__*/React.createElement("div", null, row.original.name, /*#__PURE__*/React.createElement("br", null)))));
8491
+ }, /*#__PURE__*/React.createElement("div", null, row.original.name))));
8468
8492
  }
8469
8493
  }, {
8470
8494
  Header: t("ES_VENDOR_INBOX_DATE_VENDOR_CREATION"),
@@ -8475,14 +8499,53 @@ const VendorInbox = props => {
8475
8499
  var _row$original, _row$original$auditDe, _row$original2, _row$original2$auditD;
8476
8500
  return GetCell((_row$original = row.original) !== null && _row$original !== void 0 && (_row$original$auditDe = _row$original.auditDetails) !== null && _row$original$auditDe !== void 0 && _row$original$auditDe.createdTime ? Digit.DateUtils.ConvertEpochToDate((_row$original2 = row.original) === null || _row$original2 === void 0 ? void 0 : (_row$original2$auditD = _row$original2.auditDetails) === null || _row$original2$auditD === void 0 ? void 0 : _row$original2$auditD.createdTime) : "");
8477
8501
  }
8502
+ }, {
8503
+ Header: t("WT_FILLING_POINT"),
8504
+ accessor: row => {
8505
+ var _row$dsoDetails, _row$dsoDetails2, _row$dsoDetails$filli, _row$dsoDetails3, _row$fillingpointmeta;
8506
+ return (row === null || row === void 0 ? void 0 : row.fillingPointId) || ((_row$dsoDetails = row.dsoDetails) === null || _row$dsoDetails === void 0 ? void 0 : _row$dsoDetails.fillingPointId) || ((_row$dsoDetails2 = row.dsoDetails) !== null && _row$dsoDetails2 !== void 0 && _row$dsoDetails2.fillingPoint && typeof row.dsoDetails.fillingPoint === "object" ? (_row$dsoDetails$filli = row.dsoDetails.fillingPoint) === null || _row$dsoDetails$filli === void 0 ? void 0 : _row$dsoDetails$filli.fillingPointName : (_row$dsoDetails3 = row.dsoDetails) === null || _row$dsoDetails3 === void 0 ? void 0 : _row$dsoDetails3.fillingPoint) || (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.filling_pt_name) || (row === null || row === void 0 ? void 0 : row.fillingPoint) || "NA";
8507
+ },
8508
+ id: "fillingPoint",
8509
+ Cell: ({
8510
+ row
8511
+ }) => {
8512
+ return /*#__PURE__*/React.createElement(Dropdown$2, {
8513
+ className: "fsm-registry-dropdown",
8514
+ selected: allFillingPoints === null || allFillingPoints === void 0 ? void 0 : allFillingPoints.find(fp => {
8515
+ var _fp$fillingpointmetad, _row$original$dsoDeta, _row$original$dsoDeta2, _row$original$dsoDeta3, _row$original$filling, _row$original$filling2, _row$original$filling3, _row$original$filling4;
8516
+ const fpId = String(fp.id || fp.bookingId || fp.fillingPointId || fp.uuid || ((_fp$fillingpointmetad = fp.fillingpointmetadata) === null || _fp$fillingpointmetad === void 0 ? void 0 : _fp$fillingpointmetad.fillingPointId));
8517
+ const rowFpId = String(row.original.fillingPointId || ((_row$original$dsoDeta = row.original.dsoDetails) === null || _row$original$dsoDeta === void 0 ? void 0 : _row$original$dsoDeta.fillingPointId) || ((_row$original$dsoDeta2 = row.original.dsoDetails) === null || _row$original$dsoDeta2 === void 0 ? void 0 : (_row$original$dsoDeta3 = _row$original$dsoDeta2.fillingPoint) === null || _row$original$dsoDeta3 === void 0 ? void 0 : _row$original$dsoDeta3.id) || ((_row$original$filling = row.original.fillingpointmetadata) === null || _row$original$filling === void 0 ? void 0 : _row$original$filling.fillingPointId) || row.original.filling_pt_name || (row.original.fillingPoint && typeof row.original.fillingPoint === "object" ? (_row$original$filling2 = row.original.fillingPoint) === null || _row$original$filling2 === void 0 ? void 0 : _row$original$filling2.id : row.original.fillingPoint) || ((_row$original$filling3 = row.original.fillingPointDetail) === null || _row$original$filling3 === void 0 ? void 0 : _row$original$filling3.id) || ((_row$original$filling4 = row.original.fillingPointDetail) === null || _row$original$filling4 === void 0 ? void 0 : _row$original$filling4.bookingId) || "");
8518
+ return fpId === rowFpId && rowFpId !== "undefined" && rowFpId !== "null" && rowFpId !== "";
8519
+ }),
8520
+ option: allFillingPoints,
8521
+ select: value => onFillingPointSelect(row, value),
8522
+ style: {
8523
+ textAlign: "left"
8524
+ },
8525
+ optionKey: "fillingPointName",
8526
+ t: t
8527
+ });
8528
+ }
8478
8529
  }, {
8479
8530
  Header: t("ES_VENDOR_INBOX_SERVICE_TYPE"),
8480
- disableSortBy: true,
8531
+ id: "serviceType",
8532
+ accessor: row => {
8533
+ var _row$dsoDetails4, _additionalDetails;
8534
+ let additionalDetails = (_row$dsoDetails4 = row.dsoDetails) === null || _row$dsoDetails4 === void 0 ? void 0 : _row$dsoDetails4.additionalDetails;
8535
+ if (typeof additionalDetails === "string") {
8536
+ try {
8537
+ additionalDetails = JSON.parse(additionalDetails);
8538
+ } catch (error) {
8539
+ additionalDetails = {};
8540
+ }
8541
+ }
8542
+ return ((_additionalDetails = additionalDetails) === null || _additionalDetails === void 0 ? void 0 : _additionalDetails.serviceType) || "N/A";
8543
+ },
8481
8544
  Cell: ({
8482
8545
  row
8483
8546
  }) => {
8484
- var _row$original$dsoDeta, _additionalDetails;
8485
- let additionalDetails = (_row$original$dsoDeta = row.original.dsoDetails) === null || _row$original$dsoDeta === void 0 ? void 0 : _row$original$dsoDeta.additionalDetails;
8547
+ var _row$original$dsoDeta4, _additionalDetails2;
8548
+ let additionalDetails = (_row$original$dsoDeta4 = row.original.dsoDetails) === null || _row$original$dsoDeta4 === void 0 ? void 0 : _row$original$dsoDeta4.additionalDetails;
8486
8549
  if (typeof additionalDetails === "string") {
8487
8550
  try {
8488
8551
  additionalDetails = JSON.parse(additionalDetails);
@@ -8491,12 +8554,16 @@ const VendorInbox = props => {
8491
8554
  additionalDetails = {};
8492
8555
  }
8493
8556
  }
8494
- const serviceType = ((_additionalDetails = additionalDetails) === null || _additionalDetails === void 0 ? void 0 : _additionalDetails.serviceType) || "N/A";
8557
+ const serviceType = ((_additionalDetails2 = additionalDetails) === null || _additionalDetails2 === void 0 ? void 0 : _additionalDetails2.serviceType) || "N/A";
8495
8558
  return /*#__PURE__*/React.createElement("div", null, serviceType);
8496
8559
  }
8497
8560
  }, {
8498
8561
  Header: t("ES_VENDOR_REGISTRY_INBOX_ENABLED"),
8499
- disableSortBy: true,
8562
+ id: "status",
8563
+ accessor: row => {
8564
+ var _row$dsoDetails5;
8565
+ return ((_row$dsoDetails5 = row.dsoDetails) === null || _row$dsoDetails5 === void 0 ? void 0 : _row$dsoDetails5.status) || "";
8566
+ },
8500
8567
  Cell: ({
8501
8568
  row
8502
8569
  }) => {
@@ -8540,7 +8607,7 @@ const VendorInbox = props => {
8540
8607
  case "VEHICLE":
8541
8608
  return [{
8542
8609
  Header: t("ES_FSM_REGISTRY_INBOX_VEHICLE_NAME"),
8543
- disableSortBy: true,
8610
+ accessor: "registrationNumber",
8544
8611
  Cell: ({
8545
8612
  row
8546
8613
  }) => {
@@ -8548,7 +8615,7 @@ const VendorInbox = props => {
8548
8615
  className: "link"
8549
8616
  }, /*#__PURE__*/React.createElement(Link, {
8550
8617
  to: "/digit-ui/employee/vendor/registry/vehicle-details/" + row.original["registrationNumber"]
8551
- }, /*#__PURE__*/React.createElement("div", null, row.original.registrationNumber, /*#__PURE__*/React.createElement("br", null)))));
8618
+ }, /*#__PURE__*/React.createElement("div", null, row.original.registrationNumber))));
8552
8619
  }
8553
8620
  }, {
8554
8621
  Header: t("ES_FSM_REGISTRY_INBOX_DATE_VEHICLE_CREATION"),
@@ -8561,7 +8628,11 @@ const VendorInbox = props => {
8561
8628
  }
8562
8629
  }, {
8563
8630
  Header: t("ES_FSM_REGISTRY_INBOX_VENDOR_NAME"),
8564
- disableSortBy: true,
8631
+ id: "vendorName",
8632
+ accessor: row => {
8633
+ var _row$vendor;
8634
+ return ((_row$vendor = row.vendor) === null || _row$vendor === void 0 ? void 0 : _row$vendor.name) || "NA";
8635
+ },
8565
8636
  Cell: ({
8566
8637
  row
8567
8638
  }) => {
@@ -8570,11 +8641,23 @@ const VendorInbox = props => {
8570
8641
  }
8571
8642
  }, {
8572
8643
  Header: t("ES_VENDOR_INBOX_SERVICE_TYPE"),
8573
- disableSortBy: true,
8644
+ id: "serviceType",
8645
+ accessor: row => {
8646
+ var _additionalDetail;
8647
+ let additionalDetail = row.additionalDetails;
8648
+ if (typeof additionalDetail === "string") {
8649
+ try {
8650
+ additionalDetail = JSON.parse(additionalDetail);
8651
+ } catch (error) {
8652
+ additionalDetail = {};
8653
+ }
8654
+ }
8655
+ return ((_additionalDetail = additionalDetail) === null || _additionalDetail === void 0 ? void 0 : _additionalDetail.serviceType) || "N/A";
8656
+ },
8574
8657
  Cell: ({
8575
8658
  row
8576
8659
  }) => {
8577
- var _additionalDetail;
8660
+ var _additionalDetail2;
8578
8661
  let additionalDetail = row.original.additionalDetails;
8579
8662
  if (typeof additionalDetail === "string") {
8580
8663
  try {
@@ -8584,11 +8667,16 @@ const VendorInbox = props => {
8584
8667
  additionalDetail = {};
8585
8668
  }
8586
8669
  }
8587
- const serviceType = ((_additionalDetail = additionalDetail) === null || _additionalDetail === void 0 ? void 0 : _additionalDetail.serviceType) || "N/A";
8670
+ const serviceType = ((_additionalDetail2 = additionalDetail) === null || _additionalDetail2 === void 0 ? void 0 : _additionalDetail2.serviceType) || "N/A";
8588
8671
  return /*#__PURE__*/React.createElement("div", null, serviceType);
8589
8672
  }
8590
8673
  }, {
8591
8674
  Header: t("ES_FSM_REGISTRY_SELECT_DRIVER"),
8675
+ id: "driver",
8676
+ accessor: row => {
8677
+ var _row$driverData, _row$driver;
8678
+ return ((_row$driverData = row.driverData) === null || _row$driverData === void 0 ? void 0 : _row$driverData.name) || ((_row$driver = row.driver) === null || _row$driver === void 0 ? void 0 : _row$driver.name) || "NA";
8679
+ },
8592
8680
  Cell: ({
8593
8681
  row
8594
8682
  }) => {
@@ -8609,7 +8697,8 @@ const VendorInbox = props => {
8609
8697
  }
8610
8698
  }, {
8611
8699
  Header: t("ES_FSM_REGISTRY_INBOX_ENABLED"),
8612
- disableSortBy: true,
8700
+ id: "status",
8701
+ accessor: row => row.status || "",
8613
8702
  Cell: ({
8614
8703
  row
8615
8704
  }) => {
@@ -8628,7 +8717,11 @@ const VendorInbox = props => {
8628
8717
  case "DRIVER":
8629
8718
  return [{
8630
8719
  Header: t("ES_FSM_REGISTRY_INBOX_USERNAME"),
8631
- disableSortBy: true,
8720
+ id: "userName",
8721
+ accessor: row => {
8722
+ var _row$owner;
8723
+ return ((_row$owner = row.owner) === null || _row$owner === void 0 ? void 0 : _row$owner.userName) || "NA";
8724
+ },
8632
8725
  Cell: ({
8633
8726
  row
8634
8727
  }) => {
@@ -8637,12 +8730,11 @@ const VendorInbox = props => {
8637
8730
  className: "link"
8638
8731
  }, /*#__PURE__*/React.createElement(Link, {
8639
8732
  to: "/digit-ui/employee/vendor/registry/driver-details/" + row.original["id"]
8640
- }, /*#__PURE__*/React.createElement("div", null, ((_row$original$owner = row.original.owner) === null || _row$original$owner === void 0 ? void 0 : _row$original$owner.userName) || "NA", /*#__PURE__*/React.createElement("br", null)))));
8733
+ }, /*#__PURE__*/React.createElement("div", null, ((_row$original$owner = row.original.owner) === null || _row$original$owner === void 0 ? void 0 : _row$original$owner.userName) || "NA"))));
8641
8734
  }
8642
8735
  }, {
8643
8736
  Header: t("ES_FSM_REGISTRY_INBOX_DRIVER_NAME"),
8644
- disableSortBy: true,
8645
- accessor: "tripDetails",
8737
+ accessor: "name",
8646
8738
  Cell: ({
8647
8739
  row
8648
8740
  }) => {
@@ -8650,7 +8742,7 @@ const VendorInbox = props => {
8650
8742
  className: "link"
8651
8743
  }, /*#__PURE__*/React.createElement(Link, {
8652
8744
  to: "/digit-ui/employee/vendor/registry/driver-details/" + row.original["id"]
8653
- }, /*#__PURE__*/React.createElement("div", null, row.original.name, /*#__PURE__*/React.createElement("br", null)))));
8745
+ }, /*#__PURE__*/React.createElement("div", null, row.original.name))));
8654
8746
  }
8655
8747
  }, {
8656
8748
  Header: t("ES_FSM_REGISTRY_INBOX_DATE_DRIVER_CREATION"),
@@ -8663,6 +8755,11 @@ const VendorInbox = props => {
8663
8755
  }
8664
8756
  }, {
8665
8757
  Header: t("ES_FSM_REGISTRY_INBOX_VENDOR_NAME"),
8758
+ id: "vendorName",
8759
+ accessor: row => {
8760
+ var _row$vendorData, _row$vendor2;
8761
+ return ((_row$vendorData = row.vendorData) === null || _row$vendorData === void 0 ? void 0 : _row$vendorData.name) || ((_row$vendor2 = row.vendor) === null || _row$vendor2 === void 0 ? void 0 : _row$vendor2.name) || "NA";
8762
+ },
8666
8763
  Cell: ({
8667
8764
  row
8668
8765
  }) => {
@@ -8683,7 +8780,8 @@ const VendorInbox = props => {
8683
8780
  }
8684
8781
  }, {
8685
8782
  Header: t("ES_FSM_REGISTRY_INBOX_ENABLED"),
8686
- disableSortBy: true,
8783
+ id: "status",
8784
+ accessor: row => row.status || "",
8687
8785
  Cell: ({
8688
8786
  row
8689
8787
  }) => {
@@ -8702,9 +8800,9 @@ const VendorInbox = props => {
8702
8800
  default:
8703
8801
  return [];
8704
8802
  }
8705
- }, [props.selectedTab, vendors, drivers, tableData, additionalVendorData, t]);
8803
+ }, [props.selectedTab, vendors, drivers, tableData, additionalVendorData, allFillingPoints, t]);
8706
8804
  let result;
8707
- if (props.isLoading) {
8805
+ if (props.isLoading || isAllFillingPointsLoading) {
8708
8806
  result = /*#__PURE__*/React.createElement(Loader, null);
8709
8807
  } else if (tableData.length === 0) {
8710
8808
  let emptyCardText = "";
@@ -8750,9 +8848,8 @@ const VendorInbox = props => {
8750
8848
  getCellProps: cellInfo => {
8751
8849
  return {
8752
8850
  style: {
8753
- minWidth: cellInfo.column.Header === t("ES_INBOX_APPLICATION_NO") ? "240px" : "",
8754
- padding: cellInfo.column.Header === t("ES_FSM_REGISTRY_INBOX_VENDOR_NAME") ? "10px 18px" : "20px 18px",
8755
- fontSize: "16px"
8851
+ padding: "8px 12px",
8852
+ fontSize: "13.5px"
8756
8853
  }
8757
8854
  };
8758
8855
  },
@@ -8786,6 +8883,7 @@ const VendorInbox = props => {
8786
8883
  }))), /*#__PURE__*/React.createElement("div", {
8787
8884
  style: {
8788
8885
  flex: 1,
8886
+ width: "100%",
8789
8887
  marginLeft: props.userRole === "FSM_ADMIN" ? "" : "24px"
8790
8888
  }
8791
8889
  }, /*#__PURE__*/React.createElement(SearchApplication, {
@@ -9106,7 +9204,7 @@ const SelectServiceType = ({
9106
9204
  return /*#__PURE__*/React.createElement(Loader, null);
9107
9205
  }
9108
9206
  if (userType === "employee") {
9109
- return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(CardLabel, null, config.label), /*#__PURE__*/React.createElement(Dropdown$2, {
9207
+ return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(CardLabel, null, t(config.label)), /*#__PURE__*/React.createElement(Dropdown$2, {
9110
9208
  className: "payment-form-text-input-correction",
9111
9209
  isMandatory: config.isMandatory,
9112
9210
  selected: serviceTypes,
@@ -9256,7 +9354,6 @@ const AddDriver = ({
9256
9354
  } = useTranslation();
9257
9355
  const stateId = Digit.ULBService.getStateId();
9258
9356
  const [showToast, setShowToast] = useState(null);
9259
- const history = useHistory();
9260
9357
  const [currentStep, setCurrentStep] = useState(1);
9261
9358
  const queryClient = useQueryClient();
9262
9359
  const steps = [t("ES_FSM_REGISTRY_TITLE_NEW_DRIVER")];
@@ -9343,16 +9440,16 @@ const AddDriver = ({
9343
9440
  }
9344
9441
  });
9345
9442
  };
9346
- const isMobile = window.Digit.Utils.browser.isMobile();
9347
- return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
9348
- style: {
9349
- display: "flex",
9350
- width: "100%",
9351
- gap: "24px"
9352
- }
9353
- }, /*#__PURE__*/React.createElement(Timeline, {
9354
- steps: steps,
9355
- currentStep: currentStep
9443
+ return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(VerticalTimeline, {
9444
+ config: [{
9445
+ route: "vendor-details",
9446
+ timeLine: [{
9447
+ actions: t("ES_FSM_REGISTRY_TITLE_NEW_DRIVER"),
9448
+ currentStep: 1
9449
+ }]
9450
+ }],
9451
+ currentActiveIndex: currentStep - 1,
9452
+ showFinalStep: false
9356
9453
  }), /*#__PURE__*/React.createElement("div", {
9357
9454
  style: {
9358
9455
  flex: "1",
@@ -9378,7 +9475,7 @@ const AddDriver = ({
9378
9475
  error: showToast.key === "error" ? true : false,
9379
9476
  label: t(showToast.key === "success" ? `ES_FSM_${showToast.action}_SUCCESS` : showToast.action),
9380
9477
  onClose: closeToast
9381
- }))));
9478
+ })));
9382
9479
  };
9383
9480
 
9384
9481
  const ConfirmationBox = ({
@@ -9690,12 +9787,7 @@ const EditVendorDetails = props => {
9690
9787
  const excludedKeys = ["vendorAdditionalDetailsId", "vendorId", "tenantId", "code", "lastModifiedTime", "createdTime", "lastModifiedBy", "createdBy", "active", "status", "vendorType", "vendorGroup", "narration", "documents"];
9691
9788
  return /*#__PURE__*/React.createElement("div", {
9692
9789
  className: "employee-form-content"
9693
- }, !isLoading ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Card, {
9694
- style: {
9695
- position: "relative",
9696
- paddingLeft: "30px"
9697
- }
9698
- }, dsoData === null || dsoData === void 0 ? void 0 : (_dsoData$4 = dsoData[0]) === null || _dsoData$4 === void 0 ? void 0 : (_dsoData$4$employeeRe = _dsoData$4.employeeResponse) === null || _dsoData$4$employeeRe === void 0 ? void 0 : _dsoData$4$employeeRe.map((detail, index) => {
9790
+ }, !isLoading ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Card, null, dsoData === null || dsoData === void 0 ? void 0 : (_dsoData$4 = dsoData[0]) === null || _dsoData$4 === void 0 ? void 0 : (_dsoData$4$employeeRe = _dsoData$4.employeeResponse) === null || _dsoData$4$employeeRe === void 0 ? void 0 : _dsoData$4$employeeRe.map((detail, index) => {
9699
9791
  var _detail$values, _detail$child;
9700
9792
  return /*#__PURE__*/React.createElement(React.Fragment, {
9701
9793
  key: index
@@ -9704,11 +9796,9 @@ const EditVendorDetails = props => {
9704
9796
  marginBottom: "16px",
9705
9797
  marginTop: "32px"
9706
9798
  }
9707
- }, t(detail.title)), /*#__PURE__*/React.createElement("div", {
9708
- style: !isMobile ? {
9709
- marginLeft: "-15px"
9710
- } : {}
9711
- }, /*#__PURE__*/React.createElement(StatusTable, null, detail === null || detail === void 0 ? void 0 : (_detail$values = detail.values) === null || _detail$values === void 0 ? void 0 : _detail$values.map((value, index) => {
9799
+ }, t(detail.title)), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("div", {
9800
+ className: "formcomposer-section-grid"
9801
+ }, detail === null || detail === void 0 ? void 0 : (_detail$values = detail.values) === null || _detail$values === void 0 ? void 0 : _detail$values.map((value, index) => {
9712
9802
  var _detail$values2;
9713
9803
  if (value.title === "ES_FSM_REGISTRY_DETAILS_ADDITIONAL_DETAILS") {
9714
9804
  var _vendorAdditionalData, _vendorAdditionalData2;
@@ -9719,7 +9809,7 @@ const EditVendorDetails = props => {
9719
9809
  }, /*#__PURE__*/React.createElement(Row, {
9720
9810
  label: t(value.title),
9721
9811
  text: "",
9722
- className: "border-none"
9812
+ className: "border-none flex-box"
9723
9813
  }), isVendorAdditionalLoading ? /*#__PURE__*/React.createElement(Loader, null) : additionalDetails ? /*#__PURE__*/React.createElement(Card, {
9724
9814
  className: "card-with-background",
9725
9815
  style: {
@@ -9767,7 +9857,7 @@ const EditVendorDetails = props => {
9767
9857
  text: value.value ? t(String(value.value)) : "N/A",
9768
9858
  last: index === (detail === null || detail === void 0 ? void 0 : (_detail$values2 = detail.values) === null || _detail$values2 === void 0 ? void 0 : _detail$values2.length) - 1,
9769
9859
  caption: value.caption,
9770
- className: `border-none ${!isMobile ? "vendor-details-row" : ""}`
9860
+ className: `border-none flex-box ${!isMobile ? "vendor-details-row" : ""}`
9771
9861
  });
9772
9862
  }), detail === null || detail === void 0 ? void 0 : (_detail$child = detail.child) === null || _detail$child === void 0 ? void 0 : _detail$child.map((data, index) => {
9773
9863
  var _data$values;
@@ -9873,24 +9963,26 @@ const VehicleConfig = (t, disabled = false) => {
9873
9963
  title: t("ES_FSM_VEHICLE_FORMAT_TIP")
9874
9964
  },
9875
9965
  error: t("FSM_REGISTRY_INVALID_REGISTRATION_NUMBER"),
9876
- defaultValue: "",
9877
- className: "payment-form-text-input-correction"
9966
+ defaultValue: ""
9878
9967
  }
9879
9968
  }, {
9880
9969
  label: "ES_VENDOR_REGISTRY_SERVICE_TYPE",
9881
9970
  isMandatory: true,
9882
9971
  type: "component",
9883
- route: "select-service",
9884
- hideInEmployee: false,
9885
- key: "additionalDetails",
9972
+ key: "serviceType",
9886
9973
  component: "SelectServiceType",
9887
9974
  disable: disabled,
9975
+ populators: {
9976
+ name: "serviceType",
9977
+ defaultValue: {
9978
+ code: "WT",
9979
+ name: "WT",
9980
+ i18nKey: "WT"
9981
+ }
9982
+ },
9888
9983
  texts: {
9889
- headerCaption: "",
9890
- header: "CS_COMMON_CHOOSE_SERVICE",
9891
- cardText: "CS_COMMON_SELECT_SERVICE",
9892
- submitBarLabel: "CS_COMMON_NEXT",
9893
- skipText: "CORE_COMMON_SKIP_CONTINUE"
9984
+ header: "CS_COMMON_CHOOSE_SERVICE_TYPE",
9985
+ submitBarLabel: "CS_COMMON_NEXT"
9894
9986
  }
9895
9987
  }, {
9896
9988
  route: "vehicle",
@@ -9971,8 +10063,7 @@ const VehicleConfig = (t, disabled = false) => {
9971
10063
  pattern: /^[A-Za-z]/
9972
10064
  },
9973
10065
  error: t("FSM_REGISTRY_INVALID_NAME"),
9974
- defaultValue: "",
9975
- className: "payment-form-text-input-correction"
10066
+ defaultValue: ""
9976
10067
  }
9977
10068
  }, {
9978
10069
  label: "ES_FSM_REGISTRY_NEW_VEHICLE_OWNER_PHONE",
@@ -9987,12 +10078,7 @@ const VehicleConfig = (t, disabled = false) => {
9987
10078
  pattern: /^[6-9]\d{9}$/
9988
10079
  },
9989
10080
  error: t("FSM_REGISTRY_INVALID_PHONE"),
9990
- defaultValue: "",
9991
- className: "payment-form-text-input-correction",
9992
- labelStyle: {
9993
- border: "1px solid black",
9994
- borderRight: "none"
9995
- }
10081
+ defaultValue: ""
9996
10082
  }
9997
10083
  }, {
9998
10084
  label: "ES_FSM_REGISTRY_NEW_GENDER",
@@ -10031,8 +10117,7 @@ const VehicleConfig = (t, disabled = false) => {
10031
10117
  pattern: /^[a-zA-Z0-9+_.-]+@[a-zA-Z0-9.-]+\.[a-zA-Z0-9.-]+$/
10032
10118
  },
10033
10119
  error: t("FSM_REGISTRY_INVALID_EMAIL"),
10034
- defaultValue: "",
10035
- className: "payment-form-text-input-correction"
10120
+ defaultValue: ""
10036
10121
  }
10037
10122
  }]
10038
10123
  }];
@@ -10088,6 +10173,11 @@ const AddVehicle = ({
10088
10173
  });
10089
10174
  const [canSubmit, setSubmitValve] = useState(false);
10090
10175
  const defaultValues = {
10176
+ serviceType: {
10177
+ code: "WT",
10178
+ name: "WT",
10179
+ i18nKey: "WT"
10180
+ },
10091
10181
  tripData: {
10092
10182
  noOfTrips: 1,
10093
10183
  amountPerTrip: null,
@@ -10115,7 +10205,7 @@ const AddVehicle = ({
10115
10205
  setShowToast(null);
10116
10206
  };
10117
10207
  const onSubmit = data => {
10118
- var _data$vehicle, _data$vehicle$type, _data$vehicle2, _data$vehicle2$modal, _data$vehicle3, _data$vehicle3$type, _data$additionalDetai, _data$selectGender;
10208
+ var _data$vehicle, _data$vehicle$type, _data$vehicle2, _data$vehicle2$modal, _data$vehicle3, _data$vehicle3$type, _data$serviceType, _data$selectGender;
10119
10209
  const registrationNumber = data === null || data === void 0 ? void 0 : data.registrationNumber;
10120
10210
  const vehicleType = data === null || data === void 0 ? void 0 : (_data$vehicle = data.vehicle) === null || _data$vehicle === void 0 ? void 0 : (_data$vehicle$type = _data$vehicle.type) === null || _data$vehicle$type === void 0 ? void 0 : _data$vehicle$type.code;
10121
10211
  const vehicleModal = data === null || data === void 0 ? void 0 : (_data$vehicle2 = data.vehicle) === null || _data$vehicle2 === void 0 ? void 0 : (_data$vehicle2$modal = _data$vehicle2.modal) === null || _data$vehicle2$modal === void 0 ? void 0 : _data$vehicle2$modal.code;
@@ -10126,7 +10216,7 @@ const AddVehicle = ({
10126
10216
  const fitnessValidity = new Date(`${data === null || data === void 0 ? void 0 : data.fitnessValidity}`).getTime();
10127
10217
  const ownerName = data === null || data === void 0 ? void 0 : data.ownerName;
10128
10218
  const phone = data === null || data === void 0 ? void 0 : data.phone;
10129
- const additionalDetails = data === null || data === void 0 ? void 0 : (_data$additionalDetai = data.additionalDetails) === null || _data$additionalDetai === void 0 ? void 0 : _data$additionalDetai.code;
10219
+ const additionalDetails = data === null || data === void 0 ? void 0 : (_data$serviceType = data.serviceType) === null || _data$serviceType === void 0 ? void 0 : _data$serviceType.code;
10130
10220
  const gender = data === null || data === void 0 ? void 0 : (_data$selectGender = data.selectGender) === null || _data$selectGender === void 0 ? void 0 : _data$selectGender.code;
10131
10221
  const emailId = data === null || data === void 0 ? void 0 : data.emailId;
10132
10222
  const dob = new Date(`${data.dob}`).getTime() || new Date(`1/1/1970`).getTime();
@@ -10181,16 +10271,16 @@ const AddVehicle = ({
10181
10271
  }
10182
10272
  });
10183
10273
  };
10184
- const isMobile = window.Digit.Utils.browser.isMobile();
10185
- return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
10186
- style: {
10187
- display: "flex",
10188
- width: "100%",
10189
- gap: "24px"
10190
- }
10191
- }, /*#__PURE__*/React.createElement(Timeline, {
10192
- steps: steps,
10193
- currentStep: currentStep
10274
+ return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(VerticalTimeline, {
10275
+ config: [{
10276
+ route: "vendor-details",
10277
+ timeLine: [{
10278
+ actions: t("ES_FSM_REGISTRY_TITLE_NEW_VEHICLE"),
10279
+ currentStep: 1
10280
+ }]
10281
+ }],
10282
+ currentActiveIndex: currentStep - 1,
10283
+ showFinalStep: false
10194
10284
  }), /*#__PURE__*/React.createElement("div", {
10195
10285
  style: {
10196
10286
  flex: "1",
@@ -10216,7 +10306,7 @@ const AddVehicle = ({
10216
10306
  error: showToast.key === "error" ? true : false,
10217
10307
  label: t(showToast.key === "success" ? `ES_FSM_REGISTRY_${showToast.action}_SUCCESS` : showToast.action),
10218
10308
  onClose: closeToast
10219
- }))));
10309
+ })));
10220
10310
  };
10221
10311
 
10222
10312
  const createConfig = [{
@@ -10356,7 +10446,6 @@ const VENDORCreate = ({
10356
10446
  const onSuccess = () => {
10357
10447
  clearParams();
10358
10448
  queryClient.invalidateQueries("VENDOR_CREATE");
10359
- queryClient.invalidateQueries("EMP_VENDOR_COMMON_SEARCH");
10360
10449
  };
10361
10450
  let commonFields = createConfig;
10362
10451
  commonFields.forEach(obj => {
@@ -10365,18 +10454,7 @@ const VENDORCreate = ({
10365
10454
  config.indexRoute = "info";
10366
10455
  const CheckPage = (_Digit = Digit) === null || _Digit === void 0 ? void 0 : (_Digit$ComponentRegis = _Digit.ComponentRegistryService) === null || _Digit$ComponentRegis === void 0 ? void 0 : _Digit$ComponentRegis.getComponent("VENDORCheckPage");
10367
10456
  const NewResponse = (_Digit2 = Digit) === null || _Digit2 === void 0 ? void 0 : (_Digit2$ComponentRegi = _Digit2.ComponentRegistryService) === null || _Digit2$ComponentRegi === void 0 ? void 0 : _Digit2$ComponentRegi.getComponent("NewResponse");
10368
- return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
10369
- style: {
10370
- display: "flex",
10371
- width: "100%",
10372
- gap: "24px"
10373
- }
10374
- }, /*#__PURE__*/React.createElement("div", {
10375
- style: {
10376
- flex: "1",
10377
- overflowY: "auto"
10378
- }
10379
- }, /*#__PURE__*/React.createElement(Switch, null, config.map((routeObj, index) => {
10457
+ return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Switch, null, config.map((routeObj, index) => {
10380
10458
  const {
10381
10459
  component,
10382
10460
  texts,
@@ -10411,7 +10489,7 @@ const VENDORCreate = ({
10411
10489
  onSuccess: onSuccess
10412
10490
  })), /*#__PURE__*/React.createElement(Route, null, /*#__PURE__*/React.createElement(Redirect, {
10413
10491
  to: `${match.path}/${config.indexRoute}`
10414
- }))))));
10492
+ }))));
10415
10493
  };
10416
10494
 
10417
10495
  const ActionButton = ({
@@ -10440,7 +10518,6 @@ const CheckPage = ({
10440
10518
  } = useTranslation();
10441
10519
  const history = useHistory();
10442
10520
  const [categoriesWiseData, setCategoriesWiseData] = useState();
10443
- const steps = ["VENDOR_ADDITIONAL_DETAILS", "VENDOR_DOCUMENT_DETAILS", "VENDOR_SUMMARY"];
10444
10521
  const tenantId = Digit.ULBService.getCurrentTenantId();
10445
10522
  const stateTenantId = Digit.ULBService.getStateId();
10446
10523
  const {
@@ -10478,19 +10555,30 @@ const CheckPage = ({
10478
10555
  }
10479
10556
  });
10480
10557
  };
10481
- return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
10482
- style: {
10483
- display: "flex",
10484
- width: "100%",
10485
- gap: "24px"
10486
- }
10487
- }, window.location.href.includes("/employee") ? /*#__PURE__*/React.createElement(Timeline, {
10488
- steps: steps,
10489
- currentStep: 5
10558
+ return /*#__PURE__*/React.createElement(React.Fragment, null, window.location.href.includes("/employee") ? /*#__PURE__*/React.createElement(VerticalTimeline, {
10559
+ config: [{
10560
+ timeLine: [{
10561
+ actions: t("VENDOR_ADDITIONAL_DETAILS"),
10562
+ currentStep: 1
10563
+ }]
10564
+ }, {
10565
+ timeLine: [{
10566
+ actions: t("VENDOR_DOCUMENT_DETAILS"),
10567
+ currentStep: 2
10568
+ }]
10569
+ }, {
10570
+ timeLine: [{
10571
+ actions: t("VENDOR_SUMMARY"),
10572
+ currentStep: 3
10573
+ }]
10574
+ }],
10575
+ currentActiveIndex: 2,
10576
+ showFinalStep: false
10490
10577
  }) : null, /*#__PURE__*/React.createElement("div", {
10491
10578
  style: {
10492
10579
  flex: "1",
10493
- overflowY: "auto"
10580
+ overflowY: "auto",
10581
+ marginBottom: "20px"
10494
10582
  }
10495
10583
  }, /*#__PURE__*/React.createElement(Card, null, /*#__PURE__*/React.createElement(CardHeader, null, t("VENDOR_CHECK_DETAILS")), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("br", null), /*#__PURE__*/React.createElement(CardSubHeader, null, t("VENDOR_ADDITIONAL_DETAILS")), /*#__PURE__*/React.createElement(StatusTable, null, /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Row, {
10496
10584
  label: t("VENDOR_ID"),
@@ -10605,7 +10693,7 @@ const CheckPage = ({
10605
10693
  label: t("COMMON_BUTTON_SUBMIT"),
10606
10694
  onSubmit: onSubmit,
10607
10695
  disabled: !agree
10608
- })))));
10696
+ }))));
10609
10697
  };
10610
10698
 
10611
10699
  const GetActionMessage = props => {
@@ -10661,7 +10749,9 @@ const NewResponse = ({
10661
10749
  console.log("mutation in acknowejkfdlgi ::: ", mutation);
10662
10750
  } catch (err) {}
10663
10751
  }, []);
10664
- return mutation.isLoading || mutation.isIdle ? /*#__PURE__*/React.createElement(Loader, null) : /*#__PURE__*/React.createElement(Card, null, /*#__PURE__*/React.createElement(BannerPicker, {
10752
+ return mutation.isLoading || mutation.isIdle ? /*#__PURE__*/React.createElement(Loader, null) : /*#__PURE__*/React.createElement(Card, {
10753
+ className: "vehicle-details-card"
10754
+ }, /*#__PURE__*/React.createElement(BannerPicker, {
10665
10755
  t: t,
10666
10756
  data: mutation.data,
10667
10757
  isSuccess: mutation.isSuccess,
@@ -11396,7 +11486,9 @@ const VehicleDetails = props => {
11396
11486
  if (isLoading) {
11397
11487
  return /*#__PURE__*/React.createElement(Loader, null);
11398
11488
  }
11399
- return /*#__PURE__*/React.createElement(React.Fragment, null, !isLoading ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Card, {
11489
+ return /*#__PURE__*/React.createElement(React.Fragment, null, !isLoading ? /*#__PURE__*/React.createElement("div", {
11490
+ className: "employee-form-content"
11491
+ }, /*#__PURE__*/React.createElement(Card, {
11400
11492
  className: "vehicle-details-card",
11401
11493
  style: {
11402
11494
  position: "relative"
@@ -11583,30 +11675,24 @@ const SelectVehicleType = ({
11583
11675
  if (!vehicleData || !serviceTypeData) {
11584
11676
  return /*#__PURE__*/React.createElement("div", null, t("ERROR_FETCHING_DATA"));
11585
11677
  }
11586
- return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, {
11587
- className: "card-label-smaller"
11588
- }, t("ES_FSM_REGISTRY_VEHICLE_MODEL")), /*#__PURE__*/React.createElement(Dropdown$2, {
11678
+ return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, null, t("ES_FSM_REGISTRY_VEHICLE_MODEL")), /*#__PURE__*/React.createElement(Dropdown$2, {
11589
11679
  className: "form-field",
11590
11680
  selected: selectedModal,
11591
11681
  option: modals,
11592
11682
  select: selectModal,
11593
11683
  optionKey: "name",
11594
11684
  t: t
11595
- })), /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, {
11596
- className: "card-label-smaller"
11597
- }, t("ES_FSM_REGISTRY_VEHICLE_TYPE")), /*#__PURE__*/React.createElement(Dropdown$2, {
11685
+ })), /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, null, t("ES_FSM_REGISTRY_VEHICLE_TYPE")), /*#__PURE__*/React.createElement(Dropdown$2, {
11598
11686
  className: "form-field",
11599
11687
  selected: selectedType,
11600
11688
  option: types,
11601
11689
  select: selectType,
11602
11690
  optionKey: "name",
11603
11691
  t: t
11604
- })), /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, {
11605
- className: "card-label-smaller"
11606
- }, t("ES_FSM_REGISTRY_VEHICLE_CAPACITY")), /*#__PURE__*/React.createElement(TextInput, {
11692
+ })), /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, null, t("ES_FSM_REGISTRY_VEHICLE_CAPACITY")), /*#__PURE__*/React.createElement(TextInput, {
11607
11693
  className: "",
11608
11694
  textInputStyle: {
11609
- width: "50%"
11695
+ width: "100%"
11610
11696
  },
11611
11697
  value: selectedCapacity,
11612
11698
  disable: true