@djb25/digit-ui-module-vendor 1.0.7 → 1.0.9
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 +299 -261
- package/dist/index.modern.js.map +1 -1
- package/package.json +1 -1
package/dist/index.modern.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
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, Stepper, FormComposer, TickMark, FormStep, CardLabel, TextInput, LabelFieldPair, UploadFile, CardSubHeader, CardText, RadioOrSelect, ShippingTruck, CheckBox, RadioButtons, CloseSvg, Localities, RemoveableTag, ActionBar, ApplyFilterBar, AddIcon, Menu, Label, LinkLabel, ToggleSwitch, CardSectionHeader, StatusTable, Row, EditIcon, DeleteIcon, Modal, InfoIcon, CardHeader, LinkButton, Banner } from '@djb25/digit-ui-react-components';
|
|
2
|
-
import React, { useEffect, useMemo, useCallback, useState,
|
|
2
|
+
import React, { useEffect, useMemo, useCallback, useState, Fragment } from 'react';
|
|
3
3
|
import { useTranslation } from 'react-i18next';
|
|
4
4
|
import { useParams, useLocation, Switch, Link, useHistory, useRouteMatch, Route, Redirect } from 'react-router-dom';
|
|
5
5
|
import { useForm, Controller } from 'react-hook-form';
|
|
@@ -446,7 +446,7 @@ const VENDORCard = () => {
|
|
|
446
446
|
label: t("SEARCH_VENDOR"),
|
|
447
447
|
link: `/digit-ui/employee/vendor/search-vendor`
|
|
448
448
|
}];
|
|
449
|
-
const VENDORRole = Digit.UserService.hasAccess(["
|
|
449
|
+
const VENDORRole = Digit.UserService.hasAccess(["WT_VENDOR"]);
|
|
450
450
|
const propsForModuleCard = {
|
|
451
451
|
Icon: /*#__PURE__*/React.createElement(PropertyHouse, null),
|
|
452
452
|
moduleName: t("TITLE_VENDOR_MANAGEMENT"),
|
|
@@ -480,37 +480,37 @@ const convertEpochToDate = (dateEpoch, businessService) => {
|
|
|
480
480
|
}
|
|
481
481
|
};
|
|
482
482
|
const VendorData = data => {
|
|
483
|
-
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$
|
|
483
|
+
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$vendordet13, _data$vendordet13$Sta, _data$vendordet14, _data$vendordet14$Ven, _data$vendordet15, _data$vendordet16, _data$vendordet17, _data$vendordet17$Ven, _data$documents, _data$vendordet18, _data$vendordet19;
|
|
484
484
|
const formdata = {
|
|
485
485
|
VendorAdditionalDetails: {
|
|
486
486
|
tenantId: Digit.ULBService.getCurrentTenantId(),
|
|
487
487
|
code: "VENDOR12345454",
|
|
488
|
-
name: "
|
|
489
|
-
vendorCompany: data === null || data === void 0 ? void 0 : (_data$
|
|
490
|
-
vendorPhone: data === null || data === void 0 ? void 0 : (_data$
|
|
488
|
+
name: (data === null || data === void 0 ? void 0 : (_data$vendordet = data.vendordet) === null || _data$vendordet === void 0 ? void 0 : _data$vendordet.userName) || "N/A",
|
|
489
|
+
vendorCompany: data === null || data === void 0 ? void 0 : (_data$vendordet2 = data.vendordet) === null || _data$vendordet2 === void 0 ? void 0 : _data$vendordet2.Company,
|
|
490
|
+
vendorPhone: data === null || data === void 0 ? void 0 : (_data$vendordet3 = data.vendordet) === null || _data$vendordet3 === void 0 ? void 0 : _data$vendordet3.PhoneNo,
|
|
491
491
|
vendorEmail: "vendor@example.com",
|
|
492
|
-
contactPerson: data === null || data === void 0 ? void 0 : (_data$
|
|
492
|
+
contactPerson: data === null || data === void 0 ? void 0 : (_data$vendordet4 = data.vendordet) === null || _data$vendordet4 === void 0 ? void 0 : _data$vendordet4.ContactPerson,
|
|
493
493
|
vendorMobileNumber: "9876543210",
|
|
494
|
-
bankAccountNumber: data === null || data === void 0 ? void 0 : (_data$
|
|
495
|
-
bank: data === null || data === void 0 ? void 0 : (_data$
|
|
496
|
-
bankBranchName: data === null || data === void 0 ? void 0 : (_data$
|
|
497
|
-
micrNo: data === null || data === void 0 ? void 0 : (_data$
|
|
498
|
-
epfNo: data === null || data === void 0 ? void 0 : (_data$
|
|
499
|
-
esiNo: data === null || data === void 0 ? void 0 : (_data$
|
|
500
|
-
gstRegisteredState: data === null || data === void 0 ? void 0 : (_data$
|
|
501
|
-
ifscCode: data === null || data === void 0 ? void 0 : (_data$
|
|
502
|
-
panNo: data === null || data === void 0 ? void 0 : (_data$
|
|
503
|
-
registrationNo: data === null || data === void 0 ? void 0 : (_data$
|
|
504
|
-
status: data === null || data === void 0 ? void 0 : (_data$
|
|
505
|
-
vendorCategory: data === null || data === void 0 ? void 0 : (_data$
|
|
506
|
-
vendorId: data === null || data === void 0 ? void 0 : (_data$
|
|
507
|
-
gstTinNo: data === null || data === void 0 ? void 0 : (_data$
|
|
508
|
-
serviceType: data === null || data === void 0 ? void 0 : (_data$
|
|
494
|
+
bankAccountNumber: data === null || data === void 0 ? void 0 : (_data$vendordet5 = data.vendordet) === null || _data$vendordet5 === void 0 ? void 0 : _data$vendordet5.AccountNo,
|
|
495
|
+
bank: data === null || data === void 0 ? void 0 : (_data$vendordet6 = data.vendordet) === null || _data$vendordet6 === void 0 ? void 0 : _data$vendordet6.Bank,
|
|
496
|
+
bankBranchName: data === null || data === void 0 ? void 0 : (_data$vendordet7 = data.vendordet) === null || _data$vendordet7 === void 0 ? void 0 : _data$vendordet7.BankbranchName,
|
|
497
|
+
micrNo: data === null || data === void 0 ? void 0 : (_data$vendordet8 = data.vendordet) === null || _data$vendordet8 === void 0 ? void 0 : _data$vendordet8.micrNo,
|
|
498
|
+
epfNo: data === null || data === void 0 ? void 0 : (_data$vendordet9 = data.vendordet) === null || _data$vendordet9 === void 0 ? void 0 : _data$vendordet9.EpfNo,
|
|
499
|
+
esiNo: data === null || data === void 0 ? void 0 : (_data$vendordet0 = data.vendordet) === null || _data$vendordet0 === void 0 ? void 0 : _data$vendordet0.EsiNo,
|
|
500
|
+
gstRegisteredState: data === null || data === void 0 ? void 0 : (_data$vendordet1 = data.vendordet) === null || _data$vendordet1 === void 0 ? void 0 : _data$vendordet1.GstState,
|
|
501
|
+
ifscCode: data === null || data === void 0 ? void 0 : (_data$vendordet10 = data.vendordet) === null || _data$vendordet10 === void 0 ? void 0 : _data$vendordet10.IFSC,
|
|
502
|
+
panNo: data === null || data === void 0 ? void 0 : (_data$vendordet11 = data.vendordet) === null || _data$vendordet11 === void 0 ? void 0 : _data$vendordet11.PanNo,
|
|
503
|
+
registrationNo: data === null || data === void 0 ? void 0 : (_data$vendordet12 = data.vendordet) === null || _data$vendordet12 === void 0 ? void 0 : _data$vendordet12.RegistrationNo,
|
|
504
|
+
status: data === null || data === void 0 ? void 0 : (_data$vendordet13 = data.vendordet) === null || _data$vendordet13 === void 0 ? void 0 : (_data$vendordet13$Sta = _data$vendordet13.Status) === null || _data$vendordet13$Sta === void 0 ? void 0 : _data$vendordet13$Sta.code,
|
|
505
|
+
vendorCategory: data === null || data === void 0 ? void 0 : (_data$vendordet14 = data.vendordet) === null || _data$vendordet14 === void 0 ? void 0 : (_data$vendordet14$Ven = _data$vendordet14.VendorCategory) === null || _data$vendordet14$Ven === void 0 ? void 0 : _data$vendordet14$Ven.code,
|
|
506
|
+
vendorId: data === null || data === void 0 ? void 0 : (_data$vendordet15 = data.vendordet) === null || _data$vendordet15 === void 0 ? void 0 : _data$vendordet15.VendorId,
|
|
507
|
+
gstTinNo: data === null || data === void 0 ? void 0 : (_data$vendordet16 = data.vendordet) === null || _data$vendordet16 === void 0 ? void 0 : _data$vendordet16.GstNo,
|
|
508
|
+
serviceType: data === null || data === void 0 ? void 0 : (_data$vendordet17 = data.vendordet) === null || _data$vendordet17 === void 0 ? void 0 : (_data$vendordet17$Ven = _data$vendordet17.VendorType) === null || _data$vendordet17$Ven === void 0 ? void 0 : _data$vendordet17$Ven.code,
|
|
509
509
|
documents: data === null || data === void 0 ? void 0 : (_data$documents = data.documents) === null || _data$documents === void 0 ? void 0 : _data$documents.documents,
|
|
510
510
|
active: null,
|
|
511
511
|
vendorAdditionalDetailsId: null,
|
|
512
|
-
vendorGroup: (data === null || data === void 0 ? void 0 : (_data$
|
|
513
|
-
vendorType: (data === null || data === void 0 ? void 0 : (_data$
|
|
512
|
+
vendorGroup: (data === null || data === void 0 ? void 0 : (_data$vendordet18 = data.vendordet) === null || _data$vendordet18 === void 0 ? void 0 : _data$vendordet18.vendorGroup) || "N/A",
|
|
513
|
+
vendorType: (data === null || data === void 0 ? void 0 : (_data$vendordet19 = data.vendordet) === null || _data$vendordet19 === void 0 ? void 0 : _data$vendordet19.vendorType) || "N/A"
|
|
514
514
|
}
|
|
515
515
|
};
|
|
516
516
|
return formdata;
|
|
@@ -613,6 +613,22 @@ const VendorConfig = (t, disabled = false) => {
|
|
|
613
613
|
defaultValue: "",
|
|
614
614
|
className: "payment-form-text-input-correction"
|
|
615
615
|
}
|
|
616
|
+
}, {
|
|
617
|
+
label: "ES_VENDOR_REGISTRY_SERVICE_TYPE",
|
|
618
|
+
isMandatory: true,
|
|
619
|
+
type: "component",
|
|
620
|
+
route: "select-gender",
|
|
621
|
+
hideInEmployee: false,
|
|
622
|
+
key: "serviceType",
|
|
623
|
+
component: "SelectServiceType",
|
|
624
|
+
disable: disabled,
|
|
625
|
+
texts: {
|
|
626
|
+
headerCaption: "",
|
|
627
|
+
header: "CS_COMMON_CHOOSE_GENDER",
|
|
628
|
+
cardText: "CS_COMMON_SELECT_GENDER",
|
|
629
|
+
submitBarLabel: "CS_COMMON_NEXT",
|
|
630
|
+
skipText: "CORE_COMMON_SKIP_CONTINUE"
|
|
631
|
+
}
|
|
616
632
|
}]
|
|
617
633
|
}, {
|
|
618
634
|
head: "ES_FSM_REGISTRY_NEW_ADDRESS_DETAILS",
|
|
@@ -710,12 +726,12 @@ const AddVendor = ({
|
|
|
710
726
|
const [currentStep, setCurrentStep] = useState(1);
|
|
711
727
|
const [showToast, setShowToast] = useState(null);
|
|
712
728
|
const [canSubmit, setCanSubmit] = useState(false);
|
|
713
|
-
const
|
|
729
|
+
const [step1Data, setStep1Data] = useState({});
|
|
714
730
|
const [mutationHappened, setMutationHappened, clear] = Digit.Hooks.useSessionStorage("FSM_MUTATION_HAPPENED", false);
|
|
715
731
|
const [errorInfo, setErrorInfo, clearError] = Digit.Hooks.useSessionStorage("FSM_ERROR_DATA", false);
|
|
716
732
|
const [successData, setsuccessData, clearSuccessData] = Digit.Hooks.useSessionStorage("FSM_MUTATION_SUCCESS_DATA", false);
|
|
717
733
|
const {
|
|
718
|
-
isLoading
|
|
734
|
+
isLoading,
|
|
719
735
|
isError: vendorCreateError,
|
|
720
736
|
data: updateResponse,
|
|
721
737
|
error: updateError,
|
|
@@ -755,12 +771,12 @@ const AddVendor = ({
|
|
|
755
771
|
const onSubmit = data => {
|
|
756
772
|
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;
|
|
757
773
|
if (currentStep === 1) {
|
|
758
|
-
|
|
774
|
+
setStep1Data(data);
|
|
759
775
|
setCurrentStep(2);
|
|
760
776
|
return;
|
|
761
777
|
}
|
|
762
778
|
const mergedData = {
|
|
763
|
-
...
|
|
779
|
+
...step1Data,
|
|
764
780
|
...data
|
|
765
781
|
};
|
|
766
782
|
const name = mergedData === null || mergedData === void 0 ? void 0 : mergedData.vendorName;
|
|
@@ -831,7 +847,7 @@ const AddVendor = ({
|
|
|
831
847
|
}
|
|
832
848
|
};
|
|
833
849
|
mutate(formData, {
|
|
834
|
-
onError:
|
|
850
|
+
onError: error => {
|
|
835
851
|
setShowToast({
|
|
836
852
|
key: "error",
|
|
837
853
|
action: error
|
|
@@ -850,28 +866,27 @@ const AddVendor = ({
|
|
|
850
866
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Stepper, {
|
|
851
867
|
steps: steps,
|
|
852
868
|
currentStep: currentStep - 1,
|
|
853
|
-
onStepClick:
|
|
869
|
+
onStepClick: () => {},
|
|
854
870
|
t: t
|
|
855
871
|
}), /*#__PURE__*/React.createElement("div", {
|
|
856
872
|
style: {
|
|
857
873
|
flex: "1",
|
|
858
874
|
overflowY: "auto"
|
|
859
875
|
}
|
|
860
|
-
}, currentStep === 1 &&
|
|
861
|
-
/*#__PURE__*/
|
|
862
|
-
React.createElement(FormComposer, {
|
|
876
|
+
}, currentStep === 1 && /*#__PURE__*/React.createElement(FormComposer, {
|
|
863
877
|
label: t("CS_COMMON_NEXT"),
|
|
864
878
|
config: vendorStepConfig.filter(i => !i.hideInEmployee).map(config => ({
|
|
865
879
|
...config,
|
|
866
880
|
body: config.body.filter(a => !a.hideInEmployee)
|
|
867
881
|
})),
|
|
868
882
|
onSubmit: onSubmit,
|
|
869
|
-
defaultValues:
|
|
883
|
+
defaultValues: {
|
|
884
|
+
...defaultValues,
|
|
885
|
+
...step1Data
|
|
886
|
+
},
|
|
870
887
|
onFormValueChange: onFormValueChange,
|
|
871
888
|
noBreakLine: true
|
|
872
|
-
}), currentStep === 2 &&
|
|
873
|
-
/*#__PURE__*/
|
|
874
|
-
React.createElement(FormComposer, {
|
|
889
|
+
}), currentStep === 2 && /*#__PURE__*/React.createElement(FormComposer, {
|
|
875
890
|
label: t("ES_COMMON_APPLICATION_SUBMIT"),
|
|
876
891
|
config: addressStepConfig.filter(i => !i.hideInEmployee).map(config => ({
|
|
877
892
|
...config,
|
|
@@ -902,18 +917,22 @@ const Timeline = ({
|
|
|
902
917
|
const isActive = stepNumber === _currentStep;
|
|
903
918
|
const isCompleted = stepNumber < _currentStep;
|
|
904
919
|
return /*#__PURE__*/React.createElement("div", {
|
|
905
|
-
className: "stepper-row",
|
|
920
|
+
className: "stepper-row-vendor",
|
|
906
921
|
key: index
|
|
907
922
|
}, /*#__PURE__*/React.createElement("div", {
|
|
908
923
|
className: "stepper-left"
|
|
909
924
|
}, /*#__PURE__*/React.createElement("div", {
|
|
910
|
-
className: `step-circle
|
|
925
|
+
className: `step-circle
|
|
926
|
+
${isActive ? "active" : ""}
|
|
927
|
+
${isCompleted ? "completed" : ""}`
|
|
911
928
|
}, isCompleted ? /*#__PURE__*/React.createElement(TickMark, {
|
|
912
|
-
fillColor: "
|
|
929
|
+
fillColor: "#fff"
|
|
913
930
|
}) : stepNumber), index !== _steps.length - 1 && /*#__PURE__*/React.createElement("div", {
|
|
914
931
|
className: `step-line ${isCompleted ? "completed-line" : ""}`
|
|
915
932
|
})), /*#__PURE__*/React.createElement("div", {
|
|
916
|
-
className: `step-label
|
|
933
|
+
className: `step-label
|
|
934
|
+
${isActive ? "active-text" : ""}
|
|
935
|
+
${isCompleted ? "completed-text" : ""}`
|
|
917
936
|
}, t(label)));
|
|
918
937
|
}));
|
|
919
938
|
};
|
|
@@ -926,9 +945,8 @@ const VendorDetails = ({
|
|
|
926
945
|
formData,
|
|
927
946
|
ownerIndex
|
|
928
947
|
}) => {
|
|
929
|
-
const
|
|
930
|
-
|
|
931
|
-
} = useLocation();
|
|
948
|
+
const location = useLocation();
|
|
949
|
+
console.log(formData, "oiuyt");
|
|
932
950
|
let index = 0;
|
|
933
951
|
let validation = {};
|
|
934
952
|
const steps = ["VENDOR_ADDITIONAL_DETAILS", "VENDOR_DOCUMENT_DETAILS", "VENDOR_SUMMARY"];
|
|
@@ -938,6 +956,7 @@ const VendorDetails = ({
|
|
|
938
956
|
const [VendorCategory, setVendorCategory] = useState("");
|
|
939
957
|
const [VendorEmail, setVendorEmail] = useState();
|
|
940
958
|
const [VendorId, setVendorId] = useState("");
|
|
959
|
+
const [userName, setUserName] = useState("");
|
|
941
960
|
const [Bank, setBank] = useState("");
|
|
942
961
|
const [BankbranchName, setBankbranchName] = useState();
|
|
943
962
|
const [IFSC, setIFSC] = useState("");
|
|
@@ -990,9 +1009,6 @@ const VendorDetails = ({
|
|
|
990
1009
|
}
|
|
991
1010
|
}
|
|
992
1011
|
}, [IFSC]);
|
|
993
|
-
function setvendorid(e) {
|
|
994
|
-
setVendorId(e.target.value);
|
|
995
|
-
}
|
|
996
1012
|
function setvendorbank(e) {
|
|
997
1013
|
setBank(e.target.value);
|
|
998
1014
|
}
|
|
@@ -1040,6 +1056,23 @@ const VendorDetails = ({
|
|
|
1040
1056
|
const {
|
|
1041
1057
|
control
|
|
1042
1058
|
} = useForm();
|
|
1059
|
+
const {
|
|
1060
|
+
data: dsoData,
|
|
1061
|
+
isLoading: daoDataLoading,
|
|
1062
|
+
isSuccess: isDsoSuccess,
|
|
1063
|
+
error: dsoError
|
|
1064
|
+
} = Digit.Hooks.fsm.useDsoSearch(tenantId, {
|
|
1065
|
+
staleTime: Infinity
|
|
1066
|
+
});
|
|
1067
|
+
useEffect(() => {
|
|
1068
|
+
if (dsoData) {
|
|
1069
|
+
const vendor = dsoData.find(item => item.id);
|
|
1070
|
+
if (vendor) {
|
|
1071
|
+
setUserName(vendor.name);
|
|
1072
|
+
setVendorId(vendor.id);
|
|
1073
|
+
}
|
|
1074
|
+
}
|
|
1075
|
+
}, [dsoData]);
|
|
1043
1076
|
const goNext = () => {
|
|
1044
1077
|
let owner = formData.ownerKey && formData.ownerKey[index];
|
|
1045
1078
|
let ownerStep;
|
|
@@ -1063,7 +1096,8 @@ const VendorDetails = ({
|
|
|
1063
1096
|
VendorAddress,
|
|
1064
1097
|
VendorCategory,
|
|
1065
1098
|
VendorEmail,
|
|
1066
|
-
|
|
1099
|
+
name: userName,
|
|
1100
|
+
VendorId: VendorId,
|
|
1067
1101
|
Bank,
|
|
1068
1102
|
BankbranchName,
|
|
1069
1103
|
IFSC,
|
|
@@ -1088,7 +1122,7 @@ const VendorDetails = ({
|
|
|
1088
1122
|
if (userType === "citizen") {
|
|
1089
1123
|
goNext();
|
|
1090
1124
|
}
|
|
1091
|
-
}, [VendorCompany, VendorPhone, VendorAddress, VendorCategory, VendorEmail, VendorId, Bank, BankbranchName, IFSC, AccountNo, PanNo, GstNo, GstState, RegistrationNo, EpfNo, EsiNo, VendorType, Status, micrNo, PhoneNo, ContactPerson, Company]);
|
|
1125
|
+
}, [VendorCompany, VendorPhone, VendorAddress, VendorCategory, VendorEmail, VendorId, userName, Bank, BankbranchName, IFSC, AccountNo, PanNo, GstNo, GstState, RegistrationNo, EpfNo, EsiNo, VendorType, Status, micrNo, PhoneNo, ContactPerson, Company, goNext, userType]);
|
|
1092
1126
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
1093
1127
|
style: {
|
|
1094
1128
|
display: "flex",
|
|
@@ -1107,31 +1141,7 @@ const VendorDetails = ({
|
|
|
1107
1141
|
config: config,
|
|
1108
1142
|
onSelect: goNext,
|
|
1109
1143
|
t: t
|
|
1110
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
1111
|
-
className: "finance-mainlayout"
|
|
1112
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
1113
|
-
className: "finance-mainlayout-col3"
|
|
1114
|
-
}, /*#__PURE__*/React.createElement(CardLabel, null, `${t("VENDOR_ID")}`), /*#__PURE__*/React.createElement(TextInput, Object.assign({
|
|
1115
|
-
t: t,
|
|
1116
|
-
type: "text",
|
|
1117
|
-
isMandatory: false,
|
|
1118
|
-
optionKey: "i18nKey",
|
|
1119
|
-
name: "VendorId",
|
|
1120
|
-
value: VendorId,
|
|
1121
|
-
onChange: setvendorid,
|
|
1122
|
-
style: {
|
|
1123
|
-
width: "100%"
|
|
1124
|
-
},
|
|
1125
|
-
maxLength: 11,
|
|
1126
|
-
ValidationRequired: false
|
|
1127
|
-
}, validation = {
|
|
1128
|
-
isRequired: true,
|
|
1129
|
-
pattern: "^[a-zA-Z0-9/-]{1,20}$",
|
|
1130
|
-
type: "text",
|
|
1131
|
-
title: t("INVALID_VENDOR_ID")
|
|
1132
|
-
}))), /*#__PURE__*/React.createElement("div", {
|
|
1133
|
-
className: "finance-mainlayout-col3"
|
|
1134
|
-
}, /*#__PURE__*/React.createElement(CardLabel, null, `${t("IFSC_CODE")}`), /*#__PURE__*/React.createElement(TextInput, Object.assign({
|
|
1144
|
+
}, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(CardLabel, null, `${t("IFSC_CODE")}`), /*#__PURE__*/React.createElement(TextInput, Object.assign({
|
|
1135
1145
|
t: t,
|
|
1136
1146
|
type: "text",
|
|
1137
1147
|
isMandatory: false,
|
|
@@ -1150,11 +1160,7 @@ const VendorDetails = ({
|
|
|
1150
1160
|
pattern: "^[A-Z]{4}0[A-Z0-9]{6}$",
|
|
1151
1161
|
type: "text",
|
|
1152
1162
|
title: t("INVALID_IFSC_CODE_ERROR_MESSAGE")
|
|
1153
|
-
})))
|
|
1154
|
-
className: "finance-mainlayout"
|
|
1155
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
1156
|
-
className: "finance-mainlayout-col3"
|
|
1157
|
-
}, /*#__PURE__*/React.createElement(CardLabel, null, `${t("VENDOR_BANK_NAME")}`, " ", /*#__PURE__*/React.createElement("span", {
|
|
1163
|
+
}))), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(CardLabel, null, `${t("VENDOR_BANK_NAME")}`, " ", /*#__PURE__*/React.createElement("span", {
|
|
1158
1164
|
className: "check-page-link-button"
|
|
1159
1165
|
}, "*")), /*#__PURE__*/React.createElement(TextInput, {
|
|
1160
1166
|
t: t,
|
|
@@ -1169,9 +1175,7 @@ const VendorDetails = ({
|
|
|
1169
1175
|
value: Bank,
|
|
1170
1176
|
onChange: setvendorbank,
|
|
1171
1177
|
disabled: true
|
|
1172
|
-
})), /*#__PURE__*/React.createElement("div", {
|
|
1173
|
-
className: "finance-mainlayout-col3"
|
|
1174
|
-
}, /*#__PURE__*/React.createElement(CardLabel, null, `${t("VENDOR_BANK_BRANCH_NAME")}`, " ", /*#__PURE__*/React.createElement("span", {
|
|
1178
|
+
})), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(CardLabel, null, `${t("VENDOR_BANK_BRANCH_NAME")}`, " ", /*#__PURE__*/React.createElement("span", {
|
|
1175
1179
|
className: "check-page-link-button"
|
|
1176
1180
|
}, "*")), /*#__PURE__*/React.createElement(TextInput, {
|
|
1177
1181
|
t: t,
|
|
@@ -1186,11 +1190,7 @@ const VendorDetails = ({
|
|
|
1186
1190
|
placeholder: "Bank Branch Name Auto Select",
|
|
1187
1191
|
onChange: setBankbranch,
|
|
1188
1192
|
disabled: false
|
|
1189
|
-
}))
|
|
1190
|
-
className: "finance-mainlayout"
|
|
1191
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
1192
|
-
className: "finance-mainlayout-col3"
|
|
1193
|
-
}, /*#__PURE__*/React.createElement(CardLabel, null, `${t("VENDOR_MICR_NO")}`, " ", /*#__PURE__*/React.createElement("span", {
|
|
1193
|
+
})), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(CardLabel, null, `${t("VENDOR_MICR_NO")}`, " ", /*#__PURE__*/React.createElement("span", {
|
|
1194
1194
|
className: "check-page-link-button"
|
|
1195
1195
|
}, "*")), /*#__PURE__*/React.createElement(TextInput, {
|
|
1196
1196
|
t: t,
|
|
@@ -1205,9 +1205,7 @@ const VendorDetails = ({
|
|
|
1205
1205
|
placeholder: "MICR No",
|
|
1206
1206
|
onChange: setmicrNo,
|
|
1207
1207
|
disabled: false
|
|
1208
|
-
})), /*#__PURE__*/React.createElement("div", {
|
|
1209
|
-
className: "finance-mainlayout-col3"
|
|
1210
|
-
}, /*#__PURE__*/React.createElement(CardLabel, null, `${t("ACCOUNT_NO")}`), /*#__PURE__*/React.createElement(TextInput, Object.assign({
|
|
1208
|
+
})), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(CardLabel, null, `${t("ACCOUNT_NO")}`), /*#__PURE__*/React.createElement(TextInput, Object.assign({
|
|
1211
1209
|
t: t,
|
|
1212
1210
|
type: "text",
|
|
1213
1211
|
isMandatory: false,
|
|
@@ -1224,11 +1222,7 @@ const VendorDetails = ({
|
|
|
1224
1222
|
pattern: "[0-9]{9,18}",
|
|
1225
1223
|
type: "text",
|
|
1226
1224
|
title: t("INVALID_ACCOUNT_NO_ERROR_MESSAGE")
|
|
1227
|
-
})))
|
|
1228
|
-
className: "finance-mainlayout"
|
|
1229
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
1230
|
-
className: "finance-mainlayout-col3"
|
|
1231
|
-
}, /*#__PURE__*/React.createElement(CardLabel, null, `${t("PHONE_NO")}`), /*#__PURE__*/React.createElement(TextInput, Object.assign({
|
|
1225
|
+
}))), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(CardLabel, null, `${t("PHONE_NO")}`), /*#__PURE__*/React.createElement(TextInput, Object.assign({
|
|
1232
1226
|
t: t,
|
|
1233
1227
|
type: "text",
|
|
1234
1228
|
isMandatory: false,
|
|
@@ -1246,9 +1240,7 @@ const VendorDetails = ({
|
|
|
1246
1240
|
type: "text",
|
|
1247
1241
|
title: t("INVALID_ACCOUNT_NO_ERROR_MESSAGE"),
|
|
1248
1242
|
length: 10
|
|
1249
|
-
}))), /*#__PURE__*/React.createElement("div", {
|
|
1250
|
-
className: "finance-mainlayout-col3"
|
|
1251
|
-
}, /*#__PURE__*/React.createElement(CardLabel, null, `${t("CONTACT_PERSON")}`), /*#__PURE__*/React.createElement(TextInput, Object.assign({
|
|
1243
|
+
}))), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(CardLabel, null, `${t("CONTACT_PERSON")}`), /*#__PURE__*/React.createElement(TextInput, Object.assign({
|
|
1252
1244
|
t: t,
|
|
1253
1245
|
type: "text",
|
|
1254
1246
|
isMandatory: false,
|
|
@@ -1265,11 +1257,7 @@ const VendorDetails = ({
|
|
|
1265
1257
|
pattern: "^[a-zA-Z0-9/-]{1,20}$",
|
|
1266
1258
|
type: "text",
|
|
1267
1259
|
title: t("INVALID_ACCOUNT_NO_ERROR_MESSAGE")
|
|
1268
|
-
})))
|
|
1269
|
-
className: "finance-mainlayout"
|
|
1270
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
1271
|
-
className: "finance-mainlayout-col3"
|
|
1272
|
-
}, /*#__PURE__*/React.createElement(CardLabel, null, `${t("COMPANY_NAME")}`), /*#__PURE__*/React.createElement(TextInput, Object.assign({
|
|
1260
|
+
}))), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(CardLabel, null, `${t("COMPANY_NAME")}`), /*#__PURE__*/React.createElement(TextInput, Object.assign({
|
|
1273
1261
|
t: t,
|
|
1274
1262
|
type: "text",
|
|
1275
1263
|
isMandatory: false,
|
|
@@ -1286,9 +1274,7 @@ const VendorDetails = ({
|
|
|
1286
1274
|
pattern: "^[a-zA-Z0-9/-]{1,20}$",
|
|
1287
1275
|
type: "text",
|
|
1288
1276
|
title: t("INVALID_ACCOUNT_NO_ERROR_MESSAGE")
|
|
1289
|
-
}))), /*#__PURE__*/React.createElement("div", {
|
|
1290
|
-
className: "finance-mainlayout-col3"
|
|
1291
|
-
}, /*#__PURE__*/React.createElement(CardLabel, null, `${t("PAN_NO")}`), /*#__PURE__*/React.createElement(TextInput, Object.assign({
|
|
1277
|
+
}))), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(CardLabel, null, `${t("PAN_NO")}`), /*#__PURE__*/React.createElement(TextInput, Object.assign({
|
|
1292
1278
|
t: t,
|
|
1293
1279
|
type: "text",
|
|
1294
1280
|
isMandatory: false,
|
|
@@ -1305,11 +1291,7 @@ const VendorDetails = ({
|
|
|
1305
1291
|
pattern: "[A-Z]{5}[0-9]{4}[A-Z]{1}",
|
|
1306
1292
|
type: "text",
|
|
1307
1293
|
title: t("INVALID_PAN_NO_ERROR_MESSAGE")
|
|
1308
|
-
})))
|
|
1309
|
-
className: "finance-mainlayout"
|
|
1310
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
1311
|
-
className: "finance-mainlayout-col3"
|
|
1312
|
-
}, /*#__PURE__*/React.createElement(CardLabel, null, `${t("GST_NO")}`), /*#__PURE__*/React.createElement(TextInput, Object.assign({
|
|
1294
|
+
}))), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(CardLabel, null, `${t("GST_NO")}`), /*#__PURE__*/React.createElement(TextInput, Object.assign({
|
|
1313
1295
|
t: t,
|
|
1314
1296
|
type: "text",
|
|
1315
1297
|
isMandatory: false,
|
|
@@ -1326,9 +1308,7 @@ const VendorDetails = ({
|
|
|
1326
1308
|
pattern: "^[0-9]{2}[A-Z]{5}[0-9]{4}[A-Z]{1}[A-Z0-9]{1}[Z]{1}[A-Z0-9]{1}$",
|
|
1327
1309
|
type: "text",
|
|
1328
1310
|
title: t("INVALID_GST_NO_ERROR_MESSAGE")
|
|
1329
|
-
}))), /*#__PURE__*/React.createElement("div", {
|
|
1330
|
-
className: "finance-mainlayout-col3"
|
|
1331
|
-
}, /*#__PURE__*/React.createElement(CardLabel, null, `${t("GST_REGISTERED_STATE/UT")}`), /*#__PURE__*/React.createElement(TextInput, Object.assign({
|
|
1311
|
+
}))), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(CardLabel, null, `${t("GST_REGISTERED_STATE/UT")}`), /*#__PURE__*/React.createElement(TextInput, Object.assign({
|
|
1332
1312
|
t: t,
|
|
1333
1313
|
type: "text",
|
|
1334
1314
|
isMandatory: false,
|
|
@@ -1345,11 +1325,7 @@ const VendorDetails = ({
|
|
|
1345
1325
|
pattern: "^[a-zA-Z0-9/-]{1,20}$",
|
|
1346
1326
|
type: "text",
|
|
1347
1327
|
title: t("PT_NAME_ERROR_MESSAGE")
|
|
1348
|
-
})))
|
|
1349
|
-
className: "finance-mainlayout"
|
|
1350
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
1351
|
-
className: "finance-mainlayout-col3"
|
|
1352
|
-
}, /*#__PURE__*/React.createElement(CardLabel, null, `${t("REGISTRATION_NO")}`), /*#__PURE__*/React.createElement(TextInput, Object.assign({
|
|
1328
|
+
}))), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(CardLabel, null, `${t("REGISTRATION_NO")}`), /*#__PURE__*/React.createElement(TextInput, Object.assign({
|
|
1353
1329
|
t: t,
|
|
1354
1330
|
type: "text",
|
|
1355
1331
|
isMandatory: false,
|
|
@@ -1366,9 +1342,7 @@ const VendorDetails = ({
|
|
|
1366
1342
|
pattern: "^[a-zA-Z0-9/-]{1,20}$",
|
|
1367
1343
|
type: "text",
|
|
1368
1344
|
title: t("INVALID_REGISTRATION_NO_ERROR_MESSAGE")
|
|
1369
|
-
}))), /*#__PURE__*/React.createElement("div", {
|
|
1370
|
-
className: "finance-mainlayout-col3"
|
|
1371
|
-
}, /*#__PURE__*/React.createElement(CardLabel, null, `${t("EPF_NO")}`), /*#__PURE__*/React.createElement(TextInput, Object.assign({
|
|
1345
|
+
}))), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(CardLabel, null, `${t("EPF_NO")}`), /*#__PURE__*/React.createElement(TextInput, Object.assign({
|
|
1372
1346
|
t: t,
|
|
1373
1347
|
type: "text",
|
|
1374
1348
|
isMandatory: false,
|
|
@@ -1385,11 +1359,7 @@ const VendorDetails = ({
|
|
|
1385
1359
|
pattern: "^[a-zA-Z0-9/-]{1,15}$",
|
|
1386
1360
|
type: "text",
|
|
1387
1361
|
title: t("INVALID_EPF_NO_ERROR_MESSAGE")
|
|
1388
|
-
})))
|
|
1389
|
-
className: "finance-mainlayout"
|
|
1390
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
1391
|
-
className: "finance-mainlayout-col3"
|
|
1392
|
-
}, /*#__PURE__*/React.createElement(CardLabel, null, `${t("ESI_NO")}`), /*#__PURE__*/React.createElement(TextInput, Object.assign({
|
|
1362
|
+
}))), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(CardLabel, null, `${t("ESI_NO")}`), /*#__PURE__*/React.createElement(TextInput, Object.assign({
|
|
1393
1363
|
t: t,
|
|
1394
1364
|
type: "text",
|
|
1395
1365
|
isMandatory: false,
|
|
@@ -1406,9 +1376,7 @@ const VendorDetails = ({
|
|
|
1406
1376
|
pattern: "^[a-zA-Z0-9/-]{1,20}$",
|
|
1407
1377
|
type: "text",
|
|
1408
1378
|
title: t("INVALID_ESI_NO_ERROR_MESSAGE")
|
|
1409
|
-
}))), /*#__PURE__*/React.createElement("div", {
|
|
1410
|
-
className: "finance-mainlayout-col3"
|
|
1411
|
-
}, /*#__PURE__*/React.createElement("div", null, t("VENDOR_TYPE"), /*#__PURE__*/React.createElement("div", {
|
|
1379
|
+
}))), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("div", null, t("VENDOR_TYPE"), /*#__PURE__*/React.createElement("div", {
|
|
1412
1380
|
className: "tooltip",
|
|
1413
1381
|
style: {
|
|
1414
1382
|
width: "12px",
|
|
@@ -1448,11 +1416,7 @@ const VendorDetails = ({
|
|
|
1448
1416
|
placeholder: "Select",
|
|
1449
1417
|
t: t
|
|
1450
1418
|
})
|
|
1451
|
-
}))), /*#__PURE__*/React.createElement("div", {
|
|
1452
|
-
className: "finance-mainlayout"
|
|
1453
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
1454
|
-
className: "finance-mainlayout-col3"
|
|
1455
|
-
}, /*#__PURE__*/React.createElement("div", null, t("VENOR_CATEGORY"), /*#__PURE__*/React.createElement("div", {
|
|
1419
|
+
})), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("div", null, t("VENOR_CATEGORY"), /*#__PURE__*/React.createElement("div", {
|
|
1456
1420
|
className: "tooltip",
|
|
1457
1421
|
style: {
|
|
1458
1422
|
width: "12px",
|
|
@@ -1493,7 +1457,9 @@ const VendorDetails = ({
|
|
|
1493
1457
|
t: t
|
|
1494
1458
|
})
|
|
1495
1459
|
})), /*#__PURE__*/React.createElement("div", {
|
|
1496
|
-
|
|
1460
|
+
style: {
|
|
1461
|
+
paddingBottom: "10px"
|
|
1462
|
+
}
|
|
1497
1463
|
}, /*#__PURE__*/React.createElement("div", null, t("STATUS"), /*#__PURE__*/React.createElement("div", {
|
|
1498
1464
|
className: "tooltip",
|
|
1499
1465
|
style: {
|
|
@@ -1534,7 +1500,7 @@ const VendorDetails = ({
|
|
|
1534
1500
|
placeholder: "Select",
|
|
1535
1501
|
t: t
|
|
1536
1502
|
})
|
|
1537
|
-
}))))))
|
|
1503
|
+
}))))));
|
|
1538
1504
|
};
|
|
1539
1505
|
|
|
1540
1506
|
const VendorDocuments = ({
|
|
@@ -1633,7 +1599,8 @@ const VendorDocuments = ({
|
|
|
1633
1599
|
className: "field",
|
|
1634
1600
|
style: {
|
|
1635
1601
|
display: "flex",
|
|
1636
|
-
alignItems: "center"
|
|
1602
|
+
alignItems: "center",
|
|
1603
|
+
paddingBottom: "10px"
|
|
1637
1604
|
}
|
|
1638
1605
|
}, /*#__PURE__*/React.createElement(UploadFile, {
|
|
1639
1606
|
onUpload: e => handleFileSelect(e, index),
|
|
@@ -1813,7 +1780,7 @@ const VendorSelectAddress = ({
|
|
|
1813
1780
|
});
|
|
1814
1781
|
}
|
|
1815
1782
|
if (userType === "employee") {
|
|
1816
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(
|
|
1783
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(CardLabel, {
|
|
1817
1784
|
className: "card-label-smaller"
|
|
1818
1785
|
}, t("MYCITY_CODE_LABEL"), config.isMandatory ? " * " : null), /*#__PURE__*/React.createElement(Dropdown$2, {
|
|
1819
1786
|
className: "",
|
|
@@ -1824,7 +1791,7 @@ const VendorSelectAddress = ({
|
|
|
1824
1791
|
select: selectCity,
|
|
1825
1792
|
optionKey: "code",
|
|
1826
1793
|
t: t
|
|
1827
|
-
})
|
|
1794
|
+
}), /*#__PURE__*/React.createElement(CardLabel, {
|
|
1828
1795
|
className: "card-label-smaller"
|
|
1829
1796
|
}, t("ES_NEW_APPLICATION_LOCATION_MOHALLA"), config.isMandatory ? " * " : null), /*#__PURE__*/React.createElement(Dropdown$2, {
|
|
1830
1797
|
className: "",
|
|
@@ -1834,7 +1801,7 @@ const VendorSelectAddress = ({
|
|
|
1834
1801
|
select: selectLocality,
|
|
1835
1802
|
optionKey: "name",
|
|
1836
1803
|
t: t
|
|
1837
|
-
}))
|
|
1804
|
+
}));
|
|
1838
1805
|
}
|
|
1839
1806
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(FormStep, {
|
|
1840
1807
|
config: config,
|
|
@@ -8456,6 +8423,32 @@ const VendorInbox = props => {
|
|
|
8456
8423
|
return history.push("/digit-ui/employee/fsm/registry/new-driver");
|
|
8457
8424
|
}
|
|
8458
8425
|
};
|
|
8426
|
+
const vendorIds = React.useMemo(() => {
|
|
8427
|
+
if (props.selectedTab === "VENDOR") {
|
|
8428
|
+
return (tableData === null || tableData === void 0 ? void 0 : tableData.map(row => row.id)) || [];
|
|
8429
|
+
}
|
|
8430
|
+
return (vendorData === null || vendorData === void 0 ? void 0 : vendorData.map(v => {
|
|
8431
|
+
var _v$dsoDetails;
|
|
8432
|
+
return (_v$dsoDetails = v.dsoDetails) === null || _v$dsoDetails === void 0 ? void 0 : _v$dsoDetails.id;
|
|
8433
|
+
})) || [];
|
|
8434
|
+
}, [props.selectedTab, tableData, vendorData]);
|
|
8435
|
+
const {
|
|
8436
|
+
data: additionalVendorData
|
|
8437
|
+
} = Digit.Hooks.vendor.useEmpvendorCommonSearch({
|
|
8438
|
+
tenantId,
|
|
8439
|
+
filters: {
|
|
8440
|
+
vendorIds: vendorIds
|
|
8441
|
+
}
|
|
8442
|
+
}, {
|
|
8443
|
+
enabled: (vendorIds === null || vendorIds === void 0 ? void 0 : vendorIds.length) > 0
|
|
8444
|
+
});
|
|
8445
|
+
const hasAdditionalDetails = vendorId => {
|
|
8446
|
+
var _additionalVendorData;
|
|
8447
|
+
return additionalVendorData === null || additionalVendorData === void 0 ? void 0 : (_additionalVendorData = additionalVendorData.VendorDetails) === null || _additionalVendorData === void 0 ? void 0 : _additionalVendorData.some(v => {
|
|
8448
|
+
var _v$vendorAdditionalDe;
|
|
8449
|
+
return ((_v$vendorAdditionalDe = v.vendorAdditionalDetails) === null || _v$vendorAdditionalDe === void 0 ? void 0 : _v$vendorAdditionalDe.vendorId) === vendorId;
|
|
8450
|
+
});
|
|
8451
|
+
};
|
|
8459
8452
|
const columns = React.useMemo(() => {
|
|
8460
8453
|
switch (props.selectedTab) {
|
|
8461
8454
|
case "VENDOR":
|
|
@@ -8522,11 +8515,21 @@ const VendorInbox = props => {
|
|
|
8522
8515
|
Cell: ({
|
|
8523
8516
|
row
|
|
8524
8517
|
}) => {
|
|
8518
|
+
var _row$original4;
|
|
8519
|
+
const vendorId = (_row$original4 = row.original) === null || _row$original4 === void 0 ? void 0 : _row$original4.id;
|
|
8520
|
+
const hasDetails = hasAdditionalDetails(vendorId);
|
|
8525
8521
|
return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("span", {
|
|
8526
8522
|
className: "link"
|
|
8527
8523
|
}, /*#__PURE__*/React.createElement(Link, {
|
|
8528
|
-
to: "/digit-ui/employee/vendor/registry/additionaldetails/" +
|
|
8529
|
-
}, /*#__PURE__*/React.createElement("
|
|
8524
|
+
to: hasDetails ? "/digit-ui/employee/vendor/registry/additionaldetails/info?vendorId=" + vendorId : "/digit-ui/employee/vendor/registry/additionaldetails/vendor-details?vendorId=" + vendorId
|
|
8525
|
+
}, /*#__PURE__*/React.createElement("button", {
|
|
8526
|
+
className: "submit-bar",
|
|
8527
|
+
type: "button",
|
|
8528
|
+
style: {
|
|
8529
|
+
color: "white",
|
|
8530
|
+
backgroundColor: hasDetails ? "#417505" : "#F47738"
|
|
8531
|
+
}
|
|
8532
|
+
}, hasDetails ? t("ES_VENDOR_VIEW_DETAILS") : t("ES_VENDOR_ADD_DETAILS")))));
|
|
8530
8533
|
}
|
|
8531
8534
|
}];
|
|
8532
8535
|
case "VEHICLE":
|
|
@@ -8548,8 +8551,8 @@ const VendorInbox = props => {
|
|
|
8548
8551
|
Cell: ({
|
|
8549
8552
|
row
|
|
8550
8553
|
}) => {
|
|
8551
|
-
var _row$
|
|
8552
|
-
return GetCell((_row$
|
|
8554
|
+
var _row$original5, _row$original5$auditD, _row$original6, _row$original6$auditD;
|
|
8555
|
+
return GetCell((_row$original5 = row.original) !== null && _row$original5 !== void 0 && (_row$original5$auditD = _row$original5.auditDetails) !== null && _row$original5$auditD !== void 0 && _row$original5$auditD.createdTime ? Digit.DateUtils.ConvertEpochToDate((_row$original6 = row.original) === null || _row$original6 === void 0 ? void 0 : (_row$original6$auditD = _row$original6.auditDetails) === null || _row$original6$auditD === void 0 ? void 0 : _row$original6$auditD.createdTime) : "");
|
|
8553
8556
|
}
|
|
8554
8557
|
}, {
|
|
8555
8558
|
Header: t("ES_FSM_REGISTRY_INBOX_VENDOR_NAME"),
|
|
@@ -8557,8 +8560,8 @@ const VendorInbox = props => {
|
|
|
8557
8560
|
Cell: ({
|
|
8558
8561
|
row
|
|
8559
8562
|
}) => {
|
|
8560
|
-
var _row$
|
|
8561
|
-
return GetCell(((_row$
|
|
8563
|
+
var _row$original7, _row$original7$vendor;
|
|
8564
|
+
return GetCell(((_row$original7 = row.original) === null || _row$original7 === void 0 ? void 0 : (_row$original7$vendor = _row$original7.vendor) === null || _row$original7$vendor === void 0 ? void 0 : _row$original7$vendor.name) || "NA");
|
|
8562
8565
|
}
|
|
8563
8566
|
}, {
|
|
8564
8567
|
Header: t("ES_VENDOR_INBOX_SERVICE_TYPE"),
|
|
@@ -8577,7 +8580,6 @@ const VendorInbox = props => {
|
|
|
8577
8580
|
}
|
|
8578
8581
|
}
|
|
8579
8582
|
const serviceType = ((_additionalDetail = additionalDetail) === null || _additionalDetail === void 0 ? void 0 : _additionalDetail.serviceType) || "N/A";
|
|
8580
|
-
console.log("sericvee", serviceType);
|
|
8581
8583
|
return /*#__PURE__*/React.createElement("div", null, serviceType);
|
|
8582
8584
|
}
|
|
8583
8585
|
}, {
|
|
@@ -8586,13 +8588,13 @@ const VendorInbox = props => {
|
|
|
8586
8588
|
Cell: ({
|
|
8587
8589
|
row
|
|
8588
8590
|
}) => {
|
|
8589
|
-
var _row$
|
|
8591
|
+
var _row$original8;
|
|
8590
8592
|
return /*#__PURE__*/React.createElement(ToggleSwitch, {
|
|
8591
8593
|
style: {
|
|
8592
8594
|
display: "flex",
|
|
8593
8595
|
justifyContent: "left"
|
|
8594
8596
|
},
|
|
8595
|
-
value: ((_row$
|
|
8597
|
+
value: ((_row$original8 = row.original) === null || _row$original8 === void 0 ? void 0 : _row$original8.status) === "DISABLED" ? false : true,
|
|
8596
8598
|
onChange: () => onVehicleUpdate(row),
|
|
8597
8599
|
name: `switch-${row.id}`
|
|
8598
8600
|
});
|
|
@@ -8600,6 +8602,19 @@ const VendorInbox = props => {
|
|
|
8600
8602
|
}];
|
|
8601
8603
|
case "DRIVER":
|
|
8602
8604
|
return [{
|
|
8605
|
+
Header: t("ES_FSM_REGISTRY_INBOX_USERNAME"),
|
|
8606
|
+
disableSortBy: true,
|
|
8607
|
+
Cell: ({
|
|
8608
|
+
row
|
|
8609
|
+
}) => {
|
|
8610
|
+
var _row$original$owner;
|
|
8611
|
+
return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("span", {
|
|
8612
|
+
className: "link"
|
|
8613
|
+
}, /*#__PURE__*/React.createElement(Link, {
|
|
8614
|
+
to: "/digit-ui/employee/vendor/registry/driver-details/" + row.original["id"]
|
|
8615
|
+
}, /*#__PURE__*/React.createElement("div", null, ((_row$original$owner = row.original.owner) === null || _row$original$owner === void 0 ? void 0 : _row$original$owner.userName) || "NA", /*#__PURE__*/React.createElement("br", null)))));
|
|
8616
|
+
}
|
|
8617
|
+
}, {
|
|
8603
8618
|
Header: t("ES_FSM_REGISTRY_INBOX_DRIVER_NAME"),
|
|
8604
8619
|
disableSortBy: true,
|
|
8605
8620
|
accessor: "tripDetails",
|
|
@@ -8618,8 +8633,8 @@ const VendorInbox = props => {
|
|
|
8618
8633
|
Cell: ({
|
|
8619
8634
|
row
|
|
8620
8635
|
}) => {
|
|
8621
|
-
var _row$
|
|
8622
|
-
return GetCell((_row$
|
|
8636
|
+
var _row$original9, _row$original9$auditD, _row$original0, _row$original0$auditD;
|
|
8637
|
+
return GetCell((_row$original9 = row.original) !== null && _row$original9 !== void 0 && (_row$original9$auditD = _row$original9.auditDetails) !== null && _row$original9$auditD !== void 0 && _row$original9$auditD.createdTime ? Digit.DateUtils.ConvertEpochToDate((_row$original0 = row.original) === null || _row$original0 === void 0 ? void 0 : (_row$original0$auditD = _row$original0.auditDetails) === null || _row$original0$auditD === void 0 ? void 0 : _row$original0$auditD.createdTime) : "");
|
|
8623
8638
|
}
|
|
8624
8639
|
}, {
|
|
8625
8640
|
Header: t("ES_FSM_REGISTRY_INBOX_VENDOR_NAME"),
|
|
@@ -8641,13 +8656,13 @@ const VendorInbox = props => {
|
|
|
8641
8656
|
Cell: ({
|
|
8642
8657
|
row
|
|
8643
8658
|
}) => {
|
|
8644
|
-
var _row$
|
|
8659
|
+
var _row$original1;
|
|
8645
8660
|
return /*#__PURE__*/React.createElement(ToggleSwitch, {
|
|
8646
8661
|
style: {
|
|
8647
8662
|
display: "flex",
|
|
8648
8663
|
justifyContent: "left"
|
|
8649
8664
|
},
|
|
8650
|
-
value: ((_row$
|
|
8665
|
+
value: ((_row$original1 = row.original) === null || _row$original1 === void 0 ? void 0 : _row$original1.status) === "DISABLED" ? false : true,
|
|
8651
8666
|
onChange: () => onDriverUpdate(row),
|
|
8652
8667
|
name: `switch-${row.id}`
|
|
8653
8668
|
});
|
|
@@ -8721,49 +8736,46 @@ const VendorInbox = props => {
|
|
|
8721
8736
|
totalRecords: props.totalRecords
|
|
8722
8737
|
});
|
|
8723
8738
|
}
|
|
8724
|
-
return (
|
|
8725
|
-
|
|
8726
|
-
|
|
8727
|
-
|
|
8728
|
-
|
|
8729
|
-
|
|
8730
|
-
|
|
8731
|
-
|
|
8732
|
-
|
|
8733
|
-
|
|
8734
|
-
|
|
8735
|
-
|
|
8736
|
-
|
|
8737
|
-
|
|
8738
|
-
|
|
8739
|
-
|
|
8740
|
-
|
|
8741
|
-
|
|
8742
|
-
|
|
8743
|
-
|
|
8744
|
-
|
|
8745
|
-
|
|
8746
|
-
|
|
8747
|
-
|
|
8748
|
-
|
|
8749
|
-
|
|
8750
|
-
|
|
8751
|
-
|
|
8752
|
-
|
|
8753
|
-
|
|
8754
|
-
|
|
8755
|
-
|
|
8756
|
-
|
|
8757
|
-
|
|
8758
|
-
|
|
8759
|
-
|
|
8760
|
-
|
|
8761
|
-
|
|
8762
|
-
|
|
8763
|
-
|
|
8764
|
-
onClose: closeToast
|
|
8765
|
-
}))
|
|
8766
|
-
);
|
|
8739
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
8740
|
+
className: "inbox-container"
|
|
8741
|
+
}, props.userRole !== "FSM_EMP_FSTPO" && props.userRole !== "FSM_ADMIN" && !props.isSearch && /*#__PURE__*/React.createElement("div", {
|
|
8742
|
+
className: "filters-container"
|
|
8743
|
+
}, /*#__PURE__*/React.createElement(VENDORLink, {
|
|
8744
|
+
parentRoute: props.parentRoute
|
|
8745
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
8746
|
+
style: {
|
|
8747
|
+
marginTop: "24px"
|
|
8748
|
+
}
|
|
8749
|
+
}, /*#__PURE__*/React.createElement(Filter, {
|
|
8750
|
+
searchParams: props.searchParams,
|
|
8751
|
+
paginationParms: props.paginationParms,
|
|
8752
|
+
applications: props.data,
|
|
8753
|
+
onFilterChange: props.onFilterChange,
|
|
8754
|
+
type: "desktop"
|
|
8755
|
+
}))), /*#__PURE__*/React.createElement("div", {
|
|
8756
|
+
style: {
|
|
8757
|
+
flex: 1,
|
|
8758
|
+
marginLeft: props.userRole === "FSM_ADMIN" ? "" : "24px"
|
|
8759
|
+
}
|
|
8760
|
+
}, /*#__PURE__*/React.createElement(SearchApplication, {
|
|
8761
|
+
onSearch: props.onSearch,
|
|
8762
|
+
type: "desktop",
|
|
8763
|
+
searchFields: props.searchFields,
|
|
8764
|
+
isInboxPage: !(props !== null && props !== void 0 && props.isSearch),
|
|
8765
|
+
searchParams: props.searchParams,
|
|
8766
|
+
onTabChange: props.onTabChange,
|
|
8767
|
+
selectedTab: props.selectedTab
|
|
8768
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
8769
|
+
className: "result",
|
|
8770
|
+
style: {
|
|
8771
|
+
marginLeft: FSTP || props.userRole === "FSM_ADMIN" ? "" : !(props !== null && props !== void 0 && props.isSearch) ? "24px" : "",
|
|
8772
|
+
flex: 1
|
|
8773
|
+
}
|
|
8774
|
+
}, result)), showToast && /*#__PURE__*/React.createElement(Toast, {
|
|
8775
|
+
error: showToast.key === "error" ? true : false,
|
|
8776
|
+
label: t(showToast.key === "success" ? `ES_FSM_REGISTRY_${showToast.action}_DISABLE_SUCCESS` : showToast.action),
|
|
8777
|
+
onClose: closeToast
|
|
8778
|
+
}));
|
|
8767
8779
|
};
|
|
8768
8780
|
|
|
8769
8781
|
const SearchVendor = () => {
|
|
@@ -9399,6 +9411,7 @@ const EditVendorDetails = props => {
|
|
|
9399
9411
|
}, {
|
|
9400
9412
|
enabled: !!dsoId
|
|
9401
9413
|
});
|
|
9414
|
+
console.log(vendorAdditionalData, "w2e3r4t5yh");
|
|
9402
9415
|
const {
|
|
9403
9416
|
mutate
|
|
9404
9417
|
} = Digit.Hooks.fsm.useVendorUpdate(tenantId);
|
|
@@ -9593,9 +9606,10 @@ const EditVendorDetails = props => {
|
|
|
9593
9606
|
const excludedKeys = ["vendorAdditionalDetailsId", "vendorId", "tenantId", "code", "lastModifiedTime", "createdTime", "lastModifiedBy", "createdBy", "active", "status", "vendorType", "vendorGroup", "narration", "documents"];
|
|
9594
9607
|
return /*#__PURE__*/React.createElement("div", {
|
|
9595
9608
|
className: "employee-form-content"
|
|
9596
|
-
}, !isLoading ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(
|
|
9609
|
+
}, !isLoading ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Card, {
|
|
9597
9610
|
style: {
|
|
9598
|
-
position: "relative"
|
|
9611
|
+
position: "relative",
|
|
9612
|
+
paddingLeft: "30px"
|
|
9599
9613
|
}
|
|
9600
9614
|
}, dsoData === null || dsoData === void 0 ? void 0 : (_dsoData$4 = dsoData[0]) === null || _dsoData$4 === void 0 ? void 0 : (_dsoData$4$employeeRe = _dsoData$4.employeeResponse) === null || _dsoData$4$employeeRe === void 0 ? void 0 : _dsoData$4$employeeRe.map((detail, index) => {
|
|
9601
9615
|
var _detail$values, _detail$child;
|
|
@@ -9611,68 +9625,63 @@ const EditVendorDetails = props => {
|
|
|
9611
9625
|
marginLeft: "-15px"
|
|
9612
9626
|
} : {}
|
|
9613
9627
|
}, /*#__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) => {
|
|
9614
|
-
var _detail$
|
|
9628
|
+
var _detail$values2;
|
|
9615
9629
|
if (value.title === "ES_FSM_REGISTRY_DETAILS_ADDITIONAL_DETAILS") {
|
|
9616
|
-
var _vendorAdditionalData, _vendorAdditionalData2
|
|
9630
|
+
var _vendorAdditionalData, _vendorAdditionalData2;
|
|
9617
9631
|
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;
|
|
9618
|
-
|
|
9619
|
-
|
|
9632
|
+
const entries = Object.entries(additionalDetails || {}).filter(([key]) => !excludedKeys.includes(key));
|
|
9633
|
+
return /*#__PURE__*/React.createElement(React.Fragment, {
|
|
9634
|
+
key: value.title
|
|
9635
|
+
}, /*#__PURE__*/React.createElement(Row, {
|
|
9620
9636
|
label: t(value.title),
|
|
9621
|
-
text:
|
|
9622
|
-
|
|
9623
|
-
|
|
9624
|
-
|
|
9625
|
-
|
|
9626
|
-
|
|
9637
|
+
text: "",
|
|
9638
|
+
className: "border-none"
|
|
9639
|
+
}), isVendorAdditionalLoading ? /*#__PURE__*/React.createElement(Loader, null) : additionalDetails ? /*#__PURE__*/React.createElement(Card, {
|
|
9640
|
+
className: "card-with-background",
|
|
9641
|
+
style: {
|
|
9642
|
+
margin: "10px 16px",
|
|
9643
|
+
padding: "20px"
|
|
9644
|
+
}
|
|
9645
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
9646
|
+
className: "additional-grid"
|
|
9647
|
+
}, entries.map(([key, val]) => {
|
|
9648
|
+
if (typeof val === "object" && val !== null) return null;
|
|
9649
|
+
const safeKey = String(key);
|
|
9650
|
+
let safeVal = val !== null && val !== undefined && val !== "" ? String(val) : "N/A";
|
|
9651
|
+
if (key === "name" && (!val || val === "")) {
|
|
9652
|
+
var _dsoData$5, _dsoData$5$dsoDetails;
|
|
9653
|
+
safeVal = (dsoData === null || dsoData === void 0 ? void 0 : (_dsoData$5 = dsoData[0]) === null || _dsoData$5 === void 0 ? void 0 : (_dsoData$5$dsoDetails = _dsoData$5.dsoDetails) === null || _dsoData$5$dsoDetails === void 0 ? void 0 : _dsoData$5$dsoDetails.name) || "N/A";
|
|
9654
|
+
}
|
|
9655
|
+
return /*#__PURE__*/React.createElement(React.Fragment, {
|
|
9656
|
+
key: safeKey
|
|
9627
9657
|
}, /*#__PURE__*/React.createElement("div", {
|
|
9628
|
-
|
|
9629
|
-
|
|
9630
|
-
|
|
9631
|
-
},
|
|
9632
|
-
|
|
9633
|
-
|
|
9634
|
-
|
|
9635
|
-
|
|
9636
|
-
|
|
9637
|
-
|
|
9638
|
-
|
|
9639
|
-
|
|
9640
|
-
|
|
9641
|
-
|
|
9642
|
-
|
|
9643
|
-
|
|
9644
|
-
|
|
9645
|
-
|
|
9646
|
-
|
|
9647
|
-
|
|
9648
|
-
|
|
9649
|
-
style: {
|
|
9650
|
-
color: "#a82227",
|
|
9651
|
-
cursor: "pointer",
|
|
9652
|
-
textDecoration: "underline",
|
|
9653
|
-
marginTop: "8px",
|
|
9654
|
-
display: "inline-block"
|
|
9655
|
-
},
|
|
9656
|
-
onClick: () => history.push(`/digit-ui/employee/vendor/registry/additionaldetails/info?vendorId=${dsoId}`)
|
|
9657
|
-
}, t("Edit Details"))) : /*#__PURE__*/React.createElement("span", {
|
|
9658
|
-
className: "link",
|
|
9659
|
-
style: {
|
|
9660
|
-
color: "#a82227",
|
|
9661
|
-
cursor: "pointer",
|
|
9662
|
-
textDecoration: "underline"
|
|
9663
|
-
},
|
|
9664
|
-
onClick: () => history.push(`/digit-ui/employee/vendor/registry/additionaldetails/info?vendorId=${dsoId}`)
|
|
9665
|
-
}, t("Add Additional Details"))),
|
|
9666
|
-
last: index === (detail === null || detail === void 0 ? void 0 : (_detail$values2 = detail.values) === null || _detail$values2 === void 0 ? void 0 : _detail$values2.length) - 1,
|
|
9667
|
-
caption: value.caption,
|
|
9668
|
-
className: `border-none ${!isMobile ? "vendor-details-row" : ""}`
|
|
9669
|
-
});
|
|
9658
|
+
className: "additional-label"
|
|
9659
|
+
}, t(formatLabel(safeKey))), /*#__PURE__*/React.createElement("div", {
|
|
9660
|
+
className: "additional-value"
|
|
9661
|
+
}, safeVal));
|
|
9662
|
+
})), /*#__PURE__*/React.createElement("div", {
|
|
9663
|
+
style: {
|
|
9664
|
+
marginTop: "16px",
|
|
9665
|
+
color: "#a82227",
|
|
9666
|
+
cursor: "pointer",
|
|
9667
|
+
textDecoration: "underline"
|
|
9668
|
+
},
|
|
9669
|
+
onClick: () => history.push(`/digit-ui/employee/vendor/registry/additionaldetails/info?vendorId=${dsoId}`)
|
|
9670
|
+
}, t("Edit Details"))) : /*#__PURE__*/React.createElement("div", {
|
|
9671
|
+
style: {
|
|
9672
|
+
marginLeft: "16px",
|
|
9673
|
+
color: "#a82227",
|
|
9674
|
+
cursor: "pointer",
|
|
9675
|
+
textDecoration: "underline"
|
|
9676
|
+
},
|
|
9677
|
+
onClick: () => history.push(`/digit-ui/employee/vendor/registry/additionaldetails/vendor-details?vendorId=${dsoId}`)
|
|
9678
|
+
}, t("Add Additional Details")));
|
|
9670
9679
|
}
|
|
9671
9680
|
return /*#__PURE__*/React.createElement(Row, {
|
|
9672
9681
|
key: t(String(value.title)),
|
|
9673
9682
|
label: t(String(value.title)),
|
|
9674
9683
|
text: value.value ? t(String(value.value)) : "N/A",
|
|
9675
|
-
last: index === (detail === null || detail === void 0 ? void 0 : (_detail$
|
|
9684
|
+
last: index === (detail === null || detail === void 0 ? void 0 : (_detail$values2 = detail.values) === null || _detail$values2 === void 0 ? void 0 : _detail$values2.length) - 1,
|
|
9676
9685
|
caption: value.caption,
|
|
9677
9686
|
className: `border-none ${!isMobile ? "vendor-details-row" : ""}`
|
|
9678
9687
|
});
|
|
@@ -9705,12 +9714,12 @@ const EditVendorDetails = props => {
|
|
|
9705
9714
|
className: "delete",
|
|
9706
9715
|
fill: "#a82227"
|
|
9707
9716
|
})))), data === null || data === void 0 ? void 0 : (_data$values = data.values) === null || _data$values === void 0 ? void 0 : _data$values.map((value, index) => {
|
|
9708
|
-
var _detail$
|
|
9717
|
+
var _detail$values3;
|
|
9709
9718
|
return /*#__PURE__*/React.createElement(Row, {
|
|
9710
9719
|
key: t(String(value.title)),
|
|
9711
9720
|
label: t(String(value.title)),
|
|
9712
9721
|
text: value.value ? t(String(value.value)) : "N/A",
|
|
9713
|
-
last: index === (detail === null || detail === void 0 ? void 0 : (_detail$
|
|
9722
|
+
last: index === (detail === null || detail === void 0 ? void 0 : (_detail$values3 = detail.values) === null || _detail$values3 === void 0 ? void 0 : _detail$values3.length) - 1,
|
|
9714
9723
|
caption: value.caption,
|
|
9715
9724
|
className: "border-none",
|
|
9716
9725
|
textStyle: value.value === "ACTIVE" ? {
|
|
@@ -9726,7 +9735,7 @@ const EditVendorDetails = props => {
|
|
|
9726
9735
|
},
|
|
9727
9736
|
onClick: () => onActionSelect(detail.type === "ES_FSM_REGISTRY_DETAILS_TYPE_DRIVER" ? "ADD_DRIVER" : "ADD_VEHICLE")
|
|
9728
9737
|
}, t(`${detail.type}_ADD`)))));
|
|
9729
|
-
}))
|
|
9738
|
+
})), showModal && /*#__PURE__*/React.createElement(Modal, {
|
|
9730
9739
|
headerBarMain: /*#__PURE__*/React.createElement(Heading, {
|
|
9731
9740
|
label: t(selectedAction === "DELETE" ? "ES_FSM_REGISTRY_DELETE_POPUP_HEADER" : selectedAction === "ADD_VEHICLE" ? "ES_FSM_REGISTRY_ADD_VEHICLE_POPUP_HEADER" : "ES_FSM_REGISTRY_ADD_DRIVER_POPUP_HEADER")
|
|
9732
9741
|
}),
|
|
@@ -10254,6 +10263,7 @@ const VENDORCreate = ({
|
|
|
10254
10263
|
const onSuccess = () => {
|
|
10255
10264
|
clearParams();
|
|
10256
10265
|
queryClient.invalidateQueries("VENDOR_CREATE");
|
|
10266
|
+
queryClient.invalidateQueries("EMP_VENDOR_COMMON_SEARCH");
|
|
10257
10267
|
};
|
|
10258
10268
|
let commonFields = createConfig;
|
|
10259
10269
|
commonFields.forEach(obj => {
|
|
@@ -10350,6 +10360,31 @@ const CheckPage = ({
|
|
|
10350
10360
|
const setdeclarationhandler = () => {
|
|
10351
10361
|
setAgree(!agree);
|
|
10352
10362
|
};
|
|
10363
|
+
const openFilePDF = fileId => {
|
|
10364
|
+
if (!fileId) {
|
|
10365
|
+
console.error("fileId is null or undefined!");
|
|
10366
|
+
return;
|
|
10367
|
+
}
|
|
10368
|
+
Digit.UploadServices.Filefetch([fileId], Digit.ULBService.getStateId()).then(res => {
|
|
10369
|
+
var _res$data, _res$data$fileStoreId, _res$data$fileStoreId2;
|
|
10370
|
+
const concatenatedUrls = res === null || res === void 0 ? void 0 : (_res$data = res.data) === null || _res$data === void 0 ? void 0 : (_res$data$fileStoreId = _res$data.fileStoreIds) === null || _res$data$fileStoreId === void 0 ? void 0 : (_res$data$fileStoreId2 = _res$data$fileStoreId[0]) === null || _res$data$fileStoreId2 === void 0 ? void 0 : _res$data$fileStoreId2.url;
|
|
10371
|
+
if (concatenatedUrls) {
|
|
10372
|
+
const urlArray = concatenatedUrls.split(",");
|
|
10373
|
+
const fileUrl = urlArray[0];
|
|
10374
|
+
if (fileUrl) {
|
|
10375
|
+
const link = document.createElement("a");
|
|
10376
|
+
link.href = fileUrl;
|
|
10377
|
+
link.target = "_blank";
|
|
10378
|
+
link.rel = "noopener noreferrer";
|
|
10379
|
+
document.body.appendChild(link);
|
|
10380
|
+
link.click();
|
|
10381
|
+
document.body.removeChild(link);
|
|
10382
|
+
}
|
|
10383
|
+
} else {
|
|
10384
|
+
console.error("URL missing in response. Full res:", res);
|
|
10385
|
+
}
|
|
10386
|
+
});
|
|
10387
|
+
};
|
|
10353
10388
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
10354
10389
|
style: {
|
|
10355
10390
|
display: "flex",
|
|
@@ -10454,16 +10489,19 @@ const CheckPage = ({
|
|
|
10454
10489
|
actionButton: /*#__PURE__*/React.createElement(ActionButton, {
|
|
10455
10490
|
jumpTo: `/digit-ui/employee/vendor/registry/additionaldetails/vendor-details`
|
|
10456
10491
|
})
|
|
10457
|
-
}))), /*#__PURE__*/React.createElement("br", null), /*#__PURE__*/React.createElement(CardSubHeader, null, t("VENDOR_DOCUMENTS_DETAILS")), /*#__PURE__*/React.createElement(StatusTable, null, /*#__PURE__*/React.createElement(Row, {
|
|
10492
|
+
}))), /*#__PURE__*/React.createElement("br", null), /*#__PURE__*/React.createElement(CardSubHeader, null, t("VENDOR_DOCUMENTS_DETAILS")), /*#__PURE__*/React.createElement(StatusTable, null, /*#__PURE__*/React.createElement(StatusTable, null, /*#__PURE__*/React.createElement(Row, {
|
|
10458
10493
|
label: t("VENDOR_DOCUMENTS"),
|
|
10459
10494
|
text: (documents === null || documents === void 0 ? void 0 : (_documents$documents = documents.documents) === null || _documents$documents === void 0 ? void 0 : _documents$documents.length) > 0 ? documents.documents.map((doc, index) => /*#__PURE__*/React.createElement("div", {
|
|
10460
10495
|
key: index
|
|
10461
|
-
}, /*#__PURE__*/React.createElement("
|
|
10462
|
-
|
|
10463
|
-
|
|
10464
|
-
|
|
10496
|
+
}, /*#__PURE__*/React.createElement("span", {
|
|
10497
|
+
style: {
|
|
10498
|
+
color: "#5a6ee1",
|
|
10499
|
+
cursor: "pointer",
|
|
10500
|
+
textDecoration: "underline"
|
|
10501
|
+
},
|
|
10502
|
+
onClick: () => openFilePDF(doc === null || doc === void 0 ? void 0 : doc.filestoreId)
|
|
10465
10503
|
}, t(doc.documentType)))) : t("CS_NA")
|
|
10466
|
-
})), /*#__PURE__*/React.createElement("br", null), /*#__PURE__*/React.createElement(CheckBox, {
|
|
10504
|
+
}))), /*#__PURE__*/React.createElement("br", null), /*#__PURE__*/React.createElement(CheckBox, {
|
|
10467
10505
|
label: t("AST_FINAL_DECLARATION_MESSAGE"),
|
|
10468
10506
|
onChange: setdeclarationhandler,
|
|
10469
10507
|
styles: {
|