From f4e3878283e58c0d3dc849b7077900f497b26c4d Mon Sep 17 00:00:00 2001 From: atulniua <167168460+atulniua@users.noreply.github.com> Date: Mon, 23 Dec 2024 14:52:17 +0530 Subject: [PATCH] Update chbservicepermissionletter.json updated format key for chb --- .../chbservicepermissionletter.json | 643 ++++++++++-------- 1 file changed, 364 insertions(+), 279 deletions(-) diff --git a/configs/pdf-service/format-config/chbservicepermissionletter.json b/configs/pdf-service/format-config/chbservicepermissionletter.json index bb1504c8..3eaa483c 100644 --- a/configs/pdf-service/format-config/chbservicepermissionletter.json +++ b/configs/pdf-service/format-config/chbservicepermissionletter.json @@ -1,301 +1,386 @@ { - "key": "chbservicepermissionletter", - "DataConfigs": { - "serviceName": "rainmaker-common", - "version": "1.0.0", - "baseKeyPath": "$.hallsBookingApplication[*]", - "entityIdPath": "$.id", - "isCommonTableBorderRequired": true, - "mappings": [ - { - "topic": "common-pdf-generation-3", - "mappings": [ - { - "direct": [ - { - "variable": "APPLICANT_NAME", - "value": { - "path": "$.applicantDetail.applicantName" - } - }, - { - "variable": "BOOKING_DATE", - "value": { - "path": "$.cartDetails[0].bookingDate" - } - }, - { - "variable": "LOCATION_BOOKED", - "value": { - "path": "$.cartDetails[0].location" - } - }, + "key": "chbservicepermissionletter", + "config": { + "defaultStyle": { + "font": "Cambay" + }, + "content": [ + { + "style": "noc-head", + "table": { + "widths": [60, "*", 120], + "body": [ + [ { - "variable": "FACE_AREA", - "value": { - "path": "$.cartDetails[0].faceArea" - } - }, - { - "variable": "CITY", - "value": { - "path": "$.address.city" - } + "image": "{{logoImage}}", + "width": 50, + "height": 61.25 }, { - "variable": "LOCALITY", - "value": { - "path": "$.address.locality" - } - }, - { - "variable": "AdType", - "value": { - "path": "$.cartDetails[*].addType", - "type": "array-join", - "separator": ", " + "stack": [ + { + "text": "{{logo-header}} {{Municipal_Corporation}}", + "style": "receipt-logo-header" + }, + { + "text": "{{payment_receipt}}", + "style": "receipt-logo-sub-header" } + ], + "alignment": "left", + "margin": [0, 10, 0, 0] }, - { - "variable": "BOOKING_FROM_DATE", - "value": { - "path": "$.cartDetails[*].bookingFromTime" - } - }, - { - "variable": "BOOKING_TO_DATE", - "value": { - "path": "$.cartDetails[1].bookingDate" - } - }, - { - "variable": "APPLICANT_NAME", - "value": { - "path": "$.applicantDetail.applicantName" - } - - }, - { - "variable": "BOOKING_NO", - "value": { - "path": "$.bookingNo" - } - }, - { - "variable": "AdType", - "value": { - "path": "$.cartDetails[*].addType" - } - }, - { - "variable": "tenantid", - "value": { - "path": "$.tenantId" - } - }, - { - "variable": "commissioner/eo", - "value": { - "path": "PDF_STATIC_LABEL_CONSOLIDATED_RECEIPT_COMMISSIONER_EO" + { + "stack": [ + { + "text": "{{address}}" + }, + { + "text": "{{phoneNumber}}" }, - "type": "label", - "localisation": { - "required": true, - "prefix": null, - "module": "rainmaker-common" + { + "text": "{{website}}" + }, + { + "text": "{{email}}" } - }, - { - "variable": "no_signature", - "value": { - "path": "PDF_STATIC_LABEL_CONSOLIDATED_RECEIPT_NO_SIGNATURE" + ], + "alignment": "right", + "color": "#484848", + "margin": [-100, 0, -25, 0] + } + ] + ] + }, + "layout": "noBorders" + }, + { + "stack": [ + { + "text": "Booking No- {{BOOKING_NO}}", + "style": "bookingNo", + "bold": true, + "fontSize": 12, + "alignment": "right", + "margin": [0, 10, 0, 0] + }, + { + "text": "To,", + "style": "content", + "margin": [0, 5, 0, 2] + }, + { + "text": "{{APPLICANT_NAME}},", + "style": "content", + "margin": [30, 0, 0, 2] + }, + { + "text": "{{LOCALITY}},", + "style": "content", + "margin": [30, 0, 0, 5] + }, + { + "text": "{{CITY}}.", + "style": "content", + "margin": [30, 0, 0, 5] + }, + { + "text": "Subject: Permission to use the {{HALL_NAME}} by holding for {{PURPOSE}} purpose.", + "style": "subject", + "fontSize": 12, + "margin": [0, 0, 0, 5] + }, + { + "text": "Dear {{APPLICANT_NAME}},", + "style": "content", + "margin": [0, 0, 0, 10] + }, + { + "text": "Permission is hereby accorded to use the {{HALL_NAME}} for {{PURPOSE}} purpose mentioned in your letter.", + "style": "content", + "margin": [0, 0, 0, 10] + }, + { + "text": [ + "1. Area / Accommodation Booked: ", + { "text": "{{HALL_NAME}}", "bold": true } + ], + "style": "content", + "margin": [0, 5, 0, 5] + }, + { + "text": [ + "2. Date of Booking: ", + { "text": "{{BOOKING_DATE}}", "bold": true } + ], + "style": "content", + "margin": [0, 5, 0, 5] + }, + { + "text": [ + "3. Period of Booking from: ", + { "text": "{{BOOKING_FROM_DATE}}", "bold": true }, + " to ", + { "text": "{{BOOKING_TO_DATE}}", "bold": true } + ], + "style": "content", + "margin": [0, 5, 0, 5] + }, + { + "text": "Detailed Amount:", + "style": "subheader", + "fontSize": 12, + "margin": [0, 10, 0, 5] + }, + { + "table": { + "widths": ["*", "*", "*","*"], + "body": [ + [ + { + "text": "Booking Fees", + "style": "tableCell", + "bold": true + }, + { + "text": "CGST", + "style": "tableCell", + "bold": true }, - "type": "label", - "localisation": { - "required": true, - "prefix": null, - "module": "rainmaker-common" + { + "text": "SGST", + "style": "tableCell", + "bold": true + }, + { + "text": "Total Amount", + "style": "tableCell", + "bold": true, + "fontSize": 12 } - }, - { - "variable": "disclamer", - "value": { - "path": "PDF_STATIC_LABEL_CONSOLIDATED_RECEIPT_DISCLAIMER" + ], + [ + { + "text": "{{BOOKING_FEES}}", + "style": "tableCell" + }, + { + "text": "{{CGST}}", + "style": "tableCell" }, - "type": "label", - "localisation": { - "required": true, - "prefix": null, - "module": "rainmaker-common" + { + "text": "{{SGST}}", + "style": "tableCell" + }, + { + "text": "{{totalAmount}}/-", + "style": "tableCell", + "bold": true, + "fontSize": 11 } - }, - { - "variable": "to", - "value": { - "path": "PDF_STATIC_LABEL_CONSOLIDATED_RECEIPT_TO" + ] + ] + } + }, + { + "text": "Bank Details for Refund", + "style": "subheader", + "fontSize": 12, + "margin": [0, 10, 0, 5] + }, + { + "table": { + "widths": ["*", "*", "*", "*"], + "body": [ + [ + { + "text": "Applicant Name", + "style": "tableCell", + "bold": true + }, + { + "text": "A/C No.", + "style": "tableCell", + "bold": true }, - "type": "label", - "localisation": { - "required": true, - "prefix": null, - "module": "rainmaker-common" + { + "text": "Bank Name", + "style": "tableCell", + "bold": true + }, + { + "text": "IFSC Code", + "style": "tableCell", + "bold": true } - }, - { - "variable": "Municipal_Corporation", - "value": { - "path": "PDF_STATIC_LABEL_MDMS_MUNICIPAL_CORPORATION" + ], + [ + { + "text": "{{APPLICANT_NAME}}", + "style": "tableCell" + }, + { + "text": "{{ACCOUNT_NUMBER}}", + "style": "tableCell" + }, + { + "text": "{{BANK_NAME}}", + "style": "tableCell" }, - "type": "label", - "localisation": { - "required": true, - "prefix": null, - "module": "rainmaker-common" + { + "text": "{{IFSC_CODE}}", + "style": "tableCell" } - } - ] - }, - { - "externalAPI": [ - { - "path": "http://egov-mdms-service:8080/egov-mdms-service/v1/_get", - "queryParam": "moduleName=tenant&masterName=tenants&tenantId=pg&filter=%5B?(@.code=='{$.tenantId}')%5D", - "apiRequest": null, - "responseMapping": [ - { - "variable": "address", - "value": "$.MdmsRes.tenant.tenants[0].address" - }, - { - "variable": "phoneNumber", - "value": "$.MdmsRes.tenant.tenants[0].contactNumber" - }, - { - "variable": "website", - "value": "$.MdmsRes.tenant.tenants[0].domainUrl" - }, - { - "variable": "email", - "value": "$.MdmsRes.tenant.tenants[0].emailId" - }, - { - "variable": "logoImage", - "value": "$.MdmsRes.tenant.tenants[0].logoId", - "type": "image" - }, - { - "variable": "logo-header", - "value": "$.MdmsRes.tenant.tenants[0].code", - "localisation": { - "required": true, - "prefix": "TENANT_TENANTS", - "module": "rainmaker-common" - } - } - ] - }, - { - "path": "http://collection-services:8080/collection-services/payments/chb-services/_search", - "queryParam": "tenantId=pg.mohali,consumerCode=$.bookingNo", - "apiRequest": null, - "responseMapping": [ - { - "variable": "totalAmount", - "value": "Payments[0].totalDue" - }, - { - "variable": "BOOKING_FEES", - "value": "Payments[0].paymentDetails[0].bill.billDetails[0].billAccountDetails[1].amount" - }, - { - "variable": "CGST", - "value": "Payments[0].paymentDetails[0].bill.billDetails[0].billAccountDetails[0].amount" - }, - { - "variable": "SGST", - "value": "Payments[0].paymentDetails[0].bill.billDetails[0].billAccountDetails[2].amount" - } - ] - }, - - { - "path": "http://egov-mdms-service:8080/egov-mdms-service/v1/_get", - "queryParam": "moduleName=Advertisement&masterName=AdvServices&tenantId=pg", - "apiRequest": null, - "responseMapping": [ - { - "variable": "terms", - "value": "$.MdmsRes.Advertisement.AdvServices[0].termsAndCondition" - } - ] - }, - { - "path": "http://egov-mdms-service:8080/egov-mdms-service/v1/_get", - "queryParam": "moduleName=CHB&masterName=CommunityHalls&tenantId=pg.mohali", - "apiRequest": null, - "responseMapping": [ - { - "variable": "terms", - "value": "$.MdmsRes.CHB.CommunityHalls[0].termsAndCondition" - } ] - }, - { - "path": "http://egov-workflow-v2:8080/egov-workflow-v2/egov-wf/process/_search", - "queryParam": "businessIds=$.bookingNo,history=true,tenantId=$.tenantId", - "apiRequest": null, - "responseMapping": [ - { - "variable": "approved_by_value", - "value": "$.ProcessInstances[?(@.action == 'APPROVE')].assigner.name" - }, - { - "variable": "Approval_Date", - "value": "$.ProcessInstances[?(@.action == 'APPROVE')].auditDetails.lastModifiedTime", - "type": "date" - } - ] - }, - { - "path": "http://egov-mdms-service:8080/egov-mdms-service/v1/_get", - "queryParam": "moduleName=tenant&masterName=footer&tenantId=pg&filter=%5B?(@.code=='{$.tenantId}' %26%26 @.service=='{$.paymentDetails[0].businessService}')%5D", - "apiRequest": null, - "responseMapping": [ - { - "variable": "variable11", - "value": "$.MdmsRes.tenant.footer[0].receiptFooterContent.*", - "type": "array", - "format": { - "type": "string", - "scema": [ - { - "variable": "disclaimerContent", - "value": "disclaimer", - "type": "string", - "localisation": { - "required": true, - "prefix": null, - "module": "rainmaker-common" - } - } - ] - } - } - ] - } - ] - }, - { - "qrcodeConfig": [ - { - "variable": "qrcodeImage", - "value": "digit-ui/citizen/payment/verification?tenantId={{tenantid}}&receiptNumber={{receiptNo}}" - } ] } + }, + { + "text": "TERMS AND CONDITIONS", + "style": "termsTitle", + "fontSize": 12, + "margin": [0, 10, 0, 5] + }, + { + "text": "{{terms}}", + "style": "content", + "margin": [0, 5, 0, 5] + } + ], + "alignment": "left", + "margin": [0, 0, 0, 0] + }, + { + "style": "next-noc-table", + "table": { + "widths": ["60%", "30%", "10%"], + "body": [ + [ + { + "image": "{{qrcodeImage}}", + "style": "receipt-table-value-total-Qr", + "border": [false, true, true, true], + "width": 72, + "height": 72 + } + ] ] - } - ] + }, + "layout": {} + }, + { + "style": "receipt-approver", + "columns": [ + { + "text": [ + { + "text": "{{commissioner/eo}}", + "bold": true + } + ], + "alignment": "right", + "margin": [0, 0, -10, 1] + } + ] + }, + { + "style": "no-signature", + "text": "{{no_signature}}" + }, + { + "style": "pt-disclaimer", + "stack": [ + { + "text": "{{disclamer}}", + "bold": true, + "style": "pt-disclaimer-value" + }, + { + "style": "pt-disclaimer-value", + "table": { + "widths": ["120%", "*", "*", "*"], + "body": [ + "{{#variable11}}[{\"text\":\"{{disclaimerContent}}\",\"border\":[false,false,false,false],\"style\":\"pt-disclaimer-value\"}]{{/variable11}}" + ] + }, + "layout": {} + } + ] + } + ], + "styles": { + "noc-head": { + "margin": [-30, -30, 0, 1] + }, + "receipt-logo-header": { + "color": "#000000", + "fontSize": 14, + "bold": true, + "letterSpacing": 0.74, + "margin": [0, 0, 0, 5] + }, + "receipt-logo-sub-header": { + "color": "#000000", + "fontSize": 12, + "letterSpacing": 0.6 + }, + "noc-table": { + "fontSize": 12, + "color": "#000000", + "margin": [-25, 10, -22, -8] + }, + "next-noc-table": { + "fontSize": 12, + "color": "#000000", + "margin": [-25, 28, -22, -8] + }, + "receipt-table-value": { + "color": "#000000", + "bold": true, + "fontSize": 12, + "fontWeight": 500, + "margin": [8, 2, 0, 2] + }, + "receipt-table-value-total-Qr": { + "alignment": "right", + "margin": [0, 3, 10, 0] + }, + "receipt-table-value-down": { + "color": "#000000", + "bold": false, + "fontSize": 12, + "fontWeight": 400, + "alignment": "left", + "margin": [3, 5, 0, 5] + }, + "receipt-table": { + "color": "#000000", + "bold": false, + "fontSize": 12, + "fontWeight": 400, + "margin": [-10, 2, 0, 2] + }, + "receipt-approver": { + "fontSize": 12, + "bold": true, + "margin": [-27, 50, -10, 0], + "color": "#484848" + }, + "no-signature": { + "fontSize": 12, + "margin": [-27, 10, -10, 0], + "color": "#484848" + }, + "pt-disclaimer": { + "fontSize": 12, + "margin": [-27, 10, -10, 0], + "color": "#484848" + }, + "pt-disclaimer-value": { + "fontSize": 12, + "margin": [2, 3, 0, 0], + "color": "#484848" + } } } - +}