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