@mseva/digit-ui-module-ptr 1.3.4-UAT.10 → 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 +37 -29
- package/dist/index.modern.js.map +1 -1
- package/package.json +1 -1
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) {
|
|
@@ -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;
|
|
@@ -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,
|
|
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;
|
|
@@ -17319,13 +17334,6 @@ const PTRWFApplicationTimeline = props => {
|
|
|
17319
17334
|
fetchWorkflowService();
|
|
17320
17335
|
}
|
|
17321
17336
|
}, [tenantId]);
|
|
17322
|
-
const {
|
|
17323
|
-
data
|
|
17324
|
-
} = Digit.Hooks.useCustomMDMS(tenantId, "PetService", [{
|
|
17325
|
-
name: "ApplicationType"
|
|
17326
|
-
}]);
|
|
17327
|
-
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");
|
|
17328
|
-
const checkTimeRenew = (checkRenewTime === null || checkRenewTime === void 0 ? void 0 : (_checkRenewTime$ = checkRenewTime[0]) === null || _checkRenewTime$ === void 0 ? void 0 : _checkRenewTime$.renewalPeriod) * 1000;
|
|
17329
17337
|
const validToObj = (_props$application0 = props.application) === null || _props$application0 === void 0 ? void 0 : _props$application0.validityDate;
|
|
17330
17338
|
const validToMillis = validToObj ? validToObj * 1000 : null;
|
|
17331
17339
|
const currentDateObj = Date.now();
|
|
@@ -22694,7 +22702,7 @@ const NewApplication = () => {
|
|
|
22694
22702
|
};
|
|
22695
22703
|
|
|
22696
22704
|
const ApplicationDetails = () => {
|
|
22697
|
-
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;
|
|
22698
22706
|
const {
|
|
22699
22707
|
t
|
|
22700
22708
|
} = useTranslation();
|
|
@@ -23411,7 +23419,7 @@ const ApplicationDetails = () => {
|
|
|
23411
23419
|
}
|
|
23412
23420
|
let dowloadOptions = [];
|
|
23413
23421
|
let user = Digit.UserService.getUser();
|
|
23414
|
-
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;
|
|
23415
23423
|
dowloadOptions.push({
|
|
23416
23424
|
label: t("PTR_PET_DOWNLOAD_ACK_FORM"),
|
|
23417
23425
|
onClick: () => downloadAcknowledgement()
|
|
@@ -23470,7 +23478,7 @@ const ApplicationDetails = () => {
|
|
|
23470
23478
|
styles: {
|
|
23471
23479
|
fontSize: "32px"
|
|
23472
23480
|
}
|
|
23473
|
-
}, 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, {
|
|
23474
23482
|
className: "multilinkWrapper",
|
|
23475
23483
|
onHeadClick: () => setShowOptions(!showOptions),
|
|
23476
23484
|
displayOptions: showOptions,
|