@mseva/digit-ui-module-ptr 1.3.4-UAT.1 → 1.3.4-UAT.11
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 +77 -39
- package/dist/index.modern.js.map +1 -1
- package/package.json +10 -9
package/dist/index.modern.js
CHANGED
|
@@ -7684,9 +7684,18 @@ const PTRCitizenPet = ({
|
|
|
7684
7684
|
return gt.name === (apiDataCheck === null || apiDataCheck === void 0 ? void 0 : (_apiDataCheck$3 = apiDataCheck[0]) === null || _apiDataCheck$3 === void 0 ? void 0 : (_apiDataCheck$3$petDe = _apiDataCheck$3.petDetails) === null || _apiDataCheck$3$petDe === void 0 ? void 0 : _apiDataCheck$3$petDe.petGender);
|
|
7685
7685
|
})) || null;
|
|
7686
7686
|
const pathParts = window.location.pathname.split("/");
|
|
7687
|
-
const
|
|
7688
|
-
|
|
7689
|
-
|
|
7687
|
+
const startIndex = pathParts.findIndex(part => part === "new-application");
|
|
7688
|
+
let id = null;
|
|
7689
|
+
if (startIndex !== -1) {
|
|
7690
|
+
const nextPart = pathParts[startIndex + 1];
|
|
7691
|
+
if (nextPart !== null && nextPart !== void 0 && nextPart.startsWith("PB-PTR-")) {
|
|
7692
|
+
id = nextPart;
|
|
7693
|
+
} else if (nextPart === "PL") {
|
|
7694
|
+
id = pathParts.slice(startIndex + 1, startIndex + 5).join("/");
|
|
7695
|
+
}
|
|
7696
|
+
}
|
|
7697
|
+
id = id ? decodeURIComponent(id) : null;
|
|
7698
|
+
const checkForRenew = window.location.pathname.includes("renew-application");
|
|
7690
7699
|
const today = new Date();
|
|
7691
7700
|
const todayStr = today.toISOString().split("T")[0];
|
|
7692
7701
|
const minVaccineDate = new Date();
|
|
@@ -7712,7 +7721,7 @@ const PTRCitizenPet = ({
|
|
|
7712
7721
|
return new Date(dateStr).getTime();
|
|
7713
7722
|
}
|
|
7714
7723
|
const onSubmit = async data => {
|
|
7715
|
-
var _currentStepData$Crea, _currentStepData$appl, _data$petType, _data$breedType, _data$petGender, _currentStepData$resp;
|
|
7724
|
+
var _currentStepData$Crea, _currentStepData$appl, _data$petType, _data$breedType, _data$petGender, _apiDataCheck$4, _apiDataCheck$4$addre, _apiDataCheck$5, _apiDataCheck$5$addre, _currentStepData$owne, _currentStepData$resp;
|
|
7716
7725
|
if (validateStep) {
|
|
7717
7726
|
const validationErrors = validateStep(data);
|
|
7718
7727
|
if (Object.keys(validationErrors).length > 0) return;
|
|
@@ -7750,9 +7759,9 @@ const PTRCitizenPet = ({
|
|
|
7750
7759
|
},
|
|
7751
7760
|
address: {
|
|
7752
7761
|
pincode,
|
|
7753
|
-
addressId: currentStepData.ownerDetails.address
|
|
7762
|
+
addressId: apiDataCheck !== null && apiDataCheck !== void 0 && (_apiDataCheck$4 = apiDataCheck[0]) !== null && _apiDataCheck$4 !== void 0 && (_apiDataCheck$4$addre = _apiDataCheck$4.address) !== null && _apiDataCheck$4$addre !== void 0 && _apiDataCheck$4$addre.addressId ? apiDataCheck === null || apiDataCheck === void 0 ? void 0 : (_apiDataCheck$5 = apiDataCheck[0]) === null || _apiDataCheck$5 === void 0 ? void 0 : (_apiDataCheck$5$addre = _apiDataCheck$5.address) === null || _apiDataCheck$5$addre === void 0 ? void 0 : _apiDataCheck$5$addre.addressId : currentStepData === null || currentStepData === void 0 ? void 0 : (_currentStepData$owne = currentStepData.ownerDetails) === null || _currentStepData$owne === void 0 ? void 0 : _currentStepData$owne.address
|
|
7754
7763
|
},
|
|
7755
|
-
previousApplicationNumber:
|
|
7764
|
+
previousApplicationNumber: id ? id : null,
|
|
7756
7765
|
applicationType: checkForRenew ? "RENEWAPPLICATION" : "NEWAPPLICATION",
|
|
7757
7766
|
ownerName: name,
|
|
7758
7767
|
fatherName: filteredOwnerDetails === null || filteredOwnerDetails === void 0 ? void 0 : filteredOwnerDetails.fatherOrHusbandName,
|
|
@@ -7763,6 +7772,8 @@ const PTRCitizenPet = ({
|
|
|
7763
7772
|
status: "INITIATED"
|
|
7764
7773
|
}
|
|
7765
7774
|
};
|
|
7775
|
+
console.log("formData", formData);
|
|
7776
|
+
console.log("apiDataCheck check", apiDataCheck);
|
|
7766
7777
|
const pick = (newV, oldV) => newV !== undefined && newV !== null && newV !== "" ? newV : oldV;
|
|
7767
7778
|
const existing = (apiDataCheck === null || apiDataCheck === void 0 ? void 0 : apiDataCheck[0]) || (currentStepData === null || currentStepData === void 0 ? void 0 : (_currentStepData$resp = currentStepData.responseData) === null || _currentStepData$resp === void 0 ? void 0 : _currentStepData$resp[0]) || {};
|
|
7768
7779
|
if (existing !== null && existing !== void 0 && existing.applicationNumber && !checkForRenew) {
|
|
@@ -7785,9 +7796,9 @@ const PTRCitizenPet = ({
|
|
|
7785
7796
|
petDetails: {
|
|
7786
7797
|
...existing.petDetails,
|
|
7787
7798
|
petName: pick(data.petName, (_existing$petDetails = existing.petDetails) === null || _existing$petDetails === void 0 ? void 0 : _existing$petDetails.petName),
|
|
7788
|
-
petType: pick(((_data$petType2 = data.petType) === null || _data$petType2 === void 0 ? void 0 : _data$petType2.name)
|
|
7789
|
-
breedType: pick(((_data$breedType2 = data.breedType) === null || _data$breedType2 === void 0 ? void 0 : _data$breedType2.name)
|
|
7790
|
-
petGender: pick(((_data$petGender2 = data.petGender) === null || _data$petGender2 === void 0 ? void 0 : _data$petGender2.name)
|
|
7799
|
+
petType: pick(((_data$petType2 = data.petType) === null || _data$petType2 === void 0 ? void 0 : _data$petType2.name) || ((_data$petType3 = data.petType) === null || _data$petType3 === void 0 ? void 0 : _data$petType3.code), (_existing$petDetails2 = existing.petDetails) === null || _existing$petDetails2 === void 0 ? void 0 : _existing$petDetails2.petType),
|
|
7800
|
+
breedType: pick(((_data$breedType2 = data.breedType) === null || _data$breedType2 === void 0 ? void 0 : _data$breedType2.name) || ((_data$breedType3 = data.breedType) === null || _data$breedType3 === void 0 ? void 0 : _data$breedType3.code), (_existing$petDetails3 = existing.petDetails) === null || _existing$petDetails3 === void 0 ? void 0 : _existing$petDetails3.breedType),
|
|
7801
|
+
petGender: pick(((_data$petGender2 = data.petGender) === null || _data$petGender2 === void 0 ? void 0 : _data$petGender2.name) || ((_data$petGender3 = data.petGender) === null || _data$petGender3 === void 0 ? void 0 : _data$petGender3.code), (_existing$petDetails4 = existing.petDetails) === null || _existing$petDetails4 === void 0 ? void 0 : _existing$petDetails4.petGender),
|
|
7791
7802
|
petColor: pick(data.petColor, (_existing$petDetails5 = existing.petDetails) === null || _existing$petDetails5 === void 0 ? void 0 : _existing$petDetails5.petColor),
|
|
7792
7803
|
lastVaccineDate: pick(toEpochMilliseconds(data.lastVaccineDate), (_existing$petDetails6 = existing.petDetails) === null || _existing$petDetails6 === void 0 ? void 0 : _existing$petDetails6.lastVaccineDate),
|
|
7793
7804
|
petAge: pick(data.petAge, (_existing$petDetails7 = existing.petDetails) === null || _existing$petDetails7 === void 0 ? void 0 : _existing$petDetails7.petAge),
|
|
@@ -7839,11 +7850,11 @@ const PTRCitizenPet = ({
|
|
|
7839
7850
|
}
|
|
7840
7851
|
};
|
|
7841
7852
|
useEffect(() => {
|
|
7842
|
-
var _apiDataCheck$
|
|
7843
|
-
if (apiDataCheck !== null && apiDataCheck !== void 0 && (_apiDataCheck$
|
|
7844
|
-
var _apiDataCheck$
|
|
7853
|
+
var _apiDataCheck$6;
|
|
7854
|
+
if (apiDataCheck !== null && apiDataCheck !== void 0 && (_apiDataCheck$6 = apiDataCheck[0]) !== null && _apiDataCheck$6 !== void 0 && _apiDataCheck$6.petDetails) {
|
|
7855
|
+
var _apiDataCheck$7, _apiDataCheck$7$audit;
|
|
7845
7856
|
console.log("apiDataCheck?.[0]?.petDetails", apiDataCheck === null || apiDataCheck === void 0 ? void 0 : apiDataCheck[0]);
|
|
7846
|
-
const createdTime = apiDataCheck === null || apiDataCheck === void 0 ? void 0 : (_apiDataCheck$
|
|
7857
|
+
const createdTime = apiDataCheck === null || apiDataCheck === void 0 ? void 0 : (_apiDataCheck$7 = apiDataCheck[0]) === null || _apiDataCheck$7 === void 0 ? void 0 : (_apiDataCheck$7$audit = _apiDataCheck$7.auditDetails) === null || _apiDataCheck$7$audit === void 0 ? void 0 : _apiDataCheck$7$audit.createdTime;
|
|
7847
7858
|
const createdDate = new Date(Number(createdTime));
|
|
7848
7859
|
const currentDate = new Date();
|
|
7849
7860
|
const monthsDiff = (currentDate.getFullYear() - createdDate.getFullYear()) * 12 + (currentDate.getMonth() - createdDate.getMonth());
|
|
@@ -7910,7 +7921,7 @@ const PTRCitizenPet = ({
|
|
|
7910
7921
|
totalYears: years + months / 12
|
|
7911
7922
|
};
|
|
7912
7923
|
};
|
|
7913
|
-
const AGE_REGEX = /^(?:(?:[1-9]|[1-3][0-9])(?:\.(?:[1-9]|1[01]))?|40(?:\.0?)?|0?\.(?:[1-9]|1[01]))$/;
|
|
7924
|
+
const AGE_REGEX = /^(?:(?:[1-9]|[1-3][0-9])(?:\.(?:0|[1-9]|1[01]))?|40(?:\.0?)?|0?\.(?:[1-9]|1[01]))$/;
|
|
7914
7925
|
const petAgeVal = watch("petAge");
|
|
7915
7926
|
useEffect(() => {
|
|
7916
7927
|
if (!petAgeVal) return;
|
|
@@ -15369,12 +15380,12 @@ const PTRCitizenDetails = ({
|
|
|
15369
15380
|
var _apiDataCheck$;
|
|
15370
15381
|
const formattedData = (apiDataCheck === null || apiDataCheck === void 0 ? void 0 : (_apiDataCheck$ = apiDataCheck[0]) === null || _apiDataCheck$ === void 0 ? void 0 : _apiDataCheck$.owner) || (currentStepData === null || currentStepData === void 0 ? void 0 : currentStepData.ownerDetails);
|
|
15371
15382
|
if (formattedData) {
|
|
15372
|
-
var _apiDataCheck$2, _apiDataCheck$2$addre, _currentStepData$owne, _apiDataCheck$
|
|
15383
|
+
var _apiDataCheck$2, _apiDataCheck$2$addre, _apiDataCheck$3, _apiDataCheck$3$addre, _apiDataCheck$4, _apiDataCheck$4$addre, _currentStepData$owne, _apiDataCheck$5, _apiDataCheck$5$addre, _currentStepData$owne2;
|
|
15373
15384
|
Object.entries(formattedData).forEach(([key, value]) => {
|
|
15374
15385
|
setValue(key, value);
|
|
15375
15386
|
});
|
|
15376
|
-
setValue("address", (apiDataCheck === null || apiDataCheck === void 0 ? void 0 : (_apiDataCheck$
|
|
15377
|
-
setValue("pincode", (apiDataCheck === null || apiDataCheck === void 0 ? void 0 : (_apiDataCheck$
|
|
15387
|
+
setValue("address", (apiDataCheck !== null && apiDataCheck !== void 0 && (_apiDataCheck$2 = apiDataCheck[0]) !== null && _apiDataCheck$2 !== void 0 && (_apiDataCheck$2$addre = _apiDataCheck$2.address) !== null && _apiDataCheck$2$addre !== void 0 && _apiDataCheck$2$addre.addressLine1 ? apiDataCheck === null || apiDataCheck === void 0 ? void 0 : (_apiDataCheck$3 = apiDataCheck[0]) === null || _apiDataCheck$3 === void 0 ? void 0 : (_apiDataCheck$3$addre = _apiDataCheck$3.address) === null || _apiDataCheck$3$addre === void 0 ? void 0 : _apiDataCheck$3$addre.addressLine1 : apiDataCheck === null || apiDataCheck === void 0 ? void 0 : (_apiDataCheck$4 = apiDataCheck[0]) === null || _apiDataCheck$4 === void 0 ? void 0 : (_apiDataCheck$4$addre = _apiDataCheck$4.address) === null || _apiDataCheck$4$addre === void 0 ? void 0 : _apiDataCheck$4$addre.addressId) || (currentStepData === null || currentStepData === void 0 ? void 0 : (_currentStepData$owne = currentStepData.ownerDetails) === null || _currentStepData$owne === void 0 ? void 0 : _currentStepData$owne.address) || "");
|
|
15388
|
+
setValue("pincode", (apiDataCheck === null || apiDataCheck === void 0 ? void 0 : (_apiDataCheck$5 = apiDataCheck[0]) === null || _apiDataCheck$5 === void 0 ? void 0 : (_apiDataCheck$5$addre = _apiDataCheck$5.address) === null || _apiDataCheck$5$addre === void 0 ? void 0 : _apiDataCheck$5$addre.pincode) || (currentStepData === null || currentStepData === void 0 ? void 0 : (_currentStepData$owne2 = currentStepData.ownerDetails) === null || _currentStepData$owne2 === void 0 ? void 0 : _currentStepData$owne2.pincode) || "");
|
|
15378
15389
|
}
|
|
15379
15390
|
}, [apiDataCheck, currentStepData, setValue]);
|
|
15380
15391
|
const getErrorMessage = fieldName => {
|
|
@@ -16216,8 +16227,8 @@ const PTRSelectProofIdentity = ({
|
|
|
16216
16227
|
useEffect(() => {
|
|
16217
16228
|
if (Array.isArray(apiDataCheck) && apiDataCheck.length > 0 && Array.isArray(apiDataCheck[0].documents)) {
|
|
16218
16229
|
const docs = apiDataCheck[0].documents.map(d => {
|
|
16219
|
-
const fileId = (d === null || d === void 0 ? void 0 : d.fileStoreId)
|
|
16220
|
-
const documentType = (d === null || d === void 0 ? void 0 : d.documentType)
|
|
16230
|
+
const fileId = (d === null || d === void 0 ? void 0 : d.fileStoreId) || (d === null || d === void 0 ? void 0 : d.filestoreId) || (d === null || d === void 0 ? void 0 : d.filestoreId) || (d === null || d === void 0 ? void 0 : d.documentUid) || null;
|
|
16231
|
+
const documentType = (d === null || d === void 0 ? void 0 : d.documentType) || (d === null || d === void 0 ? void 0 : d.type) || (d === null || d === void 0 ? void 0 : d.code) || null;
|
|
16221
16232
|
return {
|
|
16222
16233
|
documentType,
|
|
16223
16234
|
filestoreId: fileId,
|
|
@@ -17032,7 +17043,7 @@ function NewApplicationTimeline({
|
|
|
17032
17043
|
}))), /*#__PURE__*/React.createElement("div", {
|
|
17033
17044
|
className: "custom-timeline-entries"
|
|
17034
17045
|
}, sortedData === null || sortedData === void 0 ? void 0 : sortedData.map((item, index) => {
|
|
17035
|
-
var _item$auditDetails, _item$auditDetails2, _item$assigner2, _item$assigner3, _item$assigner4, _item$
|
|
17046
|
+
var _item$auditDetails, _item$auditDetails2, _item$assigner2, _item$assigner3, _item$assigner4, _item$wfComment, _item$wfComment2, _item$wfComment3, _item$assignes, _item$assignes$, _item$assignes$2, _item$assignes$3, _item$wfDocuments, _item$wfDocuments2;
|
|
17036
17047
|
return /*#__PURE__*/React.createElement("div", {
|
|
17037
17048
|
key: index,
|
|
17038
17049
|
className: "custom-timeline-entry"
|
|
@@ -17069,13 +17080,9 @@ function NewApplicationTimeline({
|
|
|
17069
17080
|
className: "custom-officer-info"
|
|
17070
17081
|
}, /*#__PURE__*/React.createElement("div", {
|
|
17071
17082
|
className: "custom-officer-name"
|
|
17072
|
-
}, (item === null || item === void 0 ? void 0 : (_item$assigner2 = item.assigner) === null || _item$assigner2 === void 0 ? void 0 : _item$assigner2.name) || t("CS_COMMON_NA"), deptMap[item === null || item === void 0 ? void 0 : (_item$assigner3 = item.assigner) === null || _item$assigner3 === void 0 ? void 0 : _item$assigner3.userName] && /*#__PURE__*/React.createElement("
|
|
17083
|
+
}, (item === null || item === void 0 ? void 0 : (_item$assigner2 = item.assigner) === null || _item$assigner2 === void 0 ? void 0 : _item$assigner2.name) || t("CS_COMMON_NA")), deptMap[item === null || item === void 0 ? void 0 : (_item$assigner3 = item.assigner) === null || _item$assigner3 === void 0 ? void 0 : _item$assigner3.userName] && /*#__PURE__*/React.createElement("div", {
|
|
17073
17084
|
className: "custom-officer-name"
|
|
17074
|
-
},
|
|
17075
|
-
className: "custom-officer-email"
|
|
17076
|
-
}, /*#__PURE__*/React.createElement("span", {
|
|
17077
|
-
className: "custom-email-label"
|
|
17078
|
-
}, t("Email")), " ", item === null || item === void 0 ? void 0 : (_item$assigner6 = item.assigner) === null || _item$assigner6 === void 0 ? void 0 : _item$assigner6.emailId))), /*#__PURE__*/React.createElement("div", {
|
|
17085
|
+
}, t(deptMap[item === null || item === void 0 ? void 0 : (_item$assigner4 = item.assigner) === null || _item$assigner4 === void 0 ? void 0 : _item$assigner4.userName])))), /*#__PURE__*/React.createElement("div", {
|
|
17079
17086
|
className: "custom-card-column custom-card-column-mid"
|
|
17080
17087
|
}, (item === null || item === void 0 ? void 0 : item.sla) && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("h3", {
|
|
17081
17088
|
className: "custom-action-title"
|
|
@@ -17129,7 +17136,7 @@ function NewApplicationTimeline({
|
|
|
17129
17136
|
}
|
|
17130
17137
|
|
|
17131
17138
|
const PTRWFApplicationTimeline = props => {
|
|
17132
|
-
var _props$application2, _props$application3, _props$application4, _workflowDetails$data, _workflowDetails$data2, _workflowDetails$data3, _user$info, _user$info$roles, _workflowDetails$data6, _workflowDetails$data7, _workflowDetails$data8, _workflowDetails$data9, _workflowDetails$data0, _props$application0, _props$application1,
|
|
17139
|
+
var _props$application2, _props$application3, _props$application4, _data$PetService, _data$PetService$Appl, _checkRenewTime$, _workflowDetails$data, _workflowDetails$data2, _workflowDetails$data3, _user$info, _user$info$roles, _workflowDetails$data6, _workflowDetails$data7, _workflowDetails$data8, _workflowDetails$data9, _workflowDetails$data0, _props$application0, _props$application1, _props$application10, _props$application11, _props$application12, _actions$, _props$application13, _props$application14, _props$application16, _props$application18, _workflowDetails$data1, _workflowDetails$data10, _workflowDetails$data11;
|
|
17133
17140
|
const {
|
|
17134
17141
|
t
|
|
17135
17142
|
} = useTranslation();
|
|
@@ -17149,6 +17156,14 @@ const PTRWFApplicationTimeline = props => {
|
|
|
17149
17156
|
role: "EMPLOYEE"
|
|
17150
17157
|
});
|
|
17151
17158
|
console.log("workflowDetails", workflowDetails);
|
|
17159
|
+
const {
|
|
17160
|
+
data,
|
|
17161
|
+
isLoading: isMDMSLoading
|
|
17162
|
+
} = Digit.Hooks.useCustomMDMS(tenantId, "PetService", [{
|
|
17163
|
+
name: "ApplicationType"
|
|
17164
|
+
}]);
|
|
17165
|
+
const checkRenewTime = data === null || data === void 0 ? void 0 : (_data$PetService = data.PetService) === null || _data$PetService === void 0 ? void 0 : (_data$PetService$Appl = _data$PetService.ApplicationType) === null || _data$PetService$Appl === void 0 ? void 0 : _data$PetService$Appl.filter(item => item.code == "RENEWAPPLICATION");
|
|
17166
|
+
const checkTimeRenew = (checkRenewTime === null || checkRenewTime === void 0 ? void 0 : (_checkRenewTime$ = checkRenewTime[0]) === null || _checkRenewTime$ === void 0 ? void 0 : _checkRenewTime$.renewalPeriod) * 1000;
|
|
17152
17167
|
if (workflowDetails !== null && workflowDetails !== void 0 && (_workflowDetails$data = workflowDetails.data) !== null && _workflowDetails$data !== void 0 && (_workflowDetails$data2 = _workflowDetails$data.actionState) !== null && _workflowDetails$data2 !== void 0 && _workflowDetails$data2.nextActions && !workflowDetails.isLoading) workflowDetails.data.actionState.nextActions = [...(workflowDetails === null || workflowDetails === void 0 ? void 0 : (_workflowDetails$data3 = workflowDetails.data) === null || _workflowDetails$data3 === void 0 ? void 0 : _workflowDetails$data3.nextActions)];
|
|
17153
17168
|
if (workflowDetails && workflowDetails.data && !workflowDetails.isLoading) {
|
|
17154
17169
|
var _workflowDetails$data4, _workflowDetails$data5;
|
|
@@ -17159,7 +17174,7 @@ const PTRWFApplicationTimeline = props => {
|
|
|
17159
17174
|
...workflowDetails.data
|
|
17160
17175
|
};
|
|
17161
17176
|
}
|
|
17162
|
-
console.log("data ====
|
|
17177
|
+
console.log("data ==== ||Asdasdsadbkahjsdb", workflowDetails);
|
|
17163
17178
|
const isCitizen = window.location.href.includes("citizen");
|
|
17164
17179
|
const showNextActions = nextActions => {
|
|
17165
17180
|
var _nextAction, _props$application5, _props$application6, _props$application7;
|
|
@@ -17319,10 +17334,16 @@ const PTRWFApplicationTimeline = props => {
|
|
|
17319
17334
|
fetchWorkflowService();
|
|
17320
17335
|
}
|
|
17321
17336
|
}, [tenantId]);
|
|
17337
|
+
const validToObj = (_props$application0 = props.application) === null || _props$application0 === void 0 ? void 0 : _props$application0.validityDate;
|
|
17338
|
+
const validToMillis = validToObj ? validToObj * 1000 : null;
|
|
17339
|
+
const currentDateObj = Date.now();
|
|
17340
|
+
const duration = validToObj && currentDateObj ? validToMillis - currentDateObj : null;
|
|
17341
|
+
const checkDuration = duration !== null && duration <= checkTimeRenew;
|
|
17342
|
+
const checkRenewal = ((_props$application1 = props.application) === null || _props$application1 === void 0 ? void 0 : _props$application1.status) == "APPROVED" || ((_props$application10 = props.application) === null || _props$application10 === void 0 ? void 0 : _props$application10.status) == "EXPIRED";
|
|
17322
17343
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Fragment$1, null, /*#__PURE__*/React.createElement(NewApplicationTimeline, {
|
|
17323
17344
|
workflowDetails: workflowDetails,
|
|
17324
17345
|
t: t
|
|
17325
|
-
}), (((_props$
|
|
17346
|
+
}), (((_props$application11 = props.application) === null || _props$application11 === void 0 ? void 0 : _props$application11.status) != "CITIZENACTIONREQUIRED" || ((_props$application12 = props.application) === null || _props$application12 === void 0 ? void 0 : _props$application12.status) != "INITIATED") && actions && actions.length > 0 && ((_actions$ = actions[0]) === null || _actions$ === void 0 ? void 0 : _actions$.action) != "PAY" && !isCitizen && /*#__PURE__*/React.createElement(ActionBar, null, displayMenu ? /*#__PURE__*/React.createElement(Menu, {
|
|
17326
17347
|
localeKeyPrefix: `WF_EMPLOYEE_${"PTR"}`,
|
|
17327
17348
|
options: actions,
|
|
17328
17349
|
optionKey: "action",
|
|
@@ -17332,18 +17353,24 @@ const PTRWFApplicationTimeline = props => {
|
|
|
17332
17353
|
ref: menuRef,
|
|
17333
17354
|
label: t("WF_TAKE_ACTION"),
|
|
17334
17355
|
onSubmit: () => setDisplayMenu(!displayMenu)
|
|
17335
|
-
})), (((_props$
|
|
17356
|
+
})), (((_props$application13 = props.application) === null || _props$application13 === void 0 ? void 0 : _props$application13.status) == "CITIZENACTIONREQUIRED" || ((_props$application14 = props.application) === null || _props$application14 === void 0 ? void 0 : _props$application14.status) == "INITIATED") && !isCitizen && /*#__PURE__*/React.createElement(ActionBar, null, /*#__PURE__*/React.createElement(SubmitBar, {
|
|
17336
17357
|
label: t("COMMON_EDIT"),
|
|
17337
17358
|
onSubmit: () => {
|
|
17338
|
-
var _props$
|
|
17339
|
-
history.push(`/digit-ui/employee/ptr/petservice/new-application/${(_props$
|
|
17359
|
+
var _props$application15;
|
|
17360
|
+
history.push(`/digit-ui/employee/ptr/petservice/new-application/${(_props$application15 = props.application) === null || _props$application15 === void 0 ? void 0 : _props$application15.applicationNumber}`);
|
|
17361
|
+
}
|
|
17362
|
+
})), checkRenewal && checkDuration && ((_props$application16 = props.application) === null || _props$application16 === void 0 ? void 0 : _props$application16.status) == "APPROVED" && !isCitizen && /*#__PURE__*/React.createElement(ActionBar, null, /*#__PURE__*/React.createElement(SubmitBar, {
|
|
17363
|
+
label: t("PT_RENEW_HEADER"),
|
|
17364
|
+
onSubmit: () => {
|
|
17365
|
+
var _props$application17;
|
|
17366
|
+
history.push(`/digit-ui/employee/ptr/petservice/new-application/${props === null || props === void 0 ? void 0 : (_props$application17 = props.application) === null || _props$application17 === void 0 ? void 0 : _props$application17.applicationNumber}/renew-application`);
|
|
17340
17367
|
}
|
|
17341
17368
|
})), showModal ? /*#__PURE__*/React.createElement(PTRModal, {
|
|
17342
17369
|
t: t,
|
|
17343
17370
|
action: selectedAction,
|
|
17344
17371
|
tenantId: tenantId,
|
|
17345
17372
|
state: state,
|
|
17346
|
-
id: (_props$
|
|
17373
|
+
id: (_props$application18 = props.application) === null || _props$application18 === void 0 ? void 0 : _props$application18.applicationNumber,
|
|
17347
17374
|
applicationDetails: props.application,
|
|
17348
17375
|
closeModal: closeModal,
|
|
17349
17376
|
submitAction: submitAction,
|
|
@@ -22675,7 +22702,7 @@ const NewApplication = () => {
|
|
|
22675
22702
|
};
|
|
22676
22703
|
|
|
22677
22704
|
const ApplicationDetails = () => {
|
|
22678
|
-
var _tenantInfo$city, _tenantInfo$city2, _pet_details$addition, _user$info, _reciept_data$Payment7, _reciept_data$Payment8, _pet_details$owner, _pet_details$owner2, _pet_details$owner3, _pet_details$owner4, _pet_details$owner5, _pet_details$address, _pet_details$address2, _pet_details$petDetai, _pet_details$petDetai2, _pet_details$petDetai3, _pet_details$petDetai4, _pet_details$petDetai5, _pet_details$petDetai6, _pet_details$petDetai8, _pet_details$petDetai9, _pet_details$petDetai0;
|
|
22705
|
+
var _tenantInfo$city, _tenantInfo$city2, _pet_details$addition, _user$info, _user$info$roles$find, _reciept_data$Payment7, _reciept_data$Payment8, _reciept_data$Payment1, _reciept_data$Payment10, _pet_details$owner, _pet_details$owner2, _pet_details$owner3, _pet_details$owner4, _pet_details$owner5, _pet_details$address, _pet_details$address2, _pet_details$petDetai, _pet_details$petDetai2, _pet_details$petDetai3, _pet_details$petDetai4, _pet_details$petDetai5, _pet_details$petDetai6, _pet_details$petDetai8, _pet_details$petDetai9, _pet_details$petDetai0;
|
|
22679
22706
|
const {
|
|
22680
22707
|
t
|
|
22681
22708
|
} = useTranslation();
|
|
@@ -23392,7 +23419,7 @@ const ApplicationDetails = () => {
|
|
|
23392
23419
|
}
|
|
23393
23420
|
let dowloadOptions = [];
|
|
23394
23421
|
let user = Digit.UserService.getUser();
|
|
23395
|
-
const isCemp = user === null || user === void 0 ? void 0 : (_user$info = user.info) === null || _user$info === void 0 ? void 0 : _user$info.roles.
|
|
23422
|
+
const isCemp = user === null || user === void 0 ? void 0 : (_user$info = user.info) === null || _user$info === void 0 ? void 0 : (_user$info$roles$find = _user$info.roles.find(role => role.code === "PET_REG_EMPLOYEE")) === null || _user$info$roles$find === void 0 ? void 0 : _user$info$roles$find.code;
|
|
23396
23423
|
dowloadOptions.push({
|
|
23397
23424
|
label: t("PTR_PET_DOWNLOAD_ACK_FORM"),
|
|
23398
23425
|
onClick: () => downloadAcknowledgement()
|
|
@@ -23451,7 +23478,7 @@ const ApplicationDetails = () => {
|
|
|
23451
23478
|
styles: {
|
|
23452
23479
|
fontSize: "32px"
|
|
23453
23480
|
}
|
|
23454
|
-
}, t("CS_APPLICATION_DETAILS")), isCemp && dowloadOptions && dowloadOptions.length > 0 && /*#__PURE__*/React.createElement(MultiLink, {
|
|
23481
|
+
}, t("CS_APPLICATION_DETAILS")), isCemp && ((reciept_data === null || reciept_data === void 0 ? void 0 : (_reciept_data$Payment1 = reciept_data.Payments[0]) === null || _reciept_data$Payment1 === void 0 ? void 0 : _reciept_data$Payment1.paymentStatus) === "NEW" || (reciept_data === null || reciept_data === void 0 ? void 0 : (_reciept_data$Payment10 = reciept_data.Payments[0]) === null || _reciept_data$Payment10 === void 0 ? void 0 : _reciept_data$Payment10.paymentStatus) === "DEPOSITED") && dowloadOptions && dowloadOptions.length > 0 && /*#__PURE__*/React.createElement(MultiLink, {
|
|
23455
23482
|
className: "multilinkWrapper",
|
|
23456
23483
|
onHeadClick: () => setShowOptions(!showOptions),
|
|
23457
23484
|
displayOptions: showOptions,
|
|
@@ -24448,9 +24475,19 @@ const NewPTRStepperForm = () => {
|
|
|
24448
24475
|
const step = formState.step;
|
|
24449
24476
|
const tenantId = Digit.ULBService.getCurrentTenantId();
|
|
24450
24477
|
const pathParts = window.location.pathname.split("/");
|
|
24451
|
-
const
|
|
24452
|
-
|
|
24453
|
-
|
|
24478
|
+
const startIndex = pathParts.findIndex(part => part === "new-application");
|
|
24479
|
+
let id = null;
|
|
24480
|
+
if (startIndex !== -1) {
|
|
24481
|
+
const nextPart = pathParts[startIndex + 1];
|
|
24482
|
+
if (nextPart !== null && nextPart !== void 0 && nextPart.startsWith("PB-PTR-")) {
|
|
24483
|
+
id = nextPart;
|
|
24484
|
+
} else if (nextPart === "PL") {
|
|
24485
|
+
id = pathParts.slice(startIndex + 1, startIndex + 5).join("/");
|
|
24486
|
+
}
|
|
24487
|
+
}
|
|
24488
|
+
id = id ? decodeURIComponent(id) : null;
|
|
24489
|
+
console.log("id:", id);
|
|
24490
|
+
const shouldEnableSearch = Boolean(id);
|
|
24454
24491
|
console.log("shouldEnableSearch", shouldEnableSearch);
|
|
24455
24492
|
const {
|
|
24456
24493
|
isLoading,
|
|
@@ -24465,6 +24502,7 @@ const NewPTRStepperForm = () => {
|
|
|
24465
24502
|
useEffect(() => {
|
|
24466
24503
|
var _applicationData$PetR;
|
|
24467
24504
|
console.log("applicationData for hereee:>> ", applicationData);
|
|
24505
|
+
console.log("id", id);
|
|
24468
24506
|
if (id && applicationData !== null && applicationData !== void 0 && (_applicationData$PetR = applicationData.PetRegistrationApplications) !== null && _applicationData$PetR !== void 0 && _applicationData$PetR.length) {
|
|
24469
24507
|
dispatch(UPDATE_PTRNewApplication_FORM("responseData", applicationData.PetRegistrationApplications));
|
|
24470
24508
|
}
|