@gov-cy/govcy-express-services 1.1.1 → 1.2.0
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
|
@@ -262,6 +262,21 @@ Here is an example JSON config:
|
|
|
262
262
|
"tr":"/service-id"
|
|
263
263
|
}
|
|
264
264
|
},
|
|
265
|
+
"reviewPageHeader": { //<-- OPTIONAL - Review page header. Useful when directing users to the review page from gov.cy start page
|
|
266
|
+
"el": "Υπηρεσία τεστ",
|
|
267
|
+
"en": "Test service",
|
|
268
|
+
"tr": "Test service"
|
|
269
|
+
},
|
|
270
|
+
"successPageHeader": { //<-- OPTIONAL - Success page header
|
|
271
|
+
"el": "Έχουμε λάβει την προσφορά σας",
|
|
272
|
+
"en": "We have received your offer",
|
|
273
|
+
"tr": "We have received your offer"
|
|
274
|
+
},
|
|
275
|
+
"successEmailHeader": { //<-- OPTIONAL - Success email header
|
|
276
|
+
"el": "Έχουμε λάβει την προσφορά σας",
|
|
277
|
+
"en": "We have received your offer",
|
|
278
|
+
"tr": "We have received your offer"
|
|
279
|
+
},
|
|
265
280
|
"description": { //<-- Service description (meta)
|
|
266
281
|
"el": "[Υποβάλετε αίτηση για ...]",
|
|
267
282
|
"en": "[Submit an application ...]",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gov-cy/govcy-express-services",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.2.0",
|
|
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",
|
|
@@ -37,7 +37,12 @@ export function govcyReviewPageHandler() {
|
|
|
37
37
|
element: "textElement",
|
|
38
38
|
params: {
|
|
39
39
|
type: "h1",
|
|
40
|
-
|
|
40
|
+
// if serviceCopy has site.reviewPageHeader use it otherwise use the static resource. it should test if serviceCopy.site.reviewPageHeader[req.globalLang] exists
|
|
41
|
+
text: (
|
|
42
|
+
serviceCopy?.site?.reviewPageHeader?.[req.globalLang]
|
|
43
|
+
? serviceCopy.site.reviewPageHeader
|
|
44
|
+
: govcyResources.staticResources.text.checkYourAnswersTitle
|
|
45
|
+
)
|
|
41
46
|
}
|
|
42
47
|
};
|
|
43
48
|
|
|
@@ -65,7 +65,13 @@ export function govcySuccessPageHandler(isPDF = false) {
|
|
|
65
65
|
const successPanel = {
|
|
66
66
|
element: "panel",
|
|
67
67
|
params: {
|
|
68
|
-
|
|
68
|
+
// if serviceCopy has site.successPageHeader use it otherwise use the static resource. it should test if serviceCopy.site.successPageHeader[req.globalLang] exists
|
|
69
|
+
header: (
|
|
70
|
+
serviceCopy?.site?.successPageHeader?.[req.globalLang]
|
|
71
|
+
? serviceCopy.site.successPageHeader
|
|
72
|
+
: govcyResources.staticResources.text.submissionSuccessTitle
|
|
73
|
+
),
|
|
74
|
+
// header: govcyResources.staticResources.text.submissionSuccessTitle,
|
|
69
75
|
body: govcyResources.staticResources.text.yourSubmissionId,
|
|
70
76
|
referenceNumber: govcyResources.getSameMultilingualObject(serviceCopy.site.languages,submissionData.referenceNumber)
|
|
71
77
|
}
|
|
@@ -557,7 +557,8 @@ export function generateSubmitEmail(service, submissionData, submissionId, req)
|
|
|
557
557
|
{
|
|
558
558
|
component: "bodySuccess",
|
|
559
559
|
params: {
|
|
560
|
-
title:
|
|
560
|
+
title: service?.site?.successEmailHeader?.[req.globalLang]
|
|
561
|
+
|| govcyResources.getLocalizeContent(govcyResources.staticResources.text.submissionSuccessTitle, req.globalLang),
|
|
561
562
|
body: `${govcyResources.getLocalizeContent(govcyResources.staticResources.text.yourSubmissionId, req.globalLang)} ${submissionId}`
|
|
562
563
|
}
|
|
563
564
|
}
|