@djb25/digit-ui-module-vendor 1.0.14 → 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))));
@@ -8452,7 +8434,8 @@ const VendorInbox = props => {
8452
8434
  enabled: (vendorIds === null || vendorIds === void 0 ? void 0 : vendorIds.length) > 0
8453
8435
  });
8454
8436
  const {
8455
- data: allFillingPointsData
8437
+ data: allFillingPointsData,
8438
+ isLoading: isAllFillingPointsLoading
8456
8439
  } = Digit.Hooks.wt.useFillPointSearch({
8457
8440
  tenantId,
8458
8441
  filters: {
@@ -8478,6 +8461,8 @@ const VendorInbox = props => {
8478
8461
  setToast({
8479
8462
  label: t("WT_FIXED_FILLING_MAPPING_SUCCESS")
8480
8463
  });
8464
+ props.refetchData();
8465
+ props.refetchVendor && props.refetchVendor();
8481
8466
  setTimeout(closeToast, 5000);
8482
8467
  },
8483
8468
  onError: err => {
@@ -8517,8 +8502,8 @@ const VendorInbox = props => {
8517
8502
  }, {
8518
8503
  Header: t("WT_FILLING_POINT"),
8519
8504
  accessor: row => {
8520
- var _row$fillingpointmeta;
8521
- return (row === null || row === void 0 ? void 0 : row.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.filling_pt_name) || (row === null || row === void 0 ? void 0 : row.fillingPoint) || "NA";
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";
8522
8507
  },
8523
8508
  id: "fillingPoint",
8524
8509
  Cell: ({
@@ -8527,10 +8512,10 @@ const VendorInbox = props => {
8527
8512
  return /*#__PURE__*/React.createElement(Dropdown$2, {
8528
8513
  className: "fsm-registry-dropdown",
8529
8514
  selected: allFillingPoints === null || allFillingPoints === void 0 ? void 0 : allFillingPoints.find(fp => {
8530
- var _fp$fillingpointmetad, _row$original$filling, _row$original$filling2, _row$original$filling3;
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;
8531
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));
8532
- const rowFpId = String(row.original.fillingPointId || ((_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 || ((_row$original$filling2 = row.original.fillingPointDetail) === null || _row$original$filling2 === void 0 ? void 0 : _row$original$filling2.id) || ((_row$original$filling3 = row.original.fillingPointDetail) === null || _row$original$filling3 === void 0 ? void 0 : _row$original$filling3.bookingId));
8533
- return fpId === rowFpId && rowFpId !== "undefined" && rowFpId !== "null";
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 !== "";
8534
8519
  }),
8535
8520
  option: allFillingPoints,
8536
8521
  select: value => onFillingPointSelect(row, value),
@@ -8545,8 +8530,8 @@ const VendorInbox = props => {
8545
8530
  Header: t("ES_VENDOR_INBOX_SERVICE_TYPE"),
8546
8531
  id: "serviceType",
8547
8532
  accessor: row => {
8548
- var _row$dsoDetails, _additionalDetails;
8549
- let additionalDetails = (_row$dsoDetails = row.dsoDetails) === null || _row$dsoDetails === void 0 ? void 0 : _row$dsoDetails.additionalDetails;
8533
+ var _row$dsoDetails4, _additionalDetails;
8534
+ let additionalDetails = (_row$dsoDetails4 = row.dsoDetails) === null || _row$dsoDetails4 === void 0 ? void 0 : _row$dsoDetails4.additionalDetails;
8550
8535
  if (typeof additionalDetails === "string") {
8551
8536
  try {
8552
8537
  additionalDetails = JSON.parse(additionalDetails);
@@ -8559,8 +8544,8 @@ const VendorInbox = props => {
8559
8544
  Cell: ({
8560
8545
  row
8561
8546
  }) => {
8562
- var _row$original$dsoDeta, _additionalDetails2;
8563
- 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;
8564
8549
  if (typeof additionalDetails === "string") {
8565
8550
  try {
8566
8551
  additionalDetails = JSON.parse(additionalDetails);
@@ -8576,8 +8561,8 @@ const VendorInbox = props => {
8576
8561
  Header: t("ES_VENDOR_REGISTRY_INBOX_ENABLED"),
8577
8562
  id: "status",
8578
8563
  accessor: row => {
8579
- var _row$dsoDetails2;
8580
- return ((_row$dsoDetails2 = row.dsoDetails) === null || _row$dsoDetails2 === void 0 ? void 0 : _row$dsoDetails2.status) || "";
8564
+ var _row$dsoDetails5;
8565
+ return ((_row$dsoDetails5 = row.dsoDetails) === null || _row$dsoDetails5 === void 0 ? void 0 : _row$dsoDetails5.status) || "";
8581
8566
  },
8582
8567
  Cell: ({
8583
8568
  row
@@ -8815,9 +8800,9 @@ const VendorInbox = props => {
8815
8800
  default:
8816
8801
  return [];
8817
8802
  }
8818
- }, [props.selectedTab, vendors, drivers, tableData, additionalVendorData, t]);
8803
+ }, [props.selectedTab, vendors, drivers, tableData, additionalVendorData, allFillingPoints, t]);
8819
8804
  let result;
8820
- if (props.isLoading) {
8805
+ if (props.isLoading || isAllFillingPointsLoading) {
8821
8806
  result = /*#__PURE__*/React.createElement(Loader, null);
8822
8807
  } else if (tableData.length === 0) {
8823
8808
  let emptyCardText = "";
@@ -8898,6 +8883,7 @@ const VendorInbox = props => {
8898
8883
  }))), /*#__PURE__*/React.createElement("div", {
8899
8884
  style: {
8900
8885
  flex: 1,
8886
+ width: "100%",
8901
8887
  marginLeft: props.userRole === "FSM_ADMIN" ? "" : "24px"
8902
8888
  }
8903
8889
  }, /*#__PURE__*/React.createElement(SearchApplication, {
@@ -9368,7 +9354,6 @@ const AddDriver = ({
9368
9354
  } = useTranslation();
9369
9355
  const stateId = Digit.ULBService.getStateId();
9370
9356
  const [showToast, setShowToast] = useState(null);
9371
- const history = useHistory();
9372
9357
  const [currentStep, setCurrentStep] = useState(1);
9373
9358
  const queryClient = useQueryClient();
9374
9359
  const steps = [t("ES_FSM_REGISTRY_TITLE_NEW_DRIVER")];
@@ -9455,16 +9440,16 @@ const AddDriver = ({
9455
9440
  }
9456
9441
  });
9457
9442
  };
9458
- const isMobile = window.Digit.Utils.browser.isMobile();
9459
- return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
9460
- style: {
9461
- display: "flex",
9462
- width: "100%",
9463
- gap: "24px"
9464
- }
9465
- }, /*#__PURE__*/React.createElement(Timeline, {
9466
- steps: steps,
9467
- 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
9468
9453
  }), /*#__PURE__*/React.createElement("div", {
9469
9454
  style: {
9470
9455
  flex: "1",
@@ -9490,7 +9475,7 @@ const AddDriver = ({
9490
9475
  error: showToast.key === "error" ? true : false,
9491
9476
  label: t(showToast.key === "success" ? `ES_FSM_${showToast.action}_SUCCESS` : showToast.action),
9492
9477
  onClose: closeToast
9493
- }))));
9478
+ })));
9494
9479
  };
9495
9480
 
9496
9481
  const ConfirmationBox = ({
@@ -9802,12 +9787,7 @@ const EditVendorDetails = props => {
9802
9787
  const excludedKeys = ["vendorAdditionalDetailsId", "vendorId", "tenantId", "code", "lastModifiedTime", "createdTime", "lastModifiedBy", "createdBy", "active", "status", "vendorType", "vendorGroup", "narration", "documents"];
9803
9788
  return /*#__PURE__*/React.createElement("div", {
9804
9789
  className: "employee-form-content"
9805
- }, !isLoading ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Card, {
9806
- style: {
9807
- position: "relative",
9808
- paddingLeft: "30px"
9809
- }
9810
- }, 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) => {
9811
9791
  var _detail$values, _detail$child;
9812
9792
  return /*#__PURE__*/React.createElement(React.Fragment, {
9813
9793
  key: index
@@ -9816,11 +9796,9 @@ const EditVendorDetails = props => {
9816
9796
  marginBottom: "16px",
9817
9797
  marginTop: "32px"
9818
9798
  }
9819
- }, t(detail.title)), /*#__PURE__*/React.createElement("div", {
9820
- style: !isMobile ? {
9821
- marginLeft: "-15px"
9822
- } : {}
9823
- }, /*#__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) => {
9824
9802
  var _detail$values2;
9825
9803
  if (value.title === "ES_FSM_REGISTRY_DETAILS_ADDITIONAL_DETAILS") {
9826
9804
  var _vendorAdditionalData, _vendorAdditionalData2;
@@ -9831,7 +9809,7 @@ const EditVendorDetails = props => {
9831
9809
  }, /*#__PURE__*/React.createElement(Row, {
9832
9810
  label: t(value.title),
9833
9811
  text: "",
9834
- className: "border-none"
9812
+ className: "border-none flex-box"
9835
9813
  }), isVendorAdditionalLoading ? /*#__PURE__*/React.createElement(Loader, null) : additionalDetails ? /*#__PURE__*/React.createElement(Card, {
9836
9814
  className: "card-with-background",
9837
9815
  style: {
@@ -9879,7 +9857,7 @@ const EditVendorDetails = props => {
9879
9857
  text: value.value ? t(String(value.value)) : "N/A",
9880
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,
9881
9859
  caption: value.caption,
9882
- className: `border-none ${!isMobile ? "vendor-details-row" : ""}`
9860
+ className: `border-none flex-box ${!isMobile ? "vendor-details-row" : ""}`
9883
9861
  });
9884
9862
  }), detail === null || detail === void 0 ? void 0 : (_detail$child = detail.child) === null || _detail$child === void 0 ? void 0 : _detail$child.map((data, index) => {
9885
9863
  var _data$values;
@@ -10293,16 +10271,16 @@ const AddVehicle = ({
10293
10271
  }
10294
10272
  });
10295
10273
  };
10296
- const isMobile = window.Digit.Utils.browser.isMobile();
10297
- return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
10298
- style: {
10299
- display: "flex",
10300
- width: "100%",
10301
- gap: "24px"
10302
- }
10303
- }, /*#__PURE__*/React.createElement(Timeline, {
10304
- steps: steps,
10305
- 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
10306
10284
  }), /*#__PURE__*/React.createElement("div", {
10307
10285
  style: {
10308
10286
  flex: "1",
@@ -10328,7 +10306,7 @@ const AddVehicle = ({
10328
10306
  error: showToast.key === "error" ? true : false,
10329
10307
  label: t(showToast.key === "success" ? `ES_FSM_REGISTRY_${showToast.action}_SUCCESS` : showToast.action),
10330
10308
  onClose: closeToast
10331
- }))));
10309
+ })));
10332
10310
  };
10333
10311
 
10334
10312
  const createConfig = [{
@@ -10476,18 +10454,7 @@ const VENDORCreate = ({
10476
10454
  config.indexRoute = "info";
10477
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");
10478
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");
10479
- return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
10480
- style: {
10481
- display: "flex",
10482
- width: "100%",
10483
- gap: "24px"
10484
- }
10485
- }, /*#__PURE__*/React.createElement("div", {
10486
- style: {
10487
- flex: "1",
10488
- overflowY: "auto"
10489
- }
10490
- }, /*#__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) => {
10491
10458
  const {
10492
10459
  component,
10493
10460
  texts,
@@ -10522,7 +10489,7 @@ const VENDORCreate = ({
10522
10489
  onSuccess: onSuccess
10523
10490
  })), /*#__PURE__*/React.createElement(Route, null, /*#__PURE__*/React.createElement(Redirect, {
10524
10491
  to: `${match.path}/${config.indexRoute}`
10525
- }))))));
10492
+ }))));
10526
10493
  };
10527
10494
 
10528
10495
  const ActionButton = ({
@@ -10551,7 +10518,6 @@ const CheckPage = ({
10551
10518
  } = useTranslation();
10552
10519
  const history = useHistory();
10553
10520
  const [categoriesWiseData, setCategoriesWiseData] = useState();
10554
- const steps = ["VENDOR_ADDITIONAL_DETAILS", "VENDOR_DOCUMENT_DETAILS", "VENDOR_SUMMARY"];
10555
10521
  const tenantId = Digit.ULBService.getCurrentTenantId();
10556
10522
  const stateTenantId = Digit.ULBService.getStateId();
10557
10523
  const {
@@ -10589,19 +10555,30 @@ const CheckPage = ({
10589
10555
  }
10590
10556
  });
10591
10557
  };
10592
- return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
10593
- style: {
10594
- display: "flex",
10595
- width: "100%",
10596
- gap: "24px"
10597
- }
10598
- }, window.location.href.includes("/employee") ? /*#__PURE__*/React.createElement(Timeline, {
10599
- steps: steps,
10600
- 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
10601
10577
  }) : null, /*#__PURE__*/React.createElement("div", {
10602
10578
  style: {
10603
10579
  flex: "1",
10604
- overflowY: "auto"
10580
+ overflowY: "auto",
10581
+ marginBottom: "20px"
10605
10582
  }
10606
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, {
10607
10584
  label: t("VENDOR_ID"),
@@ -10716,7 +10693,7 @@ const CheckPage = ({
10716
10693
  label: t("COMMON_BUTTON_SUBMIT"),
10717
10694
  onSubmit: onSubmit,
10718
10695
  disabled: !agree
10719
- })))));
10696
+ }))));
10720
10697
  };
10721
10698
 
10722
10699
  const GetActionMessage = props => {
@@ -10772,7 +10749,9 @@ const NewResponse = ({
10772
10749
  console.log("mutation in acknowejkfdlgi ::: ", mutation);
10773
10750
  } catch (err) {}
10774
10751
  }, []);
10775
- 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, {
10776
10755
  t: t,
10777
10756
  data: mutation.data,
10778
10757
  isSuccess: mutation.isSuccess,
@@ -11507,7 +11486,9 @@ const VehicleDetails = props => {
11507
11486
  if (isLoading) {
11508
11487
  return /*#__PURE__*/React.createElement(Loader, null);
11509
11488
  }
11510
- 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, {
11511
11492
  className: "vehicle-details-card",
11512
11493
  style: {
11513
11494
  position: "relative"