@djb25/digit-ui-module-vendor 1.0.1 → 1.0.3

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,5 +1,5 @@
1
- import { Header, SearchForm, SearchField, Dropdown as Dropdown$2, MobileNumber, CardLabelError, DatePicker as DatePicker$3, SubmitBar, Card, Table, Loader, Toast, AppContainer, PrivateRoute, EmployeeModuleCard, 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';
2
- import React, { useEffect, useMemo, useCallback, useState, Fragment } from 'react';
1
+ 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, TickMark, FormComposer, 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';
2
+ import React, { useEffect, useMemo, useCallback, useState, useRef, Fragment } from 'react';
3
3
  import { useTranslation } from 'react-i18next';
4
4
  import { useParams, useLocation, Switch, useHistory, Link, useRouteMatch, Route, Redirect } from 'react-router-dom';
5
5
  import { useForm, Controller } from 'react-hook-form';
@@ -323,7 +323,6 @@ const EmployeeApp = ({
323
323
  const location = useLocation();
324
324
  sessionStorage.removeItem("revalidateddone");
325
325
  const isMobile = window.Digit.Utils.browser.isMobile();
326
- console.log("index page in employee");
327
326
  const AddVendor = Digit.ComponentRegistryService.getComponent("AddVendor");
328
327
  const SearchVendor = Digit.ComponentRegistryService.getComponent("SearchVendor");
329
328
  const AddDriver = Digit.ComponentRegistryService.getComponent("AddDriver");
@@ -332,9 +331,61 @@ const EmployeeApp = ({
332
331
  const VendorCreate = Digit.ComponentRegistryService.getComponent("VENDORCreate");
333
332
  const DriverDetails = Digit.ComponentRegistryService.getComponent("DriverDetails");
334
333
  const VehicleDetails = Digit.ComponentRegistryService.getComponent("VehicleDetails");
334
+ const getDynamicBreadcrumbs = () => {
335
+ const pathname = location.pathname;
336
+ let crumbs = [{
337
+ icon: HomeIcon,
338
+ path: "/digit-ui/employee"
339
+ }, {
340
+ label: t("TITLE_VENDOR_MANAGEMENT"),
341
+ path: `/digit-ui/employee/vendor/search-vendor`
342
+ }];
343
+ if (pathname.includes("/registry/new-vendor")) {
344
+ crumbs.push({
345
+ label: t("ES_FSM_REGISTRY_TITLE_NEW_VENDOR")
346
+ });
347
+ } else if (pathname.includes("/search-vendor")) {
348
+ crumbs.push({
349
+ label: t("SEARCH_VENDOR")
350
+ });
351
+ } else if (pathname.includes("/registry/new-driver")) {
352
+ crumbs.push({
353
+ label: t("ES_FSM_REGISTRY_TITLE_NEW_DRIVER")
354
+ });
355
+ } else if (pathname.includes("/registry/vendor-details") || pathname.includes("/registry/modify-vendor/")) {
356
+ crumbs.push({
357
+ label: t("VENDOR_VENDOR_DETAILS")
358
+ });
359
+ } else if (pathname.includes("/registry/vehicle-details") || pathname.includes("/registry/modify-vehicle/")) {
360
+ crumbs.push({
361
+ label: t("VENDOR_VEHICLE_DETAILS")
362
+ });
363
+ } else if (pathname.includes("/registry/new-vehicle")) {
364
+ crumbs.push({
365
+ label: t("ES_FSM_REGISTRY_TITLE_NEW_VEHICLE")
366
+ });
367
+ } else if (pathname.includes("/registry/driver-details") || pathname.includes("/registry/modify-driver/")) {
368
+ crumbs.push({
369
+ label: t("VENDOR_DRIVER_DETAILS")
370
+ });
371
+ } else if (pathname.includes("/registry/additionaldetails")) {
372
+ crumbs.push({
373
+ label: t("VENDOR_ADDITIONAL_DETAILS")
374
+ });
375
+ }
376
+ return crumbs;
377
+ };
335
378
  return /*#__PURE__*/React.createElement(Switch, null, /*#__PURE__*/React.createElement(AppContainer, null, /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
336
379
  className: "ground-container"
337
- }, /*#__PURE__*/React.createElement(PrivateRoute, {
380
+ }, /*#__PURE__*/React.createElement("div", {
381
+ className: "form-container"
382
+ }, /*#__PURE__*/React.createElement(ModuleHeader, {
383
+ leftContent: /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(ArrowLeft, {
384
+ className: "icon"
385
+ }), "Back"),
386
+ onLeftClick: () => window.history.back(),
387
+ breadcrumbs: getDynamicBreadcrumbs()
388
+ }), /*#__PURE__*/React.createElement(PrivateRoute, {
338
389
  path: `${path}/registry/new-vendor`,
339
390
  component: () => /*#__PURE__*/React.createElement(AddVendor, {
340
391
  parentRoute: path
@@ -379,7 +430,7 @@ const EmployeeApp = ({
379
430
  component: props => /*#__PURE__*/React.createElement(SearchApp, Object.assign({}, props, {
380
431
  parentRoute: path
381
432
  }))
382
- })))));
433
+ }))))));
383
434
  };
384
435
 
385
436
  const VENDORCard = () => {
@@ -391,9 +442,6 @@ const VENDORCard = () => {
391
442
  return null;
392
443
  }
393
444
  const links = [{
394
- label: t("ADDITIONAL_VENDOR_DETAILS"),
395
- link: `/digit-ui/employee/vendor/registry/additionaldetails`
396
- }, {
397
445
  label: t("VENDOR_NEW_REGISTERATION"),
398
446
  link: `/digit-ui/employee/vendor/registry/new-vendor`
399
447
  }, {
@@ -402,6 +450,7 @@ const VENDORCard = () => {
402
450
  }];
403
451
  const VENDORRole = Digit.UserService.hasAccess(["VENDOR"]) || false;
404
452
  const propsForModuleCard = {
453
+ Icon: /*#__PURE__*/React.createElement(PropertyHouse, null),
405
454
  moduleName: t("TITLE_VENDOR_MANAGEMENT"),
406
455
  kpis: [{
407
456
  count: total === null || total === void 0 ? void 0 : total.totalCount,
@@ -433,7 +482,7 @@ const convertEpochToDate = (dateEpoch, businessService) => {
433
482
  }
434
483
  };
435
484
  const VendorData = data => {
436
- var _data$vendordet, _data$vendordet2, _data$vendordet3, _data$vendordet4, _data$vendordet5, _data$vendordet6, _data$vendordet7, _data$vendordet8, _data$vendordet9, _data$vendordet0, _data$vendordet1, _data$vendordet10, _data$vendordet11, _data$vendordet12, _data$vendordet12$Sta, _data$vendordet13, _data$vendordet13$Ven, _data$vendordet14, _data$vendordet15, _data$vendordet16, _data$vendordet16$Ven, _data$documents;
485
+ var _data$vendordet, _data$vendordet2, _data$vendordet3, _data$vendordet4, _data$vendordet5, _data$vendordet6, _data$vendordet7, _data$vendordet8, _data$vendordet9, _data$vendordet0, _data$vendordet1, _data$vendordet10, _data$vendordet11, _data$vendordet12, _data$vendordet12$Sta, _data$vendordet13, _data$vendordet13$Ven, _data$vendordet14, _data$vendordet15, _data$vendordet16, _data$vendordet16$Ven, _data$documents, _data$vendordet17, _data$vendordet18;
437
486
  const formdata = {
438
487
  VendorAdditionalDetails: {
439
488
  tenantId: Digit.ULBService.getCurrentTenantId(),
@@ -461,7 +510,9 @@ const VendorData = data => {
461
510
  serviceType: data === null || data === void 0 ? void 0 : (_data$vendordet16 = data.vendordet) === null || _data$vendordet16 === void 0 ? void 0 : (_data$vendordet16$Ven = _data$vendordet16.VendorType) === null || _data$vendordet16$Ven === void 0 ? void 0 : _data$vendordet16$Ven.code,
462
511
  documents: data === null || data === void 0 ? void 0 : (_data$documents = data.documents) === null || _data$documents === void 0 ? void 0 : _data$documents.documents,
463
512
  active: null,
464
- vendorAdditionalDetailsId: null
513
+ vendorAdditionalDetailsId: null,
514
+ vendorGroup: (data === null || data === void 0 ? void 0 : (_data$vendordet17 = data.vendordet) === null || _data$vendordet17 === void 0 ? void 0 : _data$vendordet17.vendorGroup) || "N/A",
515
+ vendorType: (data === null || data === void 0 ? void 0 : (_data$vendordet18 = data.vendordet) === null || _data$vendordet18 === void 0 ? void 0 : _data$vendordet18.vendorType) || "N/A"
465
516
  }
466
517
  };
467
518
  return formdata;
@@ -496,10 +547,7 @@ const VendorConfig = (t, disabled = false) => {
496
547
  defaultValue: "",
497
548
  className: "payment-form-text-input-correction"
498
549
  }
499
- }]
500
- }, {
501
- head: "ES_FSM_REGISTRY_PERSONAL_DETAILS",
502
- body: [{
550
+ }, {
503
551
  label: "ES_FSM_REGISTRY_NEW_GENDER",
504
552
  isMandatory: true,
505
553
  type: "component",
@@ -649,37 +697,54 @@ const VendorConfig = (t, disabled = false) => {
649
697
  className: "payment-form-text-input-correction"
650
698
  }
651
699
  }]
652
- }, {
653
- head: "",
654
- body: [{
655
- label: "ES_VENDOR_REGISTRY_SERVICE_TYPE",
656
- isMandatory: true,
657
- type: "component",
658
- route: "select-gender",
659
- hideInEmployee: false,
660
- key: "serviceType",
661
- component: "SelectServiceType",
662
- disable: disabled,
663
- texts: {
664
- headerCaption: "",
665
- header: "CS_COMMON_CHOOSE_GENDER",
666
- cardText: "CS_COMMON_SELECT_GENDER",
667
- submitBarLabel: "CS_COMMON_NEXT",
668
- skipText: "CORE_COMMON_SKIP_CONTINUE"
669
- }
670
- }]
671
700
  }];
672
701
  };
673
702
 
703
+ const Timeline = ({
704
+ steps: _steps = [],
705
+ currentStep: _currentStep = 1
706
+ }) => {
707
+ const {
708
+ t
709
+ } = useTranslation();
710
+ return /*#__PURE__*/React.createElement("div", {
711
+ className: "custom-stepper-card"
712
+ }, _steps.map((label, index) => {
713
+ const stepNumber = index + 1;
714
+ const isActive = stepNumber === _currentStep;
715
+ const isCompleted = stepNumber < _currentStep;
716
+ return /*#__PURE__*/React.createElement("div", {
717
+ className: "stepper-row",
718
+ key: index
719
+ }, /*#__PURE__*/React.createElement("div", {
720
+ className: "stepper-left"
721
+ }, /*#__PURE__*/React.createElement("div", {
722
+ className: `step-circle ${isActive ? "active" : ""} ${isCompleted ? "completed" : ""}`
723
+ }, isCompleted ? /*#__PURE__*/React.createElement(TickMark, {
724
+ fillColor: "red"
725
+ }) : stepNumber), index !== _steps.length - 1 && /*#__PURE__*/React.createElement("div", {
726
+ className: `step-line ${isCompleted ? "completed-line" : ""}`
727
+ })), /*#__PURE__*/React.createElement("div", {
728
+ className: `step-label ${isActive ? "active-text" : ""} ${isCompleted ? "completed-text" : ""}`
729
+ }, t(label)));
730
+ }));
731
+ };
732
+
674
733
  const AddVendor = ({
675
734
  parentUrl,
676
735
  heading
677
736
  }) => {
678
737
  const tenantId = Digit.ULBService.getCurrentTenantId();
679
738
  const stateId = Digit.ULBService.getStateId();
680
- const [showToast, setShowToast] = useState(null);
739
+ const {
740
+ t
741
+ } = useTranslation();
681
742
  const history = useHistory();
682
743
  const queryClient = useQueryClient();
744
+ const [currentStep, setCurrentStep] = useState(1);
745
+ const [showToast, setShowToast] = useState(null);
746
+ const [canSubmit, setCanSubmit] = useState(false);
747
+ const step1DataRef = useRef({});
683
748
  const [mutationHappened, setMutationHappened, clear] = Digit.Hooks.useSessionStorage("FSM_MUTATION_HAPPENED", false);
684
749
  const [errorInfo, setErrorInfo, clearError] = Digit.Hooks.useSessionStorage("FSM_ERROR_DATA", false);
685
750
  const [successData, setsuccessData, clearSuccessData] = Digit.Hooks.useSessionStorage("FSM_MUTATION_SUCCESS_DATA", false);
@@ -695,11 +760,7 @@ const AddVendor = ({
695
760
  clearSuccessData();
696
761
  clearError();
697
762
  }, []);
698
- const {
699
- t
700
- } = useTranslation();
701
763
  const Config = VendorConfig(t);
702
- const [canSubmit, setSubmitValve] = useState(false);
703
764
  const defaultValues = {
704
765
  tripData: {
705
766
  noOfTrips: 1,
@@ -707,39 +768,50 @@ const AddVendor = ({
707
768
  amount: null
708
769
  }
709
770
  };
771
+ const vendorStepConfig = Config.filter(config => config.head === "ES_VRNDOR_NEW_VENDOR_DETAILS");
772
+ const addressStepConfig = Config.filter(config => config.head === "ES_FSM_REGISTRY_NEW_ADDRESS_DETAILS");
773
+ const steps = [t("ES_VRNDOR_NEW_VENDOR_DETAILS"), t("ES_FSM_REGISTRY_NEW_ADDRESS_DETAILS")];
710
774
  const onFormValueChange = (setValue, formData) => {
711
- var _formData$address;
712
- if (formData !== null && formData !== void 0 && formData.vendorName && formData !== null && formData !== void 0 && formData.phone && formData !== null && formData !== void 0 && (_formData$address = formData.address) !== null && _formData$address !== void 0 && _formData$address.locality && formData !== null && formData !== void 0 && formData.selectGender) {
713
- setSubmitValve(true);
775
+ var _formData$selectGende;
776
+ if (formData !== null && formData !== void 0 && formData.vendorName && formData !== null && formData !== void 0 && formData.phone && formData !== null && formData !== void 0 && (_formData$selectGende = formData.selectGender) !== null && _formData$selectGende !== void 0 && _formData$selectGende.code) {
777
+ setCanSubmit(true);
714
778
  } else {
715
- setSubmitValve(false);
779
+ setCanSubmit(false);
716
780
  }
717
781
  };
718
782
  const closeToast = () => {
719
783
  setShowToast(null);
720
784
  };
721
785
  const onSubmit = data => {
722
- var _data$street, _data$doorNo, _data$plotNo, _data$landmark, _data$address, _data$address$city, _data$address2, _data$address2$city, _data$address3, _data$address3$city, _data$address4, _data$address4$city, _data$buildingName, _data$address5, _data$address5$locali, _data$address6, _data$address6$locali, _data$address7, _data$address7$locali, _data$selectGender, _data$serviceType, _data$address8, _data$address9;
723
- console.log("dataaaaaaaa", data);
724
- const name = data === null || data === void 0 ? void 0 : data.vendorName;
725
- const pincode = data === null || data === void 0 ? void 0 : data.pincode;
726
- const street = data === null || data === void 0 ? void 0 : (_data$street = data.street) === null || _data$street === void 0 ? void 0 : _data$street.trim();
727
- const doorNo = data === null || data === void 0 ? void 0 : (_data$doorNo = data.doorNo) === null || _data$doorNo === void 0 ? void 0 : _data$doorNo.trim();
728
- const plotNo = data === null || data === void 0 ? void 0 : (_data$plotNo = data.plotNo) === null || _data$plotNo === void 0 ? void 0 : _data$plotNo.trim();
729
- const landmark = data === null || data === void 0 ? void 0 : (_data$landmark = data.landmark) === null || _data$landmark === void 0 ? void 0 : _data$landmark.trim();
730
- const city = data === null || data === void 0 ? void 0 : (_data$address = data.address) === null || _data$address === void 0 ? void 0 : (_data$address$city = _data$address.city) === null || _data$address$city === void 0 ? void 0 : _data$address$city.name;
731
- const state = data === null || data === void 0 ? void 0 : (_data$address2 = data.address) === null || _data$address2 === void 0 ? void 0 : (_data$address2$city = _data$address2.city) === null || _data$address2$city === void 0 ? void 0 : _data$address2$city.state;
732
- const district = data === null || data === void 0 ? void 0 : (_data$address3 = data.address) === null || _data$address3 === void 0 ? void 0 : (_data$address3$city = _data$address3.city) === null || _data$address3$city === void 0 ? void 0 : _data$address3$city.name;
733
- const region = data === null || data === void 0 ? void 0 : (_data$address4 = data.address) === null || _data$address4 === void 0 ? void 0 : (_data$address4$city = _data$address4.city) === null || _data$address4$city === void 0 ? void 0 : _data$address4$city.name;
734
- const buildingName = data === null || data === void 0 ? void 0 : (_data$buildingName = data.buildingName) === null || _data$buildingName === void 0 ? void 0 : _data$buildingName.trim();
735
- const localityCode = data === null || data === void 0 ? void 0 : (_data$address5 = data.address) === null || _data$address5 === void 0 ? void 0 : (_data$address5$locali = _data$address5.locality) === null || _data$address5$locali === void 0 ? void 0 : _data$address5$locali.code;
736
- const localityName = data === null || data === void 0 ? void 0 : (_data$address6 = data.address) === null || _data$address6 === void 0 ? void 0 : (_data$address6$locali = _data$address6.locality) === null || _data$address6$locali === void 0 ? void 0 : _data$address6$locali.name;
737
- const localityArea = data === null || data === void 0 ? void 0 : (_data$address7 = data.address) === null || _data$address7 === void 0 ? void 0 : (_data$address7$locali = _data$address7.locality) === null || _data$address7$locali === void 0 ? void 0 : _data$address7$locali.area;
738
- const gender = data === null || data === void 0 ? void 0 : (_data$selectGender = data.selectGender) === null || _data$selectGender === void 0 ? void 0 : _data$selectGender.code;
739
- const emailId = data === null || data === void 0 ? void 0 : data.emailId;
740
- const phone = data === null || data === void 0 ? void 0 : data.phone;
741
- const dob = new Date(`${data.dob}`).getTime() || new Date(`1/1/1970`).getTime();
742
- const additionalDetails = data === null || data === void 0 ? void 0 : (_data$serviceType = data.serviceType) === null || _data$serviceType === void 0 ? void 0 : _data$serviceType.code;
786
+ var _mergedData$street, _mergedData$doorNo, _mergedData$plotNo, _mergedData$landmark, _mergedData$address, _mergedData$address$c, _mergedData$address2, _mergedData$address2$, _mergedData$address3, _mergedData$address3$, _mergedData$address4, _mergedData$address4$, _mergedData$buildingN, _mergedData$address5, _mergedData$address5$, _mergedData$address6, _mergedData$address6$, _mergedData$address7, _mergedData$address7$, _mergedData$selectGen, _mergedData$serviceTy, _mergedData$address8, _mergedData$address9;
787
+ if (currentStep === 1) {
788
+ step1DataRef.current = data;
789
+ setCurrentStep(2);
790
+ return;
791
+ }
792
+ const mergedData = {
793
+ ...step1DataRef.current,
794
+ ...data
795
+ };
796
+ const name = mergedData === null || mergedData === void 0 ? void 0 : mergedData.vendorName;
797
+ const pincode = mergedData === null || mergedData === void 0 ? void 0 : mergedData.pincode;
798
+ const street = mergedData === null || mergedData === void 0 ? void 0 : (_mergedData$street = mergedData.street) === null || _mergedData$street === void 0 ? void 0 : _mergedData$street.trim();
799
+ const doorNo = mergedData === null || mergedData === void 0 ? void 0 : (_mergedData$doorNo = mergedData.doorNo) === null || _mergedData$doorNo === void 0 ? void 0 : _mergedData$doorNo.trim();
800
+ const plotNo = mergedData === null || mergedData === void 0 ? void 0 : (_mergedData$plotNo = mergedData.plotNo) === null || _mergedData$plotNo === void 0 ? void 0 : _mergedData$plotNo.trim();
801
+ const landmark = mergedData === null || mergedData === void 0 ? void 0 : (_mergedData$landmark = mergedData.landmark) === null || _mergedData$landmark === void 0 ? void 0 : _mergedData$landmark.trim();
802
+ const city = mergedData === null || mergedData === void 0 ? void 0 : (_mergedData$address = mergedData.address) === null || _mergedData$address === void 0 ? void 0 : (_mergedData$address$c = _mergedData$address.city) === null || _mergedData$address$c === void 0 ? void 0 : _mergedData$address$c.name;
803
+ const state = mergedData === null || mergedData === void 0 ? void 0 : (_mergedData$address2 = mergedData.address) === null || _mergedData$address2 === void 0 ? void 0 : (_mergedData$address2$ = _mergedData$address2.city) === null || _mergedData$address2$ === void 0 ? void 0 : _mergedData$address2$.state;
804
+ const district = mergedData === null || mergedData === void 0 ? void 0 : (_mergedData$address3 = mergedData.address) === null || _mergedData$address3 === void 0 ? void 0 : (_mergedData$address3$ = _mergedData$address3.city) === null || _mergedData$address3$ === void 0 ? void 0 : _mergedData$address3$.name;
805
+ const region = mergedData === null || mergedData === void 0 ? void 0 : (_mergedData$address4 = mergedData.address) === null || _mergedData$address4 === void 0 ? void 0 : (_mergedData$address4$ = _mergedData$address4.city) === null || _mergedData$address4$ === void 0 ? void 0 : _mergedData$address4$.name;
806
+ const buildingName = mergedData === null || mergedData === void 0 ? void 0 : (_mergedData$buildingN = mergedData.buildingName) === null || _mergedData$buildingN === void 0 ? void 0 : _mergedData$buildingN.trim();
807
+ const localityCode = mergedData === null || mergedData === void 0 ? void 0 : (_mergedData$address5 = mergedData.address) === null || _mergedData$address5 === void 0 ? void 0 : (_mergedData$address5$ = _mergedData$address5.locality) === null || _mergedData$address5$ === void 0 ? void 0 : _mergedData$address5$.code;
808
+ const localityName = mergedData === null || mergedData === void 0 ? void 0 : (_mergedData$address6 = mergedData.address) === null || _mergedData$address6 === void 0 ? void 0 : (_mergedData$address6$ = _mergedData$address6.locality) === null || _mergedData$address6$ === void 0 ? void 0 : _mergedData$address6$.name;
809
+ const localityArea = mergedData === null || mergedData === void 0 ? void 0 : (_mergedData$address7 = mergedData.address) === null || _mergedData$address7 === void 0 ? void 0 : (_mergedData$address7$ = _mergedData$address7.locality) === null || _mergedData$address7$ === void 0 ? void 0 : _mergedData$address7$.area;
810
+ const gender = mergedData === null || mergedData === void 0 ? void 0 : (_mergedData$selectGen = mergedData.selectGender) === null || _mergedData$selectGen === void 0 ? void 0 : _mergedData$selectGen.code;
811
+ const emailId = mergedData === null || mergedData === void 0 ? void 0 : mergedData.emailId;
812
+ const phone = mergedData === null || mergedData === void 0 ? void 0 : mergedData.phone;
813
+ const dob = new Date(`${mergedData.dob}`).getTime() || new Date(`1/1/1970`).getTime();
814
+ const additionalDetails = mergedData === null || mergedData === void 0 ? void 0 : (_mergedData$serviceTy = mergedData.serviceType) === null || _mergedData$serviceTy === void 0 ? void 0 : _mergedData$serviceTy.code;
743
815
  const formData = {
744
816
  vendor: {
745
817
  tenantId: tenantId,
@@ -766,8 +838,8 @@ const AddVendor = ({
766
838
  area: localityArea || ""
767
839
  },
768
840
  geoLocation: {
769
- latitude: (data === null || data === void 0 ? void 0 : (_data$address8 = data.address) === null || _data$address8 === void 0 ? void 0 : _data$address8.latitude) || 0,
770
- longitude: (data === null || data === void 0 ? void 0 : (_data$address9 = data.address) === null || _data$address9 === void 0 ? void 0 : _data$address9.longitude) || 0
841
+ latitude: (mergedData === null || mergedData === void 0 ? void 0 : (_mergedData$address8 = mergedData.address) === null || _mergedData$address8 === void 0 ? void 0 : _mergedData$address8.latitude) || 0,
842
+ longitude: (mergedData === null || mergedData === void 0 ? void 0 : (_mergedData$address9 = mergedData.address) === null || _mergedData$address9 === void 0 ? void 0 : _mergedData$address9.longitude) || 0
771
843
  }
772
844
  },
773
845
  owner: {
@@ -804,73 +876,49 @@ const AddVendor = ({
804
876
  setTimeout(closeToast, 5000);
805
877
  }
806
878
  });
807
- console.log("formdaaatataaaa", formData);
808
879
  };
809
- const isMobile = window.Digit.Utils.browser.isMobile();
810
- return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Header, null, t("ES_FSM_REGISTRY_TITLE_NEW_VENDOR"))), /*#__PURE__*/React.createElement("div", {
811
- style: !isMobile ? {
812
- marginLeft: "-15px"
813
- } : {}
814
- }, /*#__PURE__*/React.createElement(FormComposer, {
815
- isDisabled: !canSubmit,
880
+ return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
881
+ style: {
882
+ display: "flex",
883
+ width: "100%",
884
+ gap: "24px"
885
+ }
886
+ }, /*#__PURE__*/React.createElement(Timeline, {
887
+ steps: steps,
888
+ currentStep: currentStep
889
+ }), /*#__PURE__*/React.createElement("div", {
890
+ style: {
891
+ flex: "1",
892
+ overflowY: "auto"
893
+ }
894
+ }, currentStep === 1 &&
895
+ /*#__PURE__*/
896
+ React.createElement(FormComposer, {
897
+ label: t("CS_COMMON_NEXT"),
898
+ config: vendorStepConfig.filter(i => !i.hideInEmployee).map(config => ({
899
+ ...config,
900
+ body: config.body.filter(a => !a.hideInEmployee)
901
+ })),
902
+ onSubmit: onSubmit,
903
+ defaultValues: defaultValues,
904
+ onFormValueChange: onFormValueChange,
905
+ noBreakLine: true
906
+ }), currentStep === 2 &&
907
+ /*#__PURE__*/
908
+ React.createElement(FormComposer, {
816
909
  label: t("ES_COMMON_APPLICATION_SUBMIT"),
817
- config: Config.filter(i => !i.hideInEmployee).map(config => {
818
- return {
819
- ...config,
820
- body: config.body.filter(a => !a.hideInEmployee)
821
- };
822
- }),
823
- fieldStyle: {
824
- marginRight: 0
825
- },
910
+ config: addressStepConfig.filter(i => !i.hideInEmployee).map(config => ({
911
+ ...config,
912
+ body: config.body.filter(a => !a.hideInEmployee)
913
+ })),
826
914
  onSubmit: onSubmit,
827
915
  defaultValues: defaultValues,
828
916
  onFormValueChange: onFormValueChange,
829
917
  noBreakLine: true
830
918
  }), showToast && /*#__PURE__*/React.createElement(Toast, {
831
- error: showToast.key === "error" ? true : false,
919
+ error: showToast.key === "error",
832
920
  label: t(showToast.key === "success" ? `ES_FSM_REGISTRY_${showToast.action}_SUCCESS` : showToast.action),
833
921
  onClose: closeToast
834
- })));
835
- };
836
-
837
- let actions = [];
838
- const getAction = flow => {
839
- switch (flow) {
840
- case "STAKEHOLDER":
841
- actions = [];
842
- break;
843
- default:
844
- actions = ["VENDOR_ADDITIONAL_DETAILS", "VENDOR_DOCUMENT_DETAILS", "VENDOR_SUMMARY"];
845
- }
846
- };
847
- const Timeline = ({
848
- currentStep: _currentStep = 1,
849
- flow: _flow = ""
850
- }) => {
851
- const {
852
- t
853
- } = useTranslation();
854
- const isMobile = window.Digit.Utils.browser.isMobile();
855
- getAction(_flow);
856
- return /*#__PURE__*/React.createElement("div", {
857
- className: "timeline-container",
858
- style: isMobile ? {} : {
859
- maxWidth: "960px",
860
- minWidth: "640px",
861
- marginRight: "auto"
862
- }
863
- }, actions.map((action, index, arr) => /*#__PURE__*/React.createElement("div", {
864
- className: "timeline-checkpoint",
865
- key: index
866
- }, /*#__PURE__*/React.createElement("div", {
867
- className: "timeline-content"
868
- }, /*#__PURE__*/React.createElement("span", {
869
- className: `circle ${index <= _currentStep - 1 && "active"}`
870
- }, index < _currentStep - 1 ? /*#__PURE__*/React.createElement(TickMark, null) : index + 1), /*#__PURE__*/React.createElement("span", {
871
- className: "secondary-color"
872
- }, t(action))), index < arr.length - 1 && /*#__PURE__*/React.createElement("span", {
873
- className: `line ${index < _currentStep - 1 && "active"}`
874
922
  }))));
875
923
  };
876
924
 
@@ -887,6 +935,7 @@ const VendorDetails = ({
887
935
  } = useLocation();
888
936
  let index = 0;
889
937
  let validation = {};
938
+ const steps = ["VENDOR_ADDITIONAL_DETAILS", "VENDOR_DOCUMENT_DETAILS", "VENDOR_SUMMARY"];
890
939
  const [VendorCompany, setVendorCompany] = useState("");
891
940
  const [VendorPhone, setVendorPhone] = useState("");
892
941
  const [VendorAddress, setVendorAddress] = useState("");
@@ -1044,13 +1093,29 @@ const VendorDetails = ({
1044
1093
  goNext();
1045
1094
  }
1046
1095
  }, [VendorCompany, VendorPhone, VendorAddress, VendorCategory, VendorEmail, VendorId, Bank, BankbranchName, IFSC, AccountNo, PanNo, GstNo, GstState, RegistrationNo, EpfNo, EsiNo, VendorType, Status, micrNo, PhoneNo, ContactPerson, Company]);
1047
- return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Timeline, {
1096
+ return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
1097
+ style: {
1098
+ display: "flex",
1099
+ width: "100%",
1100
+ gap: "24px"
1101
+ }
1102
+ }, /*#__PURE__*/React.createElement(Timeline, {
1103
+ steps: steps,
1048
1104
  currentStep: 1
1049
- }), console.log("kunal in vendor details"), /*#__PURE__*/React.createElement(FormStep, {
1105
+ }), /*#__PURE__*/React.createElement("div", {
1106
+ style: {
1107
+ flex: "1",
1108
+ overflowY: "auto"
1109
+ }
1110
+ }, /*#__PURE__*/React.createElement(FormStep, {
1050
1111
  config: config,
1051
1112
  onSelect: goNext,
1052
1113
  t: t
1053
- }, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(CardLabel, null, `${t("VENDOR_ID")}`), /*#__PURE__*/React.createElement(TextInput, Object.assign({
1114
+ }, /*#__PURE__*/React.createElement("div", {
1115
+ className: "finance-mainlayout"
1116
+ }, /*#__PURE__*/React.createElement("div", {
1117
+ className: "finance-mainlayout-col3"
1118
+ }, /*#__PURE__*/React.createElement(CardLabel, null, `${t("VENDOR_ID")}`), /*#__PURE__*/React.createElement(TextInput, Object.assign({
1054
1119
  t: t,
1055
1120
  type: "text",
1056
1121
  isMandatory: false,
@@ -1059,7 +1124,7 @@ const VendorDetails = ({
1059
1124
  value: VendorId,
1060
1125
  onChange: setvendorid,
1061
1126
  style: {
1062
- width: "50%"
1127
+ width: "100%"
1063
1128
  },
1064
1129
  maxLength: 11,
1065
1130
  ValidationRequired: false
@@ -1068,7 +1133,9 @@ const VendorDetails = ({
1068
1133
  pattern: "^[a-zA-Z0-9/-]{1,20}$",
1069
1134
  type: "text",
1070
1135
  title: t("INVALID_VENDOR_ID")
1071
- })), /*#__PURE__*/React.createElement(CardLabel, null, `${t("IFSC_CODE")}`), /*#__PURE__*/React.createElement(TextInput, Object.assign({
1136
+ }))), /*#__PURE__*/React.createElement("div", {
1137
+ className: "finance-mainlayout-col3"
1138
+ }, /*#__PURE__*/React.createElement(CardLabel, null, `${t("IFSC_CODE")}`), /*#__PURE__*/React.createElement(TextInput, Object.assign({
1072
1139
  t: t,
1073
1140
  type: "text",
1074
1141
  isMandatory: false,
@@ -1078,7 +1145,7 @@ const VendorDetails = ({
1078
1145
  placeholder: "Enter IFSC Code",
1079
1146
  onChange: setvendorifsc,
1080
1147
  style: {
1081
- width: "50%"
1148
+ width: "100%"
1082
1149
  },
1083
1150
  maxLength: 11,
1084
1151
  ValidationRequired: true
@@ -1087,7 +1154,11 @@ const VendorDetails = ({
1087
1154
  pattern: "^[A-Z]{4}0[A-Z0-9]{6}$",
1088
1155
  type: "text",
1089
1156
  title: t("INVALID_IFSC_CODE_ERROR_MESSAGE")
1090
- })), /*#__PURE__*/React.createElement(CardLabel, null, `${t("VENDOR_BANK_NAME")}`, " ", /*#__PURE__*/React.createElement("span", {
1157
+ })))), /*#__PURE__*/React.createElement("div", {
1158
+ className: "finance-mainlayout"
1159
+ }, /*#__PURE__*/React.createElement("div", {
1160
+ className: "finance-mainlayout-col3"
1161
+ }, /*#__PURE__*/React.createElement(CardLabel, null, `${t("VENDOR_BANK_NAME")}`, " ", /*#__PURE__*/React.createElement("span", {
1091
1162
  className: "check-page-link-button"
1092
1163
  }, "*")), /*#__PURE__*/React.createElement(TextInput, {
1093
1164
  t: t,
@@ -1097,12 +1168,14 @@ const VendorDetails = ({
1097
1168
  name: "bankName",
1098
1169
  placeholder: "Bank Name Auto Select",
1099
1170
  style: {
1100
- width: "50%"
1171
+ width: "100%"
1101
1172
  },
1102
1173
  value: Bank,
1103
1174
  onChange: setvendorbank,
1104
1175
  disabled: true
1105
- }), /*#__PURE__*/React.createElement(CardLabel, null, `${t("VENDOR_BANK_BRANCH_NAME")}`, " ", /*#__PURE__*/React.createElement("span", {
1176
+ })), /*#__PURE__*/React.createElement("div", {
1177
+ className: "finance-mainlayout-col3"
1178
+ }, /*#__PURE__*/React.createElement(CardLabel, null, `${t("VENDOR_BANK_BRANCH_NAME")}`, " ", /*#__PURE__*/React.createElement("span", {
1106
1179
  className: "check-page-link-button"
1107
1180
  }, "*")), /*#__PURE__*/React.createElement(TextInput, {
1108
1181
  t: t,
@@ -1112,12 +1185,16 @@ const VendorDetails = ({
1112
1185
  name: "BankbranchName",
1113
1186
  value: BankbranchName,
1114
1187
  style: {
1115
- width: "50%"
1188
+ width: "100%"
1116
1189
  },
1117
1190
  placeholder: "Bank Branch Name Auto Select",
1118
1191
  onChange: setBankbranch,
1119
1192
  disabled: false
1120
- }), /*#__PURE__*/React.createElement(CardLabel, null, `${t("VENDOR_MICR_NO")}`, " ", /*#__PURE__*/React.createElement("span", {
1193
+ }))), /*#__PURE__*/React.createElement("div", {
1194
+ className: "finance-mainlayout"
1195
+ }, /*#__PURE__*/React.createElement("div", {
1196
+ className: "finance-mainlayout-col3"
1197
+ }, /*#__PURE__*/React.createElement(CardLabel, null, `${t("VENDOR_MICR_NO")}`, " ", /*#__PURE__*/React.createElement("span", {
1121
1198
  className: "check-page-link-button"
1122
1199
  }, "*")), /*#__PURE__*/React.createElement(TextInput, {
1123
1200
  t: t,
@@ -1127,12 +1204,14 @@ const VendorDetails = ({
1127
1204
  name: "MicrNo",
1128
1205
  value: micrNo,
1129
1206
  style: {
1130
- width: "50%"
1207
+ width: "100%"
1131
1208
  },
1132
1209
  placeholder: "MICR No",
1133
1210
  onChange: setmicrNo,
1134
1211
  disabled: false
1135
- }), /*#__PURE__*/React.createElement(CardLabel, null, `${t("ACCOUNT_NO")}`), /*#__PURE__*/React.createElement(TextInput, Object.assign({
1212
+ })), /*#__PURE__*/React.createElement("div", {
1213
+ className: "finance-mainlayout-col3"
1214
+ }, /*#__PURE__*/React.createElement(CardLabel, null, `${t("ACCOUNT_NO")}`), /*#__PURE__*/React.createElement(TextInput, Object.assign({
1136
1215
  t: t,
1137
1216
  type: "text",
1138
1217
  isMandatory: false,
@@ -1141,7 +1220,7 @@ const VendorDetails = ({
1141
1220
  value: AccountNo,
1142
1221
  onChange: setvendoraccountno,
1143
1222
  style: {
1144
- width: "50%"
1223
+ width: "100%"
1145
1224
  },
1146
1225
  ValidationRequired: true
1147
1226
  }, validation = {
@@ -1149,7 +1228,11 @@ const VendorDetails = ({
1149
1228
  pattern: "[0-9]{9,18}",
1150
1229
  type: "text",
1151
1230
  title: t("INVALID_ACCOUNT_NO_ERROR_MESSAGE")
1152
- })), /*#__PURE__*/React.createElement(CardLabel, null, `${t("PHONE_NO")}`), /*#__PURE__*/React.createElement(TextInput, Object.assign({
1231
+ })))), /*#__PURE__*/React.createElement("div", {
1232
+ className: "finance-mainlayout"
1233
+ }, /*#__PURE__*/React.createElement("div", {
1234
+ className: "finance-mainlayout-col3"
1235
+ }, /*#__PURE__*/React.createElement(CardLabel, null, `${t("PHONE_NO")}`), /*#__PURE__*/React.createElement(TextInput, Object.assign({
1153
1236
  t: t,
1154
1237
  type: "text",
1155
1238
  isMandatory: false,
@@ -1158,15 +1241,18 @@ const VendorDetails = ({
1158
1241
  value: PhoneNo,
1159
1242
  onChange: setphoneno,
1160
1243
  style: {
1161
- width: "50%"
1244
+ width: "100%"
1162
1245
  },
1163
1246
  ValidationRequired: true
1164
1247
  }, validation = {
1165
1248
  isRequired: true,
1166
1249
  pattern: "[0-9]{9,18}",
1167
1250
  type: "text",
1168
- title: t("INVALID_ACCOUNT_NO_ERROR_MESSAGE")
1169
- })), /*#__PURE__*/React.createElement(CardLabel, null, `${t("CONTACT_PERSON")}`), /*#__PURE__*/React.createElement(TextInput, Object.assign({
1251
+ title: t("INVALID_ACCOUNT_NO_ERROR_MESSAGE"),
1252
+ length: 10
1253
+ }))), /*#__PURE__*/React.createElement("div", {
1254
+ className: "finance-mainlayout-col3"
1255
+ }, /*#__PURE__*/React.createElement(CardLabel, null, `${t("CONTACT_PERSON")}`), /*#__PURE__*/React.createElement(TextInput, Object.assign({
1170
1256
  t: t,
1171
1257
  type: "text",
1172
1258
  isMandatory: false,
@@ -1175,7 +1261,7 @@ const VendorDetails = ({
1175
1261
  value: ContactPerson,
1176
1262
  onChange: setcontactperson,
1177
1263
  style: {
1178
- width: "50%"
1264
+ width: "100%"
1179
1265
  },
1180
1266
  ValidationRequired: true
1181
1267
  }, validation = {
@@ -1183,7 +1269,11 @@ const VendorDetails = ({
1183
1269
  pattern: "^[a-zA-Z0-9/-]{1,20}$",
1184
1270
  type: "text",
1185
1271
  title: t("INVALID_ACCOUNT_NO_ERROR_MESSAGE")
1186
- })), /*#__PURE__*/React.createElement(CardLabel, null, `${t("COMPANY_NAME")}`), /*#__PURE__*/React.createElement(TextInput, Object.assign({
1272
+ })))), /*#__PURE__*/React.createElement("div", {
1273
+ className: "finance-mainlayout"
1274
+ }, /*#__PURE__*/React.createElement("div", {
1275
+ className: "finance-mainlayout-col3"
1276
+ }, /*#__PURE__*/React.createElement(CardLabel, null, `${t("COMPANY_NAME")}`), /*#__PURE__*/React.createElement(TextInput, Object.assign({
1187
1277
  t: t,
1188
1278
  type: "text",
1189
1279
  isMandatory: false,
@@ -1192,7 +1282,7 @@ const VendorDetails = ({
1192
1282
  value: Company,
1193
1283
  onChange: setcompanyname,
1194
1284
  style: {
1195
- width: "50%"
1285
+ width: "100%"
1196
1286
  },
1197
1287
  ValidationRequired: true
1198
1288
  }, validation = {
@@ -1200,7 +1290,9 @@ const VendorDetails = ({
1200
1290
  pattern: "^[a-zA-Z0-9/-]{1,20}$",
1201
1291
  type: "text",
1202
1292
  title: t("INVALID_ACCOUNT_NO_ERROR_MESSAGE")
1203
- })), /*#__PURE__*/React.createElement(CardLabel, null, `${t("PAN_NO")}`), /*#__PURE__*/React.createElement(TextInput, Object.assign({
1293
+ }))), /*#__PURE__*/React.createElement("div", {
1294
+ className: "finance-mainlayout-col3"
1295
+ }, /*#__PURE__*/React.createElement(CardLabel, null, `${t("PAN_NO")}`), /*#__PURE__*/React.createElement(TextInput, Object.assign({
1204
1296
  t: t,
1205
1297
  type: "text",
1206
1298
  isMandatory: false,
@@ -1209,7 +1301,7 @@ const VendorDetails = ({
1209
1301
  value: PanNo,
1210
1302
  onChange: setpanno,
1211
1303
  style: {
1212
- width: "50%"
1304
+ width: "100%"
1213
1305
  },
1214
1306
  ValidationRequired: true
1215
1307
  }, validation = {
@@ -1217,7 +1309,11 @@ const VendorDetails = ({
1217
1309
  pattern: "[A-Z]{5}[0-9]{4}[A-Z]{1}",
1218
1310
  type: "text",
1219
1311
  title: t("INVALID_PAN_NO_ERROR_MESSAGE")
1220
- })), /*#__PURE__*/React.createElement(CardLabel, null, `${t("GST_NO")}`), /*#__PURE__*/React.createElement(TextInput, Object.assign({
1312
+ })))), /*#__PURE__*/React.createElement("div", {
1313
+ className: "finance-mainlayout"
1314
+ }, /*#__PURE__*/React.createElement("div", {
1315
+ className: "finance-mainlayout-col3"
1316
+ }, /*#__PURE__*/React.createElement(CardLabel, null, `${t("GST_NO")}`), /*#__PURE__*/React.createElement(TextInput, Object.assign({
1221
1317
  t: t,
1222
1318
  type: "text",
1223
1319
  isMandatory: false,
@@ -1226,7 +1322,7 @@ const VendorDetails = ({
1226
1322
  value: GstNo,
1227
1323
  onChange: setgstno,
1228
1324
  style: {
1229
- width: "50%"
1325
+ width: "100%"
1230
1326
  },
1231
1327
  ValidationRequired: true
1232
1328
  }, validation = {
@@ -1234,7 +1330,9 @@ const VendorDetails = ({
1234
1330
  pattern: "^[0-9]{2}[A-Z]{5}[0-9]{4}[A-Z]{1}[A-Z0-9]{1}[Z]{1}[A-Z0-9]{1}$",
1235
1331
  type: "text",
1236
1332
  title: t("INVALID_GST_NO_ERROR_MESSAGE")
1237
- })), /*#__PURE__*/React.createElement(CardLabel, null, `${t("GST_REGISTERED_STATE/UT")}`), /*#__PURE__*/React.createElement(TextInput, Object.assign({
1333
+ }))), /*#__PURE__*/React.createElement("div", {
1334
+ className: "finance-mainlayout-col3"
1335
+ }, /*#__PURE__*/React.createElement(CardLabel, null, `${t("GST_REGISTERED_STATE/UT")}`), /*#__PURE__*/React.createElement(TextInput, Object.assign({
1238
1336
  t: t,
1239
1337
  type: "text",
1240
1338
  isMandatory: false,
@@ -1243,7 +1341,7 @@ const VendorDetails = ({
1243
1341
  value: GstState,
1244
1342
  onChange: setgststate,
1245
1343
  style: {
1246
- width: "50%"
1344
+ width: "100%"
1247
1345
  },
1248
1346
  ValidationRequired: true
1249
1347
  }, validation = {
@@ -1251,7 +1349,11 @@ const VendorDetails = ({
1251
1349
  pattern: "^[a-zA-Z0-9/-]{1,20}$",
1252
1350
  type: "text",
1253
1351
  title: t("PT_NAME_ERROR_MESSAGE")
1254
- })), /*#__PURE__*/React.createElement(CardLabel, null, `${t("REGISTRATION_NO")}`), /*#__PURE__*/React.createElement(TextInput, Object.assign({
1352
+ })))), /*#__PURE__*/React.createElement("div", {
1353
+ className: "finance-mainlayout"
1354
+ }, /*#__PURE__*/React.createElement("div", {
1355
+ className: "finance-mainlayout-col3"
1356
+ }, /*#__PURE__*/React.createElement(CardLabel, null, `${t("REGISTRATION_NO")}`), /*#__PURE__*/React.createElement(TextInput, Object.assign({
1255
1357
  t: t,
1256
1358
  type: "text",
1257
1359
  isMandatory: false,
@@ -1260,7 +1362,7 @@ const VendorDetails = ({
1260
1362
  value: RegistrationNo,
1261
1363
  onChange: setregistrationno,
1262
1364
  style: {
1263
- width: "50%"
1365
+ width: "100%"
1264
1366
  },
1265
1367
  ValidationRequired: true
1266
1368
  }, validation = {
@@ -1268,7 +1370,9 @@ const VendorDetails = ({
1268
1370
  pattern: "^[a-zA-Z0-9/-]{1,20}$",
1269
1371
  type: "text",
1270
1372
  title: t("INVALID_REGISTRATION_NO_ERROR_MESSAGE")
1271
- })), /*#__PURE__*/React.createElement(CardLabel, null, `${t("EPF_NO")}`), /*#__PURE__*/React.createElement(TextInput, Object.assign({
1373
+ }))), /*#__PURE__*/React.createElement("div", {
1374
+ className: "finance-mainlayout-col3"
1375
+ }, /*#__PURE__*/React.createElement(CardLabel, null, `${t("EPF_NO")}`), /*#__PURE__*/React.createElement(TextInput, Object.assign({
1272
1376
  t: t,
1273
1377
  type: "text",
1274
1378
  isMandatory: false,
@@ -1277,7 +1381,7 @@ const VendorDetails = ({
1277
1381
  value: EpfNo,
1278
1382
  onChange: setepfno,
1279
1383
  style: {
1280
- width: "50%"
1384
+ width: "100%"
1281
1385
  },
1282
1386
  ValidationRequired: true
1283
1387
  }, validation = {
@@ -1285,7 +1389,11 @@ const VendorDetails = ({
1285
1389
  pattern: "^[a-zA-Z0-9/-]{1,15}$",
1286
1390
  type: "text",
1287
1391
  title: t("INVALID_EPF_NO_ERROR_MESSAGE")
1288
- })), /*#__PURE__*/React.createElement(CardLabel, null, `${t("ESI_NO")}`), /*#__PURE__*/React.createElement(TextInput, Object.assign({
1392
+ })))), /*#__PURE__*/React.createElement("div", {
1393
+ className: "finance-mainlayout"
1394
+ }, /*#__PURE__*/React.createElement("div", {
1395
+ className: "finance-mainlayout-col3"
1396
+ }, /*#__PURE__*/React.createElement(CardLabel, null, `${t("ESI_NO")}`), /*#__PURE__*/React.createElement(TextInput, Object.assign({
1289
1397
  t: t,
1290
1398
  type: "text",
1291
1399
  isMandatory: false,
@@ -1294,7 +1402,7 @@ const VendorDetails = ({
1294
1402
  value: EsiNo,
1295
1403
  onChange: setesino,
1296
1404
  style: {
1297
- width: "50%"
1405
+ width: "100%"
1298
1406
  },
1299
1407
  ValidationRequired: true
1300
1408
  }, validation = {
@@ -1302,7 +1410,9 @@ const VendorDetails = ({
1302
1410
  pattern: "^[a-zA-Z0-9/-]{1,20}$",
1303
1411
  type: "text",
1304
1412
  title: t("INVALID_ESI_NO_ERROR_MESSAGE")
1305
- })), /*#__PURE__*/React.createElement("div", null, t("VENDOR_TYPE"), /*#__PURE__*/React.createElement("div", {
1413
+ }))), /*#__PURE__*/React.createElement("div", {
1414
+ className: "finance-mainlayout-col3"
1415
+ }, /*#__PURE__*/React.createElement("div", null, t("VENDOR_TYPE"), /*#__PURE__*/React.createElement("div", {
1306
1416
  className: "tooltip",
1307
1417
  style: {
1308
1418
  width: "12px",
@@ -1329,7 +1439,6 @@ const VendorDetails = ({
1329
1439
  required: t("CORE_COMMON_REQUIRED_ERRMSG")
1330
1440
  },
1331
1441
  render: props => /*#__PURE__*/React.createElement(Dropdown$2, {
1332
- className: "form-field",
1333
1442
  selected: VendorType,
1334
1443
  select: setVendorType,
1335
1444
  option: [{
@@ -1343,7 +1452,11 @@ const VendorDetails = ({
1343
1452
  placeholder: "Select",
1344
1453
  t: t
1345
1454
  })
1346
- }), /*#__PURE__*/React.createElement("div", null, t("VENOR_CATEGORY"), /*#__PURE__*/React.createElement("div", {
1455
+ }))), /*#__PURE__*/React.createElement("div", {
1456
+ className: "finance-mainlayout"
1457
+ }, /*#__PURE__*/React.createElement("div", {
1458
+ className: "finance-mainlayout-col3"
1459
+ }, /*#__PURE__*/React.createElement("div", null, t("VENOR_CATEGORY"), /*#__PURE__*/React.createElement("div", {
1347
1460
  className: "tooltip",
1348
1461
  style: {
1349
1462
  width: "12px",
@@ -1370,7 +1483,6 @@ const VendorDetails = ({
1370
1483
  required: t("CORE_COMMON_REQUIRED_ERRMSG")
1371
1484
  },
1372
1485
  render: props => /*#__PURE__*/React.createElement(Dropdown$2, {
1373
- className: "form-field",
1374
1486
  selected: VendorCategory,
1375
1487
  select: setVendorCategory,
1376
1488
  option: [{
@@ -1384,7 +1496,9 @@ const VendorDetails = ({
1384
1496
  placeholder: "Select",
1385
1497
  t: t
1386
1498
  })
1387
- }), /*#__PURE__*/React.createElement("div", null, t("STATUS"), /*#__PURE__*/React.createElement("div", {
1499
+ })), /*#__PURE__*/React.createElement("div", {
1500
+ className: "finance-mainlayout-col3"
1501
+ }, /*#__PURE__*/React.createElement("div", null, t("STATUS"), /*#__PURE__*/React.createElement("div", {
1388
1502
  className: "tooltip",
1389
1503
  style: {
1390
1504
  width: "12px",
@@ -1411,7 +1525,6 @@ const VendorDetails = ({
1411
1525
  required: t("CORE_COMMON_REQUIRED_ERRMSG")
1412
1526
  },
1413
1527
  render: props => /*#__PURE__*/React.createElement(Dropdown$2, {
1414
- className: "form-field",
1415
1528
  selected: Status,
1416
1529
  select: setStatus,
1417
1530
  option: [{
@@ -1425,7 +1538,7 @@ const VendorDetails = ({
1425
1538
  placeholder: "Select",
1426
1539
  t: t
1427
1540
  })
1428
- }))));
1541
+ })))))));
1429
1542
  };
1430
1543
 
1431
1544
  const VendorDocuments = ({
@@ -1439,6 +1552,7 @@ const VendorDocuments = ({
1439
1552
  const [uploadedFiles, setUploadedFiles] = useState([null]);
1440
1553
  const [error, setError] = useState(null);
1441
1554
  const [ind, setInd] = useState(1);
1555
+ const steps = ["VENDOR_ADDITIONAL_DETAILS", "VENDOR_DOCUMENT_DETAILS", "VENDOR_SUMMARY"];
1442
1556
  const tenantId = Digit.ULBService.getStateId();
1443
1557
  const stateId = Digit.ULBService.getStateId();
1444
1558
  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) || []);
@@ -1495,19 +1609,28 @@ const VendorDocuments = ({
1495
1609
  });
1496
1610
  handleFileUpload(file, index);
1497
1611
  };
1498
- return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Timeline, {
1612
+ return /*#__PURE__*/React.createElement("div", {
1613
+ style: {
1614
+ display: "flex",
1615
+ width: "100%",
1616
+ gap: "24px"
1617
+ }
1618
+ }, /*#__PURE__*/React.createElement(Timeline, {
1619
+ steps: steps,
1499
1620
  currentStep: 2
1500
- }), /*#__PURE__*/React.createElement(FormStep, {
1621
+ }), /*#__PURE__*/React.createElement("div", {
1622
+ style: {
1623
+ flex: "1",
1624
+ overflowY: "auto"
1625
+ }
1626
+ }, /*#__PURE__*/React.createElement(FormStep, {
1501
1627
  t: t,
1502
1628
  config: config,
1503
1629
  onSelect: handleSubmit,
1504
1630
  onSkip: onSkip,
1505
1631
  isDisabled: uploadedFiles.some(file => file === null) && files.some(file => file === null)
1506
1632
  }, files.map((file, index) => /*#__PURE__*/React.createElement(LabelFieldPair, {
1507
- key: index,
1508
- style: {
1509
- marginBottom: "24px"
1510
- }
1633
+ key: index
1511
1634
  }, /*#__PURE__*/React.createElement(CardLabel, {
1512
1635
  className: "card-label-smaller"
1513
1636
  }, t("VENDOR_ID") + (index !== 0 ? index : "")), /*#__PURE__*/React.createElement("div", {
@@ -1538,48 +1661,48 @@ const VendorDocuments = ({
1538
1661
  label: error,
1539
1662
  onClose: () => setError(null),
1540
1663
  error: true
1541
- })));
1664
+ }))));
1542
1665
  };
1543
1666
 
1544
1667
  const ServiceDoc = ({
1545
1668
  t,
1546
1669
  config,
1547
- onSelect,
1548
- userType,
1549
- formData
1670
+ onSelect
1550
1671
  }) => {
1551
1672
  var _Documentsob$ASSET;
1552
1673
  const tenantId = Digit.ULBService.getCurrentTenantId();
1553
1674
  const stateId = Digit.ULBService.getStateId();
1554
- sessionStorage.removeItem("docReqScreenByBack");
1555
1675
  const docType = config !== null && config !== void 0 && config.isMutation ? ["MutationDocuments"] : "Documents";
1556
1676
  const {
1557
1677
  isLoading,
1558
1678
  data: Documentsob = {}
1559
1679
  } = Digit.Hooks.asset.useAssetDocumentsMDMS(stateId, "ASSET", docType);
1560
1680
  let docs = Documentsob === null || Documentsob === void 0 ? void 0 : (_Documentsob$ASSET = Documentsob.ASSET) === null || _Documentsob$ASSET === void 0 ? void 0 : _Documentsob$ASSET.Documents;
1561
- return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Card, null, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(CardSubHeader, null, t("AST_REQ_SCREEN_LABEL")), /*#__PURE__*/React.createElement(CardText, {
1681
+ 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, {
1562
1682
  style: {
1563
- color: "red"
1683
+ color: "red",
1684
+ marginBottom: "20px"
1564
1685
  }
1565
- }, t("AST_DOCUMENT_ACCEPTED_PDF_JPG_PNG")), /*#__PURE__*/React.createElement("div", null, isLoading && /*#__PURE__*/React.createElement(Loader, null), Array.isArray(docs) ? config !== null && config !== void 0 && config.isMutation ? docs.map(({
1686
+ }, t("AST_DOCUMENT_ACCEPTED_PDF_JPG_PNG"))), isLoading && /*#__PURE__*/React.createElement(Loader, null), Array.isArray(docs) && docs.map(({
1566
1687
  code,
1567
1688
  dropdownData
1568
- }, index) => /*#__PURE__*/React.createElement("div", {
1689
+ }, index) => /*#__PURE__*/React.createElement(Card, {
1569
1690
  key: index
1570
- }, /*#__PURE__*/React.createElement(CardSubHeader, null, index + 1, ". ", t(code)), /*#__PURE__*/React.createElement(CardText, {
1571
- className: "primaryColor"
1572
- }, dropdownData.map(dropdownData => t(dropdownData === null || dropdownData === void 0 ? void 0 : dropdownData.code)).join(", ")))) : docs.map(({
1573
- code,
1574
- dropdownData
1575
- }, index) => /*#__PURE__*/React.createElement("div", {
1576
- key: index
1577
- }, /*#__PURE__*/React.createElement(CardSubHeader, null, index + 1, ". ", t(stringReplaceAll(code, ".", "_"))), dropdownData.map((dropdownData, dropdownIndex) => /*#__PURE__*/React.createElement(CardText, {
1578
- className: "primaryColor"
1579
- }, `${dropdownIndex + 1}`, ". ", t(stringReplaceAll(dropdownData === null || dropdownData === void 0 ? void 0 : dropdownData.code, ".", "_")))))) : null)), /*#__PURE__*/React.createElement("span", null, /*#__PURE__*/React.createElement(SubmitBar, {
1691
+ }, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("h3", {
1692
+ style: {
1693
+ margin: 0
1694
+ }
1695
+ }, index + 1, ". ", t(stringReplaceAll(code, ".", "_")))), dropdownData.map((dropdownData, dropdownIndex) => /*#__PURE__*/React.createElement("div", {
1696
+ key: dropdownIndex,
1697
+ style: {
1698
+ paddingLeft: "10px",
1699
+ marginBottom: "6px",
1700
+ fontSize: "14px"
1701
+ }
1702
+ }, dropdownIndex + 1, ". ", t(stringReplaceAll(dropdownData === null || dropdownData === void 0 ? void 0 : dropdownData.code, ".", "_")))))), /*#__PURE__*/React.createElement(SubmitBar, {
1580
1703
  label: t("COMMON_NEXT"),
1581
1704
  onSubmit: onSelect
1582
- }))));
1705
+ }));
1583
1706
  };
1584
1707
 
1585
1708
  const VendorSelectAddress = ({
@@ -1696,10 +1819,12 @@ const VendorSelectAddress = ({
1696
1819
  });
1697
1820
  }
1698
1821
  if (userType === "employee") {
1699
- return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, {
1822
+ return /*#__PURE__*/React.createElement("div", {
1823
+ className: ""
1824
+ }, /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, {
1700
1825
  className: "card-label-smaller"
1701
1826
  }, t("MYCITY_CODE_LABEL"), config.isMandatory ? " * " : null), /*#__PURE__*/React.createElement(Dropdown$2, {
1702
- className: "form-field",
1827
+ className: "",
1703
1828
  isMandatory: true,
1704
1829
  selected: (cities === null || cities === void 0 ? void 0 : cities.length) === 1 ? cities[0] : selectedCity,
1705
1830
  disable: (cities === null || cities === void 0 ? void 0 : cities.length) === 1,
@@ -1710,7 +1835,7 @@ const VendorSelectAddress = ({
1710
1835
  })), /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, {
1711
1836
  className: "card-label-smaller"
1712
1837
  }, t("ES_NEW_APPLICATION_LOCATION_MOHALLA"), config.isMandatory ? " * " : null), /*#__PURE__*/React.createElement(Dropdown$2, {
1713
- className: "form-field",
1838
+ className: "",
1714
1839
  isMandatory: true,
1715
1840
  selected: selectedLocality,
1716
1841
  option: localities,
@@ -8356,7 +8481,7 @@ const VendorInbox = props => {
8356
8481
  }
8357
8482
  }, {
8358
8483
  Header: t("ES_VENDOR_INBOX_DATE_VENDOR_CREATION"),
8359
- accessor: "createdTime",
8484
+ accessor: "VendorInboxcreatedTime",
8360
8485
  Cell: ({
8361
8486
  row
8362
8487
  }) => {
@@ -8399,6 +8524,18 @@ const VendorInbox = props => {
8399
8524
  name: `switch-${row.id}`
8400
8525
  });
8401
8526
  }
8527
+ }, {
8528
+ Header: t("ES_VENDOR_ADDITIONAL_DETAILS"),
8529
+ disableSortBy: true,
8530
+ Cell: ({
8531
+ row
8532
+ }) => {
8533
+ return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("span", {
8534
+ className: "link"
8535
+ }, /*#__PURE__*/React.createElement(Link, {
8536
+ to: "/digit-ui/employee/vendor/registry/additionaldetails/" + row.original["id"]
8537
+ }, /*#__PURE__*/React.createElement("div", null, t("ES_VENDOR_ADDITIONAL_DETAILS"), /*#__PURE__*/React.createElement("br", null)))));
8538
+ }
8402
8539
  }];
8403
8540
  case "VEHICLE":
8404
8541
  return [{
@@ -8851,7 +8988,7 @@ const SearchVendor = () => {
8851
8988
  refetch();
8852
8989
  refetchVendor();
8853
8990
  }, []);
8854
- return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Header, null, t("VENDOR_SEARCH")), /*#__PURE__*/React.createElement(VendorInbox, {
8991
+ return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(VendorInbox, {
8855
8992
  data: {
8856
8993
  table: tableData
8857
8994
  },
@@ -9043,10 +9180,15 @@ const AddDriver = ({
9043
9180
  heading
9044
9181
  }) => {
9045
9182
  const tenantId = Digit.ULBService.getCurrentTenantId();
9183
+ const {
9184
+ t
9185
+ } = useTranslation();
9046
9186
  const stateId = Digit.ULBService.getStateId();
9047
9187
  const [showToast, setShowToast] = useState(null);
9048
9188
  const history = useHistory();
9189
+ const [currentStep, setCurrentStep] = useState(1);
9049
9190
  const queryClient = useQueryClient();
9191
+ const steps = [t("ES_FSM_REGISTRY_TITLE_NEW_DRIVER")];
9050
9192
  const [mutationHappened, setMutationHappened, clear] = Digit.Hooks.useSessionStorage("FSM_MUTATION_HAPPENED", false);
9051
9193
  const [errorInfo, setErrorInfo, clearError] = Digit.Hooks.useSessionStorage("FSM_ERROR_DATA", false);
9052
9194
  const [successData, setsuccessData, clearSuccessData] = Digit.Hooks.useSessionStorage("FSM_MUTATION_SUCCESS_DATA", false);
@@ -9062,9 +9204,6 @@ const AddDriver = ({
9062
9204
  clearSuccessData();
9063
9205
  clearError();
9064
9206
  }, []);
9065
- const {
9066
- t
9067
- } = useTranslation();
9068
9207
  const Config = DriverConfig(t);
9069
9208
  const [canSubmit, setSubmitValve] = useState(false);
9070
9209
  const defaultValues = {
@@ -9132,10 +9271,20 @@ const AddDriver = ({
9132
9271
  });
9133
9272
  };
9134
9273
  const isMobile = window.Digit.Utils.browser.isMobile();
9135
- return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Header, null, t("ES_FSM_REGISTRY_TITLE_NEW_DRIVER"))), /*#__PURE__*/React.createElement("div", {
9136
- style: !isMobile ? {
9137
- marginLeft: "-15px"
9138
- } : {}
9274
+ return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
9275
+ style: {
9276
+ display: "flex",
9277
+ width: "100%",
9278
+ gap: "24px"
9279
+ }
9280
+ }, /*#__PURE__*/React.createElement(Timeline, {
9281
+ steps: steps,
9282
+ currentStep: currentStep
9283
+ }), /*#__PURE__*/React.createElement("div", {
9284
+ style: {
9285
+ flex: "1",
9286
+ overflowY: "auto"
9287
+ }
9139
9288
  }, /*#__PURE__*/React.createElement(FormComposer, {
9140
9289
  isDisabled: !canSubmit,
9141
9290
  label: t("ES_COMMON_APPLICATION_SUBMIT"),
@@ -9156,7 +9305,7 @@ const AddDriver = ({
9156
9305
  error: showToast.key === "error" ? true : false,
9157
9306
  label: t(showToast.key === "success" ? `ES_FSM_${showToast.action}_SUCCESS` : showToast.action),
9158
9307
  onClose: closeToast
9159
- })));
9308
+ }))));
9160
9309
  };
9161
9310
 
9162
9311
  const ConfirmationBox = ({
@@ -9189,6 +9338,10 @@ const CloseBtn = props => {
9189
9338
  onClick: props.onClick
9190
9339
  }, /*#__PURE__*/React.createElement(Close, null));
9191
9340
  };
9341
+ const formatLabel = key => {
9342
+ const result = key.replace(/([A-Z])/g, " $1");
9343
+ return result.charAt(0).toUpperCase() + result.slice(1);
9344
+ };
9192
9345
  const EditVendorDetails = props => {
9193
9346
  var _dsoData$4, _dsoData$4$employeeRe;
9194
9347
  const tenantId = Digit.ULBService.getCurrentTenantId();
@@ -9203,7 +9356,6 @@ const EditVendorDetails = props => {
9203
9356
  } = useParams();
9204
9357
  const [displayMenu, setDisplayMenu] = useState(false);
9205
9358
  const [selectedAction, setSelectedAction] = useState(null);
9206
- const [config, setCurrentConfig] = useState({});
9207
9359
  const [showModal, setShowModal] = useState(false);
9208
9360
  const [showToast, setShowToast] = useState(null);
9209
9361
  const [vehicles, setVehicles] = useState([]);
@@ -9212,21 +9364,14 @@ const EditVendorDetails = props => {
9212
9364
  const {
9213
9365
  data: dsoData,
9214
9366
  isLoading: isLoading,
9215
- isSuccess: isDsoSuccess,
9216
- error: dsoError,
9217
9367
  refetch: refetchDso
9218
9368
  } = Digit.Hooks.fsm.useDsoSearch(tenantId, {
9219
9369
  ids: dsoId
9220
9370
  }, {
9221
9371
  staleTime: Infinity
9222
9372
  });
9223
- console.log("id in dso :: ", dsoId);
9224
- console.log("dsoData", dsoData);
9225
9373
  const {
9226
9374
  data: vehicleData,
9227
- isLoading: isVehicleDataLoading,
9228
- isSuccess: isVehicleSuccess,
9229
- error: vehicleError,
9230
9375
  refetch: refetchVehicle
9231
9376
  } = Digit.Hooks.fsm.useVehiclesSearch({
9232
9377
  tenantId,
@@ -9239,9 +9384,6 @@ const EditVendorDetails = props => {
9239
9384
  });
9240
9385
  const {
9241
9386
  data: driverData,
9242
- isLoading: isDriverDataLoading,
9243
- isSuccess: isDriverSuccess,
9244
- error: driverError,
9245
9387
  refetch: refetchDriver
9246
9388
  } = Digit.Hooks.fsm.useDriverSearch({
9247
9389
  tenantId,
@@ -9253,10 +9395,17 @@ const EditVendorDetails = props => {
9253
9395
  }
9254
9396
  });
9255
9397
  const {
9256
- isLoading: isUpdateLoading,
9257
- isError: vendorCreateError,
9258
- data: updateResponse,
9259
- error: updateError,
9398
+ data: vendorAdditionalData,
9399
+ isLoading: isVendorAdditionalLoading
9400
+ } = Digit.Hooks.vendor.useEmpvendorCommonSearch({
9401
+ tenantId,
9402
+ filters: {
9403
+ vendorId: dsoId
9404
+ }
9405
+ }, {
9406
+ enabled: !!dsoId
9407
+ });
9408
+ const {
9260
9409
  mutate
9261
9410
  } = Digit.Hooks.fsm.useVendorUpdate(tenantId);
9262
9411
  function onActionSelect(action) {
@@ -9447,6 +9596,7 @@ const EditVendorDetails = props => {
9447
9596
  if (isLoading) {
9448
9597
  return /*#__PURE__*/React.createElement(Loader, null);
9449
9598
  }
9599
+ const excludedKeys = ["vendorAdditionalDetailsId", "vendorId", "tenantId", "code", "lastModifiedTime", "createdTime", "lastModifiedBy", "createdBy", "active", "status", "vendorType", "vendorGroup", "narration", "documents"];
9450
9600
  return /*#__PURE__*/React.createElement(React.Fragment, null, !isLoading ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Header, {
9451
9601
  style: {
9452
9602
  marginBottom: "16px"
@@ -9473,19 +9623,76 @@ const EditVendorDetails = props => {
9473
9623
  marginLeft: "-15px"
9474
9624
  } : {}
9475
9625
  }, /*#__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) => {
9476
- var _detail$values2;
9626
+ var _detail$values3;
9627
+ if (value.title === "ES_FSM_REGISTRY_DETAILS_ADDITIONAL_DETAILS") {
9628
+ var _vendorAdditionalData, _vendorAdditionalData2, _detail$values2;
9629
+ const additionalDetails = vendorAdditionalData === null || vendorAdditionalData === void 0 ? void 0 : (_vendorAdditionalData = vendorAdditionalData.VendorDetails) === null || _vendorAdditionalData === void 0 ? void 0 : (_vendorAdditionalData2 = _vendorAdditionalData[0]) === null || _vendorAdditionalData2 === void 0 ? void 0 : _vendorAdditionalData2.vendorAdditionalDetails;
9630
+ return /*#__PURE__*/React.createElement(Row, {
9631
+ key: t(value.title),
9632
+ label: t(value.title),
9633
+ text: isVendorAdditionalLoading ? /*#__PURE__*/React.createElement(Loader, null) : /*#__PURE__*/React.createElement("div", null, additionalDetails ? /*#__PURE__*/React.createElement("div", {
9634
+ style: {
9635
+ display: "flex",
9636
+ flexDirection: "column",
9637
+ width: "100%"
9638
+ }
9639
+ }, /*#__PURE__*/React.createElement("div", {
9640
+ style: {
9641
+ marginBottom: "8px"
9642
+ }
9643
+ }, typeof additionalDetails === "object" ? Object.entries(additionalDetails).filter(([key]) => !excludedKeys.includes(key)).map(([key, val]) => {
9644
+ if (typeof val === "object" && val !== null) return null;
9645
+ const safeKey = String(key);
9646
+ const safeVal = val !== null && val !== undefined ? String(val) : "";
9647
+ return /*#__PURE__*/React.createElement("div", {
9648
+ key: safeKey,
9649
+ style: {
9650
+ marginBottom: "6px"
9651
+ }
9652
+ }, /*#__PURE__*/React.createElement("span", {
9653
+ style: {
9654
+ fontWeight: "bold",
9655
+ marginRight: "6px",
9656
+ color: "#000000ff"
9657
+ }
9658
+ }, t(formatLabel(safeKey)), ":"), /*#__PURE__*/React.createElement("span", null, safeVal ? t(safeVal) : "N/A"));
9659
+ }) : /*#__PURE__*/React.createElement("span", null, t(String(additionalDetails)))), /*#__PURE__*/React.createElement("span", {
9660
+ className: "link",
9661
+ style: {
9662
+ color: "#a82227",
9663
+ cursor: "pointer",
9664
+ textDecoration: "underline",
9665
+ marginTop: "8px",
9666
+ display: "inline-block"
9667
+ },
9668
+ onClick: () => history.push(`/digit-ui/employee/vendor/registry/additionaldetails/info?vendorId=${dsoId}`)
9669
+ }, t("Edit Details"))) : /*#__PURE__*/React.createElement("span", {
9670
+ className: "link",
9671
+ style: {
9672
+ color: "#a82227",
9673
+ cursor: "pointer",
9674
+ textDecoration: "underline"
9675
+ },
9676
+ onClick: () => history.push(`/digit-ui/employee/vendor/registry/additionaldetails/info?vendorId=${dsoId}`)
9677
+ }, t("Add Additional Details"))),
9678
+ last: index === (detail === null || detail === void 0 ? void 0 : (_detail$values2 = detail.values) === null || _detail$values2 === void 0 ? void 0 : _detail$values2.length) - 1,
9679
+ caption: value.caption,
9680
+ className: `border-none ${!isMobile ? "vendor-details-row" : ""}`
9681
+ });
9682
+ }
9477
9683
  return /*#__PURE__*/React.createElement(Row, {
9478
- key: t(value.title),
9479
- label: t(value.title),
9480
- text: t(value.value) || "N/A",
9481
- last: index === (detail === null || detail === void 0 ? void 0 : (_detail$values2 = detail.values) === null || _detail$values2 === void 0 ? void 0 : _detail$values2.length) - 1,
9684
+ key: t(String(value.title)),
9685
+ label: t(String(value.title)),
9686
+ text: value.value ? t(String(value.value)) : "N/A",
9687
+ last: index === (detail === null || detail === void 0 ? void 0 : (_detail$values3 = detail.values) === null || _detail$values3 === void 0 ? void 0 : _detail$values3.length) - 1,
9482
9688
  caption: value.caption,
9483
9689
  className: `border-none ${!isMobile ? "vendor-details-row" : ""}`
9484
9690
  });
9485
9691
  }), detail === null || detail === void 0 ? void 0 : (_detail$child = detail.child) === null || _detail$child === void 0 ? void 0 : _detail$child.map((data, index) => {
9486
9692
  var _data$values;
9487
9693
  return /*#__PURE__*/React.createElement(Card, {
9488
- className: "card-with-background"
9694
+ className: "card-with-background",
9695
+ key: data.id || index
9489
9696
  }, /*#__PURE__*/React.createElement("div", {
9490
9697
  className: "card-head"
9491
9698
  }, /*#__PURE__*/React.createElement("h2", null, t(detail.type), " ", index + 1), /*#__PURE__*/React.createElement("div", {
@@ -9510,12 +9717,12 @@ const EditVendorDetails = props => {
9510
9717
  className: "delete",
9511
9718
  fill: "#a82227"
9512
9719
  })))), data === null || data === void 0 ? void 0 : (_data$values = data.values) === null || _data$values === void 0 ? void 0 : _data$values.map((value, index) => {
9513
- var _detail$values3;
9720
+ var _detail$values4;
9514
9721
  return /*#__PURE__*/React.createElement(Row, {
9515
- key: t(value.title),
9516
- label: t(value.title),
9517
- text: t(value.value) || "N/A",
9518
- last: index === (detail === null || detail === void 0 ? void 0 : (_detail$values3 = detail.values) === null || _detail$values3 === void 0 ? void 0 : _detail$values3.length) - 1,
9722
+ key: t(String(value.title)),
9723
+ label: t(String(value.title)),
9724
+ text: value.value ? t(String(value.value)) : "N/A",
9725
+ last: index === (detail === null || detail === void 0 ? void 0 : (_detail$values4 = detail.values) === null || _detail$values4 === void 0 ? void 0 : _detail$values4.length) - 1,
9519
9726
  caption: value.caption,
9520
9727
  className: "border-none",
9521
9728
  textStyle: value.value === "ACTIVE" ? {
@@ -9758,7 +9965,12 @@ const AddVehicle = ({
9758
9965
  const stateId = Digit.ULBService.getStateId();
9759
9966
  const [showToast, setShowToast] = useState(null);
9760
9967
  const history = useHistory();
9968
+ const {
9969
+ t
9970
+ } = useTranslation();
9761
9971
  const queryClient = useQueryClient();
9972
+ const [currentStep, setCurrentStep] = useState(1);
9973
+ const steps = [t("ES_FSM_REGISTRY_TITLE_NEW_VEHICLE")];
9762
9974
  const [mutationHappened, setMutationHappened, clear] = Digit.Hooks.useSessionStorage("FSM_MUTATION_HAPPENED", false);
9763
9975
  const [errorInfo, setErrorInfo, clearError] = Digit.Hooks.useSessionStorage("FSM_ERROR_DATA", false);
9764
9976
  const [successData, setsuccessData, clearSuccessData] = Digit.Hooks.useSessionStorage("FSM_MUTATION_SUCCESS_DATA", false);
@@ -9774,9 +9986,6 @@ const AddVehicle = ({
9774
9986
  clearSuccessData();
9775
9987
  clearError();
9776
9988
  }, []);
9777
- const {
9778
- t
9779
- } = useTranslation();
9780
9989
  const Config = VehicleConfig(t);
9781
9990
  Config[0].body.forEach(item => {
9782
9991
  if (item.label === "ES_FSM_REGISTRY_VEHICLE_NUMBER") {
@@ -9883,10 +10092,20 @@ const AddVehicle = ({
9883
10092
  });
9884
10093
  };
9885
10094
  const isMobile = window.Digit.Utils.browser.isMobile();
9886
- return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Header, null, t("ES_FSM_REGISTRY_TITLE_NEW_VEHICLE"))), /*#__PURE__*/React.createElement("div", {
9887
- style: !isMobile ? {
9888
- marginLeft: "-15px"
9889
- } : {}
10095
+ return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
10096
+ style: {
10097
+ display: "flex",
10098
+ width: "100%",
10099
+ gap: "24px"
10100
+ }
10101
+ }, /*#__PURE__*/React.createElement(Timeline, {
10102
+ steps: steps,
10103
+ currentStep: currentStep
10104
+ }), /*#__PURE__*/React.createElement("div", {
10105
+ style: {
10106
+ flex: "1",
10107
+ overflowY: "auto"
10108
+ }
9890
10109
  }, /*#__PURE__*/React.createElement(FormComposer, {
9891
10110
  isDisabled: !canSubmit,
9892
10111
  label: t("ES_COMMON_APPLICATION_SUBMIT"),
@@ -9907,7 +10126,7 @@ const AddVehicle = ({
9907
10126
  error: showToast.key === "error" ? true : false,
9908
10127
  label: t(showToast.key === "success" ? `ES_FSM_REGISTRY_${showToast.action}_SUCCESS` : showToast.action),
9909
10128
  onClose: closeToast
9910
- })));
10129
+ }))));
9911
10130
  };
9912
10131
 
9913
10132
  const createConfig = [{
@@ -9986,7 +10205,7 @@ const VENDORCreate = ({
9986
10205
  }
9987
10206
  let {
9988
10207
  nextStep = {}
9989
- } = config.find(routeObj => routeObj.route === (currentPath || '0'));
10208
+ } = config.find(routeObj => routeObj.route === (currentPath || "0"));
9990
10209
  let redirectWithHistory = history.push;
9991
10210
  if (skipStep) {
9992
10211
  redirectWithHistory = history.replace;
@@ -10053,9 +10272,22 @@ const VENDORCreate = ({
10053
10272
  config = config.concat(obj.body.filter(a => !a.hideInCitizen));
10054
10273
  });
10055
10274
  config.indexRoute = "info";
10275
+ console.log(commonFields, "commanFields");
10276
+ console.log(config, "config");
10056
10277
  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");
10057
10278
  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");
10058
- return /*#__PURE__*/React.createElement(Switch, null, config.map((routeObj, index) => {
10279
+ return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
10280
+ style: {
10281
+ display: "flex",
10282
+ width: "100%",
10283
+ gap: "24px"
10284
+ }
10285
+ }, /*#__PURE__*/React.createElement("div", {
10286
+ style: {
10287
+ flex: "1",
10288
+ overflowY: "auto"
10289
+ }
10290
+ }, /*#__PURE__*/React.createElement(Switch, null, config.map((routeObj, index) => {
10059
10291
  const {
10060
10292
  component,
10061
10293
  texts,
@@ -10090,7 +10322,7 @@ const VENDORCreate = ({
10090
10322
  onSuccess: onSuccess
10091
10323
  })), /*#__PURE__*/React.createElement(Route, null, /*#__PURE__*/React.createElement(Redirect, {
10092
10324
  to: `${match.path}/${config.indexRoute}`
10093
- })));
10325
+ }))))));
10094
10326
  };
10095
10327
 
10096
10328
  const ActionButton = ({
@@ -10119,6 +10351,7 @@ const CheckPage = ({
10119
10351
  } = useTranslation();
10120
10352
  const history = useHistory();
10121
10353
  const [categoriesWiseData, setCategoriesWiseData] = useState();
10354
+ const steps = ["VENDOR_ADDITIONAL_DETAILS", "VENDOR_DOCUMENT_DETAILS", "VENDOR_SUMMARY"];
10122
10355
  const tenantId = Digit.ULBService.getCurrentTenantId();
10123
10356
  const stateTenantId = Digit.ULBService.getStateId();
10124
10357
  const {
@@ -10131,9 +10364,21 @@ const CheckPage = ({
10131
10364
  const setdeclarationhandler = () => {
10132
10365
  setAgree(!agree);
10133
10366
  };
10134
- return /*#__PURE__*/React.createElement(React.Fragment, null, window.location.href.includes("/employee") ? /*#__PURE__*/React.createElement(Timeline, {
10367
+ return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
10368
+ style: {
10369
+ display: "flex",
10370
+ width: "100%",
10371
+ gap: "24px"
10372
+ }
10373
+ }, window.location.href.includes("/employee") ? /*#__PURE__*/React.createElement(Timeline, {
10374
+ steps: steps,
10135
10375
  currentStep: 5
10136
- }) : null, /*#__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, {
10376
+ }) : null, /*#__PURE__*/React.createElement("div", {
10377
+ style: {
10378
+ flex: "1",
10379
+ overflowY: "auto"
10380
+ }
10381
+ }, /*#__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, {
10137
10382
  label: t("VENDOR_ID"),
10138
10383
  text: `${t(checkForNA(vendordet === null || vendordet === void 0 ? void 0 : vendordet.VendorId))}`,
10139
10384
  actionButton: /*#__PURE__*/React.createElement(ActionButton, {
@@ -10237,12 +10482,13 @@ const CheckPage = ({
10237
10482
  onChange: setdeclarationhandler,
10238
10483
  styles: {
10239
10484
  height: "auto"
10240
- }
10485
+ },
10486
+ checked: agree
10241
10487
  })), /*#__PURE__*/React.createElement("br", null), /*#__PURE__*/React.createElement(SubmitBar, {
10242
10488
  label: t("COMMON_BUTTON_SUBMIT"),
10243
10489
  onSubmit: onSubmit,
10244
10490
  disabled: !agree
10245
- })));
10491
+ })))));
10246
10492
  };
10247
10493
 
10248
10494
  const GetActionMessage = props => {
@@ -11240,6 +11486,113 @@ const SelectVehicleType = ({
11240
11486
  })));
11241
11487
  };
11242
11488
 
11489
+ const BankDetailsComponent = ({
11490
+ t,
11491
+ config,
11492
+ onSelect,
11493
+ userType,
11494
+ formData,
11495
+ ...props
11496
+ }) => {
11497
+ const [ifsc, setIfsc] = useState((formData === null || formData === void 0 ? void 0 : formData.ifscCode) || "");
11498
+ const [bankName, setBankName] = useState((formData === null || formData === void 0 ? void 0 : formData.bankName) || "");
11499
+ const [branchName, setBranchName] = useState((formData === null || formData === void 0 ? void 0 : formData.branchName) || "");
11500
+ const [accountNumber, setAccountNumber] = useState((formData === null || formData === void 0 ? void 0 : formData.accountNumber) || "");
11501
+ const [showToast, setShowToast] = useState(null);
11502
+ useEffect(() => {
11503
+ if (ifsc.length === 11) {
11504
+ fetch(`https://ifsc.razorpay.com/${ifsc}`).then(response => response.json()).then(data => {
11505
+ if (data && data.BANK && data.BRANCH) {
11506
+ setBankName(data.BANK);
11507
+ setBranchName(data.BRANCH);
11508
+ if (typeof onSelect === 'function') {
11509
+ onSelect(config.key, {
11510
+ bankName: data.BANK,
11511
+ branchName: data.BRANCH,
11512
+ ifscCode: ifsc,
11513
+ accountNumber: accountNumber
11514
+ });
11515
+ }
11516
+ setShowToast({
11517
+ error: false,
11518
+ label: t("VALID_IFSC_CODE")
11519
+ });
11520
+ } else {
11521
+ setShowToast({
11522
+ error: true,
11523
+ label: t("INVALID_IFSC_CODE")
11524
+ });
11525
+ }
11526
+ }).catch(() => {
11527
+ setShowToast({
11528
+ error: true,
11529
+ label: t("INVALID_IFSC_CODE")
11530
+ });
11531
+ });
11532
+ }
11533
+ }, [ifsc]);
11534
+ useEffect(() => {
11535
+ if (typeof onSelect === 'function') {
11536
+ onSelect(config.key, {
11537
+ bankName,
11538
+ branchName,
11539
+ ifscCode: ifsc,
11540
+ accountNumber
11541
+ });
11542
+ }
11543
+ }, [accountNumber, bankName, branchName, ifsc]);
11544
+ const handleIfscChange = e => {
11545
+ const input = e.target.value.replace(/[^a-zA-Z0-9]/g, "");
11546
+ if (input.length <= 11) {
11547
+ setIfsc(input);
11548
+ }
11549
+ };
11550
+ return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(CardLabel, null, t("ES_FSM_REGISTRY_IFSC_CODE")), /*#__PURE__*/React.createElement(TextInput, {
11551
+ t: t,
11552
+ type: "text",
11553
+ isMandatory: false,
11554
+ name: "ifscCode",
11555
+ value: ifsc,
11556
+ onChange: handleIfscChange,
11557
+ style: {
11558
+ width: "100%"
11559
+ },
11560
+ maxLength: 11
11561
+ }), /*#__PURE__*/React.createElement(CardLabel, null, t("ES_FSM_REGISTRY_ACCOUNT_NUMBER")), /*#__PURE__*/React.createElement(TextInput, {
11562
+ t: t,
11563
+ type: "text",
11564
+ isMandatory: false,
11565
+ name: "accountNumber",
11566
+ value: accountNumber,
11567
+ onChange: e => setAccountNumber(e.target.value),
11568
+ style: {
11569
+ width: "100%"
11570
+ }
11571
+ }), /*#__PURE__*/React.createElement(CardLabel, null, t("ES_FSM_REGISTRY_BANK_NAME")), /*#__PURE__*/React.createElement(TextInput, {
11572
+ t: t,
11573
+ type: "text",
11574
+ isMandatory: false,
11575
+ name: "bankName",
11576
+ value: bankName,
11577
+ onChange: e => setBankName(e.target.value),
11578
+ disabled: ifsc.length === 11 && bankName,
11579
+ style: {
11580
+ width: "100%"
11581
+ }
11582
+ }), /*#__PURE__*/React.createElement(CardLabel, null, t("ES_FSM_REGISTRY_BRANCH_NAME")), /*#__PURE__*/React.createElement(TextInput, {
11583
+ t: t,
11584
+ type: "text",
11585
+ isMandatory: false,
11586
+ name: "branchName",
11587
+ value: branchName,
11588
+ onChange: e => setBranchName(e.target.value),
11589
+ disabled: ifsc.length === 11 && branchName,
11590
+ style: {
11591
+ width: "100%"
11592
+ }
11593
+ }));
11594
+ };
11595
+
11243
11596
  const componentsToRegister = {
11244
11597
  VendorDetails,
11245
11598
  VendorDocuments,
@@ -11250,6 +11603,7 @@ const componentsToRegister = {
11250
11603
  SearchVendor,
11251
11604
  SelectServiceType,
11252
11605
  SelectVehicleType,
11606
+ BankDetailsComponent,
11253
11607
  AddDriver,
11254
11608
  EditVendorDetails,
11255
11609
  AddVehicle,