@djb25/digit-ui-module-vendor 1.0.65 → 1.0.67
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 +157 -92
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +157 -92
- package/dist/index.modern.js.map +1 -1
- package/package.json +1 -1
package/dist/index.modern.js
CHANGED
|
@@ -1863,7 +1863,7 @@ const VendorInbox = props => {
|
|
|
1863
1863
|
}
|
|
1864
1864
|
const hasDetails = ((_row$original8 = row.original) === null || _row$original8 === void 0 ? void 0 : _row$original8.vendorAdditionalDetails) !== null;
|
|
1865
1865
|
return /*#__PURE__*/React.createElement(Link, {
|
|
1866
|
-
to: hasDetails ? "/digit-ui/" + userType + "/vendor/registry/additionaldetails/info?vendorId=" + vendorId : "/digit-ui/" + userType + "/vendor/registry/
|
|
1866
|
+
to: !hasDetails ? "/digit-ui/" + userType + "/vendor/registry/additionaldetails/info?vendorId=" + vendorId : "/digit-ui/" + userType + "/vendor/registry/vendor-details/" + vendorId
|
|
1867
1867
|
}, /*#__PURE__*/React.createElement("button", {
|
|
1868
1868
|
className: "submit-bar",
|
|
1869
1869
|
style: {
|
|
@@ -4714,8 +4714,7 @@ const VendorConfig = function (t, module, genderMenu, update) {
|
|
|
4714
4714
|
isMandatory: true,
|
|
4715
4715
|
type: "component",
|
|
4716
4716
|
key: "zoneIds",
|
|
4717
|
-
component: "SelectEkycZones"
|
|
4718
|
-
disable: update
|
|
4717
|
+
component: "SelectEkycZones"
|
|
4719
4718
|
}, {
|
|
4720
4719
|
label: "ES_FSM_REGISTRY_NEW_OWNER_NAME",
|
|
4721
4720
|
isMandatory: true,
|
|
@@ -4792,7 +4791,8 @@ const VendorConfig = function (t, module, genderMenu, update) {
|
|
|
4792
4791
|
|
|
4793
4792
|
const AddVendor = () => {
|
|
4794
4793
|
var _Digit$UserService$ge, _formData$serviceType2;
|
|
4795
|
-
const
|
|
4794
|
+
const rawTenantId = Digit.ULBService.getCurrentTenantId();
|
|
4795
|
+
const tenantId = rawTenantId !== null && rawTenantId !== void 0 && rawTenantId.includes(".") ? rawTenantId : rawTenantId + ".djb";
|
|
4796
4796
|
const _useTranslation = useTranslation(),
|
|
4797
4797
|
t = _useTranslation.t;
|
|
4798
4798
|
const history = useHistory();
|
|
@@ -5014,7 +5014,7 @@ const AddVendor = () => {
|
|
|
5014
5014
|
onError: error => {
|
|
5015
5015
|
setShowToast({
|
|
5016
5016
|
key: "error",
|
|
5017
|
-
action: error
|
|
5017
|
+
action: (error === null || error === void 0 ? void 0 : error.message) || error
|
|
5018
5018
|
});
|
|
5019
5019
|
},
|
|
5020
5020
|
onSuccess: () => {
|
|
@@ -5724,7 +5724,7 @@ const createConfig = [{
|
|
|
5724
5724
|
body: [{
|
|
5725
5725
|
route: "info",
|
|
5726
5726
|
component: "ServiceDoc",
|
|
5727
|
-
nextStep: "
|
|
5727
|
+
nextStep: "modify-details",
|
|
5728
5728
|
key: "Documents"
|
|
5729
5729
|
}, {
|
|
5730
5730
|
route: "modify-details",
|
|
@@ -5918,7 +5918,7 @@ const EditVendor = () => {
|
|
|
5918
5918
|
const _useState = useState(null),
|
|
5919
5919
|
showToast = _useState[0],
|
|
5920
5920
|
setShowToast = _useState[1];
|
|
5921
|
-
const _useState2 = useState(
|
|
5921
|
+
const _useState2 = useState(true),
|
|
5922
5922
|
canSubmit = _useState2[0],
|
|
5923
5923
|
setCanSubmit = _useState2[1];
|
|
5924
5924
|
const _useState3 = useState({}),
|
|
@@ -5952,22 +5952,20 @@ const EditVendor = () => {
|
|
|
5952
5952
|
const _useState6 = useState([]),
|
|
5953
5953
|
zones = _useState6[0],
|
|
5954
5954
|
setZones = _useState6[1];
|
|
5955
|
-
const _Digit$Hooks$useCommo = Digit.Hooks.useCommonMDMS(tenantId, "
|
|
5956
|
-
|
|
5955
|
+
const _Digit$Hooks$useCommo = Digit.Hooks.useCommonMDMS(tenantId, "common-masters", ["ZroOfficeList"]),
|
|
5956
|
+
zroData = _Digit$Hooks$useCommo.data,
|
|
5957
5957
|
isLoading = _Digit$Hooks$useCommo.isLoading;
|
|
5958
5958
|
useEffect(() => {
|
|
5959
|
-
var
|
|
5960
|
-
const
|
|
5961
|
-
|
|
5962
|
-
|
|
5963
|
-
|
|
5964
|
-
|
|
5965
|
-
|
|
5966
|
-
|
|
5967
|
-
const zonesList = [...new Map(allZones.map(zone => [zone.code, zone])).values()];
|
|
5968
|
-
setZones(zonesList);
|
|
5959
|
+
var _zroData$commonMaste, _zroData$MdmsRes, _zroData$MdmsRes$comm;
|
|
5960
|
+
const zroOfficeList = (zroData === null || zroData === void 0 ? void 0 : (_zroData$commonMaste = zroData["common-masters"]) === null || _zroData$commonMaste === void 0 ? void 0 : _zroData$commonMaste.ZroOfficeList) || (zroData === null || zroData === void 0 ? void 0 : (_zroData$MdmsRes = zroData.MdmsRes) === null || _zroData$MdmsRes === void 0 ? void 0 : (_zroData$MdmsRes$comm = _zroData$MdmsRes["common-masters"]) === null || _zroData$MdmsRes$comm === void 0 ? void 0 : _zroData$MdmsRes$comm.ZroOfficeList) || [];
|
|
5961
|
+
if (Array.isArray(zroOfficeList)) {
|
|
5962
|
+
const activeZros = zroOfficeList.filter(zro => zro && zro.active).map(zro => ({
|
|
5963
|
+
code: zro.code,
|
|
5964
|
+
name: zro.code
|
|
5965
|
+
}));
|
|
5966
|
+
setZones(activeZros);
|
|
5969
5967
|
}
|
|
5970
|
-
}, [
|
|
5968
|
+
}, [zroData]);
|
|
5971
5969
|
useEffect(() => {
|
|
5972
5970
|
var _genderTypeData$commo, _genderTypeData$commo2;
|
|
5973
5971
|
if (genderTypeData && (_genderTypeData$commo = genderTypeData["common-masters"]) !== null && _genderTypeData$commo !== void 0 && (_genderTypeData$commo2 = _genderTypeData$commo.GenderType) !== null && _genderTypeData$commo2 !== void 0 && _genderTypeData$commo2.length) {
|
|
@@ -6067,22 +6065,21 @@ const EditVendor = () => {
|
|
|
6067
6065
|
if (typeof dsoDetails.zoneIds[0] === "object") return;
|
|
6068
6066
|
setDefaultValues(prev => _extends({}, prev, {
|
|
6069
6067
|
zoneIds: zones.filter(z => {
|
|
6070
|
-
|
|
6071
|
-
return
|
|
6068
|
+
const prevZones = (prev === null || prev === void 0 ? void 0 : prev.zoneIds) || [];
|
|
6069
|
+
return prevZones.some(prevZ => typeof prevZ === "object" ? (prevZ === null || prevZ === void 0 ? void 0 : prevZ.code) === z.code : prevZ === z.code || prevZ === z.name);
|
|
6072
6070
|
})
|
|
6073
6071
|
}));
|
|
6074
6072
|
}, [dsoDetails === null || dsoDetails === void 0 ? void 0 : dsoDetails.zoneIds, zones]);
|
|
6075
6073
|
const onFormValueChange = (setValue, data) => {
|
|
6076
|
-
var _data$
|
|
6077
|
-
const isAddressFilled = (data === null || data === void 0 ? void 0 : (_data$propertyAddress = data.propertyAddress) === null || _data$propertyAddress === void 0 ? void 0 : _data$propertyAddress.city) && (data === null || data === void 0 ? void 0 : (_data$propertyAddress2 = data.propertyAddress) === null || _data$propertyAddress2 === void 0 ? void 0 : _data$propertyAddress2.locality);
|
|
6074
|
+
var _data$serviceType, _data$serviceType2, _data$serviceType2$co, _data$serviceType3, _data$serviceType3$i;
|
|
6078
6075
|
const isVendorDetailsFilled = (data === null || data === void 0 ? void 0 : data.vendorName) && (data === null || data === void 0 ? void 0 : data.phone) && (data === null || data === void 0 ? void 0 : (_data$serviceType = data.serviceType) === null || _data$serviceType === void 0 ? void 0 : _data$serviceType.code);
|
|
6079
|
-
const isEkyc = (data === null || data === void 0 ? void 0 : (_data$serviceType2 = data.serviceType) === null || _data$serviceType2 === void 0 ? void 0 : _data$serviceType2.code) === "EKYC";
|
|
6076
|
+
const isEkyc = (data === null || data === void 0 ? void 0 : (_data$serviceType2 = data.serviceType) === null || _data$serviceType2 === void 0 ? void 0 : (_data$serviceType2$co = _data$serviceType2.code) === null || _data$serviceType2$co === void 0 ? void 0 : _data$serviceType2$co.toUpperCase()) === "EKYC" || (data === null || data === void 0 ? void 0 : (_data$serviceType3 = data.serviceType) === null || _data$serviceType3 === void 0 ? void 0 : (_data$serviceType3$i = _data$serviceType3.i18nKey) === null || _data$serviceType3$i === void 0 ? void 0 : _data$serviceType3$i.toUpperCase()) === "EKYC";
|
|
6080
6077
|
let isEkycFieldsFilled = true;
|
|
6081
6078
|
if (isEkyc) {
|
|
6082
|
-
var _data$zoneIds
|
|
6083
|
-
isEkycFieldsFilled = (data === null || data === void 0 ? void 0 : data.ownerName) && (data === null || data === void 0 ? void 0 : data.contractStartDate) && (data === null || data === void 0 ? void 0 : data.contractEndDate) && (data === null || data === void 0 ? void 0 : (_data$zoneIds = data.zoneIds) === null || _data$zoneIds === void 0 ? void 0 : _data$zoneIds.length) > 0 && (data === null || data === void 0 ? void 0 :
|
|
6079
|
+
var _data$zoneIds;
|
|
6080
|
+
isEkycFieldsFilled = (data === null || data === void 0 ? void 0 : data.ownerName) && (data === null || data === void 0 ? void 0 : data.contractStartDate) && (data === null || data === void 0 ? void 0 : data.contractEndDate) && (data === null || data === void 0 ? void 0 : (_data$zoneIds = data.zoneIds) === null || _data$zoneIds === void 0 ? void 0 : _data$zoneIds.length) > 0 && (data === null || data === void 0 ? void 0 : data.gender) && (data === null || data === void 0 ? void 0 : data.dob);
|
|
6084
6081
|
}
|
|
6085
|
-
if (isVendorDetailsFilled &&
|
|
6082
|
+
if (isVendorDetailsFilled && isEkycFieldsFilled) {
|
|
6086
6083
|
setCanSubmit(true);
|
|
6087
6084
|
} else {
|
|
6088
6085
|
setCanSubmit(false);
|
|
@@ -6092,7 +6089,7 @@ const EditVendor = () => {
|
|
|
6092
6089
|
setShowToast(null);
|
|
6093
6090
|
};
|
|
6094
6091
|
const onSubmit = data => {
|
|
6095
|
-
var _address$city, _address$city2, _address$city3, _address$city4, _address$locality, _address$locality2, _address$ward, _address$ward2, _mergedData$plotNo, _mergedData$buildingN, _mergedData$serviceTy, _mergedData$address, _mergedData$address2, _mergedData$relations, _mergedData$gender, _mergedData$
|
|
6092
|
+
var _address$city, _address$city2, _address$city3, _address$city4, _address$locality, _address$locality2, _address$ward, _address$ward2, _mergedData$plotNo, _mergedData$buildingN, _mergedData$serviceTy, _mergedData$serviceTy2, _mergedData$serviceTy3, _mergedData$serviceTy4, _mergedData$address, _mergedData$address2, _mergedData$relations, _mergedData$gender, _mergedData$serviceTy5;
|
|
6096
6093
|
const mergedData = data;
|
|
6097
6094
|
const address = mergedData === null || mergedData === void 0 ? void 0 : mergedData.propertyAddress;
|
|
6098
6095
|
const pincode = address === null || address === void 0 ? void 0 : address.pincode;
|
|
@@ -6113,7 +6110,7 @@ const EditVendor = () => {
|
|
|
6113
6110
|
const buildingName = mergedData === null || mergedData === void 0 ? void 0 : (_mergedData$buildingN = mergedData.buildingName) === null || _mergedData$buildingN === void 0 ? void 0 : _mergedData$buildingN.trim();
|
|
6114
6111
|
const emailId = mergedData === null || mergedData === void 0 ? void 0 : mergedData.emailId;
|
|
6115
6112
|
const phone = mergedData === null || mergedData === void 0 ? void 0 : mergedData.phone;
|
|
6116
|
-
const isEkyc = (mergedData === null || mergedData === void 0 ? void 0 : (_mergedData$serviceTy = mergedData.serviceType) === null || _mergedData$serviceTy === void 0 ? void 0 : _mergedData$serviceTy.i18nKey) === "EKYC";
|
|
6113
|
+
const isEkyc = (mergedData === null || mergedData === void 0 ? void 0 : (_mergedData$serviceTy = mergedData.serviceType) === null || _mergedData$serviceTy === void 0 ? void 0 : (_mergedData$serviceTy2 = _mergedData$serviceTy.code) === null || _mergedData$serviceTy2 === void 0 ? void 0 : _mergedData$serviceTy2.toUpperCase()) === "EKYC" || (mergedData === null || mergedData === void 0 ? void 0 : (_mergedData$serviceTy3 = mergedData.serviceType) === null || _mergedData$serviceTy3 === void 0 ? void 0 : (_mergedData$serviceTy4 = _mergedData$serviceTy3.i18nKey) === null || _mergedData$serviceTy4 === void 0 ? void 0 : _mergedData$serviceTy4.toUpperCase()) === "EKYC";
|
|
6117
6114
|
let vendorData = _extends({}, dsoDetails, {
|
|
6118
6115
|
tenantId: tenantId,
|
|
6119
6116
|
name,
|
|
@@ -6158,7 +6155,7 @@ const EditVendor = () => {
|
|
|
6158
6155
|
mobileNumber: phone
|
|
6159
6156
|
}),
|
|
6160
6157
|
additionalDetails: {
|
|
6161
|
-
serviceType: isEkyc ? "ekyc" : mergedData === null || mergedData === void 0 ? void 0 : (_mergedData$
|
|
6158
|
+
serviceType: isEkyc ? "ekyc" : mergedData === null || mergedData === void 0 ? void 0 : (_mergedData$serviceTy5 = mergedData.serviceType) === null || _mergedData$serviceTy5 === void 0 ? void 0 : _mergedData$serviceTy5.code
|
|
6162
6159
|
},
|
|
6163
6160
|
vehicles: [],
|
|
6164
6161
|
drivers: [],
|
|
@@ -6189,7 +6186,7 @@ const EditVendor = () => {
|
|
|
6189
6186
|
onError: error => {
|
|
6190
6187
|
setShowToast({
|
|
6191
6188
|
key: "error",
|
|
6192
|
-
action: error
|
|
6189
|
+
action: (error === null || error === void 0 ? void 0 : error.message) || error
|
|
6193
6190
|
});
|
|
6194
6191
|
},
|
|
6195
6192
|
onSuccess: () => {
|
|
@@ -6651,6 +6648,9 @@ const ServiceDoc = _ref => {
|
|
|
6651
6648
|
_Digit$Hooks$asset$us2 = _Digit$Hooks$asset$us.data,
|
|
6652
6649
|
Documentsob = _Digit$Hooks$asset$us2 === void 0 ? {} : _Digit$Hooks$asset$us2;
|
|
6653
6650
|
let docs = Documentsob === null || Documentsob === void 0 ? void 0 : (_Documentsob$ASSET = Documentsob.ASSET) === null || _Documentsob$ASSET === void 0 ? void 0 : _Documentsob$ASSET.Documents;
|
|
6651
|
+
const onSubmit = () => {
|
|
6652
|
+
onSelect(config.key, {});
|
|
6653
|
+
};
|
|
6654
6654
|
return /*#__PURE__*/React.createElement("div", {
|
|
6655
6655
|
className: "employee-form-content"
|
|
6656
6656
|
}, isLoading && /*#__PURE__*/React.createElement(Loader, null), Array.isArray(docs) && docs.map((_ref2, index) => {
|
|
@@ -6672,7 +6672,7 @@ const ServiceDoc = _ref => {
|
|
|
6672
6672
|
}, dropdownIndex + 1, ". ", t(stringReplaceAll(dropdownData === null || dropdownData === void 0 ? void 0 : dropdownData.code, ".", "_")))));
|
|
6673
6673
|
}), /*#__PURE__*/React.createElement(ActionBar, null, /*#__PURE__*/React.createElement(SubmitBar, {
|
|
6674
6674
|
label: t("COMMON_NEXT"),
|
|
6675
|
-
onSubmit:
|
|
6675
|
+
onSubmit: onSubmit
|
|
6676
6676
|
})));
|
|
6677
6677
|
};
|
|
6678
6678
|
|
|
@@ -7755,91 +7755,91 @@ const CheckPage = _ref2 => {
|
|
|
7755
7755
|
label: t("VENDOR_ID"),
|
|
7756
7756
|
text: "" + t(checkForNA(vendordet === null || vendordet === void 0 ? void 0 : vendordet.VendorId)),
|
|
7757
7757
|
actionButton: /*#__PURE__*/React.createElement(ActionButton, {
|
|
7758
|
-
jumpTo: "/digit-ui/" + (window.location.pathname.includes("/citizen") ? "citizen" : "employee") + "/vendor/registry/additionaldetails/
|
|
7758
|
+
jumpTo: "/digit-ui/" + (window.location.pathname.includes("/citizen") ? "citizen" : "employee") + "/vendor/registry/additionaldetails/modify-details"
|
|
7759
7759
|
})
|
|
7760
7760
|
}), /*#__PURE__*/React.createElement(Row, {
|
|
7761
7761
|
label: t("VENDOR_BANK_IFSC_CODE"),
|
|
7762
7762
|
text: "" + t(checkForNA(vendordet === null || vendordet === void 0 ? void 0 : vendordet.IFSC)),
|
|
7763
7763
|
actionButton: /*#__PURE__*/React.createElement(ActionButton, {
|
|
7764
|
-
jumpTo: "/digit-ui/" + (window.location.pathname.includes("/citizen") ? "citizen" : "employee") + "/vendor/registry/additionaldetails/
|
|
7764
|
+
jumpTo: "/digit-ui/" + (window.location.pathname.includes("/citizen") ? "citizen" : "employee") + "/vendor/registry/additionaldetails/modify-details"
|
|
7765
7765
|
})
|
|
7766
7766
|
}), /*#__PURE__*/React.createElement(Row, {
|
|
7767
7767
|
label: t("VENDOR_BANK_NAME"),
|
|
7768
7768
|
text: "" + t(checkForNA(vendordet === null || vendordet === void 0 ? void 0 : vendordet.Bank)),
|
|
7769
7769
|
actionButton: /*#__PURE__*/React.createElement(ActionButton, {
|
|
7770
|
-
jumpTo: "/digit-ui/" + (window.location.pathname.includes("/citizen") ? "citizen" : "employee") + "/vendor/registry/additionaldetails/
|
|
7770
|
+
jumpTo: "/digit-ui/" + (window.location.pathname.includes("/citizen") ? "citizen" : "employee") + "/vendor/registry/additionaldetails/modify-details"
|
|
7771
7771
|
})
|
|
7772
7772
|
}), /*#__PURE__*/React.createElement(Row, {
|
|
7773
7773
|
label: t("VENDOR_BANK_BRANCH"),
|
|
7774
7774
|
text: "" + t(checkForNA(vendordet === null || vendordet === void 0 ? void 0 : vendordet.BankbranchName)),
|
|
7775
7775
|
actionButton: /*#__PURE__*/React.createElement(ActionButton, {
|
|
7776
|
-
jumpTo: "/digit-ui/" + (window.location.pathname.includes("/citizen") ? "citizen" : "employee") + "/vendor/registry/additionaldetails/
|
|
7776
|
+
jumpTo: "/digit-ui/" + (window.location.pathname.includes("/citizen") ? "citizen" : "employee") + "/vendor/registry/additionaldetails/modify-details"
|
|
7777
7777
|
})
|
|
7778
7778
|
}), /*#__PURE__*/React.createElement(Row, {
|
|
7779
7779
|
label: t("VENDOR_MICR_NO"),
|
|
7780
7780
|
text: "" + t(checkForNA(vendordet === null || vendordet === void 0 ? void 0 : vendordet.micrNo)),
|
|
7781
7781
|
actionButton: /*#__PURE__*/React.createElement(ActionButton, {
|
|
7782
|
-
jumpTo: "/digit-ui/" + (window.location.pathname.includes("/citizen") ? "citizen" : "employee") + "/vendor/registry/additionaldetails/
|
|
7782
|
+
jumpTo: "/digit-ui/" + (window.location.pathname.includes("/citizen") ? "citizen" : "employee") + "/vendor/registry/additionaldetails/modify-details"
|
|
7783
7783
|
})
|
|
7784
7784
|
}), /*#__PURE__*/React.createElement(Row, {
|
|
7785
7785
|
label: t("BANK_ACCONT_NO"),
|
|
7786
7786
|
text: "" + t(checkForNA(vendordet === null || vendordet === void 0 ? void 0 : vendordet.AccountNo)),
|
|
7787
7787
|
actionButton: /*#__PURE__*/React.createElement(ActionButton, {
|
|
7788
|
-
jumpTo: "/digit-ui/" + (window.location.pathname.includes("/citizen") ? "citizen" : "employee") + "/vendor/registry/additionaldetails/
|
|
7788
|
+
jumpTo: "/digit-ui/" + (window.location.pathname.includes("/citizen") ? "citizen" : "employee") + "/vendor/registry/additionaldetails/modify-details"
|
|
7789
7789
|
})
|
|
7790
7790
|
}), /*#__PURE__*/React.createElement(Row, {
|
|
7791
7791
|
label: t("PAN_NO"),
|
|
7792
7792
|
text: "" + t(checkForNA(vendordet === null || vendordet === void 0 ? void 0 : vendordet.PanNo)),
|
|
7793
7793
|
actionButton: /*#__PURE__*/React.createElement(ActionButton, {
|
|
7794
|
-
jumpTo: "/digit-ui/" + (window.location.pathname.includes("/citizen") ? "citizen" : "employee") + "/vendor/registry/additionaldetails/
|
|
7794
|
+
jumpTo: "/digit-ui/" + (window.location.pathname.includes("/citizen") ? "citizen" : "employee") + "/vendor/registry/additionaldetails/modify-details"
|
|
7795
7795
|
})
|
|
7796
7796
|
}), /*#__PURE__*/React.createElement(Row, {
|
|
7797
7797
|
label: t("GST_NO"),
|
|
7798
7798
|
text: "" + t(checkForNA(vendordet === null || vendordet === void 0 ? void 0 : vendordet.GstNo)),
|
|
7799
7799
|
actionButton: /*#__PURE__*/React.createElement(ActionButton, {
|
|
7800
|
-
jumpTo: "/digit-ui/" + (window.location.pathname.includes("/citizen") ? "citizen" : "employee") + "/vendor/registry/additionaldetails/
|
|
7800
|
+
jumpTo: "/digit-ui/" + (window.location.pathname.includes("/citizen") ? "citizen" : "employee") + "/vendor/registry/additionaldetails/modify-details"
|
|
7801
7801
|
})
|
|
7802
7802
|
}), /*#__PURE__*/React.createElement(Row, {
|
|
7803
7803
|
label: t("GST_REGISTERED_STATE/UT"),
|
|
7804
7804
|
text: "" + t(checkForNA(vendordet === null || vendordet === void 0 ? void 0 : vendordet.GstState)),
|
|
7805
7805
|
actionButton: /*#__PURE__*/React.createElement(ActionButton, {
|
|
7806
|
-
jumpTo: "/digit-ui/" + (window.location.pathname.includes("/citizen") ? "citizen" : "employee") + "/vendor/registry/additionaldetails/
|
|
7806
|
+
jumpTo: "/digit-ui/" + (window.location.pathname.includes("/citizen") ? "citizen" : "employee") + "/vendor/registry/additionaldetails/modify-details"
|
|
7807
7807
|
})
|
|
7808
7808
|
}), /*#__PURE__*/React.createElement(Row, {
|
|
7809
7809
|
label: t("REGISTRATION_NO"),
|
|
7810
7810
|
text: "" + t(checkForNA(vendordet === null || vendordet === void 0 ? void 0 : vendordet.RegistrationNo)),
|
|
7811
7811
|
actionButton: /*#__PURE__*/React.createElement(ActionButton, {
|
|
7812
|
-
jumpTo: "/digit-ui/" + (window.location.pathname.includes("/citizen") ? "citizen" : "employee") + "/vendor/registry/additionaldetails/
|
|
7812
|
+
jumpTo: "/digit-ui/" + (window.location.pathname.includes("/citizen") ? "citizen" : "employee") + "/vendor/registry/additionaldetails/modify-details"
|
|
7813
7813
|
})
|
|
7814
7814
|
}), /*#__PURE__*/React.createElement(Row, {
|
|
7815
7815
|
label: t("EPF_NO"),
|
|
7816
7816
|
text: "" + t(checkForNA(vendordet === null || vendordet === void 0 ? void 0 : vendordet.EpfNo)),
|
|
7817
7817
|
actionButton: /*#__PURE__*/React.createElement(ActionButton, {
|
|
7818
|
-
jumpTo: "/digit-ui/" + (window.location.pathname.includes("/citizen") ? "citizen" : "employee") + "/vendor/registry/additionaldetails/
|
|
7818
|
+
jumpTo: "/digit-ui/" + (window.location.pathname.includes("/citizen") ? "citizen" : "employee") + "/vendor/registry/additionaldetails/modify-details"
|
|
7819
7819
|
})
|
|
7820
7820
|
}), /*#__PURE__*/React.createElement(Row, {
|
|
7821
7821
|
label: t("ESI_NO"),
|
|
7822
7822
|
text: "" + t(checkForNA(vendordet === null || vendordet === void 0 ? void 0 : vendordet.EsiNo)),
|
|
7823
7823
|
actionButton: /*#__PURE__*/React.createElement(ActionButton, {
|
|
7824
|
-
jumpTo: "/digit-ui/" + (window.location.pathname.includes("/citizen") ? "citizen" : "employee") + "/vendor/registry/additionaldetails/
|
|
7824
|
+
jumpTo: "/digit-ui/" + (window.location.pathname.includes("/citizen") ? "citizen" : "employee") + "/vendor/registry/additionaldetails/modify-details"
|
|
7825
7825
|
})
|
|
7826
7826
|
}), /*#__PURE__*/React.createElement(Row, {
|
|
7827
7827
|
label: t("VENDOR_TYPE"),
|
|
7828
7828
|
text: "" + t(checkForNA(vendordet === null || vendordet === void 0 ? void 0 : (_vendordet$VendorType = vendordet.VendorType) === null || _vendordet$VendorType === void 0 ? void 0 : _vendordet$VendorType.code)),
|
|
7829
7829
|
actionButton: /*#__PURE__*/React.createElement(ActionButton, {
|
|
7830
|
-
jumpTo: "/digit-ui/" + (window.location.pathname.includes("/citizen") ? "citizen" : "employee") + "/vendor/registry/additionaldetails/
|
|
7830
|
+
jumpTo: "/digit-ui/" + (window.location.pathname.includes("/citizen") ? "citizen" : "employee") + "/vendor/registry/additionaldetails/modify-details"
|
|
7831
7831
|
})
|
|
7832
7832
|
}), /*#__PURE__*/React.createElement(Row, {
|
|
7833
7833
|
label: t("VENDOR_CATEGORY"),
|
|
7834
7834
|
text: "" + t(checkForNA(vendordet === null || vendordet === void 0 ? void 0 : (_vendordet$VendorCate = vendordet.VendorCategory) === null || _vendordet$VendorCate === void 0 ? void 0 : _vendordet$VendorCate.code)),
|
|
7835
7835
|
actionButton: /*#__PURE__*/React.createElement(ActionButton, {
|
|
7836
|
-
jumpTo: "/digit-ui/" + (window.location.pathname.includes("/citizen") ? "citizen" : "employee") + "/vendor/registry/additionaldetails/
|
|
7836
|
+
jumpTo: "/digit-ui/" + (window.location.pathname.includes("/citizen") ? "citizen" : "employee") + "/vendor/registry/additionaldetails/modify-details"
|
|
7837
7837
|
})
|
|
7838
7838
|
}), /*#__PURE__*/React.createElement(Row, {
|
|
7839
7839
|
label: t("VENDOR_STATUS"),
|
|
7840
7840
|
text: "" + t(checkForNA(vendordet === null || vendordet === void 0 ? void 0 : (_vendordet$Status = vendordet.Status) === null || _vendordet$Status === void 0 ? void 0 : _vendordet$Status.code)),
|
|
7841
7841
|
actionButton: /*#__PURE__*/React.createElement(ActionButton, {
|
|
7842
|
-
jumpTo: "/digit-ui/" + (window.location.pathname.includes("/citizen") ? "citizen" : "employee") + "/vendor/registry/additionaldetails/
|
|
7842
|
+
jumpTo: "/digit-ui/" + (window.location.pathname.includes("/citizen") ? "citizen" : "employee") + "/vendor/registry/additionaldetails/modify-details"
|
|
7843
7843
|
})
|
|
7844
7844
|
}))), /*#__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, {
|
|
7845
7845
|
label: t("VENDOR_DOCUMENTS"),
|
|
@@ -9561,7 +9561,8 @@ const SelectEkycZones = _ref => {
|
|
|
9561
9561
|
isMultiSelect = _ref$isMultiSelect === void 0 ? true : _ref$isMultiSelect,
|
|
9562
9562
|
_ref$disable = _ref.disable,
|
|
9563
9563
|
disable = _ref$disable === void 0 ? false : _ref$disable;
|
|
9564
|
-
const
|
|
9564
|
+
const rawTenantId = Digit.ULBService.getCurrentTenantId();
|
|
9565
|
+
const tenantId = rawTenantId !== null && rawTenantId !== void 0 && rawTenantId.includes(".") ? rawTenantId : rawTenantId + ".djb";
|
|
9565
9566
|
const _useState = useState([]),
|
|
9566
9567
|
zones = _useState[0],
|
|
9567
9568
|
setZones = _useState[1];
|
|
@@ -9608,22 +9609,31 @@ const SelectEkycZones = _ref => {
|
|
|
9608
9609
|
return ((_s$id = s.id) === null || _s$id === void 0 ? void 0 : _s$id.toLowerCase()) === (loggedInUser === null || loggedInUser === void 0 ? void 0 : (_loggedInUser$uuid = loggedInUser.uuid) === null || _loggedInUser$uuid === void 0 ? void 0 : _loggedInUser$uuid.toLowerCase()) || ((_s$owner = s.owner) === null || _s$owner === void 0 ? void 0 : (_s$owner$uuid = _s$owner.uuid) === null || _s$owner$uuid === void 0 ? void 0 : _s$owner$uuid.toLowerCase()) === (loggedInUser === null || loggedInUser === void 0 ? void 0 : (_loggedInUser$uuid2 = loggedInUser.uuid) === null || _loggedInUser$uuid2 === void 0 ? void 0 : _loggedInUser$uuid2.toLowerCase()) || ((_s$owner2 = s.owner) === null || _s$owner2 === void 0 ? void 0 : _s$owner2.mobileNumber) === (loggedInUser === null || loggedInUser === void 0 ? void 0 : loggedInUser.mobileNumber) || s.mobileNo === (loggedInUser === null || loggedInUser === void 0 ? void 0 : loggedInUser.mobileNumber);
|
|
9609
9610
|
});
|
|
9610
9611
|
}, [supervisorSearchResponse, loggedInUser]);
|
|
9611
|
-
const _Digit$Hooks$useCommo = Digit.Hooks.useCommonMDMS(
|
|
9612
|
+
const _Digit$Hooks$useCommo = Digit.Hooks.useCommonMDMS("dl", "egov-location", ["TenantBoundary"]),
|
|
9612
9613
|
boundaryData = _Digit$Hooks$useCommo.data,
|
|
9613
9614
|
isLoading = _Digit$Hooks$useCommo.isLoading;
|
|
9614
9615
|
useEffect(() => {
|
|
9615
|
-
var _boundaryData$egovLo, _boundaryData$
|
|
9616
|
-
const
|
|
9617
|
-
const
|
|
9618
|
-
|
|
9619
|
-
const
|
|
9620
|
-
|
|
9621
|
-
|
|
9622
|
-
|
|
9623
|
-
|
|
9624
|
-
|
|
9625
|
-
|
|
9626
|
-
|
|
9616
|
+
var _boundaryData$egovLo, _boundaryData$MdmsRes, _boundaryData$MdmsRes2;
|
|
9617
|
+
const tenantBoundaryList = (boundaryData === null || boundaryData === void 0 ? void 0 : (_boundaryData$egovLo = boundaryData["egov-location"]) === null || _boundaryData$egovLo === void 0 ? void 0 : _boundaryData$egovLo.TenantBoundary) || (boundaryData === null || boundaryData === void 0 ? void 0 : (_boundaryData$MdmsRes = boundaryData.MdmsRes) === null || _boundaryData$MdmsRes === void 0 ? void 0 : (_boundaryData$MdmsRes2 = _boundaryData$MdmsRes["egov-location"]) === null || _boundaryData$MdmsRes2 === void 0 ? void 0 : _boundaryData$MdmsRes2.TenantBoundary) || [];
|
|
9618
|
+
const zoneMap = {};
|
|
9619
|
+
tenantBoundaryList.forEach(tb => {
|
|
9620
|
+
const walkBoundary = node => {
|
|
9621
|
+
if (!node) return;
|
|
9622
|
+
if (node.label === "Zone" && node.code && node.code !== "UNKNOWN") {
|
|
9623
|
+
if (!zoneMap[node.code]) {
|
|
9624
|
+
zoneMap[node.code] = {
|
|
9625
|
+
code: node.code,
|
|
9626
|
+
name: node.name || node.code
|
|
9627
|
+
};
|
|
9628
|
+
}
|
|
9629
|
+
}
|
|
9630
|
+
(node.children || []).forEach(walkBoundary);
|
|
9631
|
+
};
|
|
9632
|
+
walkBoundary(tb.boundary);
|
|
9633
|
+
});
|
|
9634
|
+
const uniqueZones = Object.values(zoneMap).sort((a, b) => a.name.localeCompare(b.name));
|
|
9635
|
+
setZones(uniqueZones);
|
|
9636
|
+
}, [boundaryData]);
|
|
9627
9637
|
useEffect(() => {
|
|
9628
9638
|
if (!zones.length || !(formData !== null && formData !== void 0 && formData.zoneIds)) return;
|
|
9629
9639
|
if (isMultiSelect) {
|
|
@@ -9632,7 +9642,10 @@ const SelectEkycZones = _ref => {
|
|
|
9632
9642
|
setSelectedZones(formData.zoneIds.filter(Boolean));
|
|
9633
9643
|
return;
|
|
9634
9644
|
}
|
|
9635
|
-
const selected = zones.filter(zone => zone &&
|
|
9645
|
+
const selected = zones.filter(zone => zone && formData.zoneIds.some(id => {
|
|
9646
|
+
var _zone$code, _zone$name;
|
|
9647
|
+
return id && (id.toString().toUpperCase() === ((_zone$code = zone.code) === null || _zone$code === void 0 ? void 0 : _zone$code.toUpperCase()) || id.toString().toUpperCase() === ((_zone$name = zone.name) === null || _zone$name === void 0 ? void 0 : _zone$name.toUpperCase()));
|
|
9648
|
+
}));
|
|
9636
9649
|
setSelectedZones(selected);
|
|
9637
9650
|
if (!initialized.current) {
|
|
9638
9651
|
initialized.current = true;
|
|
@@ -9647,7 +9660,10 @@ const SelectEkycZones = _ref => {
|
|
|
9647
9660
|
if (selectedVal && typeof selectedVal === "object") {
|
|
9648
9661
|
selectedVal = selectedVal.name || selectedVal.code || "";
|
|
9649
9662
|
}
|
|
9650
|
-
const selected = zones.find(zone =>
|
|
9663
|
+
const selected = zones.find(zone => {
|
|
9664
|
+
var _zone$name2, _selectedVal, _zone$code2, _selectedVal2;
|
|
9665
|
+
return zone && (((_zone$name2 = zone.name) === null || _zone$name2 === void 0 ? void 0 : _zone$name2.toUpperCase()) === ((_selectedVal = selectedVal) === null || _selectedVal === void 0 ? void 0 : _selectedVal.toString().toUpperCase()) || ((_zone$code2 = zone.code) === null || _zone$code2 === void 0 ? void 0 : _zone$code2.toUpperCase()) === ((_selectedVal2 = selectedVal) === null || _selectedVal2 === void 0 ? void 0 : _selectedVal2.toString().toUpperCase()));
|
|
9666
|
+
});
|
|
9651
9667
|
setSelectedZones(selected ? [selected] : []);
|
|
9652
9668
|
if (!initialized.current && selected) {
|
|
9653
9669
|
initialized.current = true;
|
|
@@ -9666,7 +9682,7 @@ const SelectEkycZones = _ref => {
|
|
|
9666
9682
|
if (isMultiSelect) {
|
|
9667
9683
|
const selected = Array.isArray(value) ? value.map(v => Array.isArray(v) ? v[1] : v).filter(Boolean) : [];
|
|
9668
9684
|
setSelectedZones(selected);
|
|
9669
|
-
onSelect(config.key, selected);
|
|
9685
|
+
onSelect(config.key, selected.map(z => z.name));
|
|
9670
9686
|
} else {
|
|
9671
9687
|
const selectedZone = Array.isArray(value) ? Array.isArray(value[0]) ? value[0][1] : value[0] : value;
|
|
9672
9688
|
setSelectedZones(selectedZone ? [selectedZone] : []);
|
|
@@ -9698,7 +9714,7 @@ const SelectEkycZones = _ref => {
|
|
|
9698
9714
|
disable: disable || isEkycSupervisor || ((_config$props = config.props) === null || _config$props === void 0 ? void 0 : _config$props.disable) || config.disable
|
|
9699
9715
|
})), isMultiSelect && selectedZones.length > 0 && /*#__PURE__*/React.createElement("div", {
|
|
9700
9716
|
className: "selected-zones"
|
|
9701
|
-
}, selectedZones.filter(zone => zone && zone.
|
|
9717
|
+
}, selectedZones.filter(zone => zone && zone.name).map(zone => /*#__PURE__*/React.createElement("span", {
|
|
9702
9718
|
key: zone.code,
|
|
9703
9719
|
className: "selected-zone-chip"
|
|
9704
9720
|
}, zone.name))));
|
|
@@ -9841,70 +9857,82 @@ const SelectEkycDropdown = _ref => {
|
|
|
9841
9857
|
};
|
|
9842
9858
|
|
|
9843
9859
|
const AdditionalDetails = _ref => {
|
|
9844
|
-
var _formData$ownerKey, _formData$ownerKey2, _formData$ownerKey3, _formData$ownerKey4;
|
|
9860
|
+
var _formData$ownerKey, _formData$ownerKey2, _formData$ownerKey3, _formData$ownerKey4, _formData$config$key, _formData$config$key2, _formData$config$key3, _formData$config$key4, _formData$config$key5, _formData$config$key6, _formData$config$key7, _formData$config$key8, _formData$config$key9, _formData$config$key0, _formData$config$key1, _formData$config$key10, _formData$config$key11, _formData$config$key12, _formData$config$key13, _formData$config$key14, _formData$config$key15, _formData$config$key16;
|
|
9845
9861
|
let t = _ref.t,
|
|
9846
9862
|
config = _ref.config,
|
|
9847
9863
|
onSelect = _ref.onSelect,
|
|
9848
9864
|
userType = _ref.userType,
|
|
9849
9865
|
formData = _ref.formData;
|
|
9850
9866
|
let index = 0;
|
|
9867
|
+
const rawTenantId = Digit.ULBService.getCurrentTenantId();
|
|
9868
|
+
const tenantId = rawTenantId !== null && rawTenantId !== void 0 && rawTenantId.includes(".") ? rawTenantId : rawTenantId + ".djb";
|
|
9869
|
+
const vendorId = (formData === null || formData === void 0 ? void 0 : formData.vendor_id) || new URLSearchParams(window.location.search).get("vendorId");
|
|
9870
|
+
const _Digit$Hooks$vendor$u = Digit.Hooks.vendor.useEmpvendorCommonSearch({
|
|
9871
|
+
tenantId,
|
|
9872
|
+
filters: {
|
|
9873
|
+
vendorId: vendorId
|
|
9874
|
+
}
|
|
9875
|
+
}, {
|
|
9876
|
+
enabled: !!vendorId
|
|
9877
|
+
}),
|
|
9878
|
+
vendorAdditionalData = _Digit$Hooks$vendor$u.data;
|
|
9851
9879
|
const user = Digit.UserService.getUser().info;
|
|
9852
9880
|
const applicantName = formData.ownerKey && formData.ownerKey[index] && formData.ownerKey[index].applicantName || (formData === null || formData === void 0 ? void 0 : (_formData$ownerKey = formData.ownerKey) === null || _formData$ownerKey === void 0 ? void 0 : _formData$ownerKey.applicantName) || "";
|
|
9853
9881
|
const emailId = formData.ownerKey && formData.ownerKey[index] && formData.ownerKey[index].emailId || (formData === null || formData === void 0 ? void 0 : (_formData$ownerKey2 = formData.ownerKey) === null || _formData$ownerKey2 === void 0 ? void 0 : _formData$ownerKey2.emailId) || "";
|
|
9854
9882
|
const mobileNumber = formData.ownerKey && formData.ownerKey[index] && formData.ownerKey[index].mobileNumber || (formData === null || formData === void 0 ? void 0 : (_formData$ownerKey3 = formData.ownerKey) === null || _formData$ownerKey3 === void 0 ? void 0 : _formData$ownerKey3.mobileNumber) || (user === null || user === void 0 ? void 0 : user.mobileNumber);
|
|
9855
9883
|
const altMobileNumber = formData.ownerKey && formData.ownerKey[index] && formData.ownerKey[index].altMobileNumber || (formData === null || formData === void 0 ? void 0 : (_formData$ownerKey4 = formData.ownerKey) === null || _formData$ownerKey4 === void 0 ? void 0 : _formData$ownerKey4.altmobileNumber) || "";
|
|
9856
|
-
const _useState = useState(""),
|
|
9884
|
+
const _useState = useState((formData === null || formData === void 0 ? void 0 : (_formData$config$key = formData[config.key]) === null || _formData$config$key === void 0 ? void 0 : _formData$config$key.VendorCategory) || ""),
|
|
9857
9885
|
VendorCategory = _useState[0],
|
|
9858
9886
|
setVendorCategory = _useState[1];
|
|
9859
|
-
const _useState2 = useState(""),
|
|
9887
|
+
const _useState2 = useState((formData === null || formData === void 0 ? void 0 : (_formData$config$key2 = formData[config.key]) === null || _formData$config$key2 === void 0 ? void 0 : _formData$config$key2.VendorId) || ""),
|
|
9860
9888
|
VendorId = _useState2[0],
|
|
9861
9889
|
setVendorId = _useState2[1];
|
|
9862
|
-
const _useState3 = useState(""),
|
|
9890
|
+
const _useState3 = useState((formData === null || formData === void 0 ? void 0 : (_formData$config$key3 = formData[config.key]) === null || _formData$config$key3 === void 0 ? void 0 : _formData$config$key3.name) || ""),
|
|
9863
9891
|
userName = _useState3[0],
|
|
9864
9892
|
setUserName = _useState3[1];
|
|
9865
|
-
const _useState4 = useState(""),
|
|
9893
|
+
const _useState4 = useState((formData === null || formData === void 0 ? void 0 : (_formData$config$key4 = formData[config.key]) === null || _formData$config$key4 === void 0 ? void 0 : _formData$config$key4.Bank) || ""),
|
|
9866
9894
|
Bank = _useState4[0],
|
|
9867
9895
|
setBank = _useState4[1];
|
|
9868
|
-
const _useState5 = useState(),
|
|
9896
|
+
const _useState5 = useState((formData === null || formData === void 0 ? void 0 : (_formData$config$key5 = formData[config.key]) === null || _formData$config$key5 === void 0 ? void 0 : _formData$config$key5.BankbranchName) || undefined),
|
|
9869
9897
|
BankbranchName = _useState5[0],
|
|
9870
9898
|
setBankbranchName = _useState5[1];
|
|
9871
|
-
const _useState6 = useState(""),
|
|
9899
|
+
const _useState6 = useState((formData === null || formData === void 0 ? void 0 : (_formData$config$key6 = formData[config.key]) === null || _formData$config$key6 === void 0 ? void 0 : _formData$config$key6.IFSC) || ""),
|
|
9872
9900
|
IFSC = _useState6[0],
|
|
9873
9901
|
setIFSC = _useState6[1];
|
|
9874
|
-
const _useState7 = useState(""),
|
|
9902
|
+
const _useState7 = useState((formData === null || formData === void 0 ? void 0 : (_formData$config$key7 = formData[config.key]) === null || _formData$config$key7 === void 0 ? void 0 : _formData$config$key7.AccountNo) || ""),
|
|
9875
9903
|
AccountNo = _useState7[0],
|
|
9876
9904
|
setAccountNo = _useState7[1];
|
|
9877
|
-
const _useState8 = useState(""),
|
|
9905
|
+
const _useState8 = useState((formData === null || formData === void 0 ? void 0 : (_formData$config$key8 = formData[config.key]) === null || _formData$config$key8 === void 0 ? void 0 : _formData$config$key8.PanNo) || ""),
|
|
9878
9906
|
PanNo = _useState8[0],
|
|
9879
9907
|
setPanNo = _useState8[1];
|
|
9880
|
-
const _useState9 = useState(""),
|
|
9908
|
+
const _useState9 = useState((formData === null || formData === void 0 ? void 0 : (_formData$config$key9 = formData[config.key]) === null || _formData$config$key9 === void 0 ? void 0 : _formData$config$key9.GstNo) || ""),
|
|
9881
9909
|
GstNo = _useState9[0],
|
|
9882
9910
|
setGstNo = _useState9[1];
|
|
9883
|
-
const _useState0 = useState(""),
|
|
9911
|
+
const _useState0 = useState((formData === null || formData === void 0 ? void 0 : (_formData$config$key0 = formData[config.key]) === null || _formData$config$key0 === void 0 ? void 0 : _formData$config$key0.GstState) || ""),
|
|
9884
9912
|
GstState = _useState0[0],
|
|
9885
9913
|
setGstState = _useState0[1];
|
|
9886
|
-
const _useState1 = useState(""),
|
|
9914
|
+
const _useState1 = useState((formData === null || formData === void 0 ? void 0 : (_formData$config$key1 = formData[config.key]) === null || _formData$config$key1 === void 0 ? void 0 : _formData$config$key1.RegistrationNo) || ""),
|
|
9887
9915
|
RegistrationNo = _useState1[0],
|
|
9888
9916
|
setRegistrationNo = _useState1[1];
|
|
9889
|
-
const _useState10 = useState(""),
|
|
9917
|
+
const _useState10 = useState((formData === null || formData === void 0 ? void 0 : (_formData$config$key10 = formData[config.key]) === null || _formData$config$key10 === void 0 ? void 0 : _formData$config$key10.EpfNo) || ""),
|
|
9890
9918
|
EpfNo = _useState10[0],
|
|
9891
9919
|
setEpfNo = _useState10[1];
|
|
9892
|
-
const _useState11 = useState(""),
|
|
9920
|
+
const _useState11 = useState((formData === null || formData === void 0 ? void 0 : (_formData$config$key11 = formData[config.key]) === null || _formData$config$key11 === void 0 ? void 0 : _formData$config$key11.EsiNo) || ""),
|
|
9893
9921
|
EsiNo = _useState11[0],
|
|
9894
9922
|
setEsiNo = _useState11[1];
|
|
9895
|
-
const _useState12 = useState(""),
|
|
9923
|
+
const _useState12 = useState((formData === null || formData === void 0 ? void 0 : (_formData$config$key12 = formData[config.key]) === null || _formData$config$key12 === void 0 ? void 0 : _formData$config$key12.VendorType) || ""),
|
|
9896
9924
|
VendorType = _useState12[0],
|
|
9897
9925
|
setVendorType = _useState12[1];
|
|
9898
|
-
const _useState13 = useState(""),
|
|
9926
|
+
const _useState13 = useState((formData === null || formData === void 0 ? void 0 : (_formData$config$key13 = formData[config.key]) === null || _formData$config$key13 === void 0 ? void 0 : _formData$config$key13.Status) || ""),
|
|
9899
9927
|
Status = _useState13[0],
|
|
9900
9928
|
setStatus = _useState13[1];
|
|
9901
|
-
const _useState14 = useState(""),
|
|
9929
|
+
const _useState14 = useState((formData === null || formData === void 0 ? void 0 : (_formData$config$key14 = formData[config.key]) === null || _formData$config$key14 === void 0 ? void 0 : _formData$config$key14.micrNo) || ""),
|
|
9902
9930
|
micrNo = _useState14[0],
|
|
9903
9931
|
setmicrNo = _useState14[1];
|
|
9904
|
-
const _useState15 = useState(""),
|
|
9932
|
+
const _useState15 = useState((formData === null || formData === void 0 ? void 0 : (_formData$config$key15 = formData[config.key]) === null || _formData$config$key15 === void 0 ? void 0 : _formData$config$key15.PhoneNo) || ""),
|
|
9905
9933
|
PhoneNo = _useState15[0],
|
|
9906
9934
|
setPhoneNo = _useState15[1];
|
|
9907
|
-
const _useState16 = useState(""),
|
|
9935
|
+
const _useState16 = useState((formData === null || formData === void 0 ? void 0 : (_formData$config$key16 = formData[config.key]) === null || _formData$config$key16 === void 0 ? void 0 : _formData$config$key16.ContactPerson) || ""),
|
|
9908
9936
|
ContactPerson = _useState16[0],
|
|
9909
9937
|
setContactPerson = _useState16[1];
|
|
9910
9938
|
useEffect(() => {
|
|
@@ -9964,22 +9992,59 @@ const AdditionalDetails = _ref => {
|
|
|
9964
9992
|
function setcontactperson(e) {
|
|
9965
9993
|
setContactPerson(e.target.value);
|
|
9966
9994
|
}
|
|
9967
|
-
const tenantId = Digit.ULBService.getCurrentTenantId();
|
|
9968
9995
|
const _useForm = useForm(),
|
|
9969
9996
|
control = _useForm.control;
|
|
9970
9997
|
const _Digit$Hooks$fsm$useD = Digit.Hooks.fsm.useDsoSearch(tenantId, {
|
|
9998
|
+
ids: vendorId
|
|
9999
|
+
}, {
|
|
10000
|
+
enabled: !!vendorId,
|
|
9971
10001
|
staleTime: Infinity
|
|
9972
10002
|
}),
|
|
9973
10003
|
dsoData = _Digit$Hooks$fsm$useD.data;
|
|
9974
10004
|
useEffect(() => {
|
|
9975
|
-
if (dsoData) {
|
|
9976
|
-
const vendor = dsoData
|
|
9977
|
-
|
|
9978
|
-
|
|
9979
|
-
setVendorId(vendor.id);
|
|
9980
|
-
}
|
|
10005
|
+
if (dsoData && dsoData.length > 0) {
|
|
10006
|
+
const vendor = dsoData[0];
|
|
10007
|
+
setUserName(vendor.name);
|
|
10008
|
+
setVendorId(vendor.id);
|
|
9981
10009
|
}
|
|
9982
10010
|
}, [dsoData]);
|
|
10011
|
+
useEffect(() => {
|
|
10012
|
+
var _vendorAdditionalData, _vendorAdditionalData2;
|
|
10013
|
+
if (vendorAdditionalData !== null && vendorAdditionalData !== void 0 && (_vendorAdditionalData = vendorAdditionalData.VendorDetails) !== null && _vendorAdditionalData !== void 0 && (_vendorAdditionalData2 = _vendorAdditionalData[0]) !== null && _vendorAdditionalData2 !== void 0 && _vendorAdditionalData2.vendorAdditionalDetails) {
|
|
10014
|
+
const details = vendorAdditionalData.VendorDetails[0].vendorAdditionalDetails;
|
|
10015
|
+
if (details.ifscCode) setIFSC(details.ifscCode);
|
|
10016
|
+
if (details.bank) setBank(details.bank);
|
|
10017
|
+
if (details.bankBranchName) setBankbranchName(details.bankBranchName);
|
|
10018
|
+
if (details.micrNo) setmicrNo(details.micrNo);
|
|
10019
|
+
if (details.bankAccountNumber) setAccountNo(details.bankAccountNumber);
|
|
10020
|
+
if (details.vendorPhone) setPhoneNo(details.vendorPhone);
|
|
10021
|
+
if (details.contactPerson) setContactPerson(details.contactPerson);
|
|
10022
|
+
if (details.panNo) setPanNo(details.panNo);
|
|
10023
|
+
if (details.gstTinNo) setGstNo(details.gstTinNo);
|
|
10024
|
+
if (details.gstRegisteredState) setGstState(details.gstRegisteredState);
|
|
10025
|
+
if (details.registrationNo) setRegistrationNo(details.registrationNo);
|
|
10026
|
+
if (details.epfNo) setEpfNo(details.epfNo);
|
|
10027
|
+
if (details.esiNo) setEsiNo(details.esiNo);
|
|
10028
|
+
if (details.serviceType) {
|
|
10029
|
+
setVendorType({
|
|
10030
|
+
code: details.serviceType,
|
|
10031
|
+
i18nKey: details.serviceType === "SUPPLIER" ? "Supplier" : details.serviceType === "CONTRACTOR" ? "Contractor" : details.serviceType
|
|
10032
|
+
});
|
|
10033
|
+
}
|
|
10034
|
+
if (details.vendorCategory) {
|
|
10035
|
+
setVendorCategory({
|
|
10036
|
+
code: details.vendorCategory,
|
|
10037
|
+
i18nKey: details.vendorCategory === "FIRM" ? "Firm" : details.vendorCategory === "Individual" ? "Individual" : details.vendorCategory
|
|
10038
|
+
});
|
|
10039
|
+
}
|
|
10040
|
+
if (details.status) {
|
|
10041
|
+
setStatus({
|
|
10042
|
+
code: details.status,
|
|
10043
|
+
i18nKey: details.status === "ACTIVE" ? "Active" : details.status === "INACTIVE" ? "Inactive" : details.status
|
|
10044
|
+
});
|
|
10045
|
+
}
|
|
10046
|
+
}
|
|
10047
|
+
}, [vendorAdditionalData]);
|
|
9983
10048
|
const goNext = () => {
|
|
9984
10049
|
let owner = formData.ownerKey && formData.ownerKey[index];
|
|
9985
10050
|
let ownerStep;
|