@defra-fish/gafl-webapp-service 1.25.0-rc.7 → 1.25.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@defra-fish/gafl-webapp-service",
3
- "version": "1.25.0-rc.7",
3
+ "version": "1.25.0",
4
4
  "description": "The websales frontend for the GAFL service",
5
5
  "type": "module",
6
6
  "engines": {
@@ -36,8 +36,8 @@
36
36
  "prepare": "gulp --gulpfile build/gulpfile.cjs"
37
37
  },
38
38
  "dependencies": {
39
- "@defra-fish/business-rules-lib": "1.25.0-rc.7",
40
- "@defra-fish/connectors-lib": "1.25.0-rc.7",
39
+ "@defra-fish/business-rules-lib": "1.25.0",
40
+ "@defra-fish/connectors-lib": "1.25.0",
41
41
  "@defra/hapi-gapi": "^1.1.0",
42
42
  "@hapi/boom": "^9.1.2",
43
43
  "@hapi/catbox-redis": "^6.0.2",
@@ -76,5 +76,5 @@
76
76
  "gulp-sourcemaps": "^3.0.0",
77
77
  "node-sass": "^6.0.1"
78
78
  },
79
- "gitHead": "5369f790be226ca4c618b354fb2588089bbf3dc3"
79
+ "gitHead": "568226f08abee6272fe1d506f65c57615af50fd2"
80
80
  }
@@ -21,11 +21,11 @@ export const errorHandler = async (request, h) => {
21
21
  */
22
22
  return h
23
23
  .view(CLIENT_ERROR.page, {
24
- mssgs,
25
24
  altLang,
25
+ mssgs,
26
+ paymentInProgress,
26
27
  referer: request?.headers?.referer,
27
28
  clientError: request.response.output.payload,
28
- paymentInProgress,
29
29
  path: request.path,
30
30
  uri: {
31
31
  new: NEW_TRANSACTION.uri,
@@ -101,7 +101,7 @@
101
101
  "address_select_title_you": "Dewiswch eich cyfeiriad",
102
102
  "age_concession": "Age concession",
103
103
  "age_junior_concession": "Junior (13 to 16)",
104
- "age_junior": "Junior",
104
+ "age_junior": "Iau",
105
105
  "age_senior_concession": "Over 65",
106
106
  "age_senior": "Senior",
107
107
  "and": " ac ",
@@ -150,7 +150,7 @@
150
150
  "cookies_infrastructure_row_2": "7 niwrnod ar ôl i chi atal defnyddio’r gwasanaeth",
151
151
  "cookies_infrastructure_subheading": "Cwcis seilwaith",
152
152
  "cookies_intro_body": "Efallai y byddwch yn gweld neges o groeso pan fyddwch yn ymweld â’r gwasanaeth am y tro cyntaf. Byddwn yn storio cwci fel bod eich cyfrifiadur yn gwybod eich bod wedi’i gweld ac yn gwybod i beidio â’i dangos eto.",
153
- "cookies_intro_caption": "Introductory message cookie details",
153
+ "cookies_intro_caption": "Manylion cwcis y neges gyflwyniadol",
154
154
  "cookies_intro_row_1": "seen_cookie_message",
155
155
  "cookies_intro_row_2": "Yn storio neges er mwyn rhoi gwybod i ni eich bod wedi gweld ein neges am y cwcis",
156
156
  "cookies_intro_row_3": "1 mis",
@@ -164,15 +164,15 @@
164
164
  "cookies_security_table_row_3": "Defnyddir i ddiogelu’r gwasanaeth yn erbyn gweithgarwch maleisus",
165
165
  "cookies_security_table_row_4": "Nes eich bod yn cau eich porwr",
166
166
  "cookies_survey_body_1": "Rydym yn defnyddio ",
167
- "cookies_survey_body_2": " er mwyn casglu ymatebion i’r arolwg. Os ydych yn cymryd rhan, bydd SmartSurvey yn cadw cwcis ychwanegol ar eich cyfrifiadur i olrhain eich cynnydd drwyddo..",
167
+ "cookies_survey_body_2": " er mwyn casglu ymatebion i’r arolwg. Os ydych yn cymryd rhan, bydd SmartSurvey yn cadw cwcis ychwanegol ar eich cyfrifiadur i olrhain eich cynnydd drwyddo.",
168
168
  "cookies_survey_body_3": "Gweler ",
169
169
  "cookies_survey_body_4": " a ",
170
170
  "cookies_survey_body_5": " am ragor o wybodaeth.",
171
171
  "cookies_survey_body_link_1": "SmartSurvey",
172
- "cookies_survey_body_link_2": "SmartSurvey privacy information",
172
+ "cookies_survey_body_link_2": "gwybodaeth breifatrwydd SmartSurvey",
173
173
  "cookies_survey_body_link_3": "chanllaw cwcis SmartSurvey",
174
174
  "cookies_survey_subheading": "Arolwg o’n perfformiad",
175
- "cookies_title": "Cookies - GOV.UK",
175
+ "cookies_title": "Cwcis - GOV.UK",
176
176
  "cost": "Cost",
177
177
  "disability_concession_12_month": "Gall deiliaid trwydded 12 mis fod yn gymwys i gael consesiynau anabledd",
178
178
  "disability_concession_badge_error_msg": "Nodwch rif Bathodyn Glas deiliad y drwydded",
@@ -227,7 +227,7 @@
227
227
  "footer_ea_helpline": "Llinell Gymorth Asiantaeth yr Amgylchedd:",
228
228
  "footer_privacy_policy": "Polisi Preifatrwydd",
229
229
  "footer_refund_policy": "Polisi Ad-dalu",
230
- "free": "free",
230
+ "free": "Am ddim",
231
231
  "gov_uk": " - GOV.UK",
232
232
  "header_service_name": "Trwydded bysgota â gwialen",
233
233
  "identification": "Identification",
@@ -270,9 +270,9 @@
270
270
  "important_info_contact_post": "Post",
271
271
  "important_info_contact_title_other": "Sut y dylem gysylltu â deiliad y drwydded ynghylch nodiadau atgoffa a newidiadau pwysig?",
272
272
  "important_info_contact_title_you": "Sut dylen ni gysylltu â chi am nodiadau atgoffa a newidiadau pwysig?",
273
- "licence_confirm_method_error_choose": "Dewiswch sut dylen anfon y drwydded",
273
+ "licence_confirm_method_error_choose": "Dewiswch sut dylem anfon y drwydded",
274
274
  "licence_confirm_method_how_body_item": "Byddaf yn gwneud nodyn o rif y drwydded",
275
- "licence_confirm_method_how_body_text": "Dyma lle y byddwn yn anfon cadarnhad o’ch trwydded bysgota",
275
+ "licence_confirm_method_how_body_text": "Dyma sut y byddwn yn anfon cadarnhad o’r drwydded bysgota",
276
276
  "licence_confirm_method_how_title_other": "Sut fydden nhw’n dymuno derbyn eu cadarnhad trwydded bysgota?",
277
277
  "licence_confirm_method_how_title_you": "Sut hoffech chi dderbyn cadarnhad o'ch trwydded bysgota?",
278
278
  "licence_confirm_method_where_body_hint_other": "Licence information will be sent by email or text message only. We will not send a licence card.",
@@ -433,10 +433,10 @@
433
433
  "ordnance_body_link": "OS (yn agor ar dudalen newydd)",
434
434
  "ordnance_subheading": "Ordnance Survey terms and conditions",
435
435
  "ordnance_title": "Ordnance Survey terms and conditions - GOV.UK",
436
- "our_address_1": "Environment Agency",
436
+ "our_address_1": "Asiantaeth yr Amgylchedd",
437
437
  "our_address_2": "Horizon House",
438
438
  "our_address_3": "Deanery Road",
439
- "our_address_4": "Bristol",
439
+ "our_address_4": "Bryste",
440
440
  "our_address_5": "BS1 5AH",
441
441
  "over_65": "Dros 65",
442
442
  "payment_cancelled_title": "Your payment has been cancelled",
@@ -450,61 +450,60 @@
450
450
  "phone_number": "rhif ffôn",
451
451
  "pound": "£",
452
452
  "pricing_summary_heading": "You can go fishing without a rod licence because you’re under 13. You’ll need to get a licence to fish as soon as you turn 13.",
453
- "privacy_dp_officer_body_1": "Our Data Protection Officer (DPO) is responsible for independent advice and monitoring of the Environment Agency’s use of personal data. You can read our ",
454
- "privacy_dp_officer_body_2": " which explains how we deal with personal data in general. If you have any concerns or queries about how we process personal data, or if you would like to make a complaint or request relating to data protection, please contact our DPO using the following details:",
455
- "privacy_dp_officer_body_link": "personal information charter (opens in new tab)",
453
+ "privacy_dp_officer_body_1": "Mae ein Swyddog Diogelu Data yn gyfrifol am gyngor annibynnol a monitro defnydd Asiantaeth yr Amgylchedd o ddata personol. Gallwch ddarllen ein ",
454
+ "privacy_dp_officer_body_2": ", sy'n esbonio sut rydym yn ymdrin â data personol yn gyffredinol. Os oes gennych unrhyw bryderon neu ymholiadau am sut rydym yn prosesu data personol, neu os hoffech wneud cwyn neu gais sy’n ymwneud â diogelu data, cysylltwch â’n Swyddog Diogelu Data gan ddefnyddio’r manylion canlynol:",
455
+ "privacy_dp_officer_body_link": "siarter gwybodaeth bersonol (yn agor mewn tab newydd)",
456
456
  "privacy_heading": "Get a fishing licence privacy policy",
457
- "privacy_how_body_1": "We are the Environment Agency and we are the official authority for issuing fishing licences in England (except the River Tweed), Wales and the Border Esk region of Scotland. We are the controller for personal data collected and processed for our Get a fishing licence service. A data controller determines how and why personal data (personal information) is processed.",
458
- "privacy_how_body_2": "Children under the age of 13 do not require a licence and you should not provide us with their personal data. If you are not the angler and you are providing us with someone else’s personal data to apply for a licence on their behalf, please make them aware of this privacy notice.",
459
- "privacy_length_kept_body_1": "We will keep personal data for the duration of the licence and for 6 years after it expires in line with our standard information retention policy.",
460
- "privacy_needed_body_1": "The personal data we need about the angler is:",
461
- "privacy_needed_body_3": "We require this personal data because it is necessary to process the application for a licence. If you dont provide this information then we can’t issue a licence.",
462
- "privacy_needed_body_4": "The lawful basis we rely on to process your personal data is article 6(1)(e) of the UK GDPR, which allows us to process personal data when this is necessary to exercise our official authority set out in law (in this case the Salmon and Freshwater Fisheries Act 1975).",
463
- "privacy_needed_body_5": "If you have a disability and would like to be issued with a disabled licence, you can voluntarily provide us with your:",
464
- "privacy_needed_body_6": "If you would like to receive marketing emails from us you can sign up to receive our email newsletter.",
465
- "privacy_needed_body_7": "The lawful basis we rely on for processing this special category personal data is your explicit consent under article 6(1)(a) and 9(2)(a) of the UK GDPR. We will only use this personal data to assess your eligibility for a disabled licence. Consent can be withdrawn at any time.",
466
- "privacy_needed_body_bulleypoint_1": "name and address",
467
- "privacy_needed_body_bulleypoint_2": "date of birth",
468
- "privacy_needed_body_bulleypoint_3": "contact details including phone number, email address or both",
469
- "privacy_needed_body_bulleypoint_4": "National Insurance number (if relevant)",
470
- "privacy_needed_body_bulleypoint_5": "Blue Badge number (if relevant)",
471
- "privacy_subheading_dp_officer": "Data Protection Officer",
472
- "privacy_subheading_how": "How we use personal data",
473
- "privacy_subheading_length_kept": "How long we keep personal data",
474
- "privacy_subheading_needed": "The personal data we need",
475
- "privacy_subheading_usage": "Service Usage",
476
- "privacy_subheading_what_we_do": "What we do with personal data",
477
- "privacy_subheading_where_stored": "Where personal data is processed and stored",
478
- "privacy_title": "Get a fishing licence privacy policy - GOV.UK",
479
- "privacy_usage_body_1": "We use Google Analytics to collect anonymised information about how the service is used. We use this data to improve the service.",
480
- "privacy_usage_body_2": "We do not send any data to Google that could be used to personally identify you and we do not allow Google to use or share our analytics data.",
481
- "privacy_what_we_do_body_1": "We use personal data to:",
482
- "privacy_what_we_do_body_2": "We may use other organisations to do any of these activities on our behalf. These include:",
483
- "privacy_what_we_do_body_3": "We do not use personal data to make an automated decision or for automated profiling.",
484
- "privacy_what_we_do_bulletpoint_1": "process your transaction, including taking payment",
485
- "privacy_what_we_do_bulletpoint_10": "SSCL - for Direct Debit payments",
486
- "privacy_what_we_do_bulletpoint_11": "Post Office - to take payments and process applications",
487
- "privacy_what_we_do_bulletpoint_12": "Paragon - for licence printing and mailing",
488
- "privacy_what_we_do_bulletpoint_13": "SendInBlue - for marketing emails",
489
- "privacy_what_we_do_bulletpoint_14": "SmartSurvey - to ask anglers to provide feedback on the service",
490
- "privacy_what_we_do_bulletpoint_qa": "Substance and QA Research",
491
- "privacy_what_we_do_bulletpoint_15": "GOV.Notify - to communicate information about licences",
492
- "privacy_what_we_do_bulletpoint_hh": "HH Global - for catch return reminder letter printing and mailing",
493
- "privacy_what_we_do_bulletpoint_2": "determine the type of licence (based on age and disability information if provided)",
494
- "privacy_what_we_do_bulletpoint_3": "issue a licence and send this to the angler",
495
- "privacy_what_we_do_bulletpoint_cr": "issue catch return forms and reminders to the angler",
496
- "privacy_what_we_do_bulletpoint_4": "communicate information about licences",
497
- "privacy_what_we_do_bulletpoint_5": "check licences",
498
- "privacy_what_we_do_bulletpoint_6": "email newsletters to people who sign up",
499
- "privacy_what_we_do_bulletpoint_7": "ask anglers to provide feedback on the service",
500
- "privacy_what_we_do_bulletpoint_8": "provide updates to byelaws",
457
+ "privacy_how_body_1": "Ni yw Asiantaeth yr Amgylchedd a ni yw’r awdurdod swyddogol ar gyfer dyrannu trwyddedau pysgota yn Lloegr (ac eithrio afon Tuedd), Cymru ac afon Border Esk yr Alban. Ni hefyd sy’n rheoli data personol a gesglir ac a brosesir ar gyfer ein gwasanaeth Cais am Drwydded Bysgota. Mae rheolydd data'n penderfynu sut a pham mae data personol (gwybodaeth bersonol) yn cael ei brosesu.",
458
+ "privacy_how_body_2": "Nid oes angen trwydded ar blant dan 13 oed ac ni ddylech roi eu data personol i ni. Os nad chi yw’r genweiriwr ac rydych yn rhoi data personol rhywun arall i ni er mwyn cyflwyno cais am drwydded ar ei ran, sicrhewch ei fod yn ymwybodol o’r hysbysiad preifatrwydd hwn.",
459
+ "privacy_length_kept_body_1": "Byddwn yn cadw data personol am hyd y drwydded ac am chwe blynedd ar ôl iddi ddod i ben yn unol â'n polisi cadw gwybodaeth safonol.",
460
+ "privacy_needed_body_1": "Dyma’r data personol y mae ei angen arnom am y genweiriwr:",
461
+ "privacy_needed_body_3": "Rydym yn prosesu’r data personol hwn oherwydd ei fod yn angenrheidiol er mwyn prosesu’r cais am drwydded. Os nad ydych chin darparu’r wybodaeth hon, yna ni allwn ddyrannu trwydded.",
462
+ "privacy_needed_body_4": "Y sail gyfreithiol rydym yn dibynnu arni er mwyn prosesu eich data personol yw Erthygl 6(1)(e) GDPR y DU, sy’n ein caniatáu i brosesu data personol pan fydd hyn yn angenrheidiol i arfer ein hawdurdod swyddogol a nodir yn y gyfraith (yn yr achos hwn, Deddf Pysgodfeydd Eogiaid a Dŵr Croyw 1975).",
463
+ "privacy_needed_body_5": "Os oes gennych anabledd a hoffech dderbyn trwydded anabl, gallwch ddarparu’r canlynol inni o’ch gwirfodd:",
464
+ "privacy_needed_body_6": "Os hoffech dderbyn e-byst marchnata gennym ni, gallwch gofrestru i dderbyn ein cylchlythyr dros e-bost.",
465
+ "privacy_needed_body_7": "Y sail gyfreithiol rydym yn dibynnu arni ar gyfer prosesu’r data personol categori arbennig hwn yw eich cydsyniad penodol dan Erthygl 6(1)(a) a 9(2)(a) GDPR y DU. Byddwn yn defnyddio’r data personol hwn i asesu eich cymhwysedd ar gyfer trwydded anabl yn unig. Mae modd tynnu cydsyniad yn ôl ar unrhyw adeg.",
466
+ "privacy_needed_body_bulleypoint_1": "enw a chyfeiriad",
467
+ "privacy_needed_body_bulleypoint_2": "dyddiad geni",
468
+ "privacy_needed_body_bulleypoint_3": "manylion cyswllt, gan gynnwys rhif ffôn, cyfeiriad e-bost neu’r ddau",
469
+ "privacy_needed_body_bulleypoint_4": "Rhif Yswiriant Gwladol (os yw'n berthnasol)",
470
+ "privacy_needed_body_bulleypoint_5": "Rhif Bathodyn Glas (os yw'n berthnasol)",
471
+ "privacy_subheading_dp_officer": "Swyddog Diogelu Data",
472
+ "privacy_subheading_how": "Sut rydym yn defnyddio data personol",
473
+ "privacy_subheading_length_kept": "Pa mor hir y byddwn yn cadw data personol?",
474
+ "privacy_subheading_needed": "Y data personol y mae ei angen arnom",
475
+ "privacy_subheading_usage": "Defnydd o’r gwasanaeth",
476
+ "privacy_subheading_what_we_do": "Yr hyn yr ydym yn ei wneud gyda data personol",
477
+ "privacy_subheading_where_stored": "Lle caiff data personol ei brosesu a'i storio?",
478
+ "privacy_title": "Mynnu polisi preifatrwydd trwydded bysgota",
479
+ "privacy_usage_body_1": "Rydym yn defnyddio Google Analytics i gasglu gwybodaeth ddienw am sut y defnyddir y gwasanaeth. Rydym yn defnyddio’r data hwn i wella’r gwasanaeth.",
480
+ "privacy_usage_body_2": "Nid ydym yn anfon unrhyw ddata at Google a allai gael ei ddefnyddio i’ch adnabod yn bersonol ac nid ydym yn caniatáu i Google ddefnyddio neu rannu ein data dadansoddeg.",
481
+ "privacy_what_we_do_body_1": "Rydym yn defnyddio data personol i wneud y canlynol:",
482
+ "privacy_what_we_do_body_2": "Efallai y byddwn yn defnyddio sefydliadau eraill i ymgymryd â’r gweithgareddau hyn ar ein rhan. Mae’r rhain yn cynnwys y canlynol:",
483
+ "privacy_what_we_do_body_3": "Nid ydym yn defnyddio data personol i wneud penderfyniad awtomatig neu ar gyfer proffilio awtomatig.",
484
+ "privacy_what_we_do_bulletpoint_1": "prosesu eich trafodiad, gan gynnwys cymryd taliad",
485
+ "privacy_what_we_do_bulletpoint_10": "SSCL ar gyfer taliadau debyd uniongyrchol",
486
+ "privacy_what_we_do_bulletpoint_11": "Swyddfa’r Post i gymryd taliadau ac i brosesu ceisiadau",
487
+ "privacy_what_we_do_bulletpoint_12": "Paragon ar gyfer argraffu a phostio trwyddedau",
488
+ "privacy_what_we_do_bulletpoint_13": "SendInBlue - ar gyfer negeseuon marchnata",
489
+ "privacy_what_we_do_bulletpoint_14": "SmartSurvey er mwyn gofyn i genweirwyr ddarparu adborth ar y gwasanaeth",
490
+ "privacy_what_we_do_bulletpoint_qa": "Substance a QA research",
491
+ "privacy_what_we_do_bulletpoint_15": "GOV.Notify er mwyn cyfleu gwybodaeth am drwyddedau",
492
+ "privacy_what_we_do_bulletpoint_hh": "HH Global - i argraffu ac anfon llythyr atgoffa ar gyfer y ffurflen ddalfa",
493
+ "privacy_what_we_do_bulletpoint_2": "penderfynu ar y math o drwydded (yn seiliedig ar yr wybodaeth am oedran ac anabledd a ddarperir)",
494
+ "privacy_what_we_do_bulletpoint_3": "dyrannu trwydded ac anfon hon at y genweiriwr",
495
+ "privacy_what_we_do_bulletpoint_cr": "anfon ffurflenni dalfa a nodiadau atgoffa i’r genweiriwr",
496
+ "privacy_what_we_do_bulletpoint_4": "cyfleu gwybodaeth am drwyddedau",
497
+ "privacy_what_we_do_bulletpoint_5": "gwirio trwyddedau",
498
+ "privacy_what_we_do_bulletpoint_6": "e-bostio cylchlythyrau at bobl sy'n cofrestru amdanynt",
499
+ "privacy_what_we_do_bulletpoint_7": "gofyn i genweirwyr ddarparu adborth ar y gwasanaeth",
500
+ "privacy_what_we_do_bulletpoint_8": "darparu diweddariadau o ran is-ddeddfau",
501
501
  "privacy_what_we_do_bulletpoint_enforcement": "enforcement purposes",
502
- "privacy_what_we_do_bulletpoint_9": "GOV.UK Pay and Worldpay - for card payments",
503
- "privacy_where_stored_body_1": "We transfer personal data through Amazon Web Services (AWS) servers in the UK. We store the data on Microsoft Azure servers in Ireland.",
504
- "privacy_where_stored_body_2": "The organisations we share personal data with process and store data in the UK. Our processor may also store this data outside the UK in Switzerland.",
505
- "privacy_where_stored_body_3": "We do not store payment details.",
502
+ "privacy_what_we_do_bulletpoint_9": "GOV.UK Pay a Worldpay ar gyfer taliadau cardiau",
503
+ "privacy_where_stored_body_1": "Rydym yn trosglwyddo data personol drwy weinyddwyr Amazon Web Services (AWS) yn y DU. Rydym yn storio’r data ar weinyddwyr Microsoft Azure yn Iwerddon.",
504
+ "privacy_where_stored_body_2": "Mae’r sefydliadau rydym yn rhannu data personol â hwy yn prosesu a storio data yn y DU. Gall ein prosesydd hefyd storio'r data hwn y tu allan i’r DU yn y Swistir.",
505
+ "privacy_where_stored_body_3": "Nid ydym yn storio manylion talu.",
506
506
  "purpose": "Diben",
507
- "purpose": "Purpose",
508
507
  "refund_bulletpoint_1": "Gall Asiantaeth yr Amgylchedd ad-dalu cost trwydded i’r prynwr yn unig. Dylai’r holl geisiadau am ad-daliad gael eu cyfeirio i Asiantaeth yr Amgylchedd, ac eithrio mewn achosion lle mae’r drwydded wedi cael ei phrynu drwy drydydd parti (ac eithrio Swyddfa’r Post), pan ddylai ceisiadau am ad-daliadau gael eu cyfeirio iddyn nhw. Ffoniwch Asiantaeth yr Amgylchedd ar 03708 506506.",
509
508
  "refund_bulletpoint_2_1": "Ni fydd Asiantaeth yr Amgylchedd yn codi ffi pan fyddwch yn prynu trwydded drwy ein ",
510
509
  "refund_bulletpoint_2_2": " neu Swyddfa’r Post. Nid ydym yn argymell prynu eich trwydded drwy wefannau trydydd parti, efallai y byddant yn codi ffi ar ben cost y drwydded. Os gwnaethoch brynu eich trwydded drwy drydydd parti, cysylltwch ag ef yn uniongyrchol i ofyn iddo ad-dalu cost y drwydded a/neu’r ffi. Ni fydd Asiantaeth yr Amgylchedd yn ad-dalu deiliaid trwyddedau ar gyfer trwyddedau a brynwyd drwy drydydd partïon.",
@@ -79,7 +79,7 @@
79
79
  "address_lookup_content_info": "This is where we will send the licence card. A bankside enforcement officer may ask for this information if the licence is checked.",
80
80
  "address_lookup_crown_copyright_new_tab": "OS (opens in a new tab)",
81
81
  "address_lookup_crown_copyright_ref": "100024198.",
82
- "address_lookup_crown_copyright_terms_link": "terms and conditions (opens in a new tab)",
82
+ "address_lookup_crown_copyright_terms_link": "terms and conditions",
83
83
  "address_lookup_crown_copyright_terms": "Use of this addressing data is subject to the ",
84
84
  "address_lookup_crown_copyright": "© Crown copyright and database rights 2022 ",
85
85
  "address_lookup_error_empty_name_num": "Enter a building number or name",
@@ -101,7 +101,7 @@
101
101
  <div class="no-print">
102
102
  {% if (title === mssgs.address_lookup_title_you) or (title === mssgs.address_lookup_title_other) %}
103
103
  <p class="govuk-body-s">{{ mssgs.address_lookup_crown_copyright }}<a class="govuk-link" href="http://www.ordnancesurvey.co.uk" rel="noreferrer noopener" target="_blank">{{ mssgs.address_lookup_crown_copyright_new_tab }}</a> {{ mssgs.address_lookup_crown_copyright_ref }}
104
- <br>{{ mssgs.address_lookup_crown_copyright_terms }} <a class="govuk-link" href="{{ data.uri.osTerms }}" rel="noreferrer noopener" target="_blank">{{ mssgs.address_lookup_crown_copyright_terms_link }}</a></p>
104
+ <br>{{ mssgs.address_lookup_crown_copyright_terms }} <a class="govuk-link" href="{{ data.uri.osTerms }}">{{ mssgs.address_lookup_crown_copyright_terms_link }}</a></p>
105
105
  {% endif %}
106
106
  <p class="govuk-!-margin-top-5 govuk-!-margin-bottom-0">{{ mssgs.footer_ea_helpline }} <a class="govuk-link" href="tel:+443448005386">0344 800 5386</a></p>
107
107
  <p class="govuk-!-margin-top-0">{{ mssgs.footer_ea_helpline_opening_hours }}</p>
@@ -25,7 +25,7 @@ export const getData = async request => {
25
25
 
26
26
  const permission = await request.cache().helpers.transaction.getCurrentPermission()
27
27
 
28
- const startTimeString = displayStartTime(permission)
28
+ const startTimeString = displayStartTime(permission, request.i18n.getCatalog())
29
29
  const endTimeString = displayEndTime(permission)
30
30
 
31
31
  return {
@@ -29,7 +29,7 @@ const getData = async request => {
29
29
  await request.cache().helpers.status.set({ [COMPLETION_STATUS.completed]: true })
30
30
  await request.cache().helpers.status.setCurrentPermission({ currentPage: ORDER_COMPLETE.page })
31
31
 
32
- const startTimeStringTitle = displayStartTime(permission)
32
+ const startTimeStringTitle = displayStartTime(permission, request.i18n.getCatalog())
33
33
  return {
34
34
  permission,
35
35
  startTimeStringTitle,
@@ -61,7 +61,7 @@ export const getData = async request => {
61
61
  status.fromSummary = getFromSummary(status.fromSummary, permission.isRenewal)
62
62
  await request.cache().helpers.status.setCurrentPermission(status)
63
63
  await findPermit(permission, request)
64
- const startTimeString = displayStartTime(permission)
64
+ const startTimeString = displayStartTime(permission, request.i18n.getCatalog())
65
65
 
66
66
  return {
67
67
  permission,
@@ -2,47 +2,70 @@ import { displayStartTime, displayEndTime, displayExpiryDate } from '../date-and
2
2
 
3
3
  describe('displayStartTime', () => {
4
4
  it('displays the date in the correct format where no start time is set', () => {
5
- const startTime = displayStartTime({ licenceStartDate: '2021-01-01' })
5
+ const mssgs = getSampleRequest().i18n.getCatalog()
6
+ const startTime = displayStartTime({ licenceStartDate: '2021-01-01' }, mssgs)
6
7
  expect(startTime).toEqual('0.00am (first minute of the day) on 1 January 2021')
7
8
  })
8
9
  it('displays the date in the correct format where the start time is midnight', () => {
9
- const startTime = displayStartTime({ licenceStartDate: '2021-01-01', licenceStartTime: 0 })
10
+ const mssgs = getSampleRequest().i18n.getCatalog()
11
+ const startTime = displayStartTime({ licenceStartDate: '2021-01-01', licenceStartTime: 0 }, mssgs)
10
12
  expect(startTime).toEqual('0.00am (first minute of the day) on 1 January 2021')
11
13
  })
12
14
  it('displays the date in the correct format where the start time is 12pm', () => {
13
- const startTime = displayStartTime({ licenceStartDate: '2021-01-01', licenceStartTime: '12' })
15
+ const mssgs = getSampleRequest().i18n.getCatalog()
16
+ const startTime = displayStartTime({ licenceStartDate: '2021-01-01', licenceStartTime: '12' }, mssgs)
14
17
  expect(startTime).toEqual('12:00pm (midday) on 1 January 2021')
15
18
  })
16
19
  it('displays the date in the correct format where the start time is 3pm (UTC)', () => {
17
- const startTime = displayStartTime({ licenceStartDate: '2021-01-01', licenceStartTime: '15' })
20
+ const startTime = displayStartTime({ licenceStartDate: '2021-01-01', licenceStartTime: '15' }, {})
18
21
  expect(startTime).toEqual('3:00pm on 1 January 2021')
19
22
  })
20
23
  it('displays the date in the correct format where the start time is 3pm (BST)', () => {
21
- const startTime = displayStartTime({ licenceStartDate: '2021-07-01', licenceStartTime: '15' })
24
+ const startTime = displayStartTime({ licenceStartDate: '2021-07-01', licenceStartTime: '15' }, {})
22
25
  expect(startTime).toEqual('3:00pm on 1 July 2021')
23
26
  })
24
27
 
25
28
  it('displays the date in the correct format where the API start time is midnight', () => {
26
29
  // Tests that the API start time is used if the date/time has just rolled over (purchase completed at 11.59.59pm)
27
- const startTime = displayStartTime({ startDate: '2021-01-01T00:00:00.000Z', licenceStartDate: '2020-12-31' })
30
+ const mssgs = getSampleRequest().i18n.getCatalog()
31
+ const startTime = displayStartTime({ startDate: '2021-01-01T00:00:00.000Z', licenceStartDate: '2020-12-31' }, mssgs)
28
32
  expect(startTime).toEqual('0.00am (first minute of the day) on 1 January 2021')
29
33
  })
30
34
  it('displays the date in the correct where the API start time is 1 minute past midnight', () => {
31
- const startTime = displayStartTime({ startDate: '2020-01-01T00:01:00.000Z', licenceStartDate: '2020-01-01' })
35
+ const startTime = displayStartTime({ startDate: '2020-01-01T00:01:00.000Z', licenceStartDate: '2020-01-01' }, {})
32
36
  expect(startTime).toEqual('12:01am on 1 January 2020')
33
37
  })
34
38
  it('displays the date in the correct format where the API start time is 12pm', () => {
35
- const startTime = displayStartTime({ startDate: '2021-01-01T12:00:00.000Z', licenceStartDate: '2020-01-01', licenceStartTime: '12' })
39
+ const mssgs = getSampleRequest().i18n.getCatalog()
40
+ const startTime = displayStartTime(
41
+ { startDate: '2021-01-01T12:00:00.000Z', licenceStartDate: '2020-01-01', licenceStartTime: '12' },
42
+ mssgs
43
+ )
36
44
  expect(startTime).toEqual('12:00pm (midday) on 1 January 2021')
37
45
  })
38
46
  it('displays the date in the correct format where the API start time is 3pm (UTC)', () => {
39
- const startTime = displayStartTime({ startDate: '2021-01-01T15:00:00.000Z', licenceStartDate: '2021-01-01', licenceStartTime: '15' })
47
+ const startTime = displayStartTime(
48
+ { startDate: '2021-01-01T15:00:00.000Z', licenceStartDate: '2021-01-01', licenceStartTime: '15' },
49
+ {}
50
+ )
40
51
  expect(startTime).toEqual('3:00pm on 1 January 2021')
41
52
  })
42
53
  it('displays the date in the correct format where the API start time is 3pm (BST)', () => {
43
- const startTime = displayStartTime({ startDate: '2021-07-01T14:00:00.000Z', licenceStartDate: '2021-07-01', licenceStartTime: '15' })
54
+ const startTime = displayStartTime(
55
+ { startDate: '2021-07-01T14:00:00.000Z', licenceStartDate: '2021-07-01', licenceStartTime: '15' },
56
+ {}
57
+ )
44
58
  expect(startTime).toEqual('3:00pm on 1 July 2021')
45
59
  })
60
+
61
+ const getSampleRequest = () => ({
62
+ i18n: {
63
+ getCatalog: () => ({
64
+ licence_start_time_am_text_0: '0.00am (first minute of the day)',
65
+ licence_start_time_am_text_12: '12:00pm (midday)'
66
+ })
67
+ }
68
+ })
46
69
  })
47
70
 
48
71
  describe('displayEndTime', () => {
@@ -9,15 +9,16 @@ export const advancePurchaseDateMoment = permission =>
9
9
  /**
10
10
  * Function to convert licence start and end times to standard strings for display in the service
11
11
  * @param permission
12
+ * @param mssgs
12
13
  * @param displayTimeFirst - whether to display the time before the date, default is false
13
14
  * @returns {string}
14
15
  */
15
- export const displayStartTime = permission => {
16
+ export const displayStartTime = (permission, mssgs) => {
16
17
  const startMoment = permission.startDate ? moment.utc(permission.startDate).tz(SERVICE_LOCAL_TIME) : advancePurchaseDateMoment(permission)
17
18
  const timeComponent = startMoment
18
19
  .format('h:mma')
19
- .replace('12:00am', '0.00am (first minute of the day)')
20
- .replace('12:00pm', '12:00pm (midday)')
20
+ .replace('12:00am', mssgs.licence_start_time_am_text_0)
21
+ .replace('12:00pm', mssgs.licence_start_time_am_text_12)
21
22
  return `${timeComponent} on ${startMoment.format(dateDisplayFormat)}`
22
23
  }
23
24