@mseva/digit-ui-module-ptr 1.3.4-UAT.13 → 1.3.4-UAT.15
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 +63 -1192
- package/dist/index.modern.js.map +1 -1
- package/package.json +1 -1
package/dist/index.modern.js
CHANGED
|
@@ -17041,7 +17041,7 @@ function NewApplicationTimeline({
|
|
|
17041
17041
|
}))), /*#__PURE__*/React.createElement("div", {
|
|
17042
17042
|
className: "custom-timeline-entries"
|
|
17043
17043
|
}, sortedData === null || sortedData === void 0 ? void 0 : sortedData.map((item, index) => {
|
|
17044
|
-
var _item$auditDetails, _item$auditDetails2, _item$assigner2, _item$assigner3, _item$assigner4, _item$
|
|
17044
|
+
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;
|
|
17045
17045
|
return /*#__PURE__*/React.createElement("div", {
|
|
17046
17046
|
key: index,
|
|
17047
17047
|
className: "custom-timeline-entry"
|
|
@@ -17078,13 +17078,9 @@ function NewApplicationTimeline({
|
|
|
17078
17078
|
className: "custom-officer-info"
|
|
17079
17079
|
}, /*#__PURE__*/React.createElement("div", {
|
|
17080
17080
|
className: "custom-officer-name"
|
|
17081
|
-
}, (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("
|
|
17081
|
+
}, (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", {
|
|
17082
17082
|
className: "custom-officer-name"
|
|
17083
|
-
},
|
|
17084
|
-
className: "custom-officer-email"
|
|
17085
|
-
}, /*#__PURE__*/React.createElement("span", {
|
|
17086
|
-
className: "custom-email-label"
|
|
17087
|
-
}, 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", {
|
|
17083
|
+
}, 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", {
|
|
17088
17084
|
className: "custom-card-column custom-card-column-mid"
|
|
17089
17085
|
}, (item === null || item === void 0 ? void 0 : item.sla) && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("h3", {
|
|
17090
17086
|
className: "custom-action-title"
|
|
@@ -20065,21 +20061,14 @@ function renderCanvas(renderFunc, canvas, text, opts, cb) {
|
|
|
20065
20061
|
cb(e);
|
|
20066
20062
|
}
|
|
20067
20063
|
}
|
|
20068
|
-
var create$1 = qrcode.create;
|
|
20069
20064
|
var toCanvas = renderCanvas.bind(null, canvas.render);
|
|
20070
20065
|
var toDataURL = renderCanvas.bind(null, canvas.renderToDataURL);
|
|
20071
20066
|
var toString_1$1 = renderCanvas.bind(null, function (data, _, opts) {
|
|
20072
20067
|
return svgTag.render(data, opts);
|
|
20073
20068
|
});
|
|
20074
|
-
var browser = {
|
|
20075
|
-
create: create$1,
|
|
20076
|
-
toCanvas: toCanvas,
|
|
20077
|
-
toDataURL: toDataURL,
|
|
20078
|
-
toString: toString_1$1
|
|
20079
|
-
};
|
|
20080
20069
|
|
|
20081
20070
|
const PTRApplicationDetails = () => {
|
|
20082
|
-
var
|
|
20071
|
+
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;
|
|
20083
20072
|
const {
|
|
20084
20073
|
t
|
|
20085
20074
|
} = useTranslation();
|
|
@@ -20122,8 +20111,6 @@ const PTRApplicationDetails = () => {
|
|
|
20122
20111
|
});
|
|
20123
20112
|
console.log("data====", data);
|
|
20124
20113
|
const [billData, setBillData] = useState(null);
|
|
20125
|
-
const ulb = tenantInfo === null || tenantInfo === void 0 ? void 0 : (_tenantInfo$city = tenantInfo.city) === null || _tenantInfo$city === void 0 ? void 0 : _tenantInfo$city.name;
|
|
20126
|
-
const ulbType = tenantInfo === null || tenantInfo === void 0 ? void 0 : (_tenantInfo$city2 = tenantInfo.city) === null || _tenantInfo$city2 === void 0 ? void 0 : _tenantInfo$city2.ulbType;
|
|
20127
20114
|
const PetRegistrationApplications = get_1(data, "PetRegistrationApplications", []);
|
|
20128
20115
|
const pet_details = PetRegistrationApplications && PetRegistrationApplications.length > 0 && PetRegistrationApplications[0] || {};
|
|
20129
20116
|
const application = pet_details;
|
|
@@ -20181,581 +20168,6 @@ const PTRApplicationDetails = () => {
|
|
|
20181
20168
|
};
|
|
20182
20169
|
pet_details.workflow = workflow;
|
|
20183
20170
|
}
|
|
20184
|
-
const printCertificate = async () => {
|
|
20185
|
-
const qrDataURL = await browser.toDataURL(window.location.href);
|
|
20186
|
-
try {
|
|
20187
|
-
var _data$PetRegistration;
|
|
20188
|
-
if (!(data !== null && data !== void 0 && (_data$PetRegistration = data.PetRegistrationApplications) !== null && _data$PetRegistration !== void 0 && _data$PetRegistration[0])) {
|
|
20189
|
-
throw new Error("Pet registration data is missing");
|
|
20190
|
-
}
|
|
20191
|
-
const createCertificateHTML = () => {
|
|
20192
|
-
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;
|
|
20193
|
-
const petData = data.PetRegistrationApplications[0];
|
|
20194
|
-
const currentDate = new Date().toLocaleDateString("en-IN", {
|
|
20195
|
-
day: "2-digit",
|
|
20196
|
-
month: "2-digit",
|
|
20197
|
-
year: "numeric"
|
|
20198
|
-
});
|
|
20199
|
-
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");
|
|
20200
|
-
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`;
|
|
20201
|
-
const content = `
|
|
20202
|
-
<html>
|
|
20203
|
-
<head>
|
|
20204
|
-
<title>Pet Registration Certificate</title>
|
|
20205
|
-
<style>
|
|
20206
|
-
@page { margin: 0.5in; }
|
|
20207
|
-
body {
|
|
20208
|
-
font-family: 'Times New Roman', serif;
|
|
20209
|
-
margin: 0;
|
|
20210
|
-
font-size: 11px;
|
|
20211
|
-
}
|
|
20212
|
-
.certificate-container {
|
|
20213
|
-
max-width: 800px;
|
|
20214
|
-
margin: 0 auto;
|
|
20215
|
-
border: 3px solid #000;
|
|
20216
|
-
background: white;
|
|
20217
|
-
}
|
|
20218
|
-
.header {
|
|
20219
|
-
display: flex;
|
|
20220
|
-
justify-content: space-between;
|
|
20221
|
-
align-items: center;
|
|
20222
|
-
text-align: center;
|
|
20223
|
-
margin-bottom: 5px;
|
|
20224
|
-
position: relative;
|
|
20225
|
-
}
|
|
20226
|
-
.header-value{
|
|
20227
|
-
border: none;
|
|
20228
|
-
display: flex;
|
|
20229
|
-
text-align: center;
|
|
20230
|
-
}
|
|
20231
|
-
.header-center {
|
|
20232
|
-
text-align: center;
|
|
20233
|
-
flex: 1;
|
|
20234
|
-
padding-right: 80px
|
|
20235
|
-
}
|
|
20236
|
-
.header-disclaimer {
|
|
20237
|
-
text-align: center;
|
|
20238
|
-
flex: 1;
|
|
20239
|
-
}
|
|
20240
|
-
.header-right {
|
|
20241
|
-
flex: 0 0 auto;
|
|
20242
|
-
}
|
|
20243
|
-
.title {
|
|
20244
|
-
font-size: 13px;
|
|
20245
|
-
font-weight: bold;
|
|
20246
|
-
margin: 10px 0;
|
|
20247
|
-
}
|
|
20248
|
-
.subtitle {
|
|
20249
|
-
font-size: 10px;
|
|
20250
|
-
color: #666;
|
|
20251
|
-
}
|
|
20252
|
-
.main-content {
|
|
20253
|
-
display: flex;
|
|
20254
|
-
gap: 10px;
|
|
20255
|
-
margin: 10px 0;
|
|
20256
|
-
align-items:flex-start;
|
|
20257
|
-
margin-bottom: -13px;
|
|
20258
|
-
}
|
|
20259
|
-
.details-section {
|
|
20260
|
-
}
|
|
20261
|
-
.pet-image-section {
|
|
20262
|
-
flex-shrink: 0;
|
|
20263
|
-
text-align: center;
|
|
20264
|
-
order: 2;
|
|
20265
|
-
}
|
|
20266
|
-
.pet-image {
|
|
20267
|
-
width: 100px;
|
|
20268
|
-
max-width: 100%;
|
|
20269
|
-
aspect-ratio : 1 / 1;
|
|
20270
|
-
height: auto;
|
|
20271
|
-
border: 2px solid #000;
|
|
20272
|
-
object-fit: cover;
|
|
20273
|
-
margin-bottom: 10px;
|
|
20274
|
-
border-right-width: 2px;
|
|
20275
|
-
margin-right: 50px;
|
|
20276
|
-
margin-top: 20px;
|
|
20277
|
-
display: block;
|
|
20278
|
-
}
|
|
20279
|
-
.image-label {
|
|
20280
|
-
font-size: 12px;
|
|
20281
|
-
font-weight: bold;
|
|
20282
|
-
text-align: center;
|
|
20283
|
-
border-right-width: 30px;
|
|
20284
|
-
margin-right: 50px;
|
|
20285
|
-
}
|
|
20286
|
-
.details-grid {
|
|
20287
|
-
display: grid;
|
|
20288
|
-
grid-template-columns: 290px 280px;
|
|
20289
|
-
overflow: hidden;
|
|
20290
|
-
margin: 10px 0;
|
|
20291
|
-
margin-left : 40px;
|
|
20292
|
-
}
|
|
20293
|
-
.detail-row {
|
|
20294
|
-
display: grid;
|
|
20295
|
-
grid-template-columns: 140px 180px;
|
|
20296
|
-
overflow:hidden;
|
|
20297
|
-
border: 1px solid black;
|
|
20298
|
-
}
|
|
20299
|
-
.detail-label {
|
|
20300
|
-
font-weight: bold;
|
|
20301
|
-
white-space: normal;
|
|
20302
|
-
word-break: break-word;
|
|
20303
|
-
margin-left: 10px;
|
|
20304
|
-
flex-shrink: 1;
|
|
20305
|
-
}
|
|
20306
|
-
.detail-value {
|
|
20307
|
-
padding-bottom: 2px;
|
|
20308
|
-
margin-right: 10px;
|
|
20309
|
-
}
|
|
20310
|
-
.owner-section {
|
|
20311
|
-
margin: 5px 40px;
|
|
20312
|
-
margin-bottom: 0px;
|
|
20313
|
-
display: grid;
|
|
20314
|
-
grid-template-columns: 50%;
|
|
20315
|
-
}
|
|
20316
|
-
.footer-section {
|
|
20317
|
-
margin: 0px 40px;
|
|
20318
|
-
display: flex;
|
|
20319
|
-
justify-content: space-between;
|
|
20320
|
-
align-items: anchor-center;
|
|
20321
|
-
}
|
|
20322
|
-
.signature-area {
|
|
20323
|
-
text-align: center;
|
|
20324
|
-
min-width: 200px;
|
|
20325
|
-
}
|
|
20326
|
-
.signature-line {
|
|
20327
|
-
border-top: 1px solid #000;
|
|
20328
|
-
margin: 10px 0 5px 0;
|
|
20329
|
-
}
|
|
20330
|
-
.pet-sub {
|
|
20331
|
-
font-size: 10px;
|
|
20332
|
-
margin: 5px 0;
|
|
20333
|
-
color: #666;
|
|
20334
|
-
font-weight: bold;
|
|
20335
|
-
}
|
|
20336
|
-
.terms-section {
|
|
20337
|
-
border-top: 2px solid #000;
|
|
20338
|
-
padding-top: 5px;
|
|
20339
|
-
font-size: 11px;
|
|
20340
|
-
margin: 0px 10px;
|
|
20341
|
-
}
|
|
20342
|
-
.terms-title {
|
|
20343
|
-
font-weight: bold;
|
|
20344
|
-
margin-bottom: 10px;
|
|
20345
|
-
}
|
|
20346
|
-
.terms-list {
|
|
20347
|
-
margin: 0;
|
|
20348
|
-
padding-left: 20px;
|
|
20349
|
-
}
|
|
20350
|
-
.terms-list li {
|
|
20351
|
-
margin-bottom: 2px;
|
|
20352
|
-
text-align: left;
|
|
20353
|
-
}
|
|
20354
|
-
@media print {
|
|
20355
|
-
body { background: white !important; }
|
|
20356
|
-
}
|
|
20357
|
-
@media (max-width: 700px) {
|
|
20358
|
-
.main-content {
|
|
20359
|
-
flex-wrap: wrap;
|
|
20360
|
-
}
|
|
20361
|
-
.pet-image {
|
|
20362
|
-
width: 100px;
|
|
20363
|
-
max-width: 100%;
|
|
20364
|
-
height: auto;
|
|
20365
|
-
aspect-ratio: 1/1;
|
|
20366
|
-
}
|
|
20367
|
-
.dis-section{
|
|
20368
|
-
font-size: 12px;
|
|
20369
|
-
margin: 0px 10px;
|
|
20370
|
-
}
|
|
20371
|
-
}
|
|
20372
|
-
</style>
|
|
20373
|
-
</head>
|
|
20374
|
-
<body>
|
|
20375
|
-
<div class="certificate-container">
|
|
20376
|
-
<div class="header">
|
|
20377
|
-
<div>
|
|
20378
|
-
<img src="https://s3.ap-south-1.amazonaws.com/pb-egov-assets/${petData === null || petData === void 0 ? void 0 : petData.tenantId}/logo.png"
|
|
20379
|
-
style="width: 80px; height: 80px; padding-left: 20px; padding-top: 5px;" />
|
|
20380
|
-
</div>
|
|
20381
|
-
<div class="header-center">
|
|
20382
|
-
<div class="title">${t(ulbType)} ${t(ulb)}</div>
|
|
20383
|
-
<div class="subtitle">${t("Veterinary Services- Health Branch")}</div>
|
|
20384
|
-
<div class="pet-sub">Pet Registration Certificate</div>
|
|
20385
|
-
<div class="subtitle">(U/S 399 (1)(E) of PMC Act,1976)</div>
|
|
20386
|
-
</div>
|
|
20387
|
-
<div class="header-right">
|
|
20388
|
-
</div>
|
|
20389
|
-
</div>
|
|
20390
|
-
<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>
|
|
20391
|
-
<div class="main-content">
|
|
20392
|
-
<div class="details-section">
|
|
20393
|
-
<span class="detail-label">Pet Information</span> <br>
|
|
20394
|
-
<span class="detail-label">Registration No:</span> <span class="detail-label">${(petData === null || petData === void 0 ? void 0 : petData.petRegistrationNumber) || ""}</span>
|
|
20395
|
-
<div class="details-grid">
|
|
20396
|
-
<div class="detail-row">
|
|
20397
|
-
<span class="detail-label">Category</span>
|
|
20398
|
-
<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>
|
|
20399
|
-
</div>
|
|
20400
|
-
<div class="detail-row">
|
|
20401
|
-
<span class="detail-label">Breed</span>
|
|
20402
|
-
<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>
|
|
20403
|
-
</div>
|
|
20404
|
-
<div class="detail-row">
|
|
20405
|
-
<span class="detail-label">Name of Animal</span>
|
|
20406
|
-
<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>
|
|
20407
|
-
</div>
|
|
20408
|
-
<div class="detail-row">
|
|
20409
|
-
<span class="detail-label">Gender</span>
|
|
20410
|
-
<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>
|
|
20411
|
-
</div>
|
|
20412
|
-
<div class="detail-row">
|
|
20413
|
-
<span class="detail-label">Pet Age</span>
|
|
20414
|
-
<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>
|
|
20415
|
-
</div>
|
|
20416
|
-
<div class="detail-row">
|
|
20417
|
-
<span class="detail-label">Colour</span>
|
|
20418
|
-
<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>
|
|
20419
|
-
</div>
|
|
20420
|
-
<div class="detail-row">
|
|
20421
|
-
<span class="detail-label">Application Number</span>
|
|
20422
|
-
<span class="detail-value">${(petData === null || petData === void 0 ? void 0 : petData.applicationNumber) || "Not Specified"}</span>
|
|
20423
|
-
</div>
|
|
20424
|
-
<div class="detail-row">
|
|
20425
|
-
<span class="detail-label">Token No</span>
|
|
20426
|
-
<span class="detail-value">${(petData === null || petData === void 0 ? void 0 : petData.petToken) || "Not Specified"}</span>
|
|
20427
|
-
</div>
|
|
20428
|
-
<div class="detail-row">
|
|
20429
|
-
<span class="detail-label">Issue Date</span>
|
|
20430
|
-
<span class="detail-value">
|
|
20431
|
-
${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"}
|
|
20432
|
-
</span>
|
|
20433
|
-
</div>
|
|
20434
|
-
|
|
20435
|
-
<div class="detail-row">
|
|
20436
|
-
<span class="detail-label">License Valid Upto</span>
|
|
20437
|
-
<span class="detail-value">
|
|
20438
|
-
${petData !== null && petData !== void 0 && petData.validityDate ? new Date(petData.validityDate * 1000).toLocaleDateString("en-GB") : "N/A"}
|
|
20439
|
-
|
|
20440
|
-
</span>
|
|
20441
|
-
</div>
|
|
20442
|
-
<div class="detail-row">
|
|
20443
|
-
<span class="detail-label">Amount</span>
|
|
20444
|
-
<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>
|
|
20445
|
-
</div>
|
|
20446
|
-
<div class="detail-row">
|
|
20447
|
-
<span class="detail-label">G8/Receipt No</span>
|
|
20448
|
-
<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>
|
|
20449
|
-
</div>
|
|
20450
|
-
</div>
|
|
20451
|
-
</div>
|
|
20452
|
-
|
|
20453
|
-
<div class="pet-image-section">
|
|
20454
|
-
<img
|
|
20455
|
-
src="${petImageUrl}"
|
|
20456
|
-
alt="Pet Photo"
|
|
20457
|
-
class="pet-image"
|
|
20458
|
-
onload="console.log('Pet image loaded successfully:', this.src);"
|
|
20459
|
-
onerror="console.log('Pet image failed to load:', this.src); console.log('Trying fallback image...'); this.src='/adorable-golden-retriever.png';"
|
|
20460
|
-
/>
|
|
20461
|
-
<div class="image-label">Pet Photo</div>
|
|
20462
|
-
<script>
|
|
20463
|
-
console.log('Image URL being used:', '${petImageUrl}');
|
|
20464
|
-
console.log('Pet image data:', ${JSON.stringify(petImage)});
|
|
20465
|
-
</script>
|
|
20466
|
-
</div>
|
|
20467
|
-
</div>
|
|
20468
|
-
|
|
20469
|
-
<span class="detail-label">Owner Information</span>
|
|
20470
|
-
<div class="owner-section">
|
|
20471
|
-
<div class="detail-row">
|
|
20472
|
-
<span class="detail-label">Owner Name</span>
|
|
20473
|
-
<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>
|
|
20474
|
-
</div>
|
|
20475
|
-
<div class="detail-row">
|
|
20476
|
-
<span class="detail-label">Father/Spouse Name</span>
|
|
20477
|
-
<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>
|
|
20478
|
-
</div>
|
|
20479
|
-
<div class="detail-row">
|
|
20480
|
-
<span class="detail-label">Address</span>
|
|
20481
|
-
<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>
|
|
20482
|
-
</div>
|
|
20483
|
-
</div>
|
|
20484
|
-
|
|
20485
|
-
<div class="header">
|
|
20486
|
-
<div class="header-left"> </div>
|
|
20487
|
-
<div class="header-disclaimer">
|
|
20488
|
-
<div class="title">DISCLAIMER</div>
|
|
20489
|
-
<div class="dis-section">${t("PET_DISCLAIMER")}</div>
|
|
20490
|
-
<div class="header-right"></div>
|
|
20491
|
-
</div>
|
|
20492
|
-
</div>
|
|
20493
|
-
|
|
20494
|
-
<div class="footer-section">
|
|
20495
|
-
<div>
|
|
20496
|
-
<div>Date:........................</div>
|
|
20497
|
-
<div>Place:.......................</div>
|
|
20498
|
-
</div>
|
|
20499
|
-
<div class="signature-area">
|
|
20500
|
-
<div class="detail-label">Approved by</div>
|
|
20501
|
-
<span class="detail-value">${approver || "Not Specified"}</span>
|
|
20502
|
-
<div class="signature-line"></div>
|
|
20503
|
-
<div>Licensing Authority</div>
|
|
20504
|
-
<div>${t(ulbType)}</div>
|
|
20505
|
-
|
|
20506
|
-
</div>
|
|
20507
|
-
</div>
|
|
20508
|
-
|
|
20509
|
-
<div class="terms-section">
|
|
20510
|
-
<div class="terms-title">${t("TERMS AND CONDITIONS")}</div>
|
|
20511
|
-
<div class="terms-title">${t("PET_TERMS_HEADER")}</div>
|
|
20512
|
-
<ol class="terms-list">
|
|
20513
|
-
<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>
|
|
20514
|
-
<li>${t("PET_NEW_TERM_2")}</li>
|
|
20515
|
-
<li>${t("PET_NEW_TERM_3")}</li>
|
|
20516
|
-
<li>${t("PET_NEW_TERM_4")}</li>
|
|
20517
|
-
<li>${t("PET_NEW_TERM_5")}</li>
|
|
20518
|
-
<li>${t("PET_NEW_TERM_6")}</li>
|
|
20519
|
-
<li>${t("PET_NEW_TERM_7")}</li>
|
|
20520
|
-
<li>${t("PET_NEW_TERM_8")}</li>
|
|
20521
|
-
<li>${t("PET_NEW_TERM_9")}</li>
|
|
20522
|
-
<li>${t("PET_NEW_TERM_10")}</li>
|
|
20523
|
-
<li>${t("PET_NEW_TERM_11")}</li>
|
|
20524
|
-
<li>${t("PET_NEW_TERM_12")}</li>
|
|
20525
|
-
<li>${t("PET_NEW_TERM_13")}</li>
|
|
20526
|
-
<li>${t("PET_NEW_TERM_14")}</li>
|
|
20527
|
-
<li>${t("PET_NEW_TERM_15")}</li>
|
|
20528
|
-
<li>${t("PET_NEW_TERM_16")}</li>
|
|
20529
|
-
</ol>
|
|
20530
|
-
|
|
20531
|
-
<div style="text-align: center;">
|
|
20532
|
-
<img src="${qrDataURL}" style="width: 100px; height: 100px;" />
|
|
20533
|
-
</div>
|
|
20534
|
-
</div>
|
|
20535
|
-
</div>
|
|
20536
|
-
</body>
|
|
20537
|
-
</html>
|
|
20538
|
-
`;
|
|
20539
|
-
const printWindow = window.open("", "_blank");
|
|
20540
|
-
printWindow.document.write(content);
|
|
20541
|
-
printWindow.document.close();
|
|
20542
|
-
printWindow.onload = () => {
|
|
20543
|
-
setTimeout(() => {
|
|
20544
|
-
printWindow.print();
|
|
20545
|
-
printWindow.onafterprint = () => {
|
|
20546
|
-
printWindow.close();
|
|
20547
|
-
};
|
|
20548
|
-
}, 500);
|
|
20549
|
-
};
|
|
20550
|
-
};
|
|
20551
|
-
createCertificateHTML();
|
|
20552
|
-
setShowToast({
|
|
20553
|
-
key: false,
|
|
20554
|
-
label: "PTR_CERTIFICATE_DOWNLOADED_SUCCESSFULLY"
|
|
20555
|
-
});
|
|
20556
|
-
} catch (error) {
|
|
20557
|
-
setShowToast({
|
|
20558
|
-
key: true,
|
|
20559
|
-
label: `PTR_CERTIFICATE_DOWNLOAD_ERROR: ${error.message}`
|
|
20560
|
-
});
|
|
20561
|
-
}
|
|
20562
|
-
};
|
|
20563
|
-
const downloadAcknowledgement = async () => {
|
|
20564
|
-
try {
|
|
20565
|
-
var _data$PetRegistration2;
|
|
20566
|
-
if (!(data !== null && data !== void 0 && (_data$PetRegistration2 = data.PetRegistrationApplications) !== null && _data$PetRegistration2 !== void 0 && _data$PetRegistration2[0])) {
|
|
20567
|
-
throw new Error("Pet registration data is missing");
|
|
20568
|
-
}
|
|
20569
|
-
const createAcknowledgementHTML = () => {
|
|
20570
|
-
var _petData$petDetails8, _petData$petDetails9, _petData$petDetails0, _petData$owner5, _petData$owner6, _petData$owner7;
|
|
20571
|
-
const petData = data.PetRegistrationApplications[0];
|
|
20572
|
-
const ulb = petData === null || petData === void 0 ? void 0 : petData.tenantId.split(".")[1];
|
|
20573
|
-
const currentDate = new Date().toLocaleDateString("en-IN", {
|
|
20574
|
-
day: "2-digit",
|
|
20575
|
-
month: "long",
|
|
20576
|
-
year: "numeric"
|
|
20577
|
-
});
|
|
20578
|
-
const content = `
|
|
20579
|
-
<html>
|
|
20580
|
-
<head>
|
|
20581
|
-
<title>Pet Registration Acknowledgement</title>
|
|
20582
|
-
<style>
|
|
20583
|
-
@page { margin: 0.5in; }
|
|
20584
|
-
body {
|
|
20585
|
-
font-family: 'Arial', sans-serif;
|
|
20586
|
-
margin: 0;
|
|
20587
|
-
padding: 20px;
|
|
20588
|
-
font-size: 14px;
|
|
20589
|
-
line-height: 1.6;
|
|
20590
|
-
}
|
|
20591
|
-
.acknowledgement-container {
|
|
20592
|
-
max-width: 800px;
|
|
20593
|
-
margin: 0 auto;
|
|
20594
|
-
border: 2px solid #333;
|
|
20595
|
-
padding: 30px;
|
|
20596
|
-
background: white;
|
|
20597
|
-
}
|
|
20598
|
-
.header {
|
|
20599
|
-
text-align: center;
|
|
20600
|
-
border-bottom: 2px solid #333;
|
|
20601
|
-
display: flex;
|
|
20602
|
-
justify-content: space-between;
|
|
20603
|
-
align-items: center;
|
|
20604
|
-
position: relative;
|
|
20605
|
-
}
|
|
20606
|
-
.header-center {
|
|
20607
|
-
text-align: center;
|
|
20608
|
-
flex: 1;
|
|
20609
|
-
padding-right: 80px
|
|
20610
|
-
}
|
|
20611
|
-
.header-right {
|
|
20612
|
-
flex: 0 0 auto;
|
|
20613
|
-
}
|
|
20614
|
-
.title {
|
|
20615
|
-
font-size: 20px;
|
|
20616
|
-
font-weight: bold;
|
|
20617
|
-
margin: 10px 0;
|
|
20618
|
-
color: #333;
|
|
20619
|
-
}
|
|
20620
|
-
.subtitle {
|
|
20621
|
-
font-size: 16px;
|
|
20622
|
-
margin: 5px 0;
|
|
20623
|
-
color: #666;
|
|
20624
|
-
}
|
|
20625
|
-
.pet-sub {
|
|
20626
|
-
font-size: 16px;
|
|
20627
|
-
margin: 5px 0;
|
|
20628
|
-
color: #666;
|
|
20629
|
-
font-weight: bold;
|
|
20630
|
-
}
|
|
20631
|
-
.acknowledgement-text {
|
|
20632
|
-
text-align: justify;
|
|
20633
|
-
font-size: 15px;
|
|
20634
|
-
}
|
|
20635
|
-
.details-table {
|
|
20636
|
-
width: 100%;
|
|
20637
|
-
border-collapse: collapse;
|
|
20638
|
-
}
|
|
20639
|
-
.details-table th,
|
|
20640
|
-
.details-table td {
|
|
20641
|
-
padding: 12px;
|
|
20642
|
-
text-align: left;
|
|
20643
|
-
border: 1px solid #ddd;
|
|
20644
|
-
}
|
|
20645
|
-
.details-table th {
|
|
20646
|
-
background: #f5f5f5;
|
|
20647
|
-
font-weight: bold;
|
|
20648
|
-
width: 40%;
|
|
20649
|
-
}
|
|
20650
|
-
.footer {
|
|
20651
|
-
text-align: center;
|
|
20652
|
-
font-size: 12px;
|
|
20653
|
-
color: #666;
|
|
20654
|
-
}
|
|
20655
|
-
@media print {
|
|
20656
|
-
body { background: white !important; }
|
|
20657
|
-
}
|
|
20658
|
-
</style>
|
|
20659
|
-
</head>
|
|
20660
|
-
<body>
|
|
20661
|
-
<div class="acknowledgement-container">
|
|
20662
|
-
<div class="header">
|
|
20663
|
-
<div>
|
|
20664
|
-
<img src="https://s3.ap-south-1.amazonaws.com/pb-egov-assets/${petData === null || petData === void 0 ? void 0 : petData.tenantId}/logo.png"
|
|
20665
|
-
style="width: 110px; height: 110px; padding-left: 20px; padding-bottom: 20px;" />
|
|
20666
|
-
</div>
|
|
20667
|
-
<div class="header-center">
|
|
20668
|
-
<div class="title">${t(ulbType)} ${t(ulb)}</div>
|
|
20669
|
-
<div class="subtitle">${t("Veterinary Services- Health Branch")}</div>
|
|
20670
|
-
<div class="pet-sub">Pet Registration Acknowledgment</div>
|
|
20671
|
-
<div class="subtitle">(U/S 399 (1)(E) of PMC Act,1976)</div>
|
|
20672
|
-
</div>
|
|
20673
|
-
<div class="header-right">
|
|
20674
|
-
</div>
|
|
20675
|
-
</div>
|
|
20676
|
-
|
|
20677
|
-
<div class="acknowledgement-text">
|
|
20678
|
-
${t("PTR_ACKN_TERM_1")}
|
|
20679
|
-
</div>
|
|
20680
|
-
|
|
20681
|
-
<table class="details-table">
|
|
20682
|
-
<tr>
|
|
20683
|
-
<th>Application Number</th>
|
|
20684
|
-
<td>${(petData === null || petData === void 0 ? void 0 : petData.applicationNumber) || "Not Available"}</td>
|
|
20685
|
-
</tr>
|
|
20686
|
-
<tr>
|
|
20687
|
-
<th>Application Date</th>
|
|
20688
|
-
<td>${currentDate}</td>
|
|
20689
|
-
</tr>
|
|
20690
|
-
<tr>
|
|
20691
|
-
<th>Pet Name</th>
|
|
20692
|
-
<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>
|
|
20693
|
-
</tr>
|
|
20694
|
-
<tr>
|
|
20695
|
-
<th>Pet Type</th>
|
|
20696
|
-
<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>
|
|
20697
|
-
</tr>
|
|
20698
|
-
<tr>
|
|
20699
|
-
<th>Breed</th>
|
|
20700
|
-
<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>
|
|
20701
|
-
</tr>
|
|
20702
|
-
<tr>
|
|
20703
|
-
<th>Owner Name</th>
|
|
20704
|
-
<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>
|
|
20705
|
-
</tr>
|
|
20706
|
-
<tr>
|
|
20707
|
-
<th>Contact Number</th>
|
|
20708
|
-
<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>
|
|
20709
|
-
</tr>
|
|
20710
|
-
<tr>
|
|
20711
|
-
<th>Email</th>
|
|
20712
|
-
<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>
|
|
20713
|
-
</tr>
|
|
20714
|
-
<tr>
|
|
20715
|
-
<th>Application Status</th>
|
|
20716
|
-
<td style="color: #28a745; font-weight: bold;">${t(petData === null || petData === void 0 ? void 0 : petData.status) || "SUBMITTED"}</td>
|
|
20717
|
-
</tr>
|
|
20718
|
-
</table>
|
|
20719
|
-
|
|
20720
|
-
<div class="acknowledgement-text">
|
|
20721
|
-
${t("PTR_ACKN_TERM_2")}
|
|
20722
|
-
</div>
|
|
20723
|
-
|
|
20724
|
-
|
|
20725
|
-
<div class="footer">
|
|
20726
|
-
<p>Generated on: ${currentDate}</p>
|
|
20727
|
-
<p>${t(ulbType)}</p>
|
|
20728
|
-
<p>This is a computer-generated document and does not require a signature.</p>
|
|
20729
|
-
<p>https://mseva.lgpunjab.gov.in/digit-ui/citizen/ptr-home</p>
|
|
20730
|
-
</div>
|
|
20731
|
-
</div>
|
|
20732
|
-
</body>
|
|
20733
|
-
</html>
|
|
20734
|
-
`;
|
|
20735
|
-
const printWindow = window.open("", "_blank");
|
|
20736
|
-
printWindow.document.write(content);
|
|
20737
|
-
printWindow.document.close();
|
|
20738
|
-
printWindow.onload = () => {
|
|
20739
|
-
setTimeout(() => {
|
|
20740
|
-
printWindow.print();
|
|
20741
|
-
printWindow.onafterprint = () => {
|
|
20742
|
-
printWindow.close();
|
|
20743
|
-
};
|
|
20744
|
-
}, 500);
|
|
20745
|
-
};
|
|
20746
|
-
};
|
|
20747
|
-
createAcknowledgementHTML();
|
|
20748
|
-
setShowToast({
|
|
20749
|
-
key: false,
|
|
20750
|
-
label: "PTR_ACKNOWLEDGEMENT_DOWNLOADED_SUCCESSFULLY"
|
|
20751
|
-
});
|
|
20752
|
-
} catch (error) {
|
|
20753
|
-
setShowToast({
|
|
20754
|
-
key: true,
|
|
20755
|
-
label: `PTR_ACKNOWLEDGEMENT_DOWNLOAD_ERROR: ${error.message}`
|
|
20756
|
-
});
|
|
20757
|
-
}
|
|
20758
|
-
};
|
|
20759
20171
|
let documentDate = t("CS_NA");
|
|
20760
20172
|
if (pet_details !== null && pet_details !== void 0 && (_pet_details$addition = pet_details.additionalDetails) !== null && _pet_details$addition !== void 0 && _pet_details$addition.documentDate) {
|
|
20761
20173
|
var _pet_details$addition2;
|
|
@@ -20766,17 +20178,22 @@ const PTRApplicationDetails = () => {
|
|
|
20766
20178
|
async function getRecieptSearch({
|
|
20767
20179
|
tenantId,
|
|
20768
20180
|
payments,
|
|
20181
|
+
pdfkey,
|
|
20769
20182
|
...params
|
|
20770
20183
|
}) {
|
|
20771
|
-
var _response;
|
|
20184
|
+
var _application$petDetai, _response;
|
|
20185
|
+
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);
|
|
20772
20186
|
let response = {
|
|
20773
20187
|
filestoreIds: [payments === null || payments === void 0 ? void 0 : payments.fileStoreId]
|
|
20774
20188
|
};
|
|
20775
20189
|
response = await Digit.PaymentService.generatePdf(tenantId, {
|
|
20776
20190
|
Payments: [{
|
|
20777
|
-
...payments
|
|
20191
|
+
...payments,
|
|
20192
|
+
application,
|
|
20193
|
+
approver,
|
|
20194
|
+
petAge
|
|
20778
20195
|
}]
|
|
20779
|
-
},
|
|
20196
|
+
}, pdfkey);
|
|
20780
20197
|
const fileStore = await Digit.PaymentService.printReciept(tenantId, {
|
|
20781
20198
|
fileStoreIds: response.filestoreIds[0]
|
|
20782
20199
|
});
|
|
@@ -20785,27 +20202,40 @@ const PTRApplicationDetails = () => {
|
|
|
20785
20202
|
const dowloadOptions = [];
|
|
20786
20203
|
dowloadOptions.push({
|
|
20787
20204
|
label: t("PTR_PET_DOWNLOAD_ACK_FORM"),
|
|
20788
|
-
onClick: () =>
|
|
20205
|
+
onClick: () => {
|
|
20206
|
+
var _reciept_data$Payment;
|
|
20207
|
+
return getRecieptSearch({
|
|
20208
|
+
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,
|
|
20209
|
+
payments: reciept_data === null || reciept_data === void 0 ? void 0 : reciept_data.Payments[0],
|
|
20210
|
+
pdfkey: "petacknowledgement"
|
|
20211
|
+
});
|
|
20212
|
+
}
|
|
20789
20213
|
});
|
|
20790
|
-
if ((reciept_data === null || reciept_data === void 0 ? void 0 : (_reciept_data$
|
|
20214
|
+
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") {
|
|
20791
20215
|
dowloadOptions.push({
|
|
20792
20216
|
label: t("PTR_CERTIFICATE"),
|
|
20793
20217
|
onClick: () => {
|
|
20794
|
-
|
|
20218
|
+
var _reciept_data$Payment4;
|
|
20219
|
+
return getRecieptSearch({
|
|
20220
|
+
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,
|
|
20221
|
+
payments: reciept_data === null || reciept_data === void 0 ? void 0 : reciept_data.Payments[0],
|
|
20222
|
+
pdfkey: "petcertificatenew"
|
|
20223
|
+
});
|
|
20795
20224
|
}
|
|
20796
20225
|
});
|
|
20797
20226
|
} else {
|
|
20798
|
-
var _reciept_data$
|
|
20799
|
-
console.log("Certificate not available. Payment status:", reciept_data === null || reciept_data === void 0 ? void 0 : (_reciept_data$
|
|
20227
|
+
var _reciept_data$Payment5;
|
|
20228
|
+
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);
|
|
20800
20229
|
}
|
|
20801
20230
|
if (reciept_data && (reciept_data === null || reciept_data === void 0 ? void 0 : reciept_data.Payments.length) > 0 && !recieptDataLoading) {
|
|
20802
20231
|
dowloadOptions.push({
|
|
20803
20232
|
label: t("PTR_FEE_RECIEPT"),
|
|
20804
20233
|
onClick: () => {
|
|
20805
|
-
var _reciept_data$
|
|
20234
|
+
var _reciept_data$Payment6;
|
|
20806
20235
|
return getRecieptSearch({
|
|
20807
|
-
tenantId: reciept_data === null || reciept_data === void 0 ? void 0 : (_reciept_data$
|
|
20808
|
-
payments: reciept_data === null || reciept_data === void 0 ? void 0 : reciept_data.Payments[0]
|
|
20236
|
+
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,
|
|
20237
|
+
payments: reciept_data === null || reciept_data === void 0 ? void 0 : reciept_data.Payments[0],
|
|
20238
|
+
pdfkey: "petservice-receipt"
|
|
20809
20239
|
});
|
|
20810
20240
|
}
|
|
20811
20241
|
});
|
|
@@ -22703,7 +22133,7 @@ const NewApplication = () => {
|
|
|
22703
22133
|
};
|
|
22704
22134
|
|
|
22705
22135
|
const ApplicationDetails = () => {
|
|
22706
|
-
var
|
|
22136
|
+
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;
|
|
22707
22137
|
const {
|
|
22708
22138
|
t
|
|
22709
22139
|
} = useTranslation();
|
|
@@ -22742,8 +22172,6 @@ const ApplicationDetails = () => {
|
|
|
22742
22172
|
const [billData, setBillData] = useState(null);
|
|
22743
22173
|
const PetRegistrationApplications = get_1(data, "PetRegistrationApplications", []);
|
|
22744
22174
|
const petId = get_1(data, "PetRegistrationApplications[0].applicationNumber", []);
|
|
22745
|
-
const ulb = tenantInfo === null || tenantInfo === void 0 ? void 0 : (_tenantInfo$city = tenantInfo.city) === null || _tenantInfo$city === void 0 ? void 0 : _tenantInfo$city.name;
|
|
22746
|
-
const ulbType = tenantInfo === null || tenantInfo === void 0 ? void 0 : (_tenantInfo$city2 = tenantInfo.city) === null || _tenantInfo$city2 === void 0 ? void 0 : _tenantInfo$city2.ulbType;
|
|
22747
22175
|
let pet_details = PetRegistrationApplications && PetRegistrationApplications.length > 0 && PetRegistrationApplications[0] || {};
|
|
22748
22176
|
const application = pet_details;
|
|
22749
22177
|
sessionStorage.setItem("ptr-pet", JSON.stringify(application));
|
|
@@ -22817,581 +22245,6 @@ const ApplicationDetails = () => {
|
|
|
22817
22245
|
if (isLoading || auditDataLoading) {
|
|
22818
22246
|
return /*#__PURE__*/React.createElement(Loader$1, null);
|
|
22819
22247
|
}
|
|
22820
|
-
const printCertificate = async () => {
|
|
22821
|
-
const qrDataURL = await browser.toDataURL(window.location.href);
|
|
22822
|
-
try {
|
|
22823
|
-
var _data$PetRegistration;
|
|
22824
|
-
if (!(data !== null && data !== void 0 && (_data$PetRegistration = data.PetRegistrationApplications) !== null && _data$PetRegistration !== void 0 && _data$PetRegistration[0])) {
|
|
22825
|
-
throw new Error("Pet registration data is missing");
|
|
22826
|
-
}
|
|
22827
|
-
const createCertificateHTML = () => {
|
|
22828
|
-
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;
|
|
22829
|
-
const petData = data.PetRegistrationApplications[0];
|
|
22830
|
-
const currentDate = new Date().toLocaleDateString("en-IN", {
|
|
22831
|
-
day: "2-digit",
|
|
22832
|
-
month: "2-digit",
|
|
22833
|
-
year: "numeric"
|
|
22834
|
-
});
|
|
22835
|
-
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");
|
|
22836
|
-
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`;
|
|
22837
|
-
const content = `
|
|
22838
|
-
<html>
|
|
22839
|
-
<head>
|
|
22840
|
-
<title>Pet Registration Certificate</title>
|
|
22841
|
-
<style>
|
|
22842
|
-
@page { margin: 0.5in; }
|
|
22843
|
-
body {
|
|
22844
|
-
font-family: 'Times New Roman', serif;
|
|
22845
|
-
margin: 0;
|
|
22846
|
-
font-size: 11px;
|
|
22847
|
-
}
|
|
22848
|
-
.certificate-container {
|
|
22849
|
-
max-width: 800px;
|
|
22850
|
-
margin: 0 auto;
|
|
22851
|
-
border: 3px solid #000;
|
|
22852
|
-
background: white;
|
|
22853
|
-
}
|
|
22854
|
-
.header {
|
|
22855
|
-
display: flex;
|
|
22856
|
-
justify-content: space-between;
|
|
22857
|
-
align-items: center;
|
|
22858
|
-
text-align: center;
|
|
22859
|
-
margin-bottom: 5px;
|
|
22860
|
-
position: relative;
|
|
22861
|
-
}
|
|
22862
|
-
.header-value{
|
|
22863
|
-
border: none;
|
|
22864
|
-
display: flex;
|
|
22865
|
-
text-align: center;
|
|
22866
|
-
}
|
|
22867
|
-
.header-center {
|
|
22868
|
-
text-align: center;
|
|
22869
|
-
flex: 1;
|
|
22870
|
-
padding-right: 80px
|
|
22871
|
-
}
|
|
22872
|
-
.header-disclaimer {
|
|
22873
|
-
text-align: center;
|
|
22874
|
-
flex: 1;
|
|
22875
|
-
}
|
|
22876
|
-
.header-right {
|
|
22877
|
-
flex: 0 0 auto;
|
|
22878
|
-
}
|
|
22879
|
-
.title {
|
|
22880
|
-
font-size: 13px;
|
|
22881
|
-
font-weight: bold;
|
|
22882
|
-
margin: 10px 0;
|
|
22883
|
-
}
|
|
22884
|
-
.subtitle {
|
|
22885
|
-
font-size: 10px;
|
|
22886
|
-
color: #666;
|
|
22887
|
-
}
|
|
22888
|
-
.main-content {
|
|
22889
|
-
display: flex;
|
|
22890
|
-
gap: 10px;
|
|
22891
|
-
margin: 10px 0;
|
|
22892
|
-
align-items:flex-start;
|
|
22893
|
-
margin-bottom: -13px;
|
|
22894
|
-
}
|
|
22895
|
-
.details-section {
|
|
22896
|
-
}
|
|
22897
|
-
.pet-image-section {
|
|
22898
|
-
flex-shrink: 0;
|
|
22899
|
-
text-align: center;
|
|
22900
|
-
order: 2;
|
|
22901
|
-
}
|
|
22902
|
-
.pet-image {
|
|
22903
|
-
width: 100px;
|
|
22904
|
-
max-width: 100%;
|
|
22905
|
-
aspect-ratio : 1 / 1;
|
|
22906
|
-
height: auto;
|
|
22907
|
-
border: 2px solid #000;
|
|
22908
|
-
object-fit: cover;
|
|
22909
|
-
margin-bottom: 10px;
|
|
22910
|
-
border-right-width: 2px;
|
|
22911
|
-
margin-right: 50px;
|
|
22912
|
-
margin-top: 20px;
|
|
22913
|
-
display: block;
|
|
22914
|
-
}
|
|
22915
|
-
.image-label {
|
|
22916
|
-
font-size: 12px;
|
|
22917
|
-
font-weight: bold;
|
|
22918
|
-
text-align: center;
|
|
22919
|
-
border-right-width: 30px;
|
|
22920
|
-
margin-right: 50px;
|
|
22921
|
-
}
|
|
22922
|
-
.details-grid {
|
|
22923
|
-
display: grid;
|
|
22924
|
-
grid-template-columns: 290px 280px;
|
|
22925
|
-
overflow: hidden;
|
|
22926
|
-
margin: 10px 0;
|
|
22927
|
-
margin-left : 40px;
|
|
22928
|
-
}
|
|
22929
|
-
.detail-row {
|
|
22930
|
-
display: grid;
|
|
22931
|
-
grid-template-columns: 140px 180px;
|
|
22932
|
-
overflow:hidden;
|
|
22933
|
-
border: 1px solid black;
|
|
22934
|
-
}
|
|
22935
|
-
.detail-label {
|
|
22936
|
-
font-weight: bold;
|
|
22937
|
-
white-space: normal;
|
|
22938
|
-
word-break: break-word;
|
|
22939
|
-
margin-left: 10px;
|
|
22940
|
-
flex-shrink: 1;
|
|
22941
|
-
}
|
|
22942
|
-
.detail-value {
|
|
22943
|
-
padding-bottom: 2px;
|
|
22944
|
-
margin-right: 10px;
|
|
22945
|
-
}
|
|
22946
|
-
.owner-section {
|
|
22947
|
-
margin: 5px 40px;
|
|
22948
|
-
margin-bottom: 0px;
|
|
22949
|
-
display: grid;
|
|
22950
|
-
grid-template-columns: 50%;
|
|
22951
|
-
}
|
|
22952
|
-
.footer-section {
|
|
22953
|
-
margin: 0px 40px;
|
|
22954
|
-
display: flex;
|
|
22955
|
-
justify-content: space-between;
|
|
22956
|
-
align-items: anchor-center;
|
|
22957
|
-
}
|
|
22958
|
-
.signature-area {
|
|
22959
|
-
text-align: center;
|
|
22960
|
-
min-width: 200px;
|
|
22961
|
-
}
|
|
22962
|
-
.signature-line {
|
|
22963
|
-
border-top: 1px solid #000;
|
|
22964
|
-
margin: 10px 0 5px 0;
|
|
22965
|
-
}
|
|
22966
|
-
.pet-sub {
|
|
22967
|
-
font-size: 10px;
|
|
22968
|
-
margin: 5px 0;
|
|
22969
|
-
color: #666;
|
|
22970
|
-
font-weight: bold;
|
|
22971
|
-
}
|
|
22972
|
-
.terms-section {
|
|
22973
|
-
border-top: 2px solid #000;
|
|
22974
|
-
padding-top: 5px;
|
|
22975
|
-
font-size: 11px;
|
|
22976
|
-
margin: 0px 10px;
|
|
22977
|
-
}
|
|
22978
|
-
.terms-title {
|
|
22979
|
-
font-weight: bold;
|
|
22980
|
-
margin-bottom: 10px;
|
|
22981
|
-
}
|
|
22982
|
-
.terms-list {
|
|
22983
|
-
margin: 0;
|
|
22984
|
-
padding-left: 20px;
|
|
22985
|
-
}
|
|
22986
|
-
.terms-list li {
|
|
22987
|
-
margin-bottom: 2px;
|
|
22988
|
-
text-align: left;
|
|
22989
|
-
}
|
|
22990
|
-
@media print {
|
|
22991
|
-
body { background: white !important; }
|
|
22992
|
-
}
|
|
22993
|
-
@media (max-width: 700px) {
|
|
22994
|
-
.main-content {
|
|
22995
|
-
flex-wrap: wrap;
|
|
22996
|
-
}
|
|
22997
|
-
.pet-image {
|
|
22998
|
-
width: 100px;
|
|
22999
|
-
max-width: 100%;
|
|
23000
|
-
height: auto;
|
|
23001
|
-
aspect-ratio: 1/1;
|
|
23002
|
-
}
|
|
23003
|
-
.dis-section{
|
|
23004
|
-
font-size: 12px;
|
|
23005
|
-
margin: 0px 10px;
|
|
23006
|
-
}
|
|
23007
|
-
}
|
|
23008
|
-
</style>
|
|
23009
|
-
</head>
|
|
23010
|
-
<body>
|
|
23011
|
-
<div class="certificate-container">
|
|
23012
|
-
<div class="header">
|
|
23013
|
-
<div>
|
|
23014
|
-
<img src="https://s3.ap-south-1.amazonaws.com/pb-egov-assets/${petData === null || petData === void 0 ? void 0 : petData.tenantId}/logo.png"
|
|
23015
|
-
style="width: 80px; height: 80px; padding-left: 20px; padding-top: 5px;" />
|
|
23016
|
-
</div>
|
|
23017
|
-
<div class="header-center">
|
|
23018
|
-
<div class="title">${t(ulbType)} ${t(ulb)}</div>
|
|
23019
|
-
<div class="subtitle">${t("Veterinary Services- Health Branch")}</div>
|
|
23020
|
-
<div class="pet-sub">Pet Registration Certificate</div>
|
|
23021
|
-
<div class="subtitle">(U/S 399 (1)(E) of PMC Act,1976)</div>
|
|
23022
|
-
</div>
|
|
23023
|
-
<div class="header-right">
|
|
23024
|
-
</div>
|
|
23025
|
-
</div>
|
|
23026
|
-
<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>
|
|
23027
|
-
<div class="main-content">
|
|
23028
|
-
<div class="details-section">
|
|
23029
|
-
<span class="detail-label">Pet Information</span> <br>
|
|
23030
|
-
<span class="detail-label">Registration No:</span> <span class="detail-label">${(petData === null || petData === void 0 ? void 0 : petData.petRegistrationNumber) || ""}</span>
|
|
23031
|
-
<div class="details-grid">
|
|
23032
|
-
<div class="detail-row">
|
|
23033
|
-
<span class="detail-label">Category</span>
|
|
23034
|
-
<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>
|
|
23035
|
-
</div>
|
|
23036
|
-
<div class="detail-row">
|
|
23037
|
-
<span class="detail-label">Breed</span>
|
|
23038
|
-
<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>
|
|
23039
|
-
</div>
|
|
23040
|
-
<div class="detail-row">
|
|
23041
|
-
<span class="detail-label">Name of Animal</span>
|
|
23042
|
-
<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>
|
|
23043
|
-
</div>
|
|
23044
|
-
<div class="detail-row">
|
|
23045
|
-
<span class="detail-label">Gender</span>
|
|
23046
|
-
<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>
|
|
23047
|
-
</div>
|
|
23048
|
-
<div class="detail-row">
|
|
23049
|
-
<span class="detail-label">Pet Age</span>
|
|
23050
|
-
<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>
|
|
23051
|
-
</div>
|
|
23052
|
-
<div class="detail-row">
|
|
23053
|
-
<span class="detail-label">Colour</span>
|
|
23054
|
-
<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>
|
|
23055
|
-
</div>
|
|
23056
|
-
<div class="detail-row">
|
|
23057
|
-
<span class="detail-label">Application Number</span>
|
|
23058
|
-
<span class="detail-value">${(petData === null || petData === void 0 ? void 0 : petData.applicationNumber) || "Not Specified"}</span>
|
|
23059
|
-
</div>
|
|
23060
|
-
<div class="detail-row">
|
|
23061
|
-
<span class="detail-label">Token No</span>
|
|
23062
|
-
<span class="detail-value">${(petData === null || petData === void 0 ? void 0 : petData.petToken) || "Not Specified"}</span>
|
|
23063
|
-
</div>
|
|
23064
|
-
<div class="detail-row">
|
|
23065
|
-
<span class="detail-label">Issue Date</span>
|
|
23066
|
-
<span class="detail-value">
|
|
23067
|
-
${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"}
|
|
23068
|
-
</span>
|
|
23069
|
-
</div>
|
|
23070
|
-
|
|
23071
|
-
<div class="detail-row">
|
|
23072
|
-
<span class="detail-label">License Valid Upto</span>
|
|
23073
|
-
<span class="detail-value">
|
|
23074
|
-
${petData !== null && petData !== void 0 && petData.validityDate ? new Date(petData.validityDate * 1000).toLocaleDateString("en-GB") : "N/A"}
|
|
23075
|
-
|
|
23076
|
-
</span>
|
|
23077
|
-
</div>
|
|
23078
|
-
<div class="detail-row">
|
|
23079
|
-
<span class="detail-label">Amount</span>
|
|
23080
|
-
<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>
|
|
23081
|
-
</div>
|
|
23082
|
-
<div class="detail-row">
|
|
23083
|
-
<span class="detail-label">G8/Receipt No</span>
|
|
23084
|
-
<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>
|
|
23085
|
-
</div>
|
|
23086
|
-
</div>
|
|
23087
|
-
</div>
|
|
23088
|
-
|
|
23089
|
-
<div class="pet-image-section">
|
|
23090
|
-
<img
|
|
23091
|
-
src="${petImageUrl}"
|
|
23092
|
-
alt="Pet Photo"
|
|
23093
|
-
class="pet-image"
|
|
23094
|
-
onload="console.log('Pet image loaded successfully:', this.src);"
|
|
23095
|
-
onerror="console.log('Pet image failed to load:', this.src); console.log('Trying fallback image...'); this.src='/adorable-golden-retriever.png';"
|
|
23096
|
-
/>
|
|
23097
|
-
<div class="image-label">Pet Photo</div>
|
|
23098
|
-
<script>
|
|
23099
|
-
console.log('Image URL being used:', '${petImageUrl}');
|
|
23100
|
-
console.log('Pet image data:', ${JSON.stringify(petImage)});
|
|
23101
|
-
</script>
|
|
23102
|
-
</div>
|
|
23103
|
-
</div>
|
|
23104
|
-
|
|
23105
|
-
<span class="detail-label">Owner Information</span>
|
|
23106
|
-
<div class="owner-section">
|
|
23107
|
-
<div class="detail-row">
|
|
23108
|
-
<span class="detail-label">Owner Name</span>
|
|
23109
|
-
<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>
|
|
23110
|
-
</div>
|
|
23111
|
-
<div class="detail-row">
|
|
23112
|
-
<span class="detail-label">Father/Spouse Name</span>
|
|
23113
|
-
<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>
|
|
23114
|
-
</div>
|
|
23115
|
-
<div class="detail-row">
|
|
23116
|
-
<span class="detail-label">Address</span>
|
|
23117
|
-
<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>
|
|
23118
|
-
</div>
|
|
23119
|
-
</div>
|
|
23120
|
-
|
|
23121
|
-
<div class="header">
|
|
23122
|
-
<div class="header-left"> </div>
|
|
23123
|
-
<div class="header-disclaimer">
|
|
23124
|
-
<div class="title">DISCLAIMER</div>
|
|
23125
|
-
<div class="dis-section">${t("PET_DISCLAIMER")}</div>
|
|
23126
|
-
<div class="header-right"></div>
|
|
23127
|
-
</div>
|
|
23128
|
-
</div>
|
|
23129
|
-
|
|
23130
|
-
<div class="footer-section">
|
|
23131
|
-
<div>
|
|
23132
|
-
<div>Date:........................</div>
|
|
23133
|
-
<div>Place:.......................</div>
|
|
23134
|
-
</div>
|
|
23135
|
-
<div class="signature-area">
|
|
23136
|
-
<div class="detail-label">Approved by</div>
|
|
23137
|
-
<span class="detail-value">${approver || "Not Specified"}</span>
|
|
23138
|
-
<div class="signature-line"></div>
|
|
23139
|
-
<div>Licensing Authority</div>
|
|
23140
|
-
<div>${t(ulbType)}</div>
|
|
23141
|
-
|
|
23142
|
-
</div>
|
|
23143
|
-
</div>
|
|
23144
|
-
|
|
23145
|
-
<div class="terms-section">
|
|
23146
|
-
<div class="terms-title">${t("TERMS AND CONDITIONS")}</div>
|
|
23147
|
-
<div class="terms-title">${t("PET_TERMS_HEADER")}</div>
|
|
23148
|
-
<ol class="terms-list">
|
|
23149
|
-
<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>
|
|
23150
|
-
<li>${t("PET_NEW_TERM_2")}</li>
|
|
23151
|
-
<li>${t("PET_NEW_TERM_3")}</li>
|
|
23152
|
-
<li>${t("PET_NEW_TERM_4")}</li>
|
|
23153
|
-
<li>${t("PET_NEW_TERM_5")}</li>
|
|
23154
|
-
<li>${t("PET_NEW_TERM_6")}</li>
|
|
23155
|
-
<li>${t("PET_NEW_TERM_7")}</li>
|
|
23156
|
-
<li>${t("PET_NEW_TERM_8")}</li>
|
|
23157
|
-
<li>${t("PET_NEW_TERM_9")}</li>
|
|
23158
|
-
<li>${t("PET_NEW_TERM_10")}</li>
|
|
23159
|
-
<li>${t("PET_NEW_TERM_11")}</li>
|
|
23160
|
-
<li>${t("PET_NEW_TERM_12")}</li>
|
|
23161
|
-
<li>${t("PET_NEW_TERM_13")}</li>
|
|
23162
|
-
<li>${t("PET_NEW_TERM_14")}</li>
|
|
23163
|
-
<li>${t("PET_NEW_TERM_15")}</li>
|
|
23164
|
-
<li>${t("PET_NEW_TERM_16")}</li>
|
|
23165
|
-
</ol>
|
|
23166
|
-
|
|
23167
|
-
<div style="text-align: center;">
|
|
23168
|
-
<img src="${qrDataURL}" style="width: 100px; height: 100px;" />
|
|
23169
|
-
</div>
|
|
23170
|
-
</div>
|
|
23171
|
-
</div>
|
|
23172
|
-
</body>
|
|
23173
|
-
</html>
|
|
23174
|
-
`;
|
|
23175
|
-
const printWindow = window.open("", "_blank");
|
|
23176
|
-
printWindow.document.write(content);
|
|
23177
|
-
printWindow.document.close();
|
|
23178
|
-
printWindow.onload = () => {
|
|
23179
|
-
setTimeout(() => {
|
|
23180
|
-
printWindow.print();
|
|
23181
|
-
printWindow.onafterprint = () => {
|
|
23182
|
-
printWindow.close();
|
|
23183
|
-
};
|
|
23184
|
-
}, 500);
|
|
23185
|
-
};
|
|
23186
|
-
};
|
|
23187
|
-
createCertificateHTML();
|
|
23188
|
-
setShowToast({
|
|
23189
|
-
key: false,
|
|
23190
|
-
label: "PTR_CERTIFICATE_DOWNLOADED_SUCCESSFULLY"
|
|
23191
|
-
});
|
|
23192
|
-
} catch (error) {
|
|
23193
|
-
setShowToast({
|
|
23194
|
-
key: true,
|
|
23195
|
-
label: `PTR_CERTIFICATE_DOWNLOAD_ERROR: ${error.message}`
|
|
23196
|
-
});
|
|
23197
|
-
}
|
|
23198
|
-
};
|
|
23199
|
-
const downloadAcknowledgement = async () => {
|
|
23200
|
-
try {
|
|
23201
|
-
var _data$PetRegistration2;
|
|
23202
|
-
if (!(data !== null && data !== void 0 && (_data$PetRegistration2 = data.PetRegistrationApplications) !== null && _data$PetRegistration2 !== void 0 && _data$PetRegistration2[0])) {
|
|
23203
|
-
throw new Error("Pet registration data is missing");
|
|
23204
|
-
}
|
|
23205
|
-
const createAcknowledgementHTML = () => {
|
|
23206
|
-
var _petData$petDetails8, _petData$petDetails9, _petData$petDetails0, _petData$owner5, _petData$owner6, _petData$owner7;
|
|
23207
|
-
const petData = data.PetRegistrationApplications[0];
|
|
23208
|
-
const ulb = petData === null || petData === void 0 ? void 0 : petData.tenantId.split(".")[1];
|
|
23209
|
-
const currentDate = new Date().toLocaleDateString("en-IN", {
|
|
23210
|
-
day: "2-digit",
|
|
23211
|
-
month: "long",
|
|
23212
|
-
year: "numeric"
|
|
23213
|
-
});
|
|
23214
|
-
const content = `
|
|
23215
|
-
<html>
|
|
23216
|
-
<head>
|
|
23217
|
-
<title>Pet Registration Acknowledgement</title>
|
|
23218
|
-
<style>
|
|
23219
|
-
@page { margin: 0.5in; }
|
|
23220
|
-
body {
|
|
23221
|
-
font-family: 'Arial', sans-serif;
|
|
23222
|
-
margin: 0;
|
|
23223
|
-
padding: 20px;
|
|
23224
|
-
font-size: 14px;
|
|
23225
|
-
line-height: 1.6;
|
|
23226
|
-
}
|
|
23227
|
-
.acknowledgement-container {
|
|
23228
|
-
max-width: 800px;
|
|
23229
|
-
margin: 0 auto;
|
|
23230
|
-
border: 2px solid #333;
|
|
23231
|
-
padding: 30px;
|
|
23232
|
-
background: white;
|
|
23233
|
-
}
|
|
23234
|
-
.header {
|
|
23235
|
-
text-align: center;
|
|
23236
|
-
border-bottom: 2px solid #333;
|
|
23237
|
-
display: flex;
|
|
23238
|
-
justify-content: space-between;
|
|
23239
|
-
align-items: center;
|
|
23240
|
-
position: relative;
|
|
23241
|
-
}
|
|
23242
|
-
.header-center {
|
|
23243
|
-
text-align: center;
|
|
23244
|
-
flex: 1;
|
|
23245
|
-
padding-right: 80px
|
|
23246
|
-
}
|
|
23247
|
-
.header-right {
|
|
23248
|
-
flex: 0 0 auto;
|
|
23249
|
-
}
|
|
23250
|
-
.title {
|
|
23251
|
-
font-size: 20px;
|
|
23252
|
-
font-weight: bold;
|
|
23253
|
-
margin: 10px 0;
|
|
23254
|
-
color: #333;
|
|
23255
|
-
}
|
|
23256
|
-
.subtitle {
|
|
23257
|
-
font-size: 16px;
|
|
23258
|
-
margin: 5px 0;
|
|
23259
|
-
color: #666;
|
|
23260
|
-
}
|
|
23261
|
-
.pet-sub {
|
|
23262
|
-
font-size: 16px;
|
|
23263
|
-
margin: 5px 0;
|
|
23264
|
-
color: #666;
|
|
23265
|
-
font-weight: bold;
|
|
23266
|
-
}
|
|
23267
|
-
.acknowledgement-text {
|
|
23268
|
-
text-align: justify;
|
|
23269
|
-
font-size: 15px;
|
|
23270
|
-
}
|
|
23271
|
-
.details-table {
|
|
23272
|
-
width: 100%;
|
|
23273
|
-
border-collapse: collapse;
|
|
23274
|
-
}
|
|
23275
|
-
.details-table th,
|
|
23276
|
-
.details-table td {
|
|
23277
|
-
padding: 12px;
|
|
23278
|
-
text-align: left;
|
|
23279
|
-
border: 1px solid #ddd;
|
|
23280
|
-
}
|
|
23281
|
-
.details-table th {
|
|
23282
|
-
background: #f5f5f5;
|
|
23283
|
-
font-weight: bold;
|
|
23284
|
-
width: 40%;
|
|
23285
|
-
}
|
|
23286
|
-
.footer {
|
|
23287
|
-
text-align: center;
|
|
23288
|
-
font-size: 12px;
|
|
23289
|
-
color: #666;
|
|
23290
|
-
}
|
|
23291
|
-
@media print {
|
|
23292
|
-
body { background: white !important; }
|
|
23293
|
-
}
|
|
23294
|
-
</style>
|
|
23295
|
-
</head>
|
|
23296
|
-
<body>
|
|
23297
|
-
<div class="acknowledgement-container">
|
|
23298
|
-
<div class="header">
|
|
23299
|
-
<div>
|
|
23300
|
-
<img src="https://s3.ap-south-1.amazonaws.com/pb-egov-assets/${petData === null || petData === void 0 ? void 0 : petData.tenantId}/logo.png"
|
|
23301
|
-
style="width: 110px; height: 110px; padding-left: 20px; padding-bottom: 20px;" />
|
|
23302
|
-
</div>
|
|
23303
|
-
<div class="header-center">
|
|
23304
|
-
<div class="title">${t(ulbType)} ${t(ulb)}</div>
|
|
23305
|
-
<div class="subtitle">${t("Veterinary Services- Health Branch")}</div>
|
|
23306
|
-
<div class="pet-sub">Pet Registration Acknowledgment</div>
|
|
23307
|
-
<div class="subtitle">(U/S 399 (1)(E) of PMC Act,1976)</div>
|
|
23308
|
-
</div>
|
|
23309
|
-
<div class="header-right">
|
|
23310
|
-
</div>
|
|
23311
|
-
</div>
|
|
23312
|
-
|
|
23313
|
-
<div class="acknowledgement-text">
|
|
23314
|
-
${t("PTR_ACKN_TERM_1")}
|
|
23315
|
-
</div>
|
|
23316
|
-
|
|
23317
|
-
<table class="details-table">
|
|
23318
|
-
<tr>
|
|
23319
|
-
<th>Application Number</th>
|
|
23320
|
-
<td>${(petData === null || petData === void 0 ? void 0 : petData.applicationNumber) || "Not Available"}</td>
|
|
23321
|
-
</tr>
|
|
23322
|
-
<tr>
|
|
23323
|
-
<th>Application Date</th>
|
|
23324
|
-
<td>${currentDate}</td>
|
|
23325
|
-
</tr>
|
|
23326
|
-
<tr>
|
|
23327
|
-
<th>Pet Name</th>
|
|
23328
|
-
<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>
|
|
23329
|
-
</tr>
|
|
23330
|
-
<tr>
|
|
23331
|
-
<th>Pet Type</th>
|
|
23332
|
-
<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>
|
|
23333
|
-
</tr>
|
|
23334
|
-
<tr>
|
|
23335
|
-
<th>Breed</th>
|
|
23336
|
-
<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>
|
|
23337
|
-
</tr>
|
|
23338
|
-
<tr>
|
|
23339
|
-
<th>Owner Name</th>
|
|
23340
|
-
<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>
|
|
23341
|
-
</tr>
|
|
23342
|
-
<tr>
|
|
23343
|
-
<th>Contact Number</th>
|
|
23344
|
-
<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>
|
|
23345
|
-
</tr>
|
|
23346
|
-
<tr>
|
|
23347
|
-
<th>Email</th>
|
|
23348
|
-
<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>
|
|
23349
|
-
</tr>
|
|
23350
|
-
<tr>
|
|
23351
|
-
<th>Application Status</th>
|
|
23352
|
-
<td style="color: #28a745; font-weight: bold;">${t(petData === null || petData === void 0 ? void 0 : petData.status) || "SUBMITTED"}</td>
|
|
23353
|
-
</tr>
|
|
23354
|
-
</table>
|
|
23355
|
-
|
|
23356
|
-
<div class="acknowledgement-text">
|
|
23357
|
-
${t("PTR_ACKN_TERM_2")}
|
|
23358
|
-
</div>
|
|
23359
|
-
|
|
23360
|
-
|
|
23361
|
-
<div class="footer">
|
|
23362
|
-
<p>Generated on: ${currentDate}</p>
|
|
23363
|
-
<p>${t(ulbType)}</p>
|
|
23364
|
-
<p>This is a computer-generated document and does not require a signature.</p>
|
|
23365
|
-
<p>https://mseva.lgpunjab.gov.in/digit-ui/citizen/ptr-home</p>
|
|
23366
|
-
</div>
|
|
23367
|
-
</div>
|
|
23368
|
-
</body>
|
|
23369
|
-
</html>
|
|
23370
|
-
`;
|
|
23371
|
-
const printWindow = window.open("", "_blank");
|
|
23372
|
-
printWindow.document.write(content);
|
|
23373
|
-
printWindow.document.close();
|
|
23374
|
-
printWindow.onload = () => {
|
|
23375
|
-
setTimeout(() => {
|
|
23376
|
-
printWindow.print();
|
|
23377
|
-
printWindow.onafterprint = () => {
|
|
23378
|
-
printWindow.close();
|
|
23379
|
-
};
|
|
23380
|
-
}, 500);
|
|
23381
|
-
};
|
|
23382
|
-
};
|
|
23383
|
-
createAcknowledgementHTML();
|
|
23384
|
-
setShowToast({
|
|
23385
|
-
key: false,
|
|
23386
|
-
label: "PTR_ACKNOWLEDGEMENT_DOWNLOADED_SUCCESSFULLY"
|
|
23387
|
-
});
|
|
23388
|
-
} catch (error) {
|
|
23389
|
-
setShowToast({
|
|
23390
|
-
key: true,
|
|
23391
|
-
label: `PTR_ACKNOWLEDGEMENT_DOWNLOAD_ERROR: ${error.message}`
|
|
23392
|
-
});
|
|
23393
|
-
}
|
|
23394
|
-
};
|
|
23395
22248
|
let documentDate = t("CS_NA");
|
|
23396
22249
|
if (pet_details !== null && pet_details !== void 0 && (_pet_details$addition = pet_details.additionalDetails) !== null && _pet_details$addition !== void 0 && _pet_details$addition.documentDate) {
|
|
23397
22250
|
var _pet_details$addition2;
|
|
@@ -23402,17 +22255,22 @@ const ApplicationDetails = () => {
|
|
|
23402
22255
|
async function getRecieptSearch({
|
|
23403
22256
|
tenantId,
|
|
23404
22257
|
payments,
|
|
22258
|
+
pdfkey,
|
|
23405
22259
|
...params
|
|
23406
22260
|
}) {
|
|
23407
|
-
var _response;
|
|
22261
|
+
var _application$petDetai, _response;
|
|
22262
|
+
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);
|
|
23408
22263
|
let response = {
|
|
23409
22264
|
filestoreIds: [payments === null || payments === void 0 ? void 0 : payments.fileStoreId]
|
|
23410
22265
|
};
|
|
23411
22266
|
response = await Digit.PaymentService.generatePdf(tenantId, {
|
|
23412
22267
|
Payments: [{
|
|
23413
|
-
...payments
|
|
22268
|
+
...payments,
|
|
22269
|
+
application,
|
|
22270
|
+
approver,
|
|
22271
|
+
petAge
|
|
23414
22272
|
}]
|
|
23415
|
-
},
|
|
22273
|
+
}, pdfkey);
|
|
23416
22274
|
const fileStore = await Digit.PaymentService.printReciept(tenantId, {
|
|
23417
22275
|
fileStoreIds: response.filestoreIds[0]
|
|
23418
22276
|
});
|
|
@@ -23423,27 +22281,40 @@ const ApplicationDetails = () => {
|
|
|
23423
22281
|
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");
|
|
23424
22282
|
dowloadOptions.push({
|
|
23425
22283
|
label: t("PTR_PET_DOWNLOAD_ACK_FORM"),
|
|
23426
|
-
onClick: () =>
|
|
22284
|
+
onClick: () => {
|
|
22285
|
+
var _reciept_data$Payment;
|
|
22286
|
+
return getRecieptSearch({
|
|
22287
|
+
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,
|
|
22288
|
+
payments: reciept_data === null || reciept_data === void 0 ? void 0 : reciept_data.Payments[0],
|
|
22289
|
+
pdfkey: "petacknowledgement"
|
|
22290
|
+
});
|
|
22291
|
+
}
|
|
23427
22292
|
});
|
|
23428
|
-
if ((reciept_data === null || reciept_data === void 0 ? void 0 : (_reciept_data$
|
|
22293
|
+
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") {
|
|
23429
22294
|
dowloadOptions.push({
|
|
23430
22295
|
label: t("PTR_CERTIFICATE"),
|
|
23431
22296
|
onClick: () => {
|
|
23432
|
-
|
|
22297
|
+
var _reciept_data$Payment4;
|
|
22298
|
+
return getRecieptSearch({
|
|
22299
|
+
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,
|
|
22300
|
+
payments: reciept_data === null || reciept_data === void 0 ? void 0 : reciept_data.Payments[0],
|
|
22301
|
+
pdfkey: "petcertificatenew"
|
|
22302
|
+
});
|
|
23433
22303
|
}
|
|
23434
22304
|
});
|
|
23435
22305
|
} else {
|
|
23436
|
-
var _reciept_data$
|
|
23437
|
-
console.log("Certificate not available. Payment status:", reciept_data === null || reciept_data === void 0 ? void 0 : (_reciept_data$
|
|
22306
|
+
var _reciept_data$Payment5;
|
|
22307
|
+
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);
|
|
23438
22308
|
}
|
|
23439
22309
|
if (reciept_data && (reciept_data === null || reciept_data === void 0 ? void 0 : reciept_data.Payments.length) > 0 && !recieptDataLoading) {
|
|
23440
22310
|
dowloadOptions.push({
|
|
23441
22311
|
label: t("PTR_FEE_RECIEPT"),
|
|
23442
22312
|
onClick: () => {
|
|
23443
|
-
var _reciept_data$
|
|
22313
|
+
var _reciept_data$Payment6;
|
|
23444
22314
|
return getRecieptSearch({
|
|
23445
|
-
tenantId: reciept_data === null || reciept_data === void 0 ? void 0 : (_reciept_data$
|
|
23446
|
-
payments: reciept_data === null || reciept_data === void 0 ? void 0 : reciept_data.Payments[0]
|
|
22315
|
+
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,
|
|
22316
|
+
payments: reciept_data === null || reciept_data === void 0 ? void 0 : reciept_data.Payments[0],
|
|
22317
|
+
pdfkey: "pet-receipt-employee"
|
|
23447
22318
|
});
|
|
23448
22319
|
}
|
|
23449
22320
|
});
|