diff --git a/pdf-service/data-config/pqm-adhoctest.json b/pdf-service/data-config/pqm-adhoctest.json new file mode 100644 index 000000000..7d6663bb1 --- /dev/null +++ b/pdf-service/data-config/pqm-adhoctest.json @@ -0,0 +1,154 @@ +{ + "key": "pqm-adhoctest", + "DataConfigs": { + "serviceName": "rainmaker-common", + "version": "1.0.0", + "baseKeyPath": "$.tests.*", + "entityIdPath":"$.testId", + "isCommonTableBorderRequired": false, + "mappings": [ + { + "mappings": [ + { + "direct": [ + { + "variable": "testId", + "value": { + "path": "$.testId" + } + }, + { + "variable": "plantCode", + "value": { + "path": "$.plantCode" + }, + "localisation":{ + "required":true, + "prefix": "PQM_PLANT", + "module": "rainmaker-tqm" + } + }, + { + "variable": "processCode", + "value": { + "path": "$.processCode" + }, + "localisation":{ + "required":true, + "prefix": "PQM_PROCESS", + "module": "rainmaker-tqm" + } + }, + { + "variable": "stageCode", + "value": { + "path": "$.stageCode" + }, + "localisation":{ + "required":true, + "prefix": "PQM_STAGE", + "module": "rainmaker-tqm" + } + }, + { + "variable": "materialCode", + "value": { + "path": "$.materialCode" + }, + "localisation":{ + "required":true, + "prefix": "PQM_MATERIAL", + "module": "rainmaker-tqm" + } + }, + { + "variable": "testType", + "value": { + "path": "$.testType" + }, + "localisation":{ + "required":true, + "prefix": "PQM_SOURCETYPE", + "module": "rainmaker-tqm" + } + }, + { + "variable": "scheduleDate", + "value": { + "path": "$.scheduledDate" + }, + "type": "date" + }, + { + "variable": "status", + "value": { + "path": "$.status" + } + }, + { + "variable": "labName", + "value": { + "path": "$.labAssignedTo" + } + }, + + { + "variable": "variable14", + "value":{ + "path":"$.tradeLicenseDetail.accessories.*" + }, + "type":"array", + "format":{ + "type":"string", + "scema":[ + { + "variable": "accesoryType", + "value": "accessoryCategory", + "localisation":{ + "required":true, + "prefix": "TRADELICENSE_ACCESSORIESCATEGORY", + "module": "rainmaker-tl" + } + }, + { + "variable": "accessoryUomValue", + "value": "uomValue" + }, + + { + "variable": "uom", + "value": "uom" + }, + { + "variable": "accessoryCount", + "value": "count" + } + + ] + } + } + + + + ] + }, + { + "externalAPI": [ + { + "path": "http://egov-user:8080/user/_search", + "queryParam": "tenantId=$.tenantId", + "apiRequest": null, + "responseMapping":[ + { + "variable":"testSubmittedBy", + "value":"$.user.*.name" + } + ] + } + ] + } + ] + } + ] + } +} \ No newline at end of file diff --git a/pdf-service/format-config/pqm-adhoctest.json b/pdf-service/format-config/pqm-adhoctest.json new file mode 100644 index 000000000..ddfc2a80c --- /dev/null +++ b/pdf-service/format-config/pqm-adhoctest.json @@ -0,0 +1,278 @@ +{ + "key": "pqm-adhoctest", + "config": { + "defaultStyle": { + "font": "Cambay" + }, + "content": [ + { + "style": "noc-head", + "table": { + "widths": [ + "*", + "*", + "*" + ], + "body": [ + [ + { + "text":"{{trade_license_application}}", + "style": "receipt-logo-header" + }, + { + "text":"{{test_result}}", + "alignment":"right", + "color": "#484848", + "margin": [ + 0, + 2, + -50, + 0 + ] + }, + { + "text":"{{testId}}", + "alignment": "right", + "color": "#484848", + "bold": true, + "margin": [ + -150, + 2, + -20, + 0 + ] + } + ] + ] + }, + "layout": "noBorders" + }, + {"text": "Test Details", "style": "header"}, + { + "margin": [ + 0, + 35, + 0, + 0 + ], + "columns": [ + { + "bold": true, + "fontSize": 12, + "stack": [ + { + "text": "Test ID" + }, + { + "text": "Plant Name" + }, + { + "text": "Treatment process" + }, + { + "text": "Stage" + }, + { + "text": "Output Type" + }, + { + "text": "Test Type" + }, + { + "text": "Test scheduled on" + }, + { + "text": "Status" + }, + { + "text": "Lab name" + }, + { + "text": "Test results \nsubmitted by" + }, + { + "text": "SLA" + } + ] + }, + { + "bold": false, + "fontSize": 12, + "stack": [ + { + "text": ": {{testId}}" + }, + { + "text": ": {{plantCode}}" + }, + { + "text": ": {{processCode}}" + }, + { + "text": ": {{stageCode}}" + }, + { + "text": ": {{materialCode}}" + }, + { + "text": ": {{testType}}" + }, + { + "text": ": {{scheduleDate}}" + }, + { + "text": ": {{status}}" + }, + { + "text": ": {{labName}}" + }, + { + "text": ": {{testSubmittedBy}}" + } + ] + } + ] + } + ], + "styles": { + "header": { + "fontSize": 16, + "bold": true, + "margin": [ + -20, + 40, + 10, + 10 + ] + }, + "noc-head": { + "margin": [ + -25, + -30, + 0, + 1 + ] + }, + "receipt-logo-header": { + "color": "#484848", + "fontSize": 14, + "bold": true, + "letterSpacing": 0.74, + "margin": [ + 0, + 0, + 0, + 5 + ] + }, + "noc-table": { + "fontSize": 12, + "color": "#484848", + "margin": [ + -25, + 45, + -8, + -8 + ] + }, + "noc-table2": { + "fontSize": 12, + "color": "#484848", + "margin": [ + -25, + 18, + -25, + -8 + ] + }, + "receipt-table-value": { + "color": "#000000", + "bold": true, + "fontSize": 12, + "fontWeight": 500, + "margin": [ + 5, + 5, + 0, + 0 + ] + }, + "receipt-table-value-total": { + "color": "#000000", + "bold": true, + "fontSize": 12, + "fontWeight": 500, + "alignment": "right", + "margin": [ + 0, + 5, + 30, + 0 + ] + }, + "receipt-table-value-down": { + "color": "#000000", + "bold": false, + "fontSize": 12, + "fontWeight": 400, + "alignment": "left", + "margin": [ + 3, + 5, + 0, + 5 + ] + }, + "receipt-table-value2": { + "color": "#000000", + "bold": false, + "fontSize": 12, + "fontWeight": 500, + "margin": [ + 3, + 0, + 0, + 0 + ] + }, + "receipt-table-value-cont": { + "color": "#000000", + "bold": false, + "fontSize": 11, + "fontWeight": 400, + "margin": [ + 3, + 0, + 0, + 0 + ] + }, + "receipt-table": { + "color": "#484848", + "bold": true, + "fontSize": 12, + "fontWeight": 400, + "margin": [ + -30, + 5, + 0, + 0 + ] + }, + "receipt-table2": { + "color": "#000000", + "bold": true, + "fontSize": 12, + "fontWeight": 500, + "margin": [ + 3, + 0, + 0, + 0 + ] + } + + } + + } +} \ No newline at end of file