@gov-cy/govcy-express-services 1.0.0-alpha.16 → 1.0.0-alpha.18

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/README.md CHANGED
@@ -1175,14 +1175,14 @@ Accept: text/plain
1175
1175
  Content-Type: application/json
1176
1176
 
1177
1177
  {
1178
- "submission_username": "username",
1179
- "submission_email": "email@example.com",
1180
- "submission_data": "{\"index\":{\"certificate_select\":[\"birth\",\"permanent_residence\"]}}",
1181
- "submission_data_version": "1",
1182
- "print_friendly_data": "[{\"pageUrl\":\"index\",\"pageTitle\":{\"el\":\"Επιλογή Εγγάφου\",\"en\":\"Document selection\",\"tr\":\"\"},\"fields\":[{\"id\":\"certificate_select\",\"name\":\"certificate_select\",\"label\":{\"el\":\"Τι έγγραφα επιθυμείτε να εκδώσετε;\",\"en\":\"What documents do you wish to issue?\"},\"value\":[\"birth\",\"permanent_residence\"],\"valueLabel\":[{\"el\":\"Πιστοποιητικό γέννησης​\",\"en\":\"Birth certificate\",\"tr\":\"\"},{\"el\":\"Βεβαίωση μόνιμης διαμονής​\",\"en\":\"Certificate of permanent residence\",\"tr\":\"\"}]}]}]",
1183
- "renderer_data": "{\"element\":\"summaryList\",\"params\":{\"items\":[{\"key\":{\"el\":\"Επιλογή Εγγάφου\",\"en\":\"Document selection\",\"tr\":\"\"},\"value\":[{\"element\":\"summaryList\",\"params\":{\"items\":[{\"key\":{\"el\":\"Τι έγγραφα επιθυμείτε να εκδώσετε;\",\"en\":\"What documents do you wish to issue?\"},\"value\":[{\"element\":\"textElement\",\"params\":{\"text\":{\"en\":\"Birth certificate, Certificate of permanent residence\",\"el\":\"Birth certificate, Certificate of permanent residence\",\"tr\":\"Birth certificate, Certificate of permanent residence\"},\"type\":\"span\"}}]}]}}]}]}}",
1184
- "renderer_version": "1.14.3",
1185
- "design_systems_version": "3.2.0",
1178
+ "submissionUsername": "username",
1179
+ "submissionEmail": "email@example.com",
1180
+ "submissionData": "{\"index\":{\"certificate_select\":[\"birth\",\"permanent_residence\"]}}",
1181
+ "submissionDataVersion": "1",
1182
+ "printFriendlyData": "[{\"pageUrl\":\"index\",\"pageTitle\":{\"el\":\"Επιλογή Εγγάφου\",\"en\":\"Document selection\",\"tr\":\"\"},\"fields\":[{\"id\":\"certificate_select\",\"name\":\"certificate_select\",\"label\":{\"el\":\"Τι έγγραφα επιθυμείτε να εκδώσετε;\",\"en\":\"What documents do you wish to issue?\"},\"value\":[\"birth\",\"permanent_residence\"],\"valueLabel\":[{\"el\":\"Πιστοποιητικό γέννησης​\",\"en\":\"Birth certificate\",\"tr\":\"\"},{\"el\":\"Βεβαίωση μόνιμης διαμονής​\",\"en\":\"Certificate of permanent residence\",\"tr\":\"\"}]}]}]",
1183
+ "rendererData": "{\"element\":\"summaryList\",\"params\":{\"items\":[{\"key\":{\"el\":\"Επιλογή Εγγάφου\",\"en\":\"Document selection\",\"tr\":\"\"},\"value\":[{\"element\":\"summaryList\",\"params\":{\"items\":[{\"key\":{\"el\":\"Τι έγγραφα επιθυμείτε να εκδώσετε;\",\"en\":\"What documents do you wish to issue?\"},\"value\":[{\"element\":\"textElement\",\"params\":{\"text\":{\"en\":\"Birth certificate, Certificate of permanent residence\",\"el\":\"Birth certificate, Certificate of permanent residence\",\"tr\":\"Birth certificate, Certificate of permanent residence\"},\"type\":\"span\"}}]}]}}]}]}}",
1184
+ "rendererVersion": "1.14.3",
1185
+ "designSystemsVersion": "3.2.0",
1186
1186
  "service": "{\"id\":\"test\",\"title\":{\"el\":\"Υπηρεσία τεστ\",\"en\":\"Test service\",\"tr\":\"\"}}"
1187
1187
  }
1188
1188
  ```
@@ -1233,15 +1233,15 @@ HTTP/1.1 200 OK
1233
1233
  The data is collected from the form elements and the data layer and are sent via the submission API in the following format:
1234
1234
 
1235
1235
  ```json
1236
- "submissionData": { // Site level successful submission data
1237
- "submission_username" : "", // User's username
1238
- "submission_email" : "", // User's email
1239
- "submission_data": "{}", // Raw data as submitted by the user in each page
1240
- "submission_data_version": "",// The submission data version
1241
- "print_friendly_data": "[]", // Print friendly data
1242
- "renderer_data" :"{}", // Renderer data of the summary list
1243
- "renderer_version": "", // The renderer version
1244
- "design_systems_version": "", // The design systems version
1236
+ {
1237
+ "submissionUsername" : "", // User's username
1238
+ "submissionEmail" : "", // User's email
1239
+ "submissionData": "{}", // Raw data as submitted by the user in each page
1240
+ "submissionDataVersion": "",// The submission data version
1241
+ "printFriendlyData": "[]", // Print friendly data
1242
+ "rendererData" :"{}", // Renderer data of the summary list
1243
+ "rendererVersion": "", // The renderer version
1244
+ "designSystemsVersion": "", // The design systems version
1245
1245
  "service": "{}" // Service info
1246
1246
  }
1247
1247
  ```
@@ -1252,18 +1252,18 @@ The data is collected from the form elements and the data layer and are sent via
1252
1252
 
1253
1253
  > ℹ️ **Note:**
1254
1254
  >
1255
- > When sent to the API, the fields `submission_data`, `renderer_data`, `print_friendly_data`, and `service` are stringified using `JSON.stringify()`.
1255
+ > When sent to the API, the fields `submissionData`, `rendererData`, `printFriendlyData`, and `service` are stringified using `JSON.stringify()`.
1256
1256
  >
1257
1257
  > The sample below shows the structure **before** stringification for clarity.
1258
1258
 
1259
1259
  ```json
1260
1260
  {
1261
- "submission_username": "username", // User's username
1262
- "submission_email": "email@example.com", // User's email
1263
- "submission_data_version": "0.1", // Submission data version
1264
- "submission_data": { // Submission raw data. Object, will be stringified
1261
+ "submissionUsername": "username", // User's username
1262
+ "submissionEmail": "email@example.com", // User's email
1263
+ "submissionDataVersion": "0.1", // Submission data version
1264
+ "submissionData": { // Submission raw data. Object, will be stringified
1265
1265
  "index": { // Page level
1266
- "id_select": ["id", "arc"], // field level. Could be string or array
1266
+ "id_select": ["id", "arc"], // field level: checkboxes are ALWAYS arrays (may be []); radios/select/text are strings
1267
1267
  "id_number": "654654",
1268
1268
  "arc_number": "",
1269
1269
  "aka": "232323",
@@ -1293,8 +1293,8 @@ The data is collected from the form elements and the data layer and are sent via
1293
1293
  "reason": "24324dssf"
1294
1294
  }
1295
1295
  },
1296
- "submission_data_version": "1", // Submission data version
1297
- "renderer_data": { // Summary list renderer data ready for rendering . Object, will be stringified
1296
+ "submissionDataVersion": "1", // Submission data version
1297
+ "rendererData": { // Summary list renderer data ready for rendering . Object, will be stringified
1298
1298
  "element": "summaryList",
1299
1299
  "params": {
1300
1300
  "items": [
@@ -1501,7 +1501,7 @@ The data is collected from the form elements and the data layer and are sent via
1501
1501
  ]
1502
1502
  }
1503
1503
  },
1504
- "print_friendly_data": [ // Print friendly data. Object, will be stringified
1504
+ "printFriendlyData": [ // Print friendly data. Object, will be stringified
1505
1505
  {
1506
1506
  "pageUrl": "index", // Page URL
1507
1507
  "pageTitle": { // Page title
@@ -1516,8 +1516,8 @@ The data is collected from the form elements and the data layer and are sent via
1516
1516
  "el": "Ταυτοποίηση",
1517
1517
  "en": "Identification"
1518
1518
  },
1519
- "value": ["id", "arc"], // Field value. Could be string or array
1520
- "valueLabel": [ // Field value label. Could be string or array
1519
+ "value": ["id", "arc"], // Field value. // field level: checkboxes are ALWAYS arrays (may be []); radios/select/text are strings
1520
+ "valueLabel": [ // Field value label
1521
1521
  {
1522
1522
  "el": "Ταυτότητα",
1523
1523
  "en": "ID",
@@ -1664,8 +1664,8 @@ The data is collected from the form elements and the data layer and are sent via
1664
1664
  ]
1665
1665
  }
1666
1666
  ],
1667
- "renderer_version": "1.14.1", // Renderer version
1668
- "design_systems_version": "3.1.0", // Design systems version
1667
+ "rendererVersion": "1.14.1", // Renderer version
1668
+ "designSystemsVersion": "3.1.0", // Design systems version
1669
1669
  "service": { // Service metadata. Object, will be stringified
1670
1670
  "id": "takeover",
1671
1671
  "title": {
@@ -2015,7 +2015,7 @@ TEST_SUBMISSION_API_SERVICE_ID=123
2015
2015
  3. If not found, call the PUT endpoint to create a new temporary record.
2016
2016
  - **On every form POST**, after successful validation:
2017
2017
  - The `submissionPutAPIEndpoint` will fire-and-forget a `PUT` request to update the saved submission with the latest form data.
2018
- - The payload includes all required submission fields with `submission_data` JSON-stringified.
2018
+ - The payload includes all required submission fields with `submissionData` JSON-stringified.
2019
2019
 
2020
2020
  #### `submissionGetAPIEndpoint` `GET` API Request and Response
2021
2021
  This API is used to retrieve the saved submission data.
@@ -2116,7 +2116,7 @@ Accept: text/plain
2116
2116
  Content-Type: application/json
2117
2117
 
2118
2118
  {
2119
- "submission_data" : "{\"index\":{\"formData\":{\"certificate_select\":[\"birth\",\"permanent_residence\"]}},\"data-entry-radios\":{\"formData\":{\"mobile_select\":\"other\",\"mobileTxt\":\"+35799484967\"}}}"
2119
+ "submissionData" : "{\"index\":{\"formData\":{\"certificate_select\":[\"birth\",\"permanent_residence\"]}},\"data-entry-radios\":{\"formData\":{\"mobile_select\":\"other\",\"mobileTxt\":\"+35799484967\"}}}"
2120
2120
  }
2121
2121
  ```
2122
2122
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gov-cy/govcy-express-services",
3
- "version": "1.0.0-alpha.16",
3
+ "version": "1.0.0-alpha.18",
4
4
  "description": "An Express-based system that dynamically renders services using @gov-cy/govcy-frontend-renderer and posts data to a submission API.",
5
5
  "author": "DMRID - DSF Team",
6
6
  "license": "MIT",
@@ -51,7 +51,7 @@
51
51
  },
52
52
  "dependencies": {
53
53
  "@gov-cy/dsf-email-templates": "^2.1.0",
54
- "@gov-cy/govcy-frontend-renderer": "^1.22.0",
54
+ "@gov-cy/govcy-frontend-renderer": "^1.22.1",
55
55
  "axios": "^1.9.0",
56
56
  "cookie-parser": "^1.4.7",
57
57
  "dotenv": "^16.3.1",
@@ -220,6 +220,12 @@ export function govcyFileDeletePostHandler() {
220
220
 
221
221
  //if no validation errors
222
222
  if (req.body.deleteFile === "yes") {
223
+ //TODO: Check if fileDeleteAPIEndpoint exists and call the API to delete the file from the storage
224
+ // if it exists, check that the Env vars are set
225
+ // construct url
226
+ // get user
227
+ // call the API
228
+ // if succeeded all good
223
229
  dataLayer.storePageDataElement(req.session, siteId, pageUrl, elementName, "");
224
230
  logger.info(`File deleted by user`, { siteId, pageUrl, elementName });
225
231
  }
@@ -118,7 +118,7 @@ export function govcyReviewPostHandler() {
118
118
 
119
119
  //-- Send email to user
120
120
  // Generate the email body
121
- let emailBody = generateSubmitEmail(service, submissionData.print_friendly_data, referenceNo, req);
121
+ let emailBody = generateSubmitEmail(service, submissionData.printFriendlyData, referenceNo, req);
122
122
  logger.debug("Email generated:", emailBody);
123
123
  // Send the email
124
124
  sendEmail(service.site.title[service.site.lang],emailBody,[dataLayer.getUser(req.session).email], "eMail").catch(err => {
@@ -78,7 +78,7 @@ export function govcySuccessPageHandler(isPDF = false) {
78
78
  }
79
79
  }
80
80
 
81
- let summaryList = submissionData.renderer_data;
81
+ let summaryList = submissionData.rendererData;
82
82
 
83
83
  let mainElements = [];
84
84
  // Add elements to the main section
@@ -135,9 +135,9 @@ function _uploadFileEventHandler(event) {
135
135
  "tr": "The selected file must be a JPG, JPEG, PNG or PDF"
136
136
  },
137
137
  "uploadFailed409": {
138
- "el": "Το επιλεγμένο αρχείο πρέπει να είναι μικρότερο από 5MB",
139
- "en": "The selected file must be smaller than 5MB",
140
- "tr": "The selected file must be smaller than 5MB"
138
+ "el": "Το επιλεγμένο αρχείο πρέπει να είναι μικρότερο από 4MB",
139
+ "en": "The selected file must be smaller than 4MB",
140
+ "tr": "The selected file must be smaller than 4MB"
141
141
  }
142
142
  };
143
143
 
@@ -17,7 +17,7 @@ import { logger } from "./govcyLogger.mjs";
17
17
  export function prepareSubmissionData(req, siteId, service) {
18
18
  // Get the raw data from the session store
19
19
  // const rawData = dataLayer.getSiteInputData(req.session, siteId);
20
-
20
+
21
21
  // ----- Conditional logic comes here
22
22
  // Filter site input data based on active pages only
23
23
  // const rawData = {};
@@ -32,7 +32,7 @@ export function prepareSubmissionData(req, siteId, service) {
32
32
  // }
33
33
  // }
34
34
 
35
- // ----- consistent data model for submission_data (CONFIG-BASED)
35
+ // ----- consistent data model for submissionData (CONFIG-BASED)
36
36
  const submissionData = {};
37
37
 
38
38
  // Loop through every page in the service definition
@@ -110,7 +110,7 @@ export function prepareSubmissionData(req, siteId, service) {
110
110
  }
111
111
  }
112
112
  logger.debug("Submission Data prepared:", submissionData);
113
- // ----- END config-based stable submission_data block
113
+ // ----- END config-based stable submissionData block
114
114
 
115
115
  // Get the print-friendly data from the session store
116
116
  const printFriendlyData = preparePrintFriendlyData(req, siteId, service);
@@ -119,14 +119,14 @@ export function prepareSubmissionData(req, siteId, service) {
119
119
  const reviewSummaryList = generateReviewSummary(printFriendlyData, req, siteId, false);
120
120
  // Prepare the submission data object
121
121
  return {
122
- submission_username: dataLayer.getUser(req.session).name,
123
- submission_email: dataLayer.getUser(req.session).email,
124
- submission_data: submissionData, // Raw data as submitted by the user in each page
125
- submission_data_version: service.site?.submission_data_version || "", // The submission data version
126
- print_friendly_data: printFriendlyData, // Print-friendly data
127
- renderer_data: reviewSummaryList, // Renderer data of the summary list
128
- renderer_version: service.site?.renderer_version || "", // The renderer version
129
- design_systems_version: service.site?.design_systems_version || "", // The design systems version
122
+ submissionUsername: dataLayer.getUser(req.session).name,
123
+ submissionEmail: dataLayer.getUser(req.session).email,
124
+ submissionData: submissionData, // Raw data as submitted by the user in each page
125
+ submissionDataVersion: service.site?.submission_data_version || "", // The submission data version
126
+ printFriendlyData: printFriendlyData, // Print-friendly data
127
+ rendererData: reviewSummaryList, // Renderer data of the summary list
128
+ rendererVersion: service.site?.renderer_version || "", // The renderer version
129
+ designSystemsVersion: service.site?.design_systems_version || "", // The design systems version
130
130
  service: { // Service info
131
131
  id: service.site.id, // Service ID
132
132
  title: service.site.title // Service title multilingual object
@@ -143,16 +143,16 @@ export function prepareSubmissionData(req, siteId, service) {
143
143
  * @returns {object} The API-ready submission data object with all fields as strings
144
144
  */
145
145
  export function prepareSubmissionDataAPI(data) {
146
-
146
+
147
147
  return {
148
- submission_username: String(data.submission_username ?? ""),
149
- submission_email: String(data.submission_email ?? ""),
150
- submission_data: JSON.stringify(data.submission_data ?? {}),
151
- submission_data_version: String(data.submission_data_version ?? ""),
152
- print_friendly_data: JSON.stringify(data.print_friendly_data ?? []),
153
- renderer_data: JSON.stringify(data.renderer_data ?? {}),
154
- renderer_version: String(data.renderer_version ?? ""),
155
- design_systems_version: String(data.design_systems_version ?? ""),
148
+ submissionUsername: String(data.submissionUsername ?? ""),
149
+ submissionEmail: String(data.submissionEmail ?? ""),
150
+ submissionData: JSON.stringify(data.submissionData ?? {}),
151
+ submissionDataVersion: String(data.submissionDataVersion ?? ""),
152
+ printFriendlyData: JSON.stringify(data.printFriendlyData ?? []),
153
+ rendererData: JSON.stringify(data.rendererData ?? {}),
154
+ rendererVersion: String(data.rendererVersion ?? ""),
155
+ designSystemsVersion: String(data.designSystemsVersion ?? ""),
156
156
  service: JSON.stringify(data.service ?? {})
157
157
  };
158
158
  }
@@ -232,7 +232,7 @@ export function preparePrintFriendlyData(req, siteId, service) {
232
232
  }
233
233
  }
234
234
 
235
- return submissionData ;
235
+ return submissionData;
236
236
  }
237
237
 
238
238
  //------------------------------- Helper Functions -------------------------------//
@@ -317,6 +317,19 @@ function getValue(formElement, pageUrl, req, siteId) {
317
317
  } else {
318
318
  value = dataLayer.getFormDataValue(req.session, siteId, pageUrl, formElement.params.name);
319
319
  }
320
+
321
+ // 🔁 Normalize checkboxes: always return an array
322
+ if (formElement.element === "checkboxes") {
323
+ // If no value, return empty array
324
+ if (value == null || value === "") return [];
325
+ // If already an array, return as-is (but strip empties just in case)
326
+ if (Array.isArray(value)) {
327
+ // Strip empties just in case
328
+ return value.filter(v => v != null && v !== "");
329
+ }
330
+ // Else single value, convert to array
331
+ return [String(value)];
332
+ }
320
333
  return value;
321
334
  }
322
335
 
@@ -460,10 +473,10 @@ export function generateReviewSummary(submissionData, req, siteId, showChangeLin
460
473
  {
461
474
  "element": "htmlElement",
462
475
  "params": {
463
- "text": {
464
- "en": `<a href="/${siteId}/${pageUrl}/view-file/${elementName}" target="_blank">${govcyResources.staticResources.text.viewFile.en}<span class="govcy-visually-hidden"> ${key?.en || ""}</span></a>`,
465
- "el": `<a href="/${siteId}/${pageUrl}/view-file/${elementName}" target="_blank">${govcyResources.staticResources.text.viewFile.el}<span class="govcy-visually-hidden"> ${key?.el || ""}</span></a>`,
466
- "tr": `<a href="/${siteId}/${pageUrl}/view-file/${elementName}" target="_blank">${govcyResources.staticResources.text.viewFile.tr}<span class="govcy-visually-hidden"> ${key?.tr || ""}</span></a>`
476
+ "text": {
477
+ "en": `<a href="/${siteId}/${pageUrl}/view-file/${elementName}" target="_blank">${govcyResources.staticResources.text.viewFile.en}<span class="govcy-visually-hidden"> ${key?.en || ""}</span></a>`,
478
+ "el": `<a href="/${siteId}/${pageUrl}/view-file/${elementName}" target="_blank">${govcyResources.staticResources.text.viewFile.el}<span class="govcy-visually-hidden"> ${key?.el || ""}</span></a>`,
479
+ "tr": `<a href="/${siteId}/${pageUrl}/view-file/${elementName}" target="_blank">${govcyResources.staticResources.text.viewFile.tr}<span class="govcy-visually-hidden"> ${key?.tr || ""}</span></a>`
467
480
  }
468
481
  }
469
482
  }
@@ -471,7 +484,7 @@ export function generateReviewSummary(submissionData, req, siteId, showChangeLin
471
484
  };
472
485
  }
473
486
 
474
-
487
+
475
488
 
476
489
 
477
490
  // Loop through each page in the submission data
@@ -550,7 +563,7 @@ export function generateSubmitEmail(service, submissionData, submissionId, req)
550
563
  }
551
564
  );
552
565
  }
553
-
566
+
554
567
  // Add data title to the body
555
568
  body.push(
556
569
  {
@@ -568,7 +581,7 @@ export function generateSubmitEmail(service, submissionData, submissionId, req)
568
581
  body.push(
569
582
  {
570
583
  component: "bodyHeading",
571
- params: {"headingLevel":2},
584
+ params: { "headingLevel": 2 },
572
585
  body: govcyResources.getLocalizeContent(pageTitle, req.globalLang)
573
586
  }
574
587
  );
@@ -578,14 +591,14 @@ export function generateSubmitEmail(service, submissionData, submissionId, req)
578
591
  for (const field of fields) {
579
592
  const label = govcyResources.getLocalizeContent(field.label, req.globalLang);
580
593
  const valueLabel = getSubmissionValueLabelString(field.valueLabel, req.globalLang);
581
- dataUl.push({key: label, value: valueLabel});
594
+ dataUl.push({ key: label, value: valueLabel });
582
595
  }
583
596
  // add data to the body
584
597
  body.push(
585
- {
586
- component: "bodyKeyValue",
587
- params: {type:"ul", items: dataUl},
588
- });
598
+ {
599
+ component: "bodyKeyValue",
600
+ params: { type: "ul", items: dataUl },
601
+ });
589
602
 
590
603
  }
591
604
 
@@ -606,84 +619,84 @@ export function generateSubmitEmail(service, submissionData, submissionId, req)
606
619
 
607
620
 
608
621
 
609
- /*
622
+ /*
610
623
  {
611
- "bank-details": {
612
- "formData": {
613
- "AccountName": "asd",
614
- "Iban": "CY12 0020 0123 0000 0001 2345 6789",
615
- "Swift": "BANKCY2NXXX",
616
- "_csrf": "sjknv79rxjgv0uggo0d5312vzgz37jsh"
617
- }
618
- },
619
- "answer-bank-boc": {
620
- "formData": {
621
- "Objection": "Object",
622
- "country": "Azerbaijan",
623
- "ObjectionReason": "ObjectionReasonCode1",
624
- "ObjectionExplanation": "asdsa",
625
- "DepositsBOCAttachment": "",
626
- "_csrf": "sjknv79rxjgv0uggo0d5312vzgz37jsh"
627
- }
628
- },
629
- "bank-settlement": {
630
- "formData": {
631
- "ReceiveSettlementExplanation": "",
632
- "ReceiveSettlementDate_day": "",
633
- "ReceiveSettlementDate_month": "",
634
- "ReceiveSettlementDate_year": "",
635
- "ReceiveSettlement": "no",
636
- "_csrf": "sjknv79rxjgv0uggo0d5312vzgz37jsh"
637
- }
638
- }
624
+ "bank-details": {
625
+ "formData": {
626
+ "AccountName": "asd",
627
+ "Iban": "CY12 0020 0123 0000 0001 2345 6789",
628
+ "Swift": "BANKCY2NXXX",
629
+ "_csrf": "sjknv79rxjgv0uggo0d5312vzgz37jsh"
630
+ }
631
+ },
632
+ "answer-bank-boc": {
633
+ "formData": {
634
+ "Objection": "Object",
635
+ "country": "Azerbaijan",
636
+ "ObjectionReason": "ObjectionReasonCode1",
637
+ "ObjectionExplanation": "asdsa",
638
+ "DepositsBOCAttachment": "",
639
+ "_csrf": "sjknv79rxjgv0uggo0d5312vzgz37jsh"
640
+ }
641
+ },
642
+ "bank-settlement": {
643
+ "formData": {
644
+ "ReceiveSettlementExplanation": "",
645
+ "ReceiveSettlementDate_day": "",
646
+ "ReceiveSettlementDate_month": "",
647
+ "ReceiveSettlementDate_year": "",
648
+ "ReceiveSettlement": "no",
649
+ "_csrf": "sjknv79rxjgv0uggo0d5312vzgz37jsh"
650
+ }
651
+ }
639
652
  }
640
653
 
641
654
 
642
655
 
643
656
  [
644
- {
645
- pageUrl: "personal-details",
646
- pageTitle: { en: "Personal data", el: "Προσωπικά στοιχεία" }, // from pageData.title in correct language
647
- fields: [
648
- [
649
- {
650
- id: "firstName",
651
- label: { en: "First Name", el: "Όνομα" },
652
- value: "John", // The actual user input value
653
- valueLabel: { en: "John", el: "John" } // Same label as the value for text inputs
654
- },
655
- {
656
- id: "lastName",
657
- label: { en: "Last Name", el: "Επίθετο" },
658
- value: "Doe", // The actual user input value
659
- valueLabel: { en: "Doe", el: "Doe" } // Same label as the value for text inputs
660
- },
661
- {
662
- id: "gender",
663
- label: { en: "Gender", el: "Φύλο" },
664
- value: "m", // The actual value ("male")
665
- valueLabel: { en: "Male", el: "Άντρας" } // The corresponding label for "male"
666
- },
667
- {
668
- id: "languages",
669
- label: { en: "Languages", el: "Γλώσσες" },
670
- value: ["en", "el"], // The selected values ["en", "el"]
671
- valueLabel: [
672
- { en: "English", el: "Αγγλικά" }, // Labels corresponding to "en" and "el"
673
- { en: "Greek", el: "Ελληνικά" }
674
- ]
675
- },
676
- {
677
- id: "birthDate",
678
- label: { en: "Birth Date", el: "Ημερομηνία Γέννησης" },
679
- value: "1990-01-13", // The actual value based on user input
680
- valueLabel: "13/1/1990" // Date inputs label will be conveted to D/M/YYYY
681
- }
682
- ]
683
- },
684
- ...
657
+ {
658
+ pageUrl: "personal-details",
659
+ pageTitle: { en: "Personal data", el: "Προσωπικά στοιχεία" }, // from pageData.title in correct language
660
+ fields: [
661
+ [
662
+ {
663
+ id: "firstName",
664
+ label: { en: "First Name", el: "Όνομα" },
665
+ value: "John", // The actual user input value
666
+ valueLabel: { en: "John", el: "John" } // Same label as the value for text inputs
667
+ },
668
+ {
669
+ id: "lastName",
670
+ label: { en: "Last Name", el: "Επίθετο" },
671
+ value: "Doe", // The actual user input value
672
+ valueLabel: { en: "Doe", el: "Doe" } // Same label as the value for text inputs
673
+ },
674
+ {
675
+ id: "gender",
676
+ label: { en: "Gender", el: "Φύλο" },
677
+ value: "m", // The actual value ("male")
678
+ valueLabel: { en: "Male", el: "Άντρας" } // The corresponding label for "male"
679
+ },
680
+ {
681
+ id: "languages",
682
+ label: { en: "Languages", el: "Γλώσσες" },
683
+ value: ["en", "el"], // The selected values ["en", "el"]
684
+ valueLabel: [
685
+ { en: "English", el: "Αγγλικά" }, // Labels corresponding to "en" and "el"
686
+ { en: "Greek", el: "Ελληνικά" }
687
+ ]
688
+ },
689
+ {
690
+ id: "birthDate",
691
+ label: { en: "Birth Date", el: "Ημερομηνία Γέννησης" },
692
+ value: "1990-01-13", // The actual value based on user input
693
+ valueLabel: "13/1/1990" // Date inputs label will be conveted to D/M/YYYY
694
+ }
695
+ ]
696
+ },
697
+ ...
685
698
  ]
686
699
 
687
700
 
688
701
 
689
- */
702
+ */