@djb25/digit-ui-module-vendor 1.0.2 → 1.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +420 -251
- package/dist/index.modern.js.map +1 -1
- package/package.json +1 -1
package/dist/index.modern.js
CHANGED
|
@@ -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, ModuleHeader, ArrowLeft, PrivateRoute, HomeIcon, PropertyHouse, EmployeeModuleCard,
|
|
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';
|
|
@@ -337,20 +337,20 @@ const EmployeeApp = ({
|
|
|
337
337
|
icon: HomeIcon,
|
|
338
338
|
path: "/digit-ui/employee"
|
|
339
339
|
}, {
|
|
340
|
-
label: t("
|
|
340
|
+
label: t("TITLE_VENDOR_MANAGEMENT"),
|
|
341
341
|
path: `/digit-ui/employee/vendor/search-vendor`
|
|
342
342
|
}];
|
|
343
343
|
if (pathname.includes("/registry/new-vendor")) {
|
|
344
344
|
crumbs.push({
|
|
345
|
-
label: t("
|
|
345
|
+
label: t("ES_FSM_REGISTRY_TITLE_NEW_VENDOR")
|
|
346
346
|
});
|
|
347
347
|
} else if (pathname.includes("/search-vendor")) {
|
|
348
348
|
crumbs.push({
|
|
349
|
-
label: t("
|
|
349
|
+
label: t("SEARCH_VENDOR")
|
|
350
350
|
});
|
|
351
351
|
} else if (pathname.includes("/registry/new-driver")) {
|
|
352
352
|
crumbs.push({
|
|
353
|
-
label: t("
|
|
353
|
+
label: t("ES_FSM_REGISTRY_TITLE_NEW_DRIVER")
|
|
354
354
|
});
|
|
355
355
|
} else if (pathname.includes("/registry/vendor-details") || pathname.includes("/registry/modify-vendor/")) {
|
|
356
356
|
crumbs.push({
|
|
@@ -362,7 +362,7 @@ const EmployeeApp = ({
|
|
|
362
362
|
});
|
|
363
363
|
} else if (pathname.includes("/registry/new-vehicle")) {
|
|
364
364
|
crumbs.push({
|
|
365
|
-
label: t("
|
|
365
|
+
label: t("ES_FSM_REGISTRY_TITLE_NEW_VEHICLE")
|
|
366
366
|
});
|
|
367
367
|
} else if (pathname.includes("/registry/driver-details") || pathname.includes("/registry/modify-driver/")) {
|
|
368
368
|
crumbs.push({
|
|
@@ -377,6 +377,8 @@ const EmployeeApp = ({
|
|
|
377
377
|
};
|
|
378
378
|
return /*#__PURE__*/React.createElement(Switch, null, /*#__PURE__*/React.createElement(AppContainer, null, /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
379
379
|
className: "ground-container"
|
|
380
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
381
|
+
className: "form-container"
|
|
380
382
|
}, /*#__PURE__*/React.createElement(ModuleHeader, {
|
|
381
383
|
leftContent: /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(ArrowLeft, {
|
|
382
384
|
className: "icon"
|
|
@@ -428,7 +430,7 @@ const EmployeeApp = ({
|
|
|
428
430
|
component: props => /*#__PURE__*/React.createElement(SearchApp, Object.assign({}, props, {
|
|
429
431
|
parentRoute: path
|
|
430
432
|
}))
|
|
431
|
-
})))));
|
|
433
|
+
}))))));
|
|
432
434
|
};
|
|
433
435
|
|
|
434
436
|
const VENDORCard = () => {
|
|
@@ -440,9 +442,6 @@ const VENDORCard = () => {
|
|
|
440
442
|
return null;
|
|
441
443
|
}
|
|
442
444
|
const links = [{
|
|
443
|
-
label: t("ADDITIONAL_VENDOR_DETAILS"),
|
|
444
|
-
link: `/digit-ui/employee/vendor/registry/additionaldetails`
|
|
445
|
-
}, {
|
|
446
445
|
label: t("VENDOR_NEW_REGISTERATION"),
|
|
447
446
|
link: `/digit-ui/employee/vendor/registry/new-vendor`
|
|
448
447
|
}, {
|
|
@@ -483,7 +482,7 @@ const convertEpochToDate = (dateEpoch, businessService) => {
|
|
|
483
482
|
}
|
|
484
483
|
};
|
|
485
484
|
const VendorData = data => {
|
|
486
|
-
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;
|
|
487
486
|
const formdata = {
|
|
488
487
|
VendorAdditionalDetails: {
|
|
489
488
|
tenantId: Digit.ULBService.getCurrentTenantId(),
|
|
@@ -511,7 +510,9 @@ const VendorData = data => {
|
|
|
511
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,
|
|
512
511
|
documents: data === null || data === void 0 ? void 0 : (_data$documents = data.documents) === null || _data$documents === void 0 ? void 0 : _data$documents.documents,
|
|
513
512
|
active: null,
|
|
514
|
-
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"
|
|
515
516
|
}
|
|
516
517
|
};
|
|
517
518
|
return formdata;
|
|
@@ -546,10 +547,7 @@ const VendorConfig = (t, disabled = false) => {
|
|
|
546
547
|
defaultValue: "",
|
|
547
548
|
className: "payment-form-text-input-correction"
|
|
548
549
|
}
|
|
549
|
-
}
|
|
550
|
-
}, {
|
|
551
|
-
head: "ES_FSM_REGISTRY_PERSONAL_DETAILS",
|
|
552
|
-
body: [{
|
|
550
|
+
}, {
|
|
553
551
|
label: "ES_FSM_REGISTRY_NEW_GENDER",
|
|
554
552
|
isMandatory: true,
|
|
555
553
|
type: "component",
|
|
@@ -699,47 +697,54 @@ const VendorConfig = (t, disabled = false) => {
|
|
|
699
697
|
className: "payment-form-text-input-correction"
|
|
700
698
|
}
|
|
701
699
|
}]
|
|
702
|
-
}, {
|
|
703
|
-
head: "ES_FSM_REGISTRY_BANK_DETAILS",
|
|
704
|
-
body: [{
|
|
705
|
-
route: "bank-details",
|
|
706
|
-
component: "BankDetailsComponent",
|
|
707
|
-
withoutLabel: true,
|
|
708
|
-
key: "bankDetails",
|
|
709
|
-
isMandatory: false,
|
|
710
|
-
type: "component"
|
|
711
|
-
}]
|
|
712
|
-
}, {
|
|
713
|
-
head: "",
|
|
714
|
-
body: [{
|
|
715
|
-
label: "ES_VENDOR_REGISTRY_SERVICE_TYPE",
|
|
716
|
-
isMandatory: true,
|
|
717
|
-
type: "component",
|
|
718
|
-
route: "select-gender",
|
|
719
|
-
hideInEmployee: false,
|
|
720
|
-
key: "serviceType",
|
|
721
|
-
component: "SelectServiceType",
|
|
722
|
-
disable: disabled,
|
|
723
|
-
texts: {
|
|
724
|
-
headerCaption: "",
|
|
725
|
-
header: "CS_COMMON_CHOOSE_GENDER",
|
|
726
|
-
cardText: "CS_COMMON_SELECT_GENDER",
|
|
727
|
-
submitBarLabel: "CS_COMMON_NEXT",
|
|
728
|
-
skipText: "CORE_COMMON_SKIP_CONTINUE"
|
|
729
|
-
}
|
|
730
|
-
}]
|
|
731
700
|
}];
|
|
732
701
|
};
|
|
733
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
|
+
|
|
734
733
|
const AddVendor = ({
|
|
735
734
|
parentUrl,
|
|
736
735
|
heading
|
|
737
736
|
}) => {
|
|
738
737
|
const tenantId = Digit.ULBService.getCurrentTenantId();
|
|
739
738
|
const stateId = Digit.ULBService.getStateId();
|
|
740
|
-
const
|
|
739
|
+
const {
|
|
740
|
+
t
|
|
741
|
+
} = useTranslation();
|
|
741
742
|
const history = useHistory();
|
|
742
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({});
|
|
743
748
|
const [mutationHappened, setMutationHappened, clear] = Digit.Hooks.useSessionStorage("FSM_MUTATION_HAPPENED", false);
|
|
744
749
|
const [errorInfo, setErrorInfo, clearError] = Digit.Hooks.useSessionStorage("FSM_ERROR_DATA", false);
|
|
745
750
|
const [successData, setsuccessData, clearSuccessData] = Digit.Hooks.useSessionStorage("FSM_MUTATION_SUCCESS_DATA", false);
|
|
@@ -755,11 +760,7 @@ const AddVendor = ({
|
|
|
755
760
|
clearSuccessData();
|
|
756
761
|
clearError();
|
|
757
762
|
}, []);
|
|
758
|
-
const {
|
|
759
|
-
t
|
|
760
|
-
} = useTranslation();
|
|
761
763
|
const Config = VendorConfig(t);
|
|
762
|
-
const [canSubmit, setSubmitValve] = useState(false);
|
|
763
764
|
const defaultValues = {
|
|
764
765
|
tripData: {
|
|
765
766
|
noOfTrips: 1,
|
|
@@ -767,43 +768,50 @@ const AddVendor = ({
|
|
|
767
768
|
amount: null
|
|
768
769
|
}
|
|
769
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")];
|
|
770
774
|
const onFormValueChange = (setValue, formData) => {
|
|
771
|
-
var _formData$
|
|
772
|
-
if (formData !== null && formData !== void 0 && formData.vendorName && formData !== null && formData !== void 0 && formData.phone && formData !== null && formData !== void 0 && (_formData$
|
|
773
|
-
|
|
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);
|
|
774
778
|
} else {
|
|
775
|
-
|
|
779
|
+
setCanSubmit(false);
|
|
776
780
|
}
|
|
777
781
|
};
|
|
778
782
|
const closeToast = () => {
|
|
779
783
|
setShowToast(null);
|
|
780
784
|
};
|
|
781
785
|
const onSubmit = data => {
|
|
782
|
-
var
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
const
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
const
|
|
793
|
-
const
|
|
794
|
-
const
|
|
795
|
-
const
|
|
796
|
-
const
|
|
797
|
-
const
|
|
798
|
-
const
|
|
799
|
-
const
|
|
800
|
-
const
|
|
801
|
-
const
|
|
802
|
-
const
|
|
803
|
-
const
|
|
804
|
-
const
|
|
805
|
-
const
|
|
806
|
-
const
|
|
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;
|
|
807
815
|
const formData = {
|
|
808
816
|
vendor: {
|
|
809
817
|
tenantId: tenantId,
|
|
@@ -830,8 +838,8 @@ const AddVendor = ({
|
|
|
830
838
|
area: localityArea || ""
|
|
831
839
|
},
|
|
832
840
|
geoLocation: {
|
|
833
|
-
latitude: (
|
|
834
|
-
longitude: (
|
|
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
|
|
835
843
|
}
|
|
836
844
|
},
|
|
837
845
|
owner: {
|
|
@@ -847,12 +855,6 @@ const AddVendor = ({
|
|
|
847
855
|
additionalDetails: {
|
|
848
856
|
serviceType: additionalDetails
|
|
849
857
|
},
|
|
850
|
-
bankDetails: [{
|
|
851
|
-
bankName: bankName,
|
|
852
|
-
bankBranchName: bankBranchName,
|
|
853
|
-
ifscCode: ifscCode,
|
|
854
|
-
accountNumber: accountNo
|
|
855
|
-
}],
|
|
856
858
|
vehicle: [],
|
|
857
859
|
drivers: [],
|
|
858
860
|
source: "WhatsApp"
|
|
@@ -874,74 +876,49 @@ const AddVendor = ({
|
|
|
874
876
|
setTimeout(closeToast, 5000);
|
|
875
877
|
}
|
|
876
878
|
});
|
|
877
|
-
console.log("formdaaatataaaa", formData);
|
|
878
879
|
};
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
}
|
|
885
|
-
}, /*#__PURE__*/React.createElement(
|
|
886
|
-
|
|
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, {
|
|
887
909
|
label: t("ES_COMMON_APPLICATION_SUBMIT"),
|
|
888
|
-
config:
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
};
|
|
893
|
-
}),
|
|
894
|
-
fieldStyle: {
|
|
895
|
-
marginRight: 0
|
|
896
|
-
},
|
|
910
|
+
config: addressStepConfig.filter(i => !i.hideInEmployee).map(config => ({
|
|
911
|
+
...config,
|
|
912
|
+
body: config.body.filter(a => !a.hideInEmployee)
|
|
913
|
+
})),
|
|
897
914
|
onSubmit: onSubmit,
|
|
898
915
|
defaultValues: defaultValues,
|
|
899
916
|
onFormValueChange: onFormValueChange,
|
|
900
917
|
noBreakLine: true
|
|
901
918
|
}), showToast && /*#__PURE__*/React.createElement(Toast, {
|
|
902
|
-
error: showToast.key === "error"
|
|
919
|
+
error: showToast.key === "error",
|
|
903
920
|
label: t(showToast.key === "success" ? `ES_FSM_REGISTRY_${showToast.action}_SUCCESS` : showToast.action),
|
|
904
921
|
onClose: closeToast
|
|
905
|
-
})));
|
|
906
|
-
};
|
|
907
|
-
|
|
908
|
-
let actions = [];
|
|
909
|
-
const getAction = flow => {
|
|
910
|
-
switch (flow) {
|
|
911
|
-
case "STAKEHOLDER":
|
|
912
|
-
actions = [];
|
|
913
|
-
break;
|
|
914
|
-
default:
|
|
915
|
-
actions = ["VENDOR_ADDITIONAL_DETAILS", "VENDOR_DOCUMENT_DETAILS", "VENDOR_SUMMARY"];
|
|
916
|
-
}
|
|
917
|
-
};
|
|
918
|
-
const Timeline = ({
|
|
919
|
-
currentStep: _currentStep = 1,
|
|
920
|
-
flow: _flow = ""
|
|
921
|
-
}) => {
|
|
922
|
-
const {
|
|
923
|
-
t
|
|
924
|
-
} = useTranslation();
|
|
925
|
-
const isMobile = window.Digit.Utils.browser.isMobile();
|
|
926
|
-
getAction(_flow);
|
|
927
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
928
|
-
className: "timeline-container",
|
|
929
|
-
style: isMobile ? {} : {
|
|
930
|
-
maxWidth: "960px",
|
|
931
|
-
minWidth: "640px",
|
|
932
|
-
marginRight: "auto"
|
|
933
|
-
}
|
|
934
|
-
}, actions.map((action, index, arr) => /*#__PURE__*/React.createElement("div", {
|
|
935
|
-
className: "timeline-checkpoint",
|
|
936
|
-
key: index
|
|
937
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
938
|
-
className: "timeline-content"
|
|
939
|
-
}, /*#__PURE__*/React.createElement("span", {
|
|
940
|
-
className: `circle ${index <= _currentStep - 1 && "active"}`
|
|
941
|
-
}, index < _currentStep - 1 ? /*#__PURE__*/React.createElement(TickMark, null) : index + 1), /*#__PURE__*/React.createElement("span", {
|
|
942
|
-
className: "secondary-color"
|
|
943
|
-
}, t(action))), index < arr.length - 1 && /*#__PURE__*/React.createElement("span", {
|
|
944
|
-
className: `line ${index < _currentStep - 1 && "active"}`
|
|
945
922
|
}))));
|
|
946
923
|
};
|
|
947
924
|
|
|
@@ -958,6 +935,7 @@ const VendorDetails = ({
|
|
|
958
935
|
} = useLocation();
|
|
959
936
|
let index = 0;
|
|
960
937
|
let validation = {};
|
|
938
|
+
const steps = ["VENDOR_ADDITIONAL_DETAILS", "VENDOR_DOCUMENT_DETAILS", "VENDOR_SUMMARY"];
|
|
961
939
|
const [VendorCompany, setVendorCompany] = useState("");
|
|
962
940
|
const [VendorPhone, setVendorPhone] = useState("");
|
|
963
941
|
const [VendorAddress, setVendorAddress] = useState("");
|
|
@@ -1115,15 +1093,29 @@ const VendorDetails = ({
|
|
|
1115
1093
|
goNext();
|
|
1116
1094
|
}
|
|
1117
1095
|
}, [VendorCompany, VendorPhone, VendorAddress, VendorCategory, VendorEmail, VendorId, Bank, BankbranchName, IFSC, AccountNo, PanNo, GstNo, GstState, RegistrationNo, EpfNo, EsiNo, VendorType, Status, micrNo, PhoneNo, ContactPerson, Company]);
|
|
1118
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(
|
|
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,
|
|
1119
1104
|
currentStep: 1
|
|
1120
|
-
}),
|
|
1105
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
1106
|
+
style: {
|
|
1107
|
+
flex: "1",
|
|
1108
|
+
overflowY: "auto"
|
|
1109
|
+
}
|
|
1110
|
+
}, /*#__PURE__*/React.createElement(FormStep, {
|
|
1121
1111
|
config: config,
|
|
1122
1112
|
onSelect: goNext,
|
|
1123
1113
|
t: t
|
|
1124
1114
|
}, /*#__PURE__*/React.createElement("div", {
|
|
1125
|
-
className: "
|
|
1126
|
-
}, /*#__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({
|
|
1127
1119
|
t: t,
|
|
1128
1120
|
type: "text",
|
|
1129
1121
|
isMandatory: false,
|
|
@@ -1141,7 +1133,9 @@ const VendorDetails = ({
|
|
|
1141
1133
|
pattern: "^[a-zA-Z0-9/-]{1,20}$",
|
|
1142
1134
|
type: "text",
|
|
1143
1135
|
title: t("INVALID_VENDOR_ID")
|
|
1144
|
-
})), /*#__PURE__*/React.createElement(
|
|
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({
|
|
1145
1139
|
t: t,
|
|
1146
1140
|
type: "text",
|
|
1147
1141
|
isMandatory: false,
|
|
@@ -1160,7 +1154,11 @@ const VendorDetails = ({
|
|
|
1160
1154
|
pattern: "^[A-Z]{4}0[A-Z0-9]{6}$",
|
|
1161
1155
|
type: "text",
|
|
1162
1156
|
title: t("INVALID_IFSC_CODE_ERROR_MESSAGE")
|
|
1163
|
-
}))
|
|
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", {
|
|
1164
1162
|
className: "check-page-link-button"
|
|
1165
1163
|
}, "*")), /*#__PURE__*/React.createElement(TextInput, {
|
|
1166
1164
|
t: t,
|
|
@@ -1175,7 +1173,9 @@ const VendorDetails = ({
|
|
|
1175
1173
|
value: Bank,
|
|
1176
1174
|
onChange: setvendorbank,
|
|
1177
1175
|
disabled: true
|
|
1178
|
-
})
|
|
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", {
|
|
1179
1179
|
className: "check-page-link-button"
|
|
1180
1180
|
}, "*")), /*#__PURE__*/React.createElement(TextInput, {
|
|
1181
1181
|
t: t,
|
|
@@ -1190,7 +1190,11 @@ const VendorDetails = ({
|
|
|
1190
1190
|
placeholder: "Bank Branch Name Auto Select",
|
|
1191
1191
|
onChange: setBankbranch,
|
|
1192
1192
|
disabled: false
|
|
1193
|
-
})
|
|
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", {
|
|
1194
1198
|
className: "check-page-link-button"
|
|
1195
1199
|
}, "*")), /*#__PURE__*/React.createElement(TextInput, {
|
|
1196
1200
|
t: t,
|
|
@@ -1205,7 +1209,9 @@ const VendorDetails = ({
|
|
|
1205
1209
|
placeholder: "MICR No",
|
|
1206
1210
|
onChange: setmicrNo,
|
|
1207
1211
|
disabled: false
|
|
1208
|
-
}), /*#__PURE__*/React.createElement(
|
|
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({
|
|
1209
1215
|
t: t,
|
|
1210
1216
|
type: "text",
|
|
1211
1217
|
isMandatory: false,
|
|
@@ -1222,7 +1228,11 @@ const VendorDetails = ({
|
|
|
1222
1228
|
pattern: "[0-9]{9,18}",
|
|
1223
1229
|
type: "text",
|
|
1224
1230
|
title: t("INVALID_ACCOUNT_NO_ERROR_MESSAGE")
|
|
1225
|
-
})), /*#__PURE__*/React.createElement(
|
|
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({
|
|
1226
1236
|
t: t,
|
|
1227
1237
|
type: "text",
|
|
1228
1238
|
isMandatory: false,
|
|
@@ -1238,8 +1248,11 @@ const VendorDetails = ({
|
|
|
1238
1248
|
isRequired: true,
|
|
1239
1249
|
pattern: "[0-9]{9,18}",
|
|
1240
1250
|
type: "text",
|
|
1241
|
-
title: t("INVALID_ACCOUNT_NO_ERROR_MESSAGE")
|
|
1242
|
-
|
|
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({
|
|
1243
1256
|
t: t,
|
|
1244
1257
|
type: "text",
|
|
1245
1258
|
isMandatory: false,
|
|
@@ -1256,7 +1269,11 @@ const VendorDetails = ({
|
|
|
1256
1269
|
pattern: "^[a-zA-Z0-9/-]{1,20}$",
|
|
1257
1270
|
type: "text",
|
|
1258
1271
|
title: t("INVALID_ACCOUNT_NO_ERROR_MESSAGE")
|
|
1259
|
-
})), /*#__PURE__*/React.createElement(
|
|
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({
|
|
1260
1277
|
t: t,
|
|
1261
1278
|
type: "text",
|
|
1262
1279
|
isMandatory: false,
|
|
@@ -1273,7 +1290,9 @@ const VendorDetails = ({
|
|
|
1273
1290
|
pattern: "^[a-zA-Z0-9/-]{1,20}$",
|
|
1274
1291
|
type: "text",
|
|
1275
1292
|
title: t("INVALID_ACCOUNT_NO_ERROR_MESSAGE")
|
|
1276
|
-
})), /*#__PURE__*/React.createElement(
|
|
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({
|
|
1277
1296
|
t: t,
|
|
1278
1297
|
type: "text",
|
|
1279
1298
|
isMandatory: false,
|
|
@@ -1290,7 +1309,11 @@ const VendorDetails = ({
|
|
|
1290
1309
|
pattern: "[A-Z]{5}[0-9]{4}[A-Z]{1}",
|
|
1291
1310
|
type: "text",
|
|
1292
1311
|
title: t("INVALID_PAN_NO_ERROR_MESSAGE")
|
|
1293
|
-
})), /*#__PURE__*/React.createElement(
|
|
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({
|
|
1294
1317
|
t: t,
|
|
1295
1318
|
type: "text",
|
|
1296
1319
|
isMandatory: false,
|
|
@@ -1307,7 +1330,9 @@ const VendorDetails = ({
|
|
|
1307
1330
|
pattern: "^[0-9]{2}[A-Z]{5}[0-9]{4}[A-Z]{1}[A-Z0-9]{1}[Z]{1}[A-Z0-9]{1}$",
|
|
1308
1331
|
type: "text",
|
|
1309
1332
|
title: t("INVALID_GST_NO_ERROR_MESSAGE")
|
|
1310
|
-
})), /*#__PURE__*/React.createElement(
|
|
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({
|
|
1311
1336
|
t: t,
|
|
1312
1337
|
type: "text",
|
|
1313
1338
|
isMandatory: false,
|
|
@@ -1324,7 +1349,11 @@ const VendorDetails = ({
|
|
|
1324
1349
|
pattern: "^[a-zA-Z0-9/-]{1,20}$",
|
|
1325
1350
|
type: "text",
|
|
1326
1351
|
title: t("PT_NAME_ERROR_MESSAGE")
|
|
1327
|
-
})), /*#__PURE__*/React.createElement(
|
|
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({
|
|
1328
1357
|
t: t,
|
|
1329
1358
|
type: "text",
|
|
1330
1359
|
isMandatory: false,
|
|
@@ -1341,7 +1370,9 @@ const VendorDetails = ({
|
|
|
1341
1370
|
pattern: "^[a-zA-Z0-9/-]{1,20}$",
|
|
1342
1371
|
type: "text",
|
|
1343
1372
|
title: t("INVALID_REGISTRATION_NO_ERROR_MESSAGE")
|
|
1344
|
-
})), /*#__PURE__*/React.createElement(
|
|
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({
|
|
1345
1376
|
t: t,
|
|
1346
1377
|
type: "text",
|
|
1347
1378
|
isMandatory: false,
|
|
@@ -1358,7 +1389,11 @@ const VendorDetails = ({
|
|
|
1358
1389
|
pattern: "^[a-zA-Z0-9/-]{1,15}$",
|
|
1359
1390
|
type: "text",
|
|
1360
1391
|
title: t("INVALID_EPF_NO_ERROR_MESSAGE")
|
|
1361
|
-
})), /*#__PURE__*/React.createElement(
|
|
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({
|
|
1362
1397
|
t: t,
|
|
1363
1398
|
type: "text",
|
|
1364
1399
|
isMandatory: false,
|
|
@@ -1375,7 +1410,9 @@ const VendorDetails = ({
|
|
|
1375
1410
|
pattern: "^[a-zA-Z0-9/-]{1,20}$",
|
|
1376
1411
|
type: "text",
|
|
1377
1412
|
title: t("INVALID_ESI_NO_ERROR_MESSAGE")
|
|
1378
|
-
}))
|
|
1413
|
+
}))), /*#__PURE__*/React.createElement("div", {
|
|
1414
|
+
className: "finance-mainlayout-col3"
|
|
1415
|
+
}, /*#__PURE__*/React.createElement("div", null, t("VENDOR_TYPE"), /*#__PURE__*/React.createElement("div", {
|
|
1379
1416
|
className: "tooltip",
|
|
1380
1417
|
style: {
|
|
1381
1418
|
width: "12px",
|
|
@@ -1402,7 +1439,6 @@ const VendorDetails = ({
|
|
|
1402
1439
|
required: t("CORE_COMMON_REQUIRED_ERRMSG")
|
|
1403
1440
|
},
|
|
1404
1441
|
render: props => /*#__PURE__*/React.createElement(Dropdown$2, {
|
|
1405
|
-
className: "form-field",
|
|
1406
1442
|
selected: VendorType,
|
|
1407
1443
|
select: setVendorType,
|
|
1408
1444
|
option: [{
|
|
@@ -1416,7 +1452,11 @@ const VendorDetails = ({
|
|
|
1416
1452
|
placeholder: "Select",
|
|
1417
1453
|
t: t
|
|
1418
1454
|
})
|
|
1419
|
-
})
|
|
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", {
|
|
1420
1460
|
className: "tooltip",
|
|
1421
1461
|
style: {
|
|
1422
1462
|
width: "12px",
|
|
@@ -1443,7 +1483,6 @@ const VendorDetails = ({
|
|
|
1443
1483
|
required: t("CORE_COMMON_REQUIRED_ERRMSG")
|
|
1444
1484
|
},
|
|
1445
1485
|
render: props => /*#__PURE__*/React.createElement(Dropdown$2, {
|
|
1446
|
-
className: "form-field",
|
|
1447
1486
|
selected: VendorCategory,
|
|
1448
1487
|
select: setVendorCategory,
|
|
1449
1488
|
option: [{
|
|
@@ -1457,7 +1496,9 @@ const VendorDetails = ({
|
|
|
1457
1496
|
placeholder: "Select",
|
|
1458
1497
|
t: t
|
|
1459
1498
|
})
|
|
1460
|
-
})
|
|
1499
|
+
})), /*#__PURE__*/React.createElement("div", {
|
|
1500
|
+
className: "finance-mainlayout-col3"
|
|
1501
|
+
}, /*#__PURE__*/React.createElement("div", null, t("STATUS"), /*#__PURE__*/React.createElement("div", {
|
|
1461
1502
|
className: "tooltip",
|
|
1462
1503
|
style: {
|
|
1463
1504
|
width: "12px",
|
|
@@ -1484,7 +1525,6 @@ const VendorDetails = ({
|
|
|
1484
1525
|
required: t("CORE_COMMON_REQUIRED_ERRMSG")
|
|
1485
1526
|
},
|
|
1486
1527
|
render: props => /*#__PURE__*/React.createElement(Dropdown$2, {
|
|
1487
|
-
className: "form-field",
|
|
1488
1528
|
selected: Status,
|
|
1489
1529
|
select: setStatus,
|
|
1490
1530
|
option: [{
|
|
@@ -1498,7 +1538,7 @@ const VendorDetails = ({
|
|
|
1498
1538
|
placeholder: "Select",
|
|
1499
1539
|
t: t
|
|
1500
1540
|
})
|
|
1501
|
-
})))));
|
|
1541
|
+
})))))));
|
|
1502
1542
|
};
|
|
1503
1543
|
|
|
1504
1544
|
const VendorDocuments = ({
|
|
@@ -1512,6 +1552,7 @@ const VendorDocuments = ({
|
|
|
1512
1552
|
const [uploadedFiles, setUploadedFiles] = useState([null]);
|
|
1513
1553
|
const [error, setError] = useState(null);
|
|
1514
1554
|
const [ind, setInd] = useState(1);
|
|
1555
|
+
const steps = ["VENDOR_ADDITIONAL_DETAILS", "VENDOR_DOCUMENT_DETAILS", "VENDOR_SUMMARY"];
|
|
1515
1556
|
const tenantId = Digit.ULBService.getStateId();
|
|
1516
1557
|
const stateId = Digit.ULBService.getStateId();
|
|
1517
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) || []);
|
|
@@ -1568,19 +1609,28 @@ const VendorDocuments = ({
|
|
|
1568
1609
|
});
|
|
1569
1610
|
handleFileUpload(file, index);
|
|
1570
1611
|
};
|
|
1571
|
-
return /*#__PURE__*/React.createElement("div",
|
|
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,
|
|
1572
1620
|
currentStep: 2
|
|
1573
|
-
}), /*#__PURE__*/React.createElement(
|
|
1621
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
1622
|
+
style: {
|
|
1623
|
+
flex: "1",
|
|
1624
|
+
overflowY: "auto"
|
|
1625
|
+
}
|
|
1626
|
+
}, /*#__PURE__*/React.createElement(FormStep, {
|
|
1574
1627
|
t: t,
|
|
1575
1628
|
config: config,
|
|
1576
1629
|
onSelect: handleSubmit,
|
|
1577
1630
|
onSkip: onSkip,
|
|
1578
1631
|
isDisabled: uploadedFiles.some(file => file === null) && files.some(file => file === null)
|
|
1579
1632
|
}, files.map((file, index) => /*#__PURE__*/React.createElement(LabelFieldPair, {
|
|
1580
|
-
key: index
|
|
1581
|
-
style: {
|
|
1582
|
-
marginBottom: "24px"
|
|
1583
|
-
}
|
|
1633
|
+
key: index
|
|
1584
1634
|
}, /*#__PURE__*/React.createElement(CardLabel, {
|
|
1585
1635
|
className: "card-label-smaller"
|
|
1586
1636
|
}, t("VENDOR_ID") + (index !== 0 ? index : "")), /*#__PURE__*/React.createElement("div", {
|
|
@@ -1611,48 +1661,48 @@ const VendorDocuments = ({
|
|
|
1611
1661
|
label: error,
|
|
1612
1662
|
onClose: () => setError(null),
|
|
1613
1663
|
error: true
|
|
1614
|
-
})));
|
|
1664
|
+
}))));
|
|
1615
1665
|
};
|
|
1616
1666
|
|
|
1617
1667
|
const ServiceDoc = ({
|
|
1618
1668
|
t,
|
|
1619
1669
|
config,
|
|
1620
|
-
onSelect
|
|
1621
|
-
userType,
|
|
1622
|
-
formData
|
|
1670
|
+
onSelect
|
|
1623
1671
|
}) => {
|
|
1624
1672
|
var _Documentsob$ASSET;
|
|
1625
1673
|
const tenantId = Digit.ULBService.getCurrentTenantId();
|
|
1626
1674
|
const stateId = Digit.ULBService.getStateId();
|
|
1627
|
-
sessionStorage.removeItem("docReqScreenByBack");
|
|
1628
1675
|
const docType = config !== null && config !== void 0 && config.isMutation ? ["MutationDocuments"] : "Documents";
|
|
1629
1676
|
const {
|
|
1630
1677
|
isLoading,
|
|
1631
1678
|
data: Documentsob = {}
|
|
1632
1679
|
} = Digit.Hooks.asset.useAssetDocumentsMDMS(stateId, "ASSET", docType);
|
|
1633
1680
|
let docs = Documentsob === null || Documentsob === void 0 ? void 0 : (_Documentsob$ASSET = Documentsob.ASSET) === null || _Documentsob$ASSET === void 0 ? void 0 : _Documentsob$ASSET.Documents;
|
|
1634
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Card, null, /*#__PURE__*/React.createElement(
|
|
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, {
|
|
1635
1682
|
style: {
|
|
1636
|
-
color: "red"
|
|
1683
|
+
color: "red",
|
|
1684
|
+
marginBottom: "20px"
|
|
1637
1685
|
}
|
|
1638
|
-
}, t("AST_DOCUMENT_ACCEPTED_PDF_JPG_PNG")),
|
|
1639
|
-
code,
|
|
1640
|
-
dropdownData
|
|
1641
|
-
}, index) => /*#__PURE__*/React.createElement("div", {
|
|
1642
|
-
key: index
|
|
1643
|
-
}, /*#__PURE__*/React.createElement(CardSubHeader, null, index + 1, ". ", t(code)), /*#__PURE__*/React.createElement(CardText, {
|
|
1644
|
-
className: "primaryColor"
|
|
1645
|
-
}, dropdownData.map(dropdownData => t(dropdownData === null || dropdownData === void 0 ? void 0 : dropdownData.code)).join(", ")))) : docs.map(({
|
|
1686
|
+
}, t("AST_DOCUMENT_ACCEPTED_PDF_JPG_PNG"))), isLoading && /*#__PURE__*/React.createElement(Loader, null), Array.isArray(docs) && docs.map(({
|
|
1646
1687
|
code,
|
|
1647
1688
|
dropdownData
|
|
1648
|
-
}, index) => /*#__PURE__*/React.createElement(
|
|
1689
|
+
}, index) => /*#__PURE__*/React.createElement(Card, {
|
|
1649
1690
|
key: index
|
|
1650
|
-
}, /*#__PURE__*/React.createElement(
|
|
1651
|
-
|
|
1652
|
-
|
|
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, {
|
|
1653
1703
|
label: t("COMMON_NEXT"),
|
|
1654
1704
|
onSubmit: onSelect
|
|
1655
|
-
}))
|
|
1705
|
+
}));
|
|
1656
1706
|
};
|
|
1657
1707
|
|
|
1658
1708
|
const VendorSelectAddress = ({
|
|
@@ -8474,6 +8524,18 @@ const VendorInbox = props => {
|
|
|
8474
8524
|
name: `switch-${row.id}`
|
|
8475
8525
|
});
|
|
8476
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
|
+
}
|
|
8477
8539
|
}];
|
|
8478
8540
|
case "VEHICLE":
|
|
8479
8541
|
return [{
|
|
@@ -8926,7 +8988,7 @@ const SearchVendor = () => {
|
|
|
8926
8988
|
refetch();
|
|
8927
8989
|
refetchVendor();
|
|
8928
8990
|
}, []);
|
|
8929
|
-
return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(
|
|
8991
|
+
return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(VendorInbox, {
|
|
8930
8992
|
data: {
|
|
8931
8993
|
table: tableData
|
|
8932
8994
|
},
|
|
@@ -9118,10 +9180,15 @@ const AddDriver = ({
|
|
|
9118
9180
|
heading
|
|
9119
9181
|
}) => {
|
|
9120
9182
|
const tenantId = Digit.ULBService.getCurrentTenantId();
|
|
9183
|
+
const {
|
|
9184
|
+
t
|
|
9185
|
+
} = useTranslation();
|
|
9121
9186
|
const stateId = Digit.ULBService.getStateId();
|
|
9122
9187
|
const [showToast, setShowToast] = useState(null);
|
|
9123
9188
|
const history = useHistory();
|
|
9189
|
+
const [currentStep, setCurrentStep] = useState(1);
|
|
9124
9190
|
const queryClient = useQueryClient();
|
|
9191
|
+
const steps = [t("ES_FSM_REGISTRY_TITLE_NEW_DRIVER")];
|
|
9125
9192
|
const [mutationHappened, setMutationHappened, clear] = Digit.Hooks.useSessionStorage("FSM_MUTATION_HAPPENED", false);
|
|
9126
9193
|
const [errorInfo, setErrorInfo, clearError] = Digit.Hooks.useSessionStorage("FSM_ERROR_DATA", false);
|
|
9127
9194
|
const [successData, setsuccessData, clearSuccessData] = Digit.Hooks.useSessionStorage("FSM_MUTATION_SUCCESS_DATA", false);
|
|
@@ -9137,9 +9204,6 @@ const AddDriver = ({
|
|
|
9137
9204
|
clearSuccessData();
|
|
9138
9205
|
clearError();
|
|
9139
9206
|
}, []);
|
|
9140
|
-
const {
|
|
9141
|
-
t
|
|
9142
|
-
} = useTranslation();
|
|
9143
9207
|
const Config = DriverConfig(t);
|
|
9144
9208
|
const [canSubmit, setSubmitValve] = useState(false);
|
|
9145
9209
|
const defaultValues = {
|
|
@@ -9207,11 +9271,20 @@ const AddDriver = ({
|
|
|
9207
9271
|
});
|
|
9208
9272
|
};
|
|
9209
9273
|
const isMobile = window.Digit.Utils.browser.isMobile();
|
|
9210
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div",
|
|
9211
|
-
|
|
9212
|
-
|
|
9213
|
-
|
|
9214
|
-
|
|
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
|
+
}
|
|
9215
9288
|
}, /*#__PURE__*/React.createElement(FormComposer, {
|
|
9216
9289
|
isDisabled: !canSubmit,
|
|
9217
9290
|
label: t("ES_COMMON_APPLICATION_SUBMIT"),
|
|
@@ -9232,7 +9305,7 @@ const AddDriver = ({
|
|
|
9232
9305
|
error: showToast.key === "error" ? true : false,
|
|
9233
9306
|
label: t(showToast.key === "success" ? `ES_FSM_${showToast.action}_SUCCESS` : showToast.action),
|
|
9234
9307
|
onClose: closeToast
|
|
9235
|
-
})));
|
|
9308
|
+
}))));
|
|
9236
9309
|
};
|
|
9237
9310
|
|
|
9238
9311
|
const ConfirmationBox = ({
|
|
@@ -9265,6 +9338,10 @@ const CloseBtn = props => {
|
|
|
9265
9338
|
onClick: props.onClick
|
|
9266
9339
|
}, /*#__PURE__*/React.createElement(Close, null));
|
|
9267
9340
|
};
|
|
9341
|
+
const formatLabel = key => {
|
|
9342
|
+
const result = key.replace(/([A-Z])/g, " $1");
|
|
9343
|
+
return result.charAt(0).toUpperCase() + result.slice(1);
|
|
9344
|
+
};
|
|
9268
9345
|
const EditVendorDetails = props => {
|
|
9269
9346
|
var _dsoData$4, _dsoData$4$employeeRe;
|
|
9270
9347
|
const tenantId = Digit.ULBService.getCurrentTenantId();
|
|
@@ -9279,7 +9356,6 @@ const EditVendorDetails = props => {
|
|
|
9279
9356
|
} = useParams();
|
|
9280
9357
|
const [displayMenu, setDisplayMenu] = useState(false);
|
|
9281
9358
|
const [selectedAction, setSelectedAction] = useState(null);
|
|
9282
|
-
const [config, setCurrentConfig] = useState({});
|
|
9283
9359
|
const [showModal, setShowModal] = useState(false);
|
|
9284
9360
|
const [showToast, setShowToast] = useState(null);
|
|
9285
9361
|
const [vehicles, setVehicles] = useState([]);
|
|
@@ -9288,21 +9364,14 @@ const EditVendorDetails = props => {
|
|
|
9288
9364
|
const {
|
|
9289
9365
|
data: dsoData,
|
|
9290
9366
|
isLoading: isLoading,
|
|
9291
|
-
isSuccess: isDsoSuccess,
|
|
9292
|
-
error: dsoError,
|
|
9293
9367
|
refetch: refetchDso
|
|
9294
9368
|
} = Digit.Hooks.fsm.useDsoSearch(tenantId, {
|
|
9295
9369
|
ids: dsoId
|
|
9296
9370
|
}, {
|
|
9297
9371
|
staleTime: Infinity
|
|
9298
9372
|
});
|
|
9299
|
-
console.log("id in dso :: ", dsoId);
|
|
9300
|
-
console.log("dsoData", dsoData);
|
|
9301
9373
|
const {
|
|
9302
9374
|
data: vehicleData,
|
|
9303
|
-
isLoading: isVehicleDataLoading,
|
|
9304
|
-
isSuccess: isVehicleSuccess,
|
|
9305
|
-
error: vehicleError,
|
|
9306
9375
|
refetch: refetchVehicle
|
|
9307
9376
|
} = Digit.Hooks.fsm.useVehiclesSearch({
|
|
9308
9377
|
tenantId,
|
|
@@ -9315,9 +9384,6 @@ const EditVendorDetails = props => {
|
|
|
9315
9384
|
});
|
|
9316
9385
|
const {
|
|
9317
9386
|
data: driverData,
|
|
9318
|
-
isLoading: isDriverDataLoading,
|
|
9319
|
-
isSuccess: isDriverSuccess,
|
|
9320
|
-
error: driverError,
|
|
9321
9387
|
refetch: refetchDriver
|
|
9322
9388
|
} = Digit.Hooks.fsm.useDriverSearch({
|
|
9323
9389
|
tenantId,
|
|
@@ -9329,10 +9395,17 @@ const EditVendorDetails = props => {
|
|
|
9329
9395
|
}
|
|
9330
9396
|
});
|
|
9331
9397
|
const {
|
|
9332
|
-
|
|
9333
|
-
|
|
9334
|
-
|
|
9335
|
-
|
|
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 {
|
|
9336
9409
|
mutate
|
|
9337
9410
|
} = Digit.Hooks.fsm.useVendorUpdate(tenantId);
|
|
9338
9411
|
function onActionSelect(action) {
|
|
@@ -9523,6 +9596,7 @@ const EditVendorDetails = props => {
|
|
|
9523
9596
|
if (isLoading) {
|
|
9524
9597
|
return /*#__PURE__*/React.createElement(Loader, null);
|
|
9525
9598
|
}
|
|
9599
|
+
const excludedKeys = ["vendorAdditionalDetailsId", "vendorId", "tenantId", "code", "lastModifiedTime", "createdTime", "lastModifiedBy", "createdBy", "active", "status", "vendorType", "vendorGroup", "narration", "documents"];
|
|
9526
9600
|
return /*#__PURE__*/React.createElement(React.Fragment, null, !isLoading ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Header, {
|
|
9527
9601
|
style: {
|
|
9528
9602
|
marginBottom: "16px"
|
|
@@ -9549,19 +9623,76 @@ const EditVendorDetails = props => {
|
|
|
9549
9623
|
marginLeft: "-15px"
|
|
9550
9624
|
} : {}
|
|
9551
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) => {
|
|
9552
|
-
var _detail$
|
|
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
|
+
}
|
|
9553
9683
|
return /*#__PURE__*/React.createElement(Row, {
|
|
9554
|
-
key: t(value.title),
|
|
9555
|
-
label: t(value.title),
|
|
9556
|
-
text: t(value.value)
|
|
9557
|
-
last: index === (detail === null || detail === void 0 ? void 0 : (_detail$
|
|
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,
|
|
9558
9688
|
caption: value.caption,
|
|
9559
9689
|
className: `border-none ${!isMobile ? "vendor-details-row" : ""}`
|
|
9560
9690
|
});
|
|
9561
9691
|
}), detail === null || detail === void 0 ? void 0 : (_detail$child = detail.child) === null || _detail$child === void 0 ? void 0 : _detail$child.map((data, index) => {
|
|
9562
9692
|
var _data$values;
|
|
9563
9693
|
return /*#__PURE__*/React.createElement(Card, {
|
|
9564
|
-
className: "card-with-background"
|
|
9694
|
+
className: "card-with-background",
|
|
9695
|
+
key: data.id || index
|
|
9565
9696
|
}, /*#__PURE__*/React.createElement("div", {
|
|
9566
9697
|
className: "card-head"
|
|
9567
9698
|
}, /*#__PURE__*/React.createElement("h2", null, t(detail.type), " ", index + 1), /*#__PURE__*/React.createElement("div", {
|
|
@@ -9586,12 +9717,12 @@ const EditVendorDetails = props => {
|
|
|
9586
9717
|
className: "delete",
|
|
9587
9718
|
fill: "#a82227"
|
|
9588
9719
|
})))), data === null || data === void 0 ? void 0 : (_data$values = data.values) === null || _data$values === void 0 ? void 0 : _data$values.map((value, index) => {
|
|
9589
|
-
var _detail$
|
|
9720
|
+
var _detail$values4;
|
|
9590
9721
|
return /*#__PURE__*/React.createElement(Row, {
|
|
9591
|
-
key: t(value.title),
|
|
9592
|
-
label: t(value.title),
|
|
9593
|
-
text: t(value.value)
|
|
9594
|
-
last: index === (detail === null || detail === void 0 ? void 0 : (_detail$
|
|
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,
|
|
9595
9726
|
caption: value.caption,
|
|
9596
9727
|
className: "border-none",
|
|
9597
9728
|
textStyle: value.value === "ACTIVE" ? {
|
|
@@ -9834,7 +9965,12 @@ const AddVehicle = ({
|
|
|
9834
9965
|
const stateId = Digit.ULBService.getStateId();
|
|
9835
9966
|
const [showToast, setShowToast] = useState(null);
|
|
9836
9967
|
const history = useHistory();
|
|
9968
|
+
const {
|
|
9969
|
+
t
|
|
9970
|
+
} = useTranslation();
|
|
9837
9971
|
const queryClient = useQueryClient();
|
|
9972
|
+
const [currentStep, setCurrentStep] = useState(1);
|
|
9973
|
+
const steps = [t("ES_FSM_REGISTRY_TITLE_NEW_VEHICLE")];
|
|
9838
9974
|
const [mutationHappened, setMutationHappened, clear] = Digit.Hooks.useSessionStorage("FSM_MUTATION_HAPPENED", false);
|
|
9839
9975
|
const [errorInfo, setErrorInfo, clearError] = Digit.Hooks.useSessionStorage("FSM_ERROR_DATA", false);
|
|
9840
9976
|
const [successData, setsuccessData, clearSuccessData] = Digit.Hooks.useSessionStorage("FSM_MUTATION_SUCCESS_DATA", false);
|
|
@@ -9850,9 +9986,6 @@ const AddVehicle = ({
|
|
|
9850
9986
|
clearSuccessData();
|
|
9851
9987
|
clearError();
|
|
9852
9988
|
}, []);
|
|
9853
|
-
const {
|
|
9854
|
-
t
|
|
9855
|
-
} = useTranslation();
|
|
9856
9989
|
const Config = VehicleConfig(t);
|
|
9857
9990
|
Config[0].body.forEach(item => {
|
|
9858
9991
|
if (item.label === "ES_FSM_REGISTRY_VEHICLE_NUMBER") {
|
|
@@ -9959,11 +10092,20 @@ const AddVehicle = ({
|
|
|
9959
10092
|
});
|
|
9960
10093
|
};
|
|
9961
10094
|
const isMobile = window.Digit.Utils.browser.isMobile();
|
|
9962
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div",
|
|
9963
|
-
|
|
9964
|
-
|
|
9965
|
-
|
|
9966
|
-
|
|
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
|
+
}
|
|
9967
10109
|
}, /*#__PURE__*/React.createElement(FormComposer, {
|
|
9968
10110
|
isDisabled: !canSubmit,
|
|
9969
10111
|
label: t("ES_COMMON_APPLICATION_SUBMIT"),
|
|
@@ -9984,7 +10126,7 @@ const AddVehicle = ({
|
|
|
9984
10126
|
error: showToast.key === "error" ? true : false,
|
|
9985
10127
|
label: t(showToast.key === "success" ? `ES_FSM_REGISTRY_${showToast.action}_SUCCESS` : showToast.action),
|
|
9986
10128
|
onClose: closeToast
|
|
9987
|
-
})));
|
|
10129
|
+
}))));
|
|
9988
10130
|
};
|
|
9989
10131
|
|
|
9990
10132
|
const createConfig = [{
|
|
@@ -10063,7 +10205,7 @@ const VENDORCreate = ({
|
|
|
10063
10205
|
}
|
|
10064
10206
|
let {
|
|
10065
10207
|
nextStep = {}
|
|
10066
|
-
} = config.find(routeObj => routeObj.route === (currentPath ||
|
|
10208
|
+
} = config.find(routeObj => routeObj.route === (currentPath || "0"));
|
|
10067
10209
|
let redirectWithHistory = history.push;
|
|
10068
10210
|
if (skipStep) {
|
|
10069
10211
|
redirectWithHistory = history.replace;
|
|
@@ -10130,9 +10272,22 @@ const VENDORCreate = ({
|
|
|
10130
10272
|
config = config.concat(obj.body.filter(a => !a.hideInCitizen));
|
|
10131
10273
|
});
|
|
10132
10274
|
config.indexRoute = "info";
|
|
10275
|
+
console.log(commonFields, "commanFields");
|
|
10276
|
+
console.log(config, "config");
|
|
10133
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");
|
|
10134
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");
|
|
10135
|
-
return /*#__PURE__*/React.createElement(
|
|
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) => {
|
|
10136
10291
|
const {
|
|
10137
10292
|
component,
|
|
10138
10293
|
texts,
|
|
@@ -10167,7 +10322,7 @@ const VENDORCreate = ({
|
|
|
10167
10322
|
onSuccess: onSuccess
|
|
10168
10323
|
})), /*#__PURE__*/React.createElement(Route, null, /*#__PURE__*/React.createElement(Redirect, {
|
|
10169
10324
|
to: `${match.path}/${config.indexRoute}`
|
|
10170
|
-
})));
|
|
10325
|
+
}))))));
|
|
10171
10326
|
};
|
|
10172
10327
|
|
|
10173
10328
|
const ActionButton = ({
|
|
@@ -10196,6 +10351,7 @@ const CheckPage = ({
|
|
|
10196
10351
|
} = useTranslation();
|
|
10197
10352
|
const history = useHistory();
|
|
10198
10353
|
const [categoriesWiseData, setCategoriesWiseData] = useState();
|
|
10354
|
+
const steps = ["VENDOR_ADDITIONAL_DETAILS", "VENDOR_DOCUMENT_DETAILS", "VENDOR_SUMMARY"];
|
|
10199
10355
|
const tenantId = Digit.ULBService.getCurrentTenantId();
|
|
10200
10356
|
const stateTenantId = Digit.ULBService.getStateId();
|
|
10201
10357
|
const {
|
|
@@ -10208,9 +10364,21 @@ const CheckPage = ({
|
|
|
10208
10364
|
const setdeclarationhandler = () => {
|
|
10209
10365
|
setAgree(!agree);
|
|
10210
10366
|
};
|
|
10211
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null,
|
|
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,
|
|
10212
10375
|
currentStep: 5
|
|
10213
|
-
}) : null, /*#__PURE__*/React.createElement(
|
|
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, {
|
|
10214
10382
|
label: t("VENDOR_ID"),
|
|
10215
10383
|
text: `${t(checkForNA(vendordet === null || vendordet === void 0 ? void 0 : vendordet.VendorId))}`,
|
|
10216
10384
|
actionButton: /*#__PURE__*/React.createElement(ActionButton, {
|
|
@@ -10314,12 +10482,13 @@ const CheckPage = ({
|
|
|
10314
10482
|
onChange: setdeclarationhandler,
|
|
10315
10483
|
styles: {
|
|
10316
10484
|
height: "auto"
|
|
10317
|
-
}
|
|
10485
|
+
},
|
|
10486
|
+
checked: agree
|
|
10318
10487
|
})), /*#__PURE__*/React.createElement("br", null), /*#__PURE__*/React.createElement(SubmitBar, {
|
|
10319
10488
|
label: t("COMMON_BUTTON_SUBMIT"),
|
|
10320
10489
|
onSubmit: onSubmit,
|
|
10321
10490
|
disabled: !agree
|
|
10322
|
-
})));
|
|
10491
|
+
})))));
|
|
10323
10492
|
};
|
|
10324
10493
|
|
|
10325
10494
|
const GetActionMessage = props => {
|