diff --git a/pdf-service/data-config/case-summary.json b/pdf-service/data-config/case-summary.json new file mode 100644 index 00000000..511d83bd --- /dev/null +++ b/pdf-service/data-config/case-summary.json @@ -0,0 +1,68 @@ +{ + "key": "case-summary", + "DataConfigs": { + "serviceName": "pdf-service", + "version": "1.0.0", + "baseKeyPath": "$.Data.*", + "entityIdPath": "$.id", + "isCommonTableBorderRequired": true, + "mappings": [ + { + "topic": "common-pdf-generation-3", + "mappings": [ + { + "direct": [ + { + "variable": "courtName", + "value": { + "path": "$.courtName" + } + }, + { + "variable": "caseNumber", + "value": { + "path": "$.caseNumber" + } + }, + { + "variable": "caseName", + "value": { + "path": "$.caseName" + } + }, + { + "variable": "date", + "value": { + "path": "$.date" + } + }, + { + "variable": "complainantList", + "value": { + "path": "$.complainantList" + }, + "type": "function", + "format": " var i = 0; for (i=0;i< type.length;i++) {type[i]['index'] = i + 1;} return type;" + }, + { + "variable": "accusedList", + "value": { + "path": "$.accusedList" + }, + "type": "function", + "format": " var i = 0; for (i=0;i< type.length;i++) {type[i]['index'] = i + 1;} return type;" + }, + { + "variable": "hearings", + "value": { + "path": "$.hearings" + }, + "type": "index" + } + ] + } + ] + } + ] + } +} diff --git a/pdf-service/data-config/summons-witness-epost.json b/pdf-service/data-config/summons-witness-epost.json index 5e467a2f..c8c3b266 100644 --- a/pdf-service/data-config/summons-witness-epost.json +++ b/pdf-service/data-config/summons-witness-epost.json @@ -137,6 +137,22 @@ "path": "$.address.pincode", "defaultValue": "NA" } + }, + { + "variable": "complainantList", + "value": { + "path": "$.complainantList" + }, + "type": "function", + "format": " var i = 0; for (i=0;i< type.length;i++) {type[i]['index'] = i + 1;} return type;" + }, + { + "variable": "accusedList", + "value": { + "path": "$.accusedList" + }, + "type": "function", + "format": " var i = 0; for (i=0;i< type.length;i++) {type[i]['index'] = i + 1;} return type;" } ] } diff --git a/pdf-service/data-config/summons-witness.json b/pdf-service/data-config/summons-witness.json index d5e5df2a..8a2bde2f 100644 --- a/pdf-service/data-config/summons-witness.json +++ b/pdf-service/data-config/summons-witness.json @@ -137,6 +137,22 @@ "path": "$.address.pincode", "defaultValue": "NA" } + }, + { + "variable": "complainantList", + "value": { + "path": "$.complainantList" + }, + "type": "function", + "format": " var i = 0; for (i=0;i< type.length;i++) {type[i]['index'] = i + 1;} return type;" + }, + { + "variable": "accusedList", + "value": { + "path": "$.accusedList" + }, + "type": "function", + "format": " var i = 0; for (i=0;i< type.length;i++) {type[i]['index'] = i + 1;} return type;" } ] } diff --git a/pdf-service/data-config/witness-warrant-pdf.json b/pdf-service/data-config/witness-warrant-pdf.json index 8e327c1b..c3e83274 100644 --- a/pdf-service/data-config/witness-warrant-pdf.json +++ b/pdf-service/data-config/witness-warrant-pdf.json @@ -20,19 +20,35 @@ } }, { - "variable": "respondentName", + "variable": "respondentAddress", "value": { - "path": "$.respondentName", + "path": "$.respondentAddress", "defaultValue": "NA" } }, { - "variable": "respondentAddress", + "variable": "witnessName", "value": { - "path": "$.respondentAddress", + "path": "$.witnessName", "defaultValue": "NA" } }, + { + "variable": "complainantList", + "value": { + "path": "$.complainantList" + }, + "type": "function", + "format": " var i = 0; for (i=0;i< type.length;i++) {type[i]['index'] = i + 1;} return type;" + }, + { + "variable": "accusedList", + "value": { + "path": "$.accusedList" + }, + "type": "function", + "format": " var i = 0; for (i=0;i< type.length;i++) {type[i]['index'] = i + 1;} return type;" + }, { "variable": "caseName", "value": { diff --git a/pdf-service/format-config/case-summary.json b/pdf-service/format-config/case-summary.json new file mode 100644 index 00000000..94faf600 --- /dev/null +++ b/pdf-service/format-config/case-summary.json @@ -0,0 +1,226 @@ +{ + "key": "case-summary", + "config": { + "pageSize": "A4", + "pageMargins": [40, 40, 40, 40], + "content": [ + { + "table": { + "widths": ["*"], + "body": [ + [ + { + "stack": [ + { + "text": "Before {{courtName}}", + "style": "header" + }, + { + "text": "Case No: {{caseNumber}}", + "style": "header", + "margin": [0, 5, 0, 0] + }, + { + "text": "In the matter of: {{caseName}}", + "style": "header", + "margin": [0, 5, 0, 0] + }, + { + "text": "Date: {{date}}", + "style": "header", + "margin": [0, 5, 0, 15] + }, + { + "style": "table", + "table": { + "widths": ["30%", "70%"], + "body": [ + "{{#complainantList}}", + [ + { + "text": "Complainant {{index}}", + "style": "tableText", + "border": [true, true, true, true] + }, + { + "text": "{{name}}", + "style": "tableText", + "border": [true, true, true, true] + } + ], + [ + { + "text": "Advocate(s)", + "style": "tableText", + "border": [true, true, true, true] + }, + { + "text": "{{listOfAdvocatesRepresenting}}", + "style": "tableText", + "border": [true, true, true, true] + } + ], + "{{/complainantList}}", + [ + { + "text": "", + "style": "tableText", + "border": [true, false, false, false] + }, + { + "text": "", + "style": "tableText", + "border": [false, false, true, false] + } + ], + "{{#accusedList}}", + [ + { + "text": "Accused {{index}}", + "style": "tableText", + "border": [true, true, true, true] + }, + { + "text": "{{name}}", + "style": "tableText", + "border": [true, true, true, true] + } + ], + [ + { + "text": "Advocate(s)", + "style": "tableText", + "border": [true, true, true, true] + }, + { + "text": "{{listOfAdvocatesRepresenting}}", + "style": "tableText", + "border": [true, true, true, true] + } + ], + "{{/accusedList}}", + [ + { + "text": "", + "style": "tableText", + "border": [true, false, false, false] + }, + { + "text": "", + "style": "tableText", + "border": [false, false, true, false] + } + ], + [ + { + "text": "Offence", + "style": "tableText", + "border": [true, true, true, true] + }, + { + "text": "S.138 of the Negotiable Instruments Act, 1881", + "style": "tableText", + "border": [true, true, true, true] + } + ] + ] + } + }, + { + "text": "", + "margin": [0, 0, 0, 15] + }, + { + "style": "hearingTable", + "table": { + "headerRows": 1, + "widths": ["35%", "65%"], + "body": [ + [ + { + "text": "Date and Purpose of Hearing", + "style": "hearingTableHeader", + "border": [true, true, true, true] + }, + { + "text": "BoTD", + "style": "hearingTableHeader", + "border": [true, true, true, true] + } + ], + "{{#hearings}}", + [ + { + "stack": [ + { + "text": "{{date}}", + "style": "hearingDate" + }, + { + "text": "{{purpose}}", + "style": "hearingPurpose" + } + ], + "border": [true, true, true, true] + }, + { + "text": "{{businessOfTheDay}}", + "style": "hearingBotd", + "border": [true, true, true, true] + } + ], + "{{/hearings}}" + ] + } + } + ], + "alignment": "left", + "margin": [0, 20, 0, 20] + } + ] + ] + }, + "layout": "noBorders" + } + ], + "styles": { + "header": { + "fontSize": 14, + "bold": true, + "alignment": "center", + "margin": [0, 0, 0, 0] + }, + "table": { + "fontSize": 13 + }, + "tableText": { + "fontSize": 13, + "margin": [2, 5, 2, 5] + }, + "hearingTable": { + "fontSize": 12 + }, + "hearingTableHeader": { + "fontSize": 12, + "bold": true, + "fillColor": "#EAEAEA", + "margin": [4, 6, 4, 6] + }, + "hearingDate": { + "fontSize": 12, + "bold": true, + "margin": [4, 6, 4, 2] + }, + "hearingPurpose": { + "fontSize": 11, + "color": "#3D3C3C", + "margin": [4, 0, 4, 6] + }, + "hearingBotd": { + "fontSize": 11, + "alignment": "justify", + "margin": [4, 6, 4, 6] + } + } + } +} diff --git a/pdf-service/format-config/summons-witness-epost.json b/pdf-service/format-config/summons-witness-epost.json index 088a5237..f05d317a 100644 --- a/pdf-service/format-config/summons-witness-epost.json +++ b/pdf-service/format-config/summons-witness-epost.json @@ -53,6 +53,108 @@ }, "layout": "noBorders" }, + { + "text": "Next Hearing Date: {{hearingDate}}", + "style": "next-hearing-date", + "layout": "noBorders" + }, + { + "style": "party-table", + "table": { + "widths": ["30%", "70%"], + "body": [ + "{{#complainantList}}", + [ + { + "text": "Complainant {{index}}", + "style": "party-cell", + "border": [true, true, true, true] + }, + { + "text": "{{name}}", + "style": "party-cell", + "border": [true, true, true, true] + } + ], + [ + { + "text": "Advocate(s)", + "style": "party-cell", + "border": [true, true, true, true] + }, + { + "text": "{{listOfAdvocatesRepresenting}}", + "style": "party-cell", + "border": [true, true, true, true] + } + ], + "{{/complainantList}}", + [ + { + "text": "", + "style": "party-cell", + "border": [true, false, false, false] + }, + { + "text": "", + "style": "party-cell", + "border": [false, false, true, false] + } + ], + "{{#accusedList}}", + [ + { + "text": "Accused {{index}}", + "style": "party-cell", + "border": [true, true, true, true] + }, + { + "text": "{{name}}", + "style": "party-cell", + "border": [true, true, true, true] + } + ], + [ + { + "text": "Advocate(s)", + "style": "party-cell", + "border": [true, true, true, true] + }, + { + "text": "{{listOfAdvocatesRepresenting}}", + "style": "party-cell", + "border": [true, true, true, true] + } + ], + "{{/accusedList}}", + [ + { + "text": "", + "style": "party-cell", + "border": [true, false, false, false] + }, + { + "text": "", + "style": "party-cell", + "border": [false, false, true, false] + } + ], + [ + { + "text": "Offence", + "style": "party-cell", + "border": [true, true, true, true] + }, + { + "text": "S.138 of the Negotiable Instruments Act, 1881", + "style": "party-cell", + "border": [true, true, true, true] + } + ] + ] + }, + "margin": [0, 10, 0, 10] + }, { "style": "form-body", "table": { @@ -66,7 +168,7 @@ ], [ { - "text": "WHEREAS complaint has been made before me that {{respondentName}} of {{respondentAddress}} has (or is suspected to have) committed the offence U/s. 138 of Negotiable Instruments Act, and it appears to me that you are likely to give material evidence or to produce any document or other thing for the prosecution;", + "text": "In the above mentioned case, involving the above listed parties, it appears to me that you are likely to give material evidence or to produce any document or other thing;", "style": "form-sub-body" } ], @@ -137,6 +239,22 @@ } ], "styles": { + "next-hearing-date": { + "fontSize": 12, + "bold": true, + "color": "#000000", + "alignment": "right", + "margin": [0, 0, 0, 10] + }, + "party-table": { + "fontSize": 12, + "color": "#484848" + }, + "party-cell": { + "fontSize": 12, + "color": "#484848", + "margin": [2, 5, 2, 5] + }, "form-header": { "color": "#484848", "fontFamily": "Roboto", diff --git a/pdf-service/format-config/summons-witness.json b/pdf-service/format-config/summons-witness.json index 3f2ccb6d..4588e4c2 100644 --- a/pdf-service/format-config/summons-witness.json +++ b/pdf-service/format-config/summons-witness.json @@ -58,6 +58,103 @@ "style": "next-hearing-date", "layout": "noBorders" }, + { + "style": "party-table", + "table": { + "widths": ["30%", "70%"], + "body": [ + "{{#complainantList}}", + [ + { + "text": "Complainant {{index}}", + "style": "party-cell", + "border": [true, true, true, true] + }, + { + "text": "{{name}}", + "style": "party-cell", + "border": [true, true, true, true] + } + ], + [ + { + "text": "Advocate(s)", + "style": "party-cell", + "border": [true, true, true, true] + }, + { + "text": "{{listOfAdvocatesRepresenting}}", + "style": "party-cell", + "border": [true, true, true, true] + } + ], + "{{/complainantList}}", + [ + { + "text": "", + "style": "party-cell", + "border": [true, false, false, false] + }, + { + "text": "", + "style": "party-cell", + "border": [false, false, true, false] + } + ], + "{{#accusedList}}", + [ + { + "text": "Accused {{index}}", + "style": "party-cell", + "border": [true, true, true, true] + }, + { + "text": "{{name}}", + "style": "party-cell", + "border": [true, true, true, true] + } + ], + [ + { + "text": "Advocate(s)", + "style": "party-cell", + "border": [true, true, true, true] + }, + { + "text": "{{listOfAdvocatesRepresenting}}", + "style": "party-cell", + "border": [true, true, true, true] + } + ], + "{{/accusedList}}", + [ + { + "text": "", + "style": "party-cell", + "border": [true, false, false, false] + }, + { + "text": "", + "style": "party-cell", + "border": [false, false, true, false] + } + ], + [ + { + "text": "Offence", + "style": "party-cell", + "border": [true, true, true, true] + }, + { + "text": "S.138 of the Negotiable Instruments Act, 1881", + "style": "party-cell", + "border": [true, true, true, true] + } + ] + ] + }, + "margin": [0, 10, 0, 10] + }, { "style": "form-body", "table": { @@ -71,7 +168,7 @@ ], [ { - "text": "WHEREAS complaint has been made before me that {{respondentName}} of {{respondentAddress}} has (or is suspected to have) committed the offence U/s. 138 of Negotiable Instruments Act, and it appears to me that you are likely to give material evidence or to produce any document or other thing for the prosecution;", + "text": "In the above mentioned case, involving the above listed parties, it appears to me that you are likely to give material evidence or to produce any document or other thing;", "style": "form-sub-body" } ], @@ -123,6 +220,15 @@ "alignment": "right", "margin": [0, 0, 0, 10] }, + "party-table": { + "fontSize": 12, + "color": "#484848" + }, + "party-cell": { + "fontSize": 12, + "color": "#484848", + "margin": [2, 5, 2, 5] + }, "form-header": { "color": "#484848", "fontFamily": "Roboto", diff --git a/pdf-service/format-config/witness-warrant-pdf.json b/pdf-service/format-config/witness-warrant-pdf.json index ec5021a9..19d11c08 100644 --- a/pdf-service/format-config/witness-warrant-pdf.json +++ b/pdf-service/format-config/witness-warrant-pdf.json @@ -43,9 +43,9 @@ "alignment": "center", "margin": [ 0, - 20, + 10, 0, - 20 + 10 ] } ] @@ -58,6 +58,103 @@ "style": "next-hearing-date", "layout": "noBorders" }, + { + "style": "party-table", + "table": { + "widths": ["30%", "70%"], + "body": [ + "{{#complainantList}}", + [ + { + "text": "Complainant {{index}}", + "style": "party-cell", + "border": [true, true, true, true] + }, + { + "text": "{{name}}", + "style": "party-cell", + "border": [true, true, true, true] + } + ], + [ + { + "text": "Advocate(s)", + "style": "party-cell", + "border": [true, true, true, true] + }, + { + "text": "{{listOfAdvocatesRepresenting}}", + "style": "party-cell", + "border": [true, true, true, true] + } + ], + "{{/complainantList}}", + [ + { + "text": "", + "style": "empty-party-cell", + "border": [true, false, false, false] + }, + { + "text": "", + "style": "empty-party-cell", + "border": [false, false, true, false] + } + ], + "{{#accusedList}}", + [ + { + "text": "Accused {{index}}", + "style": "party-cell", + "border": [true, true, true, true] + }, + { + "text": "{{name}}", + "style": "party-cell", + "border": [true, true, true, true] + } + ], + [ + { + "text": "Advocate(s)", + "style": "party-cell", + "border": [true, true, true, true] + }, + { + "text": "{{listOfAdvocatesRepresenting}}", + "style": "party-cell", + "border": [true, true, true, true] + } + ], + "{{/accusedList}}", + [ + { + "text": "", + "style": "empty-party-cell", + "border": [true, false, false, false] + }, + { + "text": "", + "style": "empty-party-cell", + "border": [false, false, true, false] + } + ], + [ + { + "text": "Offence", + "style": "party-cell", + "border": [true, true, true, true] + }, + { + "text": "S.138 of the Negotiable Instruments Act, 1881", + "style": "party-cell", + "border": [true, true, true, true] + } + ] + ] + }, + "margin": [0, 10, 0, 10] + }, { "style": "form-body", "table": { @@ -75,7 +172,7 @@ { "text": [ { - "text": "Whereas complaint has been made before me that {{respondentName}} of {{respondentAddress}} has (or is suspected to have) committed the offence U/s. 138 of Negotiable Instruments Act, and it appears likely that {{respondentName}} can give evidence concerning the said complaint, and whereas I have good and sufficient reason to believe that he will not attend as a witness on the hearing of the said complaint unless compelled to do so;" + "text": "In the above mentioned case, involving the above listed parties, it appears to me that {{witnessName}} is likely to give material evidence or to produce any document or other thing, and whereas I have good and sufficient reason to believe that he will not attend as a witness on the hearing of the said complaint unless compelled to do so;" } ], "style": "form-sub-body" @@ -83,7 +180,7 @@ ], [ { - "text": "This is to authorise and require you to arrest {{respondentName}}, and on the {{hearingDate}} to bring him before the Special Court of Judicial Magistrate of the First Class, for the trial of cases under section 138 of Negotiable Instruments Act, 1881 at Kollam (‘24x7 ON Courts’) to be examined touching the offence complained of.", + "text": "This is to authorise and require you to arrest {{witnessName}} of {{respondentAddress}}, and on the {{hearingDate}} to bring him before the Special Court of Judicial Magistrate of the First Class, for the trial of cases under section 138 of Negotiable Instruments Act, 1881 at Kollam (‘24x7 ON Courts’) to be examined touching the offence complained of.", "style": "form-sub-body" } ] @@ -92,9 +189,9 @@ "layout": "noBorders", "margin": [ 0, - 20, + 15, 0, - 20 + 15 ] }, { @@ -127,7 +224,7 @@ "layout": "noBorders", "margin": [ 0, - 20, + 10, 0, 0 ] @@ -141,6 +238,20 @@ "alignment": "right", "margin": [0, 0, 0, 10] }, + "party-table": { + "fontSize": 12, + "color": "#484848" + }, + "party-cell": { + "fontSize": 10, + "color": "#484848", + "margin": [0, 2, 0, 2] + }, + "empty-party-cell": { + "fontSize": 5, + "color": "#484848", + "margin": [0, 0, 0, 0] + }, "tl-head": { "fillColor": "white", "margin": [ @@ -211,7 +322,7 @@ 0, 30, 0, - 20 + 0 ], "bold": true, "color": "#000000",