@mseva/digit-ui-module-ptr 1.3.5 → 1.3.7

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.
@@ -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 id = pathParts[pathParts.length - 1];
7688
- const checkNumber = pathParts[pathParts.length - 2];
7689
- const checkForRenew = id == "renew-application";
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, _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
+ addressLine1: 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: checkNumber ? checkNumber : null,
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,
@@ -7779,15 +7788,15 @@ const PTRCitizenPet = ({
7779
7788
  address: {
7780
7789
  ...existing.address,
7781
7790
  pincode: pick(pincode, (_existing$address = existing.address) === null || _existing$address === void 0 ? void 0 : _existing$address.pincode),
7782
- addressId: pick(currentStepData.ownerDetails.address, (_existing$address2 = existing.address) === null || _existing$address2 === void 0 ? void 0 : _existing$address2.addressId),
7791
+ addressLine1: pick(currentStepData.ownerDetails.address, (_existing$address2 = existing.address) === null || _existing$address2 === void 0 ? void 0 : _existing$address2.addressLine1),
7783
7792
  tenantId
7784
7793
  },
7785
7794
  petDetails: {
7786
7795
  ...existing.petDetails,
7787
7796
  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) ?? ((_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),
7789
- 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),
7790
- 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),
7797
+ 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),
7798
+ 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),
7799
+ 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
7800
  petColor: pick(data.petColor, (_existing$petDetails5 = existing.petDetails) === null || _existing$petDetails5 === void 0 ? void 0 : _existing$petDetails5.petColor),
7792
7801
  lastVaccineDate: pick(toEpochMilliseconds(data.lastVaccineDate), (_existing$petDetails6 = existing.petDetails) === null || _existing$petDetails6 === void 0 ? void 0 : _existing$petDetails6.lastVaccineDate),
7793
7802
  petAge: pick(data.petAge, (_existing$petDetails7 = existing.petDetails) === null || _existing$petDetails7 === void 0 ? void 0 : _existing$petDetails7.petAge),
@@ -7910,7 +7919,7 @@ const PTRCitizenPet = ({
7910
7919
  totalYears: years + months / 12
7911
7920
  };
7912
7921
  };
7913
- const AGE_REGEX = /^(?:(?:[1-9]|[1-3][0-9])(?:\.(?:[1-9]|1[01]))?|40(?:\.0?)?|0?\.(?:[1-9]|1[01]))$/;
7922
+ const AGE_REGEX = /^(?:(?:[1-9]|[1-3][0-9])(?:\.(?:0|[1-9]|1[01]))?|40(?:\.0?)?|0?\.(?:[1-9]|1[01]))$/;
7914
7923
  const petAgeVal = watch("petAge");
7915
7924
  useEffect(() => {
7916
7925
  if (!petAgeVal) return;
@@ -15369,12 +15378,12 @@ const PTRCitizenDetails = ({
15369
15378
  var _apiDataCheck$;
15370
15379
  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
15380
  if (formattedData) {
15372
- var _apiDataCheck$2, _apiDataCheck$2$addre, _currentStepData$owne, _apiDataCheck$3, _apiDataCheck$3$addre, _currentStepData$owne2;
15381
+ 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
15382
  Object.entries(formattedData).forEach(([key, value]) => {
15374
15383
  setValue(key, value);
15375
15384
  });
15376
- setValue("address", (apiDataCheck === null || apiDataCheck === void 0 ? void 0 : (_apiDataCheck$2 = apiDataCheck[0]) === null || _apiDataCheck$2 === void 0 ? void 0 : (_apiDataCheck$2$addre = _apiDataCheck$2.address) === null || _apiDataCheck$2$addre === void 0 ? void 0 : _apiDataCheck$2$addre.addressId) || (currentStepData === null || currentStepData === void 0 ? void 0 : (_currentStepData$owne = currentStepData.ownerDetails) === null || _currentStepData$owne === void 0 ? void 0 : _currentStepData$owne.address) || "");
15377
- setValue("pincode", (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.pincode) || (currentStepData === null || currentStepData === void 0 ? void 0 : (_currentStepData$owne2 = currentStepData.ownerDetails) === null || _currentStepData$owne2 === void 0 ? void 0 : _currentStepData$owne2.pincode) || "");
15385
+ 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) || "");
15386
+ 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
15387
  }
15379
15388
  }, [apiDataCheck, currentStepData, setValue]);
15380
15389
  const getErrorMessage = fieldName => {
@@ -16216,8 +16225,8 @@ const PTRSelectProofIdentity = ({
16216
16225
  useEffect(() => {
16217
16226
  if (Array.isArray(apiDataCheck) && apiDataCheck.length > 0 && Array.isArray(apiDataCheck[0].documents)) {
16218
16227
  const docs = apiDataCheck[0].documents.map(d => {
16219
- 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;
16220
- 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;
16228
+ 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;
16229
+ 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
16230
  return {
16222
16231
  documentType,
16223
16232
  filestoreId: fileId,
@@ -17129,7 +17138,7 @@ function NewApplicationTimeline({
17129
17138
  }
17130
17139
 
17131
17140
  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, _actions$, _props$application10, _props$application11, _props$application13, _workflowDetails$data1, _workflowDetails$data10, _workflowDetails$data11;
17141
+ 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, _data$PetService, _data$PetService$Appl, _checkRenewTime$, _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
17142
  const {
17134
17143
  t
17135
17144
  } = useTranslation();
@@ -17159,7 +17168,7 @@ const PTRWFApplicationTimeline = props => {
17159
17168
  ...workflowDetails.data
17160
17169
  };
17161
17170
  }
17162
- console.log("data ==== ??Asdasdsadbkahjsdb", workflowDetails);
17171
+ console.log("data ==== ||Asdasdsadbkahjsdb", workflowDetails);
17163
17172
  const isCitizen = window.location.href.includes("citizen");
17164
17173
  const showNextActions = nextActions => {
17165
17174
  var _nextAction, _props$application5, _props$application6, _props$application7;
@@ -17319,10 +17328,23 @@ const PTRWFApplicationTimeline = props => {
17319
17328
  fetchWorkflowService();
17320
17329
  }
17321
17330
  }, [tenantId]);
17331
+ const {
17332
+ data
17333
+ } = Digit.Hooks.useCustomMDMS(tenantId, "PetService", [{
17334
+ name: "ApplicationType"
17335
+ }]);
17336
+ 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");
17337
+ const checkTimeRenew = (checkRenewTime === null || checkRenewTime === void 0 ? void 0 : (_checkRenewTime$ = checkRenewTime[0]) === null || _checkRenewTime$ === void 0 ? void 0 : _checkRenewTime$.renewalPeriod) * 1000;
17338
+ const validToObj = (_props$application0 = props.application) === null || _props$application0 === void 0 ? void 0 : _props$application0.validityDate;
17339
+ const validToMillis = validToObj ? validToObj * 1000 : null;
17340
+ const currentDateObj = Date.now();
17341
+ const duration = validToObj && currentDateObj ? validToMillis - currentDateObj : null;
17342
+ const checkDuration = duration !== null && duration <= checkTimeRenew;
17343
+ 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
17344
  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Fragment$1, null, /*#__PURE__*/React.createElement(NewApplicationTimeline, {
17323
17345
  workflowDetails: workflowDetails,
17324
17346
  t: t
17325
- }), (((_props$application0 = props.application) === null || _props$application0 === void 0 ? void 0 : _props$application0.status) != "CITIZENACTIONREQUIRED" || ((_props$application1 = props.application) === null || _props$application1 === void 0 ? void 0 : _props$application1.status) != "INITIATED") && actions && ((_actions$ = actions[0]) === null || _actions$ === void 0 ? void 0 : _actions$.action) != "PAY" && !isCitizen && /*#__PURE__*/React.createElement(ActionBar, null, displayMenu ? /*#__PURE__*/React.createElement(Menu, {
17347
+ }), (((_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
17348
  localeKeyPrefix: `WF_EMPLOYEE_${"PTR"}`,
17327
17349
  options: actions,
17328
17350
  optionKey: "action",
@@ -17332,18 +17354,24 @@ const PTRWFApplicationTimeline = props => {
17332
17354
  ref: menuRef,
17333
17355
  label: t("WF_TAKE_ACTION"),
17334
17356
  onSubmit: () => setDisplayMenu(!displayMenu)
17335
- })), (((_props$application10 = props.application) === null || _props$application10 === void 0 ? void 0 : _props$application10.status) == "CITIZENACTIONREQUIRED" || ((_props$application11 = props.application) === null || _props$application11 === void 0 ? void 0 : _props$application11.status) == "INITIATED") && !isCitizen && /*#__PURE__*/React.createElement(ActionBar, null, /*#__PURE__*/React.createElement(SubmitBar, {
17357
+ })), (((_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
17358
  label: t("COMMON_EDIT"),
17337
17359
  onSubmit: () => {
17338
- var _props$application12;
17339
- history.push(`/digit-ui/employee/ptr/petservice/new-application/${(_props$application12 = props.application) === null || _props$application12 === void 0 ? void 0 : _props$application12.applicationNumber}`);
17360
+ var _props$application15;
17361
+ history.push(`/digit-ui/employee/ptr/petservice/new-application/${(_props$application15 = props.application) === null || _props$application15 === void 0 ? void 0 : _props$application15.applicationNumber}`);
17362
+ }
17363
+ })), 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, {
17364
+ label: t("PT_RENEW_HEADER"),
17365
+ onSubmit: () => {
17366
+ var _props$application17;
17367
+ 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
17368
  }
17341
17369
  })), showModal ? /*#__PURE__*/React.createElement(PTRModal, {
17342
17370
  t: t,
17343
17371
  action: selectedAction,
17344
17372
  tenantId: tenantId,
17345
17373
  state: state,
17346
- id: (_props$application13 = props.application) === null || _props$application13 === void 0 ? void 0 : _props$application13.applicationNumber,
17374
+ id: (_props$application18 = props.application) === null || _props$application18 === void 0 ? void 0 : _props$application18.applicationNumber,
17347
17375
  applicationDetails: props.application,
17348
17376
  closeModal: closeModal,
17349
17377
  submitAction: submitAction,
@@ -20037,21 +20065,14 @@ function renderCanvas(renderFunc, canvas, text, opts, cb) {
20037
20065
  cb(e);
20038
20066
  }
20039
20067
  }
20040
- var create$1 = qrcode.create;
20041
20068
  var toCanvas = renderCanvas.bind(null, canvas.render);
20042
20069
  var toDataURL = renderCanvas.bind(null, canvas.renderToDataURL);
20043
20070
  var toString_1$1 = renderCanvas.bind(null, function (data, _, opts) {
20044
20071
  return svgTag.render(data, opts);
20045
20072
  });
20046
- var browser = {
20047
- create: create$1,
20048
- toCanvas: toCanvas,
20049
- toDataURL: toDataURL,
20050
- toString: toString_1$1
20051
- };
20052
20073
 
20053
20074
  const PTRApplicationDetails = () => {
20054
- var _tenantInfo$city, _tenantInfo$city2, _pet_details$addition, _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;
20075
+ var _pet_details$addition, _reciept_data$Payment2, _reciept_data$Payment3, _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;
20055
20076
  const {
20056
20077
  t
20057
20078
  } = useTranslation();
@@ -20094,8 +20115,6 @@ const PTRApplicationDetails = () => {
20094
20115
  });
20095
20116
  console.log("data====", data);
20096
20117
  const [billData, setBillData] = useState(null);
20097
- const ulb = tenantInfo === null || tenantInfo === void 0 ? void 0 : (_tenantInfo$city = tenantInfo.city) === null || _tenantInfo$city === void 0 ? void 0 : _tenantInfo$city.name;
20098
- const ulbType = tenantInfo === null || tenantInfo === void 0 ? void 0 : (_tenantInfo$city2 = tenantInfo.city) === null || _tenantInfo$city2 === void 0 ? void 0 : _tenantInfo$city2.ulbType;
20099
20118
  const PetRegistrationApplications = get_1(data, "PetRegistrationApplications", []);
20100
20119
  const pet_details = PetRegistrationApplications && PetRegistrationApplications.length > 0 && PetRegistrationApplications[0] || {};
20101
20120
  const application = pet_details;
@@ -20153,581 +20172,6 @@ const PTRApplicationDetails = () => {
20153
20172
  };
20154
20173
  pet_details.workflow = workflow;
20155
20174
  }
20156
- const printCertificate = async () => {
20157
- const qrDataURL = await browser.toDataURL(window.location.href);
20158
- try {
20159
- var _data$PetRegistration;
20160
- if (!(data !== null && data !== void 0 && (_data$PetRegistration = data.PetRegistrationApplications) !== null && _data$PetRegistration !== void 0 && _data$PetRegistration[0])) {
20161
- throw new Error("Pet registration data is missing");
20162
- }
20163
- const createCertificateHTML = () => {
20164
- var _petData$documents, _petData$petDetails, _petData$owner, _petData$address, _petData$address2, _petData$owner2, _petData$petDetails2, _petData$petDetails3, _petData$petDetails4, _petData$petDetails5, _petData$petDetails6, _petData$petDetails7, _petData$auditDetails, _petData$auditDetails2, _reciept_data$Payment, _reciept_data$Payment2, _reciept_data$Payment3, _reciept_data$Payment4, _reciept_data$Payment5, _reciept_data$Payment6, _petData$owner3, _petData$owner4, _petData$address3, _petData$address4;
20165
- const petData = data.PetRegistrationApplications[0];
20166
- const currentDate = new Date().toLocaleDateString("en-IN", {
20167
- day: "2-digit",
20168
- month: "2-digit",
20169
- year: "numeric"
20170
- });
20171
- const petImage = petData === null || petData === void 0 ? void 0 : (_petData$documents = petData.documents) === null || _petData$documents === void 0 ? void 0 : _petData$documents.find(doc => (doc === null || doc === void 0 ? void 0 : doc.documentType) === "PET.PETPHOTO");
20172
- const petImageUrl = petImage !== null && petImage !== void 0 && petImage.filestoreId ? `${window.location.origin}/filestore/v1/files/id?tenantId=pb&fileStoreId=${petImage.filestoreId}` : `${window.location.origin}/adorable-golden-retriever.png`;
20173
- const content = `
20174
- <html>
20175
- <head>
20176
- <title>Pet Registration Certificate</title>
20177
- <style>
20178
- @page { margin: 0.5in; }
20179
- body {
20180
- font-family: 'Times New Roman', serif;
20181
- margin: 0;
20182
- font-size: 11px;
20183
- }
20184
- .certificate-container {
20185
- max-width: 800px;
20186
- margin: 0 auto;
20187
- border: 3px solid #000;
20188
- background: white;
20189
- }
20190
- .header {
20191
- display: flex;
20192
- justify-content: space-between;
20193
- align-items: center;
20194
- text-align: center;
20195
- margin-bottom: 5px;
20196
- position: relative;
20197
- }
20198
- .header-value{
20199
- border: none;
20200
- display: flex;
20201
- text-align: center;
20202
- }
20203
- .header-center {
20204
- text-align: center;
20205
- flex: 1;
20206
- padding-right: 80px
20207
- }
20208
- .header-disclaimer {
20209
- text-align: center;
20210
- flex: 1;
20211
- }
20212
- .header-right {
20213
- flex: 0 0 auto;
20214
- }
20215
- .title {
20216
- font-size: 13px;
20217
- font-weight: bold;
20218
- margin: 10px 0;
20219
- }
20220
- .subtitle {
20221
- font-size: 10px;
20222
- color: #666;
20223
- }
20224
- .main-content {
20225
- display: flex;
20226
- gap: 10px;
20227
- margin: 10px 0;
20228
- align-items:flex-start;
20229
- margin-bottom: -13px;
20230
- }
20231
- .details-section {
20232
- }
20233
- .pet-image-section {
20234
- flex-shrink: 0;
20235
- text-align: center;
20236
- order: 2;
20237
- }
20238
- .pet-image {
20239
- width: 100px;
20240
- max-width: 100%;
20241
- aspect-ratio : 1 / 1;
20242
- height: auto;
20243
- border: 2px solid #000;
20244
- object-fit: cover;
20245
- margin-bottom: 10px;
20246
- border-right-width: 2px;
20247
- margin-right: 50px;
20248
- margin-top: 20px;
20249
- display: block;
20250
- }
20251
- .image-label {
20252
- font-size: 12px;
20253
- font-weight: bold;
20254
- text-align: center;
20255
- border-right-width: 30px;
20256
- margin-right: 50px;
20257
- }
20258
- .details-grid {
20259
- display: grid;
20260
- grid-template-columns: 290px 280px;
20261
- overflow: hidden;
20262
- margin: 10px 0;
20263
- margin-left : 40px;
20264
- }
20265
- .detail-row {
20266
- display: grid;
20267
- grid-template-columns: 140px 180px;
20268
- overflow:hidden;
20269
- border: 1px solid black;
20270
- }
20271
- .detail-label {
20272
- font-weight: bold;
20273
- white-space: normal;
20274
- word-break: break-word;
20275
- margin-left: 10px;
20276
- flex-shrink: 1;
20277
- }
20278
- .detail-value {
20279
- padding-bottom: 2px;
20280
- margin-right: 10px;
20281
- }
20282
- .owner-section {
20283
- margin: 5px 40px;
20284
- margin-bottom: 0px;
20285
- display: grid;
20286
- grid-template-columns: 50%;
20287
- }
20288
- .footer-section {
20289
- margin: 0px 40px;
20290
- display: flex;
20291
- justify-content: space-between;
20292
- align-items: anchor-center;
20293
- }
20294
- .signature-area {
20295
- text-align: center;
20296
- min-width: 200px;
20297
- }
20298
- .signature-line {
20299
- border-top: 1px solid #000;
20300
- margin: 10px 0 5px 0;
20301
- }
20302
- .pet-sub {
20303
- font-size: 10px;
20304
- margin: 5px 0;
20305
- color: #666;
20306
- font-weight: bold;
20307
- }
20308
- .terms-section {
20309
- border-top: 2px solid #000;
20310
- padding-top: 5px;
20311
- font-size: 11px;
20312
- margin: 0px 10px;
20313
- }
20314
- .terms-title {
20315
- font-weight: bold;
20316
- margin-bottom: 10px;
20317
- }
20318
- .terms-list {
20319
- margin: 0;
20320
- padding-left: 20px;
20321
- }
20322
- .terms-list li {
20323
- margin-bottom: 2px;
20324
- text-align: left;
20325
- }
20326
- @media print {
20327
- body { background: white !important; }
20328
- }
20329
- @media (max-width: 700px) {
20330
- .main-content {
20331
- flex-wrap: wrap;
20332
- }
20333
- .pet-image {
20334
- width: 100px;
20335
- max-width: 100%;
20336
- height: auto;
20337
- aspect-ratio: 1/1;
20338
- }
20339
- .dis-section{
20340
- font-size: 12px;
20341
- margin: 0px 10px;
20342
- }
20343
- }
20344
- </style>
20345
- </head>
20346
- <body>
20347
- <div class="certificate-container">
20348
- <div class="header">
20349
- <div>
20350
- <img src="https://s3.ap-south-1.amazonaws.com/pb-egov-assets/${petData === null || petData === void 0 ? void 0 : petData.tenantId}/logo.png"
20351
- style="width: 80px; height: 80px; padding-left: 20px; padding-top: 5px;" />
20352
- </div>
20353
- <div class="header-center">
20354
- <div class="title">${t(ulbType)} ${t(ulb)}</div>
20355
- <div class="subtitle">${t("Veterinary Services- Health Branch")}</div>
20356
- <div class="pet-sub">Pet Registration Certificate</div>
20357
- <div class="subtitle">(U/S 399 (1)(E) of PMC Act,1976)</div>
20358
- </div>
20359
- <div class="header-right">
20360
- </div>
20361
- </div>
20362
- <span class="header-value">This is to certify that the ${(petData === null || petData === void 0 ? void 0 : (_petData$petDetails = petData.petDetails) === null || _petData$petDetails === void 0 ? void 0 : _petData$petDetails.petType) || "Dog"} kept by Mr./Mrs./Ms. ${(petData === null || petData === void 0 ? void 0 : (_petData$owner = petData.owner) === null || _petData$owner === void 0 ? void 0 : _petData$owner.name) || "Not Specified"} at ${(petData === null || petData === void 0 ? void 0 : (_petData$address = petData.address) === null || _petData$address === void 0 ? void 0 : _petData$address.addressId) || "Not Specified"}, ${(petData === null || petData === void 0 ? void 0 : (_petData$address2 = petData.address) === null || _petData$address2 === void 0 ? void 0 : _petData$address2.pincode) || ""} mobile no. ${(petData === null || petData === void 0 ? void 0 : (_petData$owner2 = petData.owner) === null || _petData$owner2 === void 0 ? void 0 : _petData$owner2.mobileNumber) || "Not Specified"} is registered with ${ulbType} ${ulb} as per following details:</span>
20363
- <div class="main-content">
20364
- <div class="details-section">
20365
- <span class="detail-label">Pet Information</span> <br>
20366
- <span class="detail-label">Registration No:</span> <span class="detail-label">${(petData === null || petData === void 0 ? void 0 : petData.petRegistrationNumber) || ""}</span>
20367
- <div class="details-grid">
20368
- <div class="detail-row">
20369
- <span class="detail-label">Category</span>
20370
- <span class="detail-value">${(petData === null || petData === void 0 ? void 0 : (_petData$petDetails2 = petData.petDetails) === null || _petData$petDetails2 === void 0 ? void 0 : _petData$petDetails2.petType) || "Dog"}</span>
20371
- </div>
20372
- <div class="detail-row">
20373
- <span class="detail-label">Breed</span>
20374
- <span class="detail-value">${(petData === null || petData === void 0 ? void 0 : (_petData$petDetails3 = petData.petDetails) === null || _petData$petDetails3 === void 0 ? void 0 : _petData$petDetails3.breedType) || "Not Specified"}</span>
20375
- </div>
20376
- <div class="detail-row">
20377
- <span class="detail-label">Name of Animal</span>
20378
- <span class="detail-value">${(petData === null || petData === void 0 ? void 0 : (_petData$petDetails4 = petData.petDetails) === null || _petData$petDetails4 === void 0 ? void 0 : _petData$petDetails4.petName) || "Not Specified"}</span>
20379
- </div>
20380
- <div class="detail-row">
20381
- <span class="detail-label">Gender</span>
20382
- <span class="detail-value">${(petData === null || petData === void 0 ? void 0 : (_petData$petDetails5 = petData.petDetails) === null || _petData$petDetails5 === void 0 ? void 0 : _petData$petDetails5.petGender) || "Not Specified"}</span>
20383
- </div>
20384
- <div class="detail-row">
20385
- <span class="detail-label">Pet Age</span>
20386
- <span class="detail-value">${formatPetAge(petData === null || petData === void 0 ? void 0 : (_petData$petDetails6 = petData.petDetails) === null || _petData$petDetails6 === void 0 ? void 0 : _petData$petDetails6.petAge, t) || t("CS_NA")}</span>
20387
- </div>
20388
- <div class="detail-row">
20389
- <span class="detail-label">Colour</span>
20390
- <span class="detail-value">${(petData === null || petData === void 0 ? void 0 : (_petData$petDetails7 = petData.petDetails) === null || _petData$petDetails7 === void 0 ? void 0 : _petData$petDetails7.petColor) || "Not Specified"}</span>
20391
- </div>
20392
- <div class="detail-row">
20393
- <span class="detail-label">Application Number</span>
20394
- <span class="detail-value">${(petData === null || petData === void 0 ? void 0 : petData.applicationNumber) || "Not Specified"}</span>
20395
- </div>
20396
- <div class="detail-row">
20397
- <span class="detail-label">Token No</span>
20398
- <span class="detail-value">${(petData === null || petData === void 0 ? void 0 : petData.petToken) || "Not Specified"}</span>
20399
- </div>
20400
- <div class="detail-row">
20401
- <span class="detail-label">Issue Date</span>
20402
- <span class="detail-value">
20403
- ${petData !== null && petData !== void 0 && (_petData$auditDetails = petData.auditDetails) !== null && _petData$auditDetails !== void 0 && _petData$auditDetails.lastModifiedTime ? new Date((_petData$auditDetails2 = petData.auditDetails) === null || _petData$auditDetails2 === void 0 ? void 0 : _petData$auditDetails2.lastModifiedTime).toLocaleDateString("en-GB") : "N/A"}
20404
- </span>
20405
- </div>
20406
-
20407
- <div class="detail-row">
20408
- <span class="detail-label">License Valid Upto</span>
20409
- <span class="detail-value">
20410
- ${petData !== null && petData !== void 0 && petData.validityDate ? new Date(petData.validityDate * 1000).toLocaleDateString("en-GB") : "N/A"}
20411
-
20412
- </span>
20413
- </div>
20414
- <div class="detail-row">
20415
- <span class="detail-label">Amount</span>
20416
- <span class="detail-value">Rs. ${(reciept_data === null || reciept_data === void 0 ? void 0 : (_reciept_data$Payment = reciept_data.Payments) === null || _reciept_data$Payment === void 0 ? void 0 : (_reciept_data$Payment2 = _reciept_data$Payment[0]) === null || _reciept_data$Payment2 === void 0 ? void 0 : _reciept_data$Payment2.totalAmountPaid) || "Not Specified"}/-</span>
20417
- </div>
20418
- <div class="detail-row">
20419
- <span class="detail-label">G8/Receipt No</span>
20420
- <span class="detail-value">${(reciept_data === null || reciept_data === void 0 ? void 0 : (_reciept_data$Payment3 = reciept_data.Payments) === null || _reciept_data$Payment3 === void 0 ? void 0 : (_reciept_data$Payment4 = _reciept_data$Payment3[0]) === null || _reciept_data$Payment4 === void 0 ? void 0 : (_reciept_data$Payment5 = _reciept_data$Payment4.paymentDetails) === null || _reciept_data$Payment5 === void 0 ? void 0 : (_reciept_data$Payment6 = _reciept_data$Payment5[0]) === null || _reciept_data$Payment6 === void 0 ? void 0 : _reciept_data$Payment6.receiptNumber) || "Not Specified"}</span>
20421
- </div>
20422
- </div>
20423
- </div>
20424
-
20425
- <div class="pet-image-section">
20426
- <img
20427
- src="${petImageUrl}"
20428
- alt="Pet Photo"
20429
- class="pet-image"
20430
- onload="console.log('Pet image loaded successfully:', this.src);"
20431
- onerror="console.log('Pet image failed to load:', this.src); console.log('Trying fallback image...'); this.src='/adorable-golden-retriever.png';"
20432
- />
20433
- <div class="image-label">Pet Photo</div>
20434
- <script>
20435
- console.log('Image URL being used:', '${petImageUrl}');
20436
- console.log('Pet image data:', ${JSON.stringify(petImage)});
20437
- </script>
20438
- </div>
20439
- </div>
20440
-
20441
- <span class="detail-label">Owner Information</span>
20442
- <div class="owner-section">
20443
- <div class="detail-row">
20444
- <span class="detail-label">Owner Name</span>
20445
- <span class="detail-value">${(petData === null || petData === void 0 ? void 0 : (_petData$owner3 = petData.owner) === null || _petData$owner3 === void 0 ? void 0 : _petData$owner3.name) || "Not Specified"}</span>
20446
- </div>
20447
- <div class="detail-row">
20448
- <span class="detail-label">Father/Spouse Name</span>
20449
- <span class="detail-value">${(petData === null || petData === void 0 ? void 0 : petData.fatherName) || (petData === null || petData === void 0 ? void 0 : (_petData$owner4 = petData.owner) === null || _petData$owner4 === void 0 ? void 0 : _petData$owner4.fatherOrHusbandName) || "Not Specified"}</span>
20450
- </div>
20451
- <div class="detail-row">
20452
- <span class="detail-label">Address</span>
20453
- <span class="detail-value">${(petData === null || petData === void 0 ? void 0 : (_petData$address3 = petData.address) === null || _petData$address3 === void 0 ? void 0 : _petData$address3.addressId) || "Not Specified"}, ${(petData === null || petData === void 0 ? void 0 : (_petData$address4 = petData.address) === null || _petData$address4 === void 0 ? void 0 : _petData$address4.pincode) || ""}</span>
20454
- </div>
20455
- </div>
20456
-
20457
- <div class="header">
20458
- <div class="header-left"> </div>
20459
- <div class="header-disclaimer">
20460
- <div class="title">DISCLAIMER</div>
20461
- <div class="dis-section">${t("PET_DISCLAIMER")}</div>
20462
- <div class="header-right"></div>
20463
- </div>
20464
- </div>
20465
-
20466
- <div class="footer-section">
20467
- <div>
20468
- <div>Date:........................</div>
20469
- <div>Place:.......................</div>
20470
- </div>
20471
- <div class="signature-area">
20472
- <div class="detail-label">Approved by</div>
20473
- <span class="detail-value">${approver || "Not Specified"}</span>
20474
- <div class="signature-line"></div>
20475
- <div>Licensing Authority</div>
20476
- <div>${t(ulbType)}</div>
20477
-
20478
- </div>
20479
- </div>
20480
-
20481
- <div class="terms-section">
20482
- <div class="terms-title">${t("TERMS AND CONDITIONS")}</div>
20483
- <div class="terms-title">${t("PET_TERMS_HEADER")}</div>
20484
- <ol class="terms-list">
20485
- <li>${t("PET_TERM1A")} <strong> ${(petData === null || petData === void 0 ? void 0 : petData.petRegistrationNumber) || ""} </strong> ${t("PET_TERM1B")} <strong>'https://mseva.lgpunjab.gov.in/digit-ui/citizen/ptr-home'</strong></li>
20486
- <li>${t("PET_NEW_TERM_2")}</li>
20487
- <li>${t("PET_NEW_TERM_3")}</li>
20488
- <li>${t("PET_NEW_TERM_4")}</li>
20489
- <li>${t("PET_NEW_TERM_5")}</li>
20490
- <li>${t("PET_NEW_TERM_6")}</li>
20491
- <li>${t("PET_NEW_TERM_7")}</li>
20492
- <li>${t("PET_NEW_TERM_8")}</li>
20493
- <li>${t("PET_NEW_TERM_9")}</li>
20494
- <li>${t("PET_NEW_TERM_10")}</li>
20495
- <li>${t("PET_NEW_TERM_11")}</li>
20496
- <li>${t("PET_NEW_TERM_12")}</li>
20497
- <li>${t("PET_NEW_TERM_13")}</li>
20498
- <li>${t("PET_NEW_TERM_14")}</li>
20499
- <li>${t("PET_NEW_TERM_15")}</li>
20500
- <li>${t("PET_NEW_TERM_16")}</li>
20501
- </ol>
20502
-
20503
- <div style="text-align: center;">
20504
- <img src="${qrDataURL}" style="width: 100px; height: 100px;" />
20505
- </div>
20506
- </div>
20507
- </div>
20508
- </body>
20509
- </html>
20510
- `;
20511
- const printWindow = window.open("", "_blank");
20512
- printWindow.document.write(content);
20513
- printWindow.document.close();
20514
- printWindow.onload = () => {
20515
- setTimeout(() => {
20516
- printWindow.print();
20517
- printWindow.onafterprint = () => {
20518
- printWindow.close();
20519
- };
20520
- }, 500);
20521
- };
20522
- };
20523
- createCertificateHTML();
20524
- setShowToast({
20525
- key: false,
20526
- label: "PTR_CERTIFICATE_DOWNLOADED_SUCCESSFULLY"
20527
- });
20528
- } catch (error) {
20529
- setShowToast({
20530
- key: true,
20531
- label: `PTR_CERTIFICATE_DOWNLOAD_ERROR: ${error.message}`
20532
- });
20533
- }
20534
- };
20535
- const downloadAcknowledgement = async () => {
20536
- try {
20537
- var _data$PetRegistration2;
20538
- if (!(data !== null && data !== void 0 && (_data$PetRegistration2 = data.PetRegistrationApplications) !== null && _data$PetRegistration2 !== void 0 && _data$PetRegistration2[0])) {
20539
- throw new Error("Pet registration data is missing");
20540
- }
20541
- const createAcknowledgementHTML = () => {
20542
- var _petData$petDetails8, _petData$petDetails9, _petData$petDetails0, _petData$owner5, _petData$owner6, _petData$owner7;
20543
- const petData = data.PetRegistrationApplications[0];
20544
- const ulb = petData === null || petData === void 0 ? void 0 : petData.tenantId.split(".")[1];
20545
- const currentDate = new Date().toLocaleDateString("en-IN", {
20546
- day: "2-digit",
20547
- month: "long",
20548
- year: "numeric"
20549
- });
20550
- const content = `
20551
- <html>
20552
- <head>
20553
- <title>Pet Registration Acknowledgement</title>
20554
- <style>
20555
- @page { margin: 0.5in; }
20556
- body {
20557
- font-family: 'Arial', sans-serif;
20558
- margin: 0;
20559
- padding: 20px;
20560
- font-size: 14px;
20561
- line-height: 1.6;
20562
- }
20563
- .acknowledgement-container {
20564
- max-width: 800px;
20565
- margin: 0 auto;
20566
- border: 2px solid #333;
20567
- padding: 30px;
20568
- background: white;
20569
- }
20570
- .header {
20571
- text-align: center;
20572
- border-bottom: 2px solid #333;
20573
- display: flex;
20574
- justify-content: space-between;
20575
- align-items: center;
20576
- position: relative;
20577
- }
20578
- .header-center {
20579
- text-align: center;
20580
- flex: 1;
20581
- padding-right: 80px
20582
- }
20583
- .header-right {
20584
- flex: 0 0 auto;
20585
- }
20586
- .title {
20587
- font-size: 20px;
20588
- font-weight: bold;
20589
- margin: 10px 0;
20590
- color: #333;
20591
- }
20592
- .subtitle {
20593
- font-size: 16px;
20594
- margin: 5px 0;
20595
- color: #666;
20596
- }
20597
- .pet-sub {
20598
- font-size: 16px;
20599
- margin: 5px 0;
20600
- color: #666;
20601
- font-weight: bold;
20602
- }
20603
- .acknowledgement-text {
20604
- text-align: justify;
20605
- font-size: 15px;
20606
- }
20607
- .details-table {
20608
- width: 100%;
20609
- border-collapse: collapse;
20610
- }
20611
- .details-table th,
20612
- .details-table td {
20613
- padding: 12px;
20614
- text-align: left;
20615
- border: 1px solid #ddd;
20616
- }
20617
- .details-table th {
20618
- background: #f5f5f5;
20619
- font-weight: bold;
20620
- width: 40%;
20621
- }
20622
- .footer {
20623
- text-align: center;
20624
- font-size: 12px;
20625
- color: #666;
20626
- }
20627
- @media print {
20628
- body { background: white !important; }
20629
- }
20630
- </style>
20631
- </head>
20632
- <body>
20633
- <div class="acknowledgement-container">
20634
- <div class="header">
20635
- <div>
20636
- <img src="https://s3.ap-south-1.amazonaws.com/pb-egov-assets/${petData === null || petData === void 0 ? void 0 : petData.tenantId}/logo.png"
20637
- style="width: 110px; height: 110px; padding-left: 20px; padding-bottom: 20px;" />
20638
- </div>
20639
- <div class="header-center">
20640
- <div class="title">${t(ulbType)} ${t(ulb)}</div>
20641
- <div class="subtitle">${t("Veterinary Services- Health Branch")}</div>
20642
- <div class="pet-sub">Pet Registration Acknowledgment</div>
20643
- <div class="subtitle">(U/S 399 (1)(E) of PMC Act,1976)</div>
20644
- </div>
20645
- <div class="header-right">
20646
- </div>
20647
- </div>
20648
-
20649
- <div class="acknowledgement-text">
20650
- ${t("PTR_ACKN_TERM_1")}
20651
- </div>
20652
-
20653
- <table class="details-table">
20654
- <tr>
20655
- <th>Application Number</th>
20656
- <td>${(petData === null || petData === void 0 ? void 0 : petData.applicationNumber) || "Not Available"}</td>
20657
- </tr>
20658
- <tr>
20659
- <th>Application Date</th>
20660
- <td>${currentDate}</td>
20661
- </tr>
20662
- <tr>
20663
- <th>Pet Name</th>
20664
- <td>${(petData === null || petData === void 0 ? void 0 : (_petData$petDetails8 = petData.petDetails) === null || _petData$petDetails8 === void 0 ? void 0 : _petData$petDetails8.petName) || "Not Specified"}</td>
20665
- </tr>
20666
- <tr>
20667
- <th>Pet Type</th>
20668
- <td>${(petData === null || petData === void 0 ? void 0 : (_petData$petDetails9 = petData.petDetails) === null || _petData$petDetails9 === void 0 ? void 0 : _petData$petDetails9.petType) || "Not Specified"}</td>
20669
- </tr>
20670
- <tr>
20671
- <th>Breed</th>
20672
- <td>${(petData === null || petData === void 0 ? void 0 : (_petData$petDetails0 = petData.petDetails) === null || _petData$petDetails0 === void 0 ? void 0 : _petData$petDetails0.breedType) || "Not Specified"}</td>
20673
- </tr>
20674
- <tr>
20675
- <th>Owner Name</th>
20676
- <td>${(petData === null || petData === void 0 ? void 0 : (_petData$owner5 = petData.owner) === null || _petData$owner5 === void 0 ? void 0 : _petData$owner5.name) || "Not Specified"}</td>
20677
- </tr>
20678
- <tr>
20679
- <th>Contact Number</th>
20680
- <td>${(petData === null || petData === void 0 ? void 0 : (_petData$owner6 = petData.owner) === null || _petData$owner6 === void 0 ? void 0 : _petData$owner6.mobileNumber) || "Not Specified"}</td>
20681
- </tr>
20682
- <tr>
20683
- <th>Email</th>
20684
- <td>${(petData === null || petData === void 0 ? void 0 : (_petData$owner7 = petData.owner) === null || _petData$owner7 === void 0 ? void 0 : _petData$owner7.emailId) || "Not Specified"}</td>
20685
- </tr>
20686
- <tr>
20687
- <th>Application Status</th>
20688
- <td style="color: #28a745; font-weight: bold;">${t(petData === null || petData === void 0 ? void 0 : petData.status) || "SUBMITTED"}</td>
20689
- </tr>
20690
- </table>
20691
-
20692
- <div class="acknowledgement-text">
20693
- ${t("PTR_ACKN_TERM_2")}
20694
- </div>
20695
-
20696
-
20697
- <div class="footer">
20698
- <p>Generated on: ${currentDate}</p>
20699
- <p>${t(ulbType)}</p>
20700
- <p>This is a computer-generated document and does not require a signature.</p>
20701
- <p>https://mseva.lgpunjab.gov.in/digit-ui/citizen/ptr-home</p>
20702
- </div>
20703
- </div>
20704
- </body>
20705
- </html>
20706
- `;
20707
- const printWindow = window.open("", "_blank");
20708
- printWindow.document.write(content);
20709
- printWindow.document.close();
20710
- printWindow.onload = () => {
20711
- setTimeout(() => {
20712
- printWindow.print();
20713
- printWindow.onafterprint = () => {
20714
- printWindow.close();
20715
- };
20716
- }, 500);
20717
- };
20718
- };
20719
- createAcknowledgementHTML();
20720
- setShowToast({
20721
- key: false,
20722
- label: "PTR_ACKNOWLEDGEMENT_DOWNLOADED_SUCCESSFULLY"
20723
- });
20724
- } catch (error) {
20725
- setShowToast({
20726
- key: true,
20727
- label: `PTR_ACKNOWLEDGEMENT_DOWNLOAD_ERROR: ${error.message}`
20728
- });
20729
- }
20730
- };
20731
20175
  let documentDate = t("CS_NA");
20732
20176
  if (pet_details !== null && pet_details !== void 0 && (_pet_details$addition = pet_details.additionalDetails) !== null && _pet_details$addition !== void 0 && _pet_details$addition.documentDate) {
20733
20177
  var _pet_details$addition2;
@@ -20738,17 +20182,22 @@ const PTRApplicationDetails = () => {
20738
20182
  async function getRecieptSearch({
20739
20183
  tenantId,
20740
20184
  payments,
20185
+ pdfkey,
20741
20186
  ...params
20742
20187
  }) {
20743
- var _response;
20188
+ var _application$petDetai, _response;
20189
+ const petAge = formatPetAge(application === null || application === void 0 ? void 0 : (_application$petDetai = application.petDetails) === null || _application$petDetai === void 0 ? void 0 : _application$petDetai.petAge, t);
20744
20190
  let response = {
20745
20191
  filestoreIds: [payments === null || payments === void 0 ? void 0 : payments.fileStoreId]
20746
20192
  };
20747
20193
  response = await Digit.PaymentService.generatePdf(tenantId, {
20748
20194
  Payments: [{
20749
- ...payments
20195
+ ...payments,
20196
+ application,
20197
+ approver,
20198
+ petAge
20750
20199
  }]
20751
- }, "petservice-receipt");
20200
+ }, pdfkey);
20752
20201
  const fileStore = await Digit.PaymentService.printReciept(tenantId, {
20753
20202
  fileStoreIds: response.filestoreIds[0]
20754
20203
  });
@@ -20757,27 +20206,40 @@ const PTRApplicationDetails = () => {
20757
20206
  const dowloadOptions = [];
20758
20207
  dowloadOptions.push({
20759
20208
  label: t("PTR_PET_DOWNLOAD_ACK_FORM"),
20760
- onClick: () => downloadAcknowledgement()
20209
+ onClick: () => {
20210
+ var _reciept_data$Payment;
20211
+ return getRecieptSearch({
20212
+ tenantId: reciept_data === null || reciept_data === void 0 ? void 0 : (_reciept_data$Payment = reciept_data.Payments[0]) === null || _reciept_data$Payment === void 0 ? void 0 : _reciept_data$Payment.tenantId,
20213
+ payments: reciept_data === null || reciept_data === void 0 ? void 0 : reciept_data.Payments[0],
20214
+ pdfkey: "petacknowledgement"
20215
+ });
20216
+ }
20761
20217
  });
20762
- if ((reciept_data === null || reciept_data === void 0 ? void 0 : (_reciept_data$Payment7 = reciept_data.Payments[0]) === null || _reciept_data$Payment7 === void 0 ? void 0 : _reciept_data$Payment7.paymentStatus) === "NEW" || (reciept_data === null || reciept_data === void 0 ? void 0 : (_reciept_data$Payment8 = reciept_data.Payments[0]) === null || _reciept_data$Payment8 === void 0 ? void 0 : _reciept_data$Payment8.paymentStatus) === "DEPOSITED") {
20218
+ if ((reciept_data === null || reciept_data === void 0 ? void 0 : (_reciept_data$Payment2 = reciept_data.Payments[0]) === null || _reciept_data$Payment2 === void 0 ? void 0 : _reciept_data$Payment2.paymentStatus) === "NEW" || (reciept_data === null || reciept_data === void 0 ? void 0 : (_reciept_data$Payment3 = reciept_data.Payments[0]) === null || _reciept_data$Payment3 === void 0 ? void 0 : _reciept_data$Payment3.paymentStatus) === "DEPOSITED") {
20763
20219
  dowloadOptions.push({
20764
20220
  label: t("PTR_CERTIFICATE"),
20765
20221
  onClick: () => {
20766
- printCertificate();
20222
+ var _reciept_data$Payment4;
20223
+ return getRecieptSearch({
20224
+ tenantId: reciept_data === null || reciept_data === void 0 ? void 0 : (_reciept_data$Payment4 = reciept_data.Payments[0]) === null || _reciept_data$Payment4 === void 0 ? void 0 : _reciept_data$Payment4.tenantId,
20225
+ payments: reciept_data === null || reciept_data === void 0 ? void 0 : reciept_data.Payments[0],
20226
+ pdfkey: "petcertificatenew"
20227
+ });
20767
20228
  }
20768
20229
  });
20769
20230
  } else {
20770
- var _reciept_data$Payment9;
20771
- console.log("Certificate not available. Payment status:", reciept_data === null || reciept_data === void 0 ? void 0 : (_reciept_data$Payment9 = reciept_data.Payments[0]) === null || _reciept_data$Payment9 === void 0 ? void 0 : _reciept_data$Payment9.paymentStatus);
20231
+ var _reciept_data$Payment5;
20232
+ console.log("Certificate not available. Payment status:", reciept_data === null || reciept_data === void 0 ? void 0 : (_reciept_data$Payment5 = reciept_data.Payments[0]) === null || _reciept_data$Payment5 === void 0 ? void 0 : _reciept_data$Payment5.paymentStatus);
20772
20233
  }
20773
20234
  if (reciept_data && (reciept_data === null || reciept_data === void 0 ? void 0 : reciept_data.Payments.length) > 0 && !recieptDataLoading) {
20774
20235
  dowloadOptions.push({
20775
20236
  label: t("PTR_FEE_RECIEPT"),
20776
20237
  onClick: () => {
20777
- var _reciept_data$Payment0;
20238
+ var _reciept_data$Payment6;
20778
20239
  return getRecieptSearch({
20779
- tenantId: reciept_data === null || reciept_data === void 0 ? void 0 : (_reciept_data$Payment0 = reciept_data.Payments[0]) === null || _reciept_data$Payment0 === void 0 ? void 0 : _reciept_data$Payment0.tenantId,
20780
- payments: reciept_data === null || reciept_data === void 0 ? void 0 : reciept_data.Payments[0]
20240
+ tenantId: reciept_data === null || reciept_data === void 0 ? void 0 : (_reciept_data$Payment6 = reciept_data.Payments[0]) === null || _reciept_data$Payment6 === void 0 ? void 0 : _reciept_data$Payment6.tenantId,
20241
+ payments: reciept_data === null || reciept_data === void 0 ? void 0 : reciept_data.Payments[0],
20242
+ pdfkey: "petservice-receipt"
20781
20243
  });
20782
20244
  }
20783
20245
  });
@@ -20864,7 +20326,7 @@ const PTRApplicationDetails = () => {
20864
20326
  }, t("WS_COMMON_TABLE_COL_ADDRESS")), /*#__PURE__*/React.createElement(StatusTable, null, /*#__PURE__*/React.createElement(Row, {
20865
20327
  className: "border-none",
20866
20328
  label: t("PTR_ADDRESS"),
20867
- text: (pet_details === null || pet_details === void 0 ? void 0 : (_pet_details$address = pet_details.address) === null || _pet_details$address === void 0 ? void 0 : _pet_details$address.addressId) || t("CS_NA")
20329
+ text: (pet_details === null || pet_details === void 0 ? void 0 : (_pet_details$address = pet_details.address) === null || _pet_details$address === void 0 ? void 0 : _pet_details$address.addressLine1) || t("CS_NA")
20868
20330
  }), /*#__PURE__*/React.createElement(Row, {
20869
20331
  className: "border-none",
20870
20332
  label: t("PTR_PINCODE"),
@@ -22675,7 +22137,7 @@ const NewApplication = () => {
22675
22137
  };
22676
22138
 
22677
22139
  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;
22140
+ var _pet_details$addition, _user$info, _reciept_data$Payment2, _reciept_data$Payment3, _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
22141
  const {
22680
22142
  t
22681
22143
  } = useTranslation();
@@ -22714,8 +22176,6 @@ const ApplicationDetails = () => {
22714
22176
  const [billData, setBillData] = useState(null);
22715
22177
  const PetRegistrationApplications = get_1(data, "PetRegistrationApplications", []);
22716
22178
  const petId = get_1(data, "PetRegistrationApplications[0].applicationNumber", []);
22717
- const ulb = tenantInfo === null || tenantInfo === void 0 ? void 0 : (_tenantInfo$city = tenantInfo.city) === null || _tenantInfo$city === void 0 ? void 0 : _tenantInfo$city.name;
22718
- const ulbType = tenantInfo === null || tenantInfo === void 0 ? void 0 : (_tenantInfo$city2 = tenantInfo.city) === null || _tenantInfo$city2 === void 0 ? void 0 : _tenantInfo$city2.ulbType;
22719
22179
  let pet_details = PetRegistrationApplications && PetRegistrationApplications.length > 0 && PetRegistrationApplications[0] || {};
22720
22180
  const application = pet_details;
22721
22181
  sessionStorage.setItem("ptr-pet", JSON.stringify(application));
@@ -22789,581 +22249,6 @@ const ApplicationDetails = () => {
22789
22249
  if (isLoading || auditDataLoading) {
22790
22250
  return /*#__PURE__*/React.createElement(Loader$1, null);
22791
22251
  }
22792
- const printCertificate = async () => {
22793
- const qrDataURL = await browser.toDataURL(window.location.href);
22794
- try {
22795
- var _data$PetRegistration;
22796
- if (!(data !== null && data !== void 0 && (_data$PetRegistration = data.PetRegistrationApplications) !== null && _data$PetRegistration !== void 0 && _data$PetRegistration[0])) {
22797
- throw new Error("Pet registration data is missing");
22798
- }
22799
- const createCertificateHTML = () => {
22800
- var _petData$documents, _petData$petDetails, _petData$owner, _petData$address, _petData$address2, _petData$owner2, _petData$petDetails2, _petData$petDetails3, _petData$petDetails4, _petData$petDetails5, _petData$petDetails6, _petData$petDetails7, _petData$auditDetails, _petData$auditDetails2, _reciept_data$Payment, _reciept_data$Payment2, _reciept_data$Payment3, _reciept_data$Payment4, _reciept_data$Payment5, _reciept_data$Payment6, _petData$owner3, _petData$owner4, _petData$address3, _petData$address4;
22801
- const petData = data.PetRegistrationApplications[0];
22802
- const currentDate = new Date().toLocaleDateString("en-IN", {
22803
- day: "2-digit",
22804
- month: "2-digit",
22805
- year: "numeric"
22806
- });
22807
- const petImage = petData === null || petData === void 0 ? void 0 : (_petData$documents = petData.documents) === null || _petData$documents === void 0 ? void 0 : _petData$documents.find(doc => (doc === null || doc === void 0 ? void 0 : doc.documentType) === "PET.PETPHOTO");
22808
- const petImageUrl = petImage !== null && petImage !== void 0 && petImage.filestoreId ? `${window.location.origin}/filestore/v1/files/id?tenantId=pb&fileStoreId=${petImage.filestoreId}` : `${window.location.origin}/adorable-golden-retriever.png`;
22809
- const content = `
22810
- <html>
22811
- <head>
22812
- <title>Pet Registration Certificate</title>
22813
- <style>
22814
- @page { margin: 0.5in; }
22815
- body {
22816
- font-family: 'Times New Roman', serif;
22817
- margin: 0;
22818
- font-size: 11px;
22819
- }
22820
- .certificate-container {
22821
- max-width: 800px;
22822
- margin: 0 auto;
22823
- border: 3px solid #000;
22824
- background: white;
22825
- }
22826
- .header {
22827
- display: flex;
22828
- justify-content: space-between;
22829
- align-items: center;
22830
- text-align: center;
22831
- margin-bottom: 5px;
22832
- position: relative;
22833
- }
22834
- .header-value{
22835
- border: none;
22836
- display: flex;
22837
- text-align: center;
22838
- }
22839
- .header-center {
22840
- text-align: center;
22841
- flex: 1;
22842
- padding-right: 80px
22843
- }
22844
- .header-disclaimer {
22845
- text-align: center;
22846
- flex: 1;
22847
- }
22848
- .header-right {
22849
- flex: 0 0 auto;
22850
- }
22851
- .title {
22852
- font-size: 13px;
22853
- font-weight: bold;
22854
- margin: 10px 0;
22855
- }
22856
- .subtitle {
22857
- font-size: 10px;
22858
- color: #666;
22859
- }
22860
- .main-content {
22861
- display: flex;
22862
- gap: 10px;
22863
- margin: 10px 0;
22864
- align-items:flex-start;
22865
- margin-bottom: -13px;
22866
- }
22867
- .details-section {
22868
- }
22869
- .pet-image-section {
22870
- flex-shrink: 0;
22871
- text-align: center;
22872
- order: 2;
22873
- }
22874
- .pet-image {
22875
- width: 100px;
22876
- max-width: 100%;
22877
- aspect-ratio : 1 / 1;
22878
- height: auto;
22879
- border: 2px solid #000;
22880
- object-fit: cover;
22881
- margin-bottom: 10px;
22882
- border-right-width: 2px;
22883
- margin-right: 50px;
22884
- margin-top: 20px;
22885
- display: block;
22886
- }
22887
- .image-label {
22888
- font-size: 12px;
22889
- font-weight: bold;
22890
- text-align: center;
22891
- border-right-width: 30px;
22892
- margin-right: 50px;
22893
- }
22894
- .details-grid {
22895
- display: grid;
22896
- grid-template-columns: 290px 280px;
22897
- overflow: hidden;
22898
- margin: 10px 0;
22899
- margin-left : 40px;
22900
- }
22901
- .detail-row {
22902
- display: grid;
22903
- grid-template-columns: 140px 180px;
22904
- overflow:hidden;
22905
- border: 1px solid black;
22906
- }
22907
- .detail-label {
22908
- font-weight: bold;
22909
- white-space: normal;
22910
- word-break: break-word;
22911
- margin-left: 10px;
22912
- flex-shrink: 1;
22913
- }
22914
- .detail-value {
22915
- padding-bottom: 2px;
22916
- margin-right: 10px;
22917
- }
22918
- .owner-section {
22919
- margin: 5px 40px;
22920
- margin-bottom: 0px;
22921
- display: grid;
22922
- grid-template-columns: 50%;
22923
- }
22924
- .footer-section {
22925
- margin: 0px 40px;
22926
- display: flex;
22927
- justify-content: space-between;
22928
- align-items: anchor-center;
22929
- }
22930
- .signature-area {
22931
- text-align: center;
22932
- min-width: 200px;
22933
- }
22934
- .signature-line {
22935
- border-top: 1px solid #000;
22936
- margin: 10px 0 5px 0;
22937
- }
22938
- .pet-sub {
22939
- font-size: 10px;
22940
- margin: 5px 0;
22941
- color: #666;
22942
- font-weight: bold;
22943
- }
22944
- .terms-section {
22945
- border-top: 2px solid #000;
22946
- padding-top: 5px;
22947
- font-size: 11px;
22948
- margin: 0px 10px;
22949
- }
22950
- .terms-title {
22951
- font-weight: bold;
22952
- margin-bottom: 10px;
22953
- }
22954
- .terms-list {
22955
- margin: 0;
22956
- padding-left: 20px;
22957
- }
22958
- .terms-list li {
22959
- margin-bottom: 2px;
22960
- text-align: left;
22961
- }
22962
- @media print {
22963
- body { background: white !important; }
22964
- }
22965
- @media (max-width: 700px) {
22966
- .main-content {
22967
- flex-wrap: wrap;
22968
- }
22969
- .pet-image {
22970
- width: 100px;
22971
- max-width: 100%;
22972
- height: auto;
22973
- aspect-ratio: 1/1;
22974
- }
22975
- .dis-section{
22976
- font-size: 12px;
22977
- margin: 0px 10px;
22978
- }
22979
- }
22980
- </style>
22981
- </head>
22982
- <body>
22983
- <div class="certificate-container">
22984
- <div class="header">
22985
- <div>
22986
- <img src="https://s3.ap-south-1.amazonaws.com/pb-egov-assets/${petData === null || petData === void 0 ? void 0 : petData.tenantId}/logo.png"
22987
- style="width: 80px; height: 80px; padding-left: 20px; padding-top: 5px;" />
22988
- </div>
22989
- <div class="header-center">
22990
- <div class="title">${t(ulbType)} ${t(ulb)}</div>
22991
- <div class="subtitle">${t("Veterinary Services- Health Branch")}</div>
22992
- <div class="pet-sub">Pet Registration Certificate</div>
22993
- <div class="subtitle">(U/S 399 (1)(E) of PMC Act,1976)</div>
22994
- </div>
22995
- <div class="header-right">
22996
- </div>
22997
- </div>
22998
- <span class="header-value">This is to certify that the ${(petData === null || petData === void 0 ? void 0 : (_petData$petDetails = petData.petDetails) === null || _petData$petDetails === void 0 ? void 0 : _petData$petDetails.petType) || "Dog"} kept by Mr./Mrs./Ms. ${(petData === null || petData === void 0 ? void 0 : (_petData$owner = petData.owner) === null || _petData$owner === void 0 ? void 0 : _petData$owner.name) || "Not Specified"} at ${(petData === null || petData === void 0 ? void 0 : (_petData$address = petData.address) === null || _petData$address === void 0 ? void 0 : _petData$address.addressId) || "Not Specified"}, ${(petData === null || petData === void 0 ? void 0 : (_petData$address2 = petData.address) === null || _petData$address2 === void 0 ? void 0 : _petData$address2.pincode) || ""} mobile no. ${(petData === null || petData === void 0 ? void 0 : (_petData$owner2 = petData.owner) === null || _petData$owner2 === void 0 ? void 0 : _petData$owner2.mobileNumber) || "Not Specified"} is registered with ${ulbType} ${ulb} as per following details:</span>
22999
- <div class="main-content">
23000
- <div class="details-section">
23001
- <span class="detail-label">Pet Information</span> <br>
23002
- <span class="detail-label">Registration No:</span> <span class="detail-label">${(petData === null || petData === void 0 ? void 0 : petData.petRegistrationNumber) || ""}</span>
23003
- <div class="details-grid">
23004
- <div class="detail-row">
23005
- <span class="detail-label">Category</span>
23006
- <span class="detail-value">${(petData === null || petData === void 0 ? void 0 : (_petData$petDetails2 = petData.petDetails) === null || _petData$petDetails2 === void 0 ? void 0 : _petData$petDetails2.petType) || "Dog"}</span>
23007
- </div>
23008
- <div class="detail-row">
23009
- <span class="detail-label">Breed</span>
23010
- <span class="detail-value">${(petData === null || petData === void 0 ? void 0 : (_petData$petDetails3 = petData.petDetails) === null || _petData$petDetails3 === void 0 ? void 0 : _petData$petDetails3.breedType) || "Not Specified"}</span>
23011
- </div>
23012
- <div class="detail-row">
23013
- <span class="detail-label">Name of Animal</span>
23014
- <span class="detail-value">${(petData === null || petData === void 0 ? void 0 : (_petData$petDetails4 = petData.petDetails) === null || _petData$petDetails4 === void 0 ? void 0 : _petData$petDetails4.petName) || "Not Specified"}</span>
23015
- </div>
23016
- <div class="detail-row">
23017
- <span class="detail-label">Gender</span>
23018
- <span class="detail-value">${(petData === null || petData === void 0 ? void 0 : (_petData$petDetails5 = petData.petDetails) === null || _petData$petDetails5 === void 0 ? void 0 : _petData$petDetails5.petGender) || "Not Specified"}</span>
23019
- </div>
23020
- <div class="detail-row">
23021
- <span class="detail-label">Pet Age</span>
23022
- <span class="detail-value">${formatPetAge(petData === null || petData === void 0 ? void 0 : (_petData$petDetails6 = petData.petDetails) === null || _petData$petDetails6 === void 0 ? void 0 : _petData$petDetails6.petAge, t) || t("CS_NA")}</span>
23023
- </div>
23024
- <div class="detail-row">
23025
- <span class="detail-label">Colour</span>
23026
- <span class="detail-value">${(petData === null || petData === void 0 ? void 0 : (_petData$petDetails7 = petData.petDetails) === null || _petData$petDetails7 === void 0 ? void 0 : _petData$petDetails7.petColor) || "Not Specified"}</span>
23027
- </div>
23028
- <div class="detail-row">
23029
- <span class="detail-label">Application Number</span>
23030
- <span class="detail-value">${(petData === null || petData === void 0 ? void 0 : petData.applicationNumber) || "Not Specified"}</span>
23031
- </div>
23032
- <div class="detail-row">
23033
- <span class="detail-label">Token No</span>
23034
- <span class="detail-value">${(petData === null || petData === void 0 ? void 0 : petData.petToken) || "Not Specified"}</span>
23035
- </div>
23036
- <div class="detail-row">
23037
- <span class="detail-label">Issue Date</span>
23038
- <span class="detail-value">
23039
- ${petData !== null && petData !== void 0 && (_petData$auditDetails = petData.auditDetails) !== null && _petData$auditDetails !== void 0 && _petData$auditDetails.lastModifiedTime ? new Date((_petData$auditDetails2 = petData.auditDetails) === null || _petData$auditDetails2 === void 0 ? void 0 : _petData$auditDetails2.lastModifiedTime).toLocaleDateString("en-GB") : "N/A"}
23040
- </span>
23041
- </div>
23042
-
23043
- <div class="detail-row">
23044
- <span class="detail-label">License Valid Upto</span>
23045
- <span class="detail-value">
23046
- ${petData !== null && petData !== void 0 && petData.validityDate ? new Date(petData.validityDate * 1000).toLocaleDateString("en-GB") : "N/A"}
23047
-
23048
- </span>
23049
- </div>
23050
- <div class="detail-row">
23051
- <span class="detail-label">Amount</span>
23052
- <span class="detail-value">Rs. ${(reciept_data === null || reciept_data === void 0 ? void 0 : (_reciept_data$Payment = reciept_data.Payments) === null || _reciept_data$Payment === void 0 ? void 0 : (_reciept_data$Payment2 = _reciept_data$Payment[0]) === null || _reciept_data$Payment2 === void 0 ? void 0 : _reciept_data$Payment2.totalAmountPaid) || "Not Specified"}/-</span>
23053
- </div>
23054
- <div class="detail-row">
23055
- <span class="detail-label">G8/Receipt No</span>
23056
- <span class="detail-value">${(reciept_data === null || reciept_data === void 0 ? void 0 : (_reciept_data$Payment3 = reciept_data.Payments) === null || _reciept_data$Payment3 === void 0 ? void 0 : (_reciept_data$Payment4 = _reciept_data$Payment3[0]) === null || _reciept_data$Payment4 === void 0 ? void 0 : (_reciept_data$Payment5 = _reciept_data$Payment4.paymentDetails) === null || _reciept_data$Payment5 === void 0 ? void 0 : (_reciept_data$Payment6 = _reciept_data$Payment5[0]) === null || _reciept_data$Payment6 === void 0 ? void 0 : _reciept_data$Payment6.receiptNumber) || "Not Specified"}</span>
23057
- </div>
23058
- </div>
23059
- </div>
23060
-
23061
- <div class="pet-image-section">
23062
- <img
23063
- src="${petImageUrl}"
23064
- alt="Pet Photo"
23065
- class="pet-image"
23066
- onload="console.log('Pet image loaded successfully:', this.src);"
23067
- onerror="console.log('Pet image failed to load:', this.src); console.log('Trying fallback image...'); this.src='/adorable-golden-retriever.png';"
23068
- />
23069
- <div class="image-label">Pet Photo</div>
23070
- <script>
23071
- console.log('Image URL being used:', '${petImageUrl}');
23072
- console.log('Pet image data:', ${JSON.stringify(petImage)});
23073
- </script>
23074
- </div>
23075
- </div>
23076
-
23077
- <span class="detail-label">Owner Information</span>
23078
- <div class="owner-section">
23079
- <div class="detail-row">
23080
- <span class="detail-label">Owner Name</span>
23081
- <span class="detail-value">${(petData === null || petData === void 0 ? void 0 : (_petData$owner3 = petData.owner) === null || _petData$owner3 === void 0 ? void 0 : _petData$owner3.name) || "Not Specified"}</span>
23082
- </div>
23083
- <div class="detail-row">
23084
- <span class="detail-label">Father/Spouse Name</span>
23085
- <span class="detail-value">${(petData === null || petData === void 0 ? void 0 : petData.fatherName) || (petData === null || petData === void 0 ? void 0 : (_petData$owner4 = petData.owner) === null || _petData$owner4 === void 0 ? void 0 : _petData$owner4.fatherOrHusbandName) || "Not Specified"}</span>
23086
- </div>
23087
- <div class="detail-row">
23088
- <span class="detail-label">Address</span>
23089
- <span class="detail-value">${(petData === null || petData === void 0 ? void 0 : (_petData$address3 = petData.address) === null || _petData$address3 === void 0 ? void 0 : _petData$address3.addressId) || "Not Specified"}, ${(petData === null || petData === void 0 ? void 0 : (_petData$address4 = petData.address) === null || _petData$address4 === void 0 ? void 0 : _petData$address4.pincode) || ""}</span>
23090
- </div>
23091
- </div>
23092
-
23093
- <div class="header">
23094
- <div class="header-left"> </div>
23095
- <div class="header-disclaimer">
23096
- <div class="title">DISCLAIMER</div>
23097
- <div class="dis-section">${t("PET_DISCLAIMER")}</div>
23098
- <div class="header-right"></div>
23099
- </div>
23100
- </div>
23101
-
23102
- <div class="footer-section">
23103
- <div>
23104
- <div>Date:........................</div>
23105
- <div>Place:.......................</div>
23106
- </div>
23107
- <div class="signature-area">
23108
- <div class="detail-label">Approved by</div>
23109
- <span class="detail-value">${approver || "Not Specified"}</span>
23110
- <div class="signature-line"></div>
23111
- <div>Licensing Authority</div>
23112
- <div>${t(ulbType)}</div>
23113
-
23114
- </div>
23115
- </div>
23116
-
23117
- <div class="terms-section">
23118
- <div class="terms-title">${t("TERMS AND CONDITIONS")}</div>
23119
- <div class="terms-title">${t("PET_TERMS_HEADER")}</div>
23120
- <ol class="terms-list">
23121
- <li>${t("PET_TERM1A")} <strong> ${(petData === null || petData === void 0 ? void 0 : petData.petRegistrationNumber) || ""} </strong> ${t("PET_TERM1B")} <strong>'https://mseva.lgpunjab.gov.in/digit-ui/citizen/ptr-home'</strong></li>
23122
- <li>${t("PET_NEW_TERM_2")}</li>
23123
- <li>${t("PET_NEW_TERM_3")}</li>
23124
- <li>${t("PET_NEW_TERM_4")}</li>
23125
- <li>${t("PET_NEW_TERM_5")}</li>
23126
- <li>${t("PET_NEW_TERM_6")}</li>
23127
- <li>${t("PET_NEW_TERM_7")}</li>
23128
- <li>${t("PET_NEW_TERM_8")}</li>
23129
- <li>${t("PET_NEW_TERM_9")}</li>
23130
- <li>${t("PET_NEW_TERM_10")}</li>
23131
- <li>${t("PET_NEW_TERM_11")}</li>
23132
- <li>${t("PET_NEW_TERM_12")}</li>
23133
- <li>${t("PET_NEW_TERM_13")}</li>
23134
- <li>${t("PET_NEW_TERM_14")}</li>
23135
- <li>${t("PET_NEW_TERM_15")}</li>
23136
- <li>${t("PET_NEW_TERM_16")}</li>
23137
- </ol>
23138
-
23139
- <div style="text-align: center;">
23140
- <img src="${qrDataURL}" style="width: 100px; height: 100px;" />
23141
- </div>
23142
- </div>
23143
- </div>
23144
- </body>
23145
- </html>
23146
- `;
23147
- const printWindow = window.open("", "_blank");
23148
- printWindow.document.write(content);
23149
- printWindow.document.close();
23150
- printWindow.onload = () => {
23151
- setTimeout(() => {
23152
- printWindow.print();
23153
- printWindow.onafterprint = () => {
23154
- printWindow.close();
23155
- };
23156
- }, 500);
23157
- };
23158
- };
23159
- createCertificateHTML();
23160
- setShowToast({
23161
- key: false,
23162
- label: "PTR_CERTIFICATE_DOWNLOADED_SUCCESSFULLY"
23163
- });
23164
- } catch (error) {
23165
- setShowToast({
23166
- key: true,
23167
- label: `PTR_CERTIFICATE_DOWNLOAD_ERROR: ${error.message}`
23168
- });
23169
- }
23170
- };
23171
- const downloadAcknowledgement = async () => {
23172
- try {
23173
- var _data$PetRegistration2;
23174
- if (!(data !== null && data !== void 0 && (_data$PetRegistration2 = data.PetRegistrationApplications) !== null && _data$PetRegistration2 !== void 0 && _data$PetRegistration2[0])) {
23175
- throw new Error("Pet registration data is missing");
23176
- }
23177
- const createAcknowledgementHTML = () => {
23178
- var _petData$petDetails8, _petData$petDetails9, _petData$petDetails0, _petData$owner5, _petData$owner6, _petData$owner7;
23179
- const petData = data.PetRegistrationApplications[0];
23180
- const ulb = petData === null || petData === void 0 ? void 0 : petData.tenantId.split(".")[1];
23181
- const currentDate = new Date().toLocaleDateString("en-IN", {
23182
- day: "2-digit",
23183
- month: "long",
23184
- year: "numeric"
23185
- });
23186
- const content = `
23187
- <html>
23188
- <head>
23189
- <title>Pet Registration Acknowledgement</title>
23190
- <style>
23191
- @page { margin: 0.5in; }
23192
- body {
23193
- font-family: 'Arial', sans-serif;
23194
- margin: 0;
23195
- padding: 20px;
23196
- font-size: 14px;
23197
- line-height: 1.6;
23198
- }
23199
- .acknowledgement-container {
23200
- max-width: 800px;
23201
- margin: 0 auto;
23202
- border: 2px solid #333;
23203
- padding: 30px;
23204
- background: white;
23205
- }
23206
- .header {
23207
- text-align: center;
23208
- border-bottom: 2px solid #333;
23209
- display: flex;
23210
- justify-content: space-between;
23211
- align-items: center;
23212
- position: relative;
23213
- }
23214
- .header-center {
23215
- text-align: center;
23216
- flex: 1;
23217
- padding-right: 80px
23218
- }
23219
- .header-right {
23220
- flex: 0 0 auto;
23221
- }
23222
- .title {
23223
- font-size: 20px;
23224
- font-weight: bold;
23225
- margin: 10px 0;
23226
- color: #333;
23227
- }
23228
- .subtitle {
23229
- font-size: 16px;
23230
- margin: 5px 0;
23231
- color: #666;
23232
- }
23233
- .pet-sub {
23234
- font-size: 16px;
23235
- margin: 5px 0;
23236
- color: #666;
23237
- font-weight: bold;
23238
- }
23239
- .acknowledgement-text {
23240
- text-align: justify;
23241
- font-size: 15px;
23242
- }
23243
- .details-table {
23244
- width: 100%;
23245
- border-collapse: collapse;
23246
- }
23247
- .details-table th,
23248
- .details-table td {
23249
- padding: 12px;
23250
- text-align: left;
23251
- border: 1px solid #ddd;
23252
- }
23253
- .details-table th {
23254
- background: #f5f5f5;
23255
- font-weight: bold;
23256
- width: 40%;
23257
- }
23258
- .footer {
23259
- text-align: center;
23260
- font-size: 12px;
23261
- color: #666;
23262
- }
23263
- @media print {
23264
- body { background: white !important; }
23265
- }
23266
- </style>
23267
- </head>
23268
- <body>
23269
- <div class="acknowledgement-container">
23270
- <div class="header">
23271
- <div>
23272
- <img src="https://s3.ap-south-1.amazonaws.com/pb-egov-assets/${petData === null || petData === void 0 ? void 0 : petData.tenantId}/logo.png"
23273
- style="width: 110px; height: 110px; padding-left: 20px; padding-bottom: 20px;" />
23274
- </div>
23275
- <div class="header-center">
23276
- <div class="title">${t(ulbType)} ${t(ulb)}</div>
23277
- <div class="subtitle">${t("Veterinary Services- Health Branch")}</div>
23278
- <div class="pet-sub">Pet Registration Acknowledgment</div>
23279
- <div class="subtitle">(U/S 399 (1)(E) of PMC Act,1976)</div>
23280
- </div>
23281
- <div class="header-right">
23282
- </div>
23283
- </div>
23284
-
23285
- <div class="acknowledgement-text">
23286
- ${t("PTR_ACKN_TERM_1")}
23287
- </div>
23288
-
23289
- <table class="details-table">
23290
- <tr>
23291
- <th>Application Number</th>
23292
- <td>${(petData === null || petData === void 0 ? void 0 : petData.applicationNumber) || "Not Available"}</td>
23293
- </tr>
23294
- <tr>
23295
- <th>Application Date</th>
23296
- <td>${currentDate}</td>
23297
- </tr>
23298
- <tr>
23299
- <th>Pet Name</th>
23300
- <td>${(petData === null || petData === void 0 ? void 0 : (_petData$petDetails8 = petData.petDetails) === null || _petData$petDetails8 === void 0 ? void 0 : _petData$petDetails8.petName) || "Not Specified"}</td>
23301
- </tr>
23302
- <tr>
23303
- <th>Pet Type</th>
23304
- <td>${(petData === null || petData === void 0 ? void 0 : (_petData$petDetails9 = petData.petDetails) === null || _petData$petDetails9 === void 0 ? void 0 : _petData$petDetails9.petType) || "Not Specified"}</td>
23305
- </tr>
23306
- <tr>
23307
- <th>Breed</th>
23308
- <td>${(petData === null || petData === void 0 ? void 0 : (_petData$petDetails0 = petData.petDetails) === null || _petData$petDetails0 === void 0 ? void 0 : _petData$petDetails0.breedType) || "Not Specified"}</td>
23309
- </tr>
23310
- <tr>
23311
- <th>Owner Name</th>
23312
- <td>${(petData === null || petData === void 0 ? void 0 : (_petData$owner5 = petData.owner) === null || _petData$owner5 === void 0 ? void 0 : _petData$owner5.name) || "Not Specified"}</td>
23313
- </tr>
23314
- <tr>
23315
- <th>Contact Number</th>
23316
- <td>${(petData === null || petData === void 0 ? void 0 : (_petData$owner6 = petData.owner) === null || _petData$owner6 === void 0 ? void 0 : _petData$owner6.mobileNumber) || "Not Specified"}</td>
23317
- </tr>
23318
- <tr>
23319
- <th>Email</th>
23320
- <td>${(petData === null || petData === void 0 ? void 0 : (_petData$owner7 = petData.owner) === null || _petData$owner7 === void 0 ? void 0 : _petData$owner7.emailId) || "Not Specified"}</td>
23321
- </tr>
23322
- <tr>
23323
- <th>Application Status</th>
23324
- <td style="color: #28a745; font-weight: bold;">${t(petData === null || petData === void 0 ? void 0 : petData.status) || "SUBMITTED"}</td>
23325
- </tr>
23326
- </table>
23327
-
23328
- <div class="acknowledgement-text">
23329
- ${t("PTR_ACKN_TERM_2")}
23330
- </div>
23331
-
23332
-
23333
- <div class="footer">
23334
- <p>Generated on: ${currentDate}</p>
23335
- <p>${t(ulbType)}</p>
23336
- <p>This is a computer-generated document and does not require a signature.</p>
23337
- <p>https://mseva.lgpunjab.gov.in/digit-ui/citizen/ptr-home</p>
23338
- </div>
23339
- </div>
23340
- </body>
23341
- </html>
23342
- `;
23343
- const printWindow = window.open("", "_blank");
23344
- printWindow.document.write(content);
23345
- printWindow.document.close();
23346
- printWindow.onload = () => {
23347
- setTimeout(() => {
23348
- printWindow.print();
23349
- printWindow.onafterprint = () => {
23350
- printWindow.close();
23351
- };
23352
- }, 500);
23353
- };
23354
- };
23355
- createAcknowledgementHTML();
23356
- setShowToast({
23357
- key: false,
23358
- label: "PTR_ACKNOWLEDGEMENT_DOWNLOADED_SUCCESSFULLY"
23359
- });
23360
- } catch (error) {
23361
- setShowToast({
23362
- key: true,
23363
- label: `PTR_ACKNOWLEDGEMENT_DOWNLOAD_ERROR: ${error.message}`
23364
- });
23365
- }
23366
- };
23367
22252
  let documentDate = t("CS_NA");
23368
22253
  if (pet_details !== null && pet_details !== void 0 && (_pet_details$addition = pet_details.additionalDetails) !== null && _pet_details$addition !== void 0 && _pet_details$addition.documentDate) {
23369
22254
  var _pet_details$addition2;
@@ -23374,17 +22259,22 @@ const ApplicationDetails = () => {
23374
22259
  async function getRecieptSearch({
23375
22260
  tenantId,
23376
22261
  payments,
22262
+ pdfkey,
23377
22263
  ...params
23378
22264
  }) {
23379
- var _response;
22265
+ var _application$petDetai, _response;
22266
+ const petAge = formatPetAge(application === null || application === void 0 ? void 0 : (_application$petDetai = application.petDetails) === null || _application$petDetai === void 0 ? void 0 : _application$petDetai.petAge, t);
23380
22267
  let response = {
23381
22268
  filestoreIds: [payments === null || payments === void 0 ? void 0 : payments.fileStoreId]
23382
22269
  };
23383
22270
  response = await Digit.PaymentService.generatePdf(tenantId, {
23384
22271
  Payments: [{
23385
- ...payments
22272
+ ...payments,
22273
+ application,
22274
+ approver,
22275
+ petAge
23386
22276
  }]
23387
- }, "petservice-receipt");
22277
+ }, pdfkey);
23388
22278
  const fileStore = await Digit.PaymentService.printReciept(tenantId, {
23389
22279
  fileStoreIds: response.filestoreIds[0]
23390
22280
  });
@@ -23395,27 +22285,40 @@ const ApplicationDetails = () => {
23395
22285
  const isCemp = user === null || user === void 0 ? void 0 : (_user$info = user.info) === null || _user$info === void 0 ? void 0 : _user$info.roles.filter(role => role.code === "CEMP");
23396
22286
  dowloadOptions.push({
23397
22287
  label: t("PTR_PET_DOWNLOAD_ACK_FORM"),
23398
- onClick: () => downloadAcknowledgement()
22288
+ onClick: () => {
22289
+ var _reciept_data$Payment;
22290
+ return getRecieptSearch({
22291
+ tenantId: reciept_data === null || reciept_data === void 0 ? void 0 : (_reciept_data$Payment = reciept_data.Payments[0]) === null || _reciept_data$Payment === void 0 ? void 0 : _reciept_data$Payment.tenantId,
22292
+ payments: reciept_data === null || reciept_data === void 0 ? void 0 : reciept_data.Payments[0],
22293
+ pdfkey: "petacknowledgement"
22294
+ });
22295
+ }
23399
22296
  });
23400
- if ((reciept_data === null || reciept_data === void 0 ? void 0 : (_reciept_data$Payment7 = reciept_data.Payments[0]) === null || _reciept_data$Payment7 === void 0 ? void 0 : _reciept_data$Payment7.paymentStatus) === "NEW" || (reciept_data === null || reciept_data === void 0 ? void 0 : (_reciept_data$Payment8 = reciept_data.Payments[0]) === null || _reciept_data$Payment8 === void 0 ? void 0 : _reciept_data$Payment8.paymentStatus) === "DEPOSITED") {
22297
+ if ((reciept_data === null || reciept_data === void 0 ? void 0 : (_reciept_data$Payment2 = reciept_data.Payments[0]) === null || _reciept_data$Payment2 === void 0 ? void 0 : _reciept_data$Payment2.paymentStatus) === "NEW" || (reciept_data === null || reciept_data === void 0 ? void 0 : (_reciept_data$Payment3 = reciept_data.Payments[0]) === null || _reciept_data$Payment3 === void 0 ? void 0 : _reciept_data$Payment3.paymentStatus) === "DEPOSITED") {
23401
22298
  dowloadOptions.push({
23402
22299
  label: t("PTR_CERTIFICATE"),
23403
22300
  onClick: () => {
23404
- printCertificate();
22301
+ var _reciept_data$Payment4;
22302
+ return getRecieptSearch({
22303
+ tenantId: reciept_data === null || reciept_data === void 0 ? void 0 : (_reciept_data$Payment4 = reciept_data.Payments[0]) === null || _reciept_data$Payment4 === void 0 ? void 0 : _reciept_data$Payment4.tenantId,
22304
+ payments: reciept_data === null || reciept_data === void 0 ? void 0 : reciept_data.Payments[0],
22305
+ pdfkey: "petcertificatenew"
22306
+ });
23405
22307
  }
23406
22308
  });
23407
22309
  } else {
23408
- var _reciept_data$Payment9;
23409
- console.log("Certificate not available. Payment status:", reciept_data === null || reciept_data === void 0 ? void 0 : (_reciept_data$Payment9 = reciept_data.Payments[0]) === null || _reciept_data$Payment9 === void 0 ? void 0 : _reciept_data$Payment9.paymentStatus);
22310
+ var _reciept_data$Payment5;
22311
+ console.log("Certificate not available. Payment status:", reciept_data === null || reciept_data === void 0 ? void 0 : (_reciept_data$Payment5 = reciept_data.Payments[0]) === null || _reciept_data$Payment5 === void 0 ? void 0 : _reciept_data$Payment5.paymentStatus);
23410
22312
  }
23411
22313
  if (reciept_data && (reciept_data === null || reciept_data === void 0 ? void 0 : reciept_data.Payments.length) > 0 && !recieptDataLoading) {
23412
22314
  dowloadOptions.push({
23413
22315
  label: t("PTR_FEE_RECIEPT"),
23414
22316
  onClick: () => {
23415
- var _reciept_data$Payment0;
22317
+ var _reciept_data$Payment6;
23416
22318
  return getRecieptSearch({
23417
- tenantId: reciept_data === null || reciept_data === void 0 ? void 0 : (_reciept_data$Payment0 = reciept_data.Payments[0]) === null || _reciept_data$Payment0 === void 0 ? void 0 : _reciept_data$Payment0.tenantId,
23418
- payments: reciept_data === null || reciept_data === void 0 ? void 0 : reciept_data.Payments[0]
22319
+ tenantId: reciept_data === null || reciept_data === void 0 ? void 0 : (_reciept_data$Payment6 = reciept_data.Payments[0]) === null || _reciept_data$Payment6 === void 0 ? void 0 : _reciept_data$Payment6.tenantId,
22320
+ payments: reciept_data === null || reciept_data === void 0 ? void 0 : reciept_data.Payments[0],
22321
+ pdfkey: "pet-receipt-employee"
23419
22322
  });
23420
22323
  }
23421
22324
  });
@@ -23487,7 +22390,7 @@ const ApplicationDetails = () => {
23487
22390
  }, t("WS_COMMON_TABLE_COL_ADDRESS")), /*#__PURE__*/React.createElement(StatusTable, null, /*#__PURE__*/React.createElement(Row, {
23488
22391
  className: "border-none",
23489
22392
  label: t("PTR_ADDRESS"),
23490
- text: (pet_details === null || pet_details === void 0 ? void 0 : (_pet_details$address = pet_details.address) === null || _pet_details$address === void 0 ? void 0 : _pet_details$address.addressId) || t("CS_NA")
22393
+ text: (pet_details === null || pet_details === void 0 ? void 0 : (_pet_details$address = pet_details.address) === null || _pet_details$address === void 0 ? void 0 : _pet_details$address.addressLine1) || t("CS_NA")
23491
22394
  }), /*#__PURE__*/React.createElement(Row, {
23492
22395
  className: "border-none",
23493
22396
  label: t("PTR_PINCODE"),
@@ -24448,9 +23351,19 @@ const NewPTRStepperForm = () => {
24448
23351
  const step = formState.step;
24449
23352
  const tenantId = Digit.ULBService.getCurrentTenantId();
24450
23353
  const pathParts = window.location.pathname.split("/");
24451
- const id = pathParts.find(part => part.startsWith("PB-PTR-"));
24452
- console.log("id", id);
24453
- const shouldEnableSearch = Boolean(id && id.startsWith("PB-PTR-"));
23354
+ const startIndex = pathParts.findIndex(part => part === "new-application");
23355
+ let id = null;
23356
+ if (startIndex !== -1) {
23357
+ const nextPart = pathParts[startIndex + 1];
23358
+ if (nextPart !== null && nextPart !== void 0 && nextPart.startsWith("PB-PTR-")) {
23359
+ id = nextPart;
23360
+ } else if (nextPart === "PL") {
23361
+ id = pathParts.slice(startIndex + 1, startIndex + 5).join("/");
23362
+ }
23363
+ }
23364
+ id = id ? decodeURIComponent(id) : null;
23365
+ console.log("id:", id);
23366
+ const shouldEnableSearch = Boolean(id);
24454
23367
  console.log("shouldEnableSearch", shouldEnableSearch);
24455
23368
  const {
24456
23369
  isLoading,
@@ -24465,6 +23378,7 @@ const NewPTRStepperForm = () => {
24465
23378
  useEffect(() => {
24466
23379
  var _applicationData$PetR;
24467
23380
  console.log("applicationData for hereee:>> ", applicationData);
23381
+ console.log("id", id);
24468
23382
  if (id && applicationData !== null && applicationData !== void 0 && (_applicationData$PetR = applicationData.PetRegistrationApplications) !== null && _applicationData$PetR !== void 0 && _applicationData$PetR.length) {
24469
23383
  dispatch(UPDATE_PTRNewApplication_FORM("responseData", applicationData.PetRegistrationApplications));
24470
23384
  }