From 881a5391fc8e38898af5911358e02da256f67f3a Mon Sep 17 00:00:00 2001 From: Rhys Lewis Date: Wed, 18 Sep 2024 10:52:24 +0100 Subject: [PATCH 1/7] Refactored code to bring in line with standard --- src/app/pages/debrief/debrief.page.html | 2 +- .../alternate-mot-evidence.component.html | 1 + .../vehicle-registration.html | 9 ++++----- .../vehicle-registration/vehicle-registration.ts | 15 ++++++++++++++- 4 files changed, 20 insertions(+), 7 deletions(-) diff --git a/src/app/pages/debrief/debrief.page.html b/src/app/pages/debrief/debrief.page.html index c9c6924e3..990795ef5 100644 --- a/src/app/pages/debrief/debrief.page.html +++ b/src/app/pages/debrief/debrief.page.html @@ -8,10 +8,10 @@ >{{ 'debrief.title' | translate }} - {{pageState.candidateName$ | async}} - +
- + - + - -
+ +
Enter the registration number
diff --git a/src/app/pages/waiting-room-to-car/components/vehicle-registration/vehicle-registration.ts b/src/app/pages/waiting-room-to-car/components/vehicle-registration/vehicle-registration.ts index b20960865..e8aadb729 100644 --- a/src/app/pages/waiting-room-to-car/components/vehicle-registration/vehicle-registration.ts +++ b/src/app/pages/waiting-room-to-car/components/vehicle-registration/vehicle-registration.ts @@ -16,6 +16,7 @@ import { nonAlphaNumericValues, } from '@shared/constants/field-validators/field-validators'; import { isEmpty } from 'lodash-es'; +import {AccessibilityService} from '@providers/accessibility/accessibility.service'; @Component({ selector: 'vehicle-registration', @@ -56,7 +57,8 @@ export class VehicleRegistrationComponent implements OnChanges { constructor( public motApiService: MotHistoryApiService, public modalController: ModalController, - protected networkState: NetworkStateProvider + protected networkState: NetworkStateProvider, + protected accessibilityService: AccessibilityService ) {} get invalid(): boolean { @@ -206,4 +208,15 @@ export class VehicleRegistrationComponent implements OnChanges { isMOTNotValid() { return this.motData?.data?.status !== MotStatusCodes.NOT_VALID; } + + getMOTButtonColSize(zoomClass: string) { + switch (zoomClass) { + case 'text-zoom-x-large': + return 37; + case 'text-zoom-large': + return 33; + default: + return 30; + } + } } From 7df938e8b6edc8f54c1626d63949b820506843a4 Mon Sep 17 00:00:00 2001 From: Rhys Lewis Date: Wed, 18 Sep 2024 10:54:24 +0100 Subject: [PATCH 2/7] linting --- .../components/vehicle-registration/vehicle-registration.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/pages/waiting-room-to-car/components/vehicle-registration/vehicle-registration.ts b/src/app/pages/waiting-room-to-car/components/vehicle-registration/vehicle-registration.ts index e8aadb729..35107a997 100644 --- a/src/app/pages/waiting-room-to-car/components/vehicle-registration/vehicle-registration.ts +++ b/src/app/pages/waiting-room-to-car/components/vehicle-registration/vehicle-registration.ts @@ -7,6 +7,7 @@ import { PracticeModeMOTModal, PracticeModeMOTType, } from '@pages/waiting-room-to-car/components/mot-components/practice-mode-mot-modal/practice-mode-mot-modal.component'; +import { AccessibilityService } from '@providers/accessibility/accessibility.service'; import { MotHistoryApiService, MotHistoryWithStatus } from '@providers/mot-history-api/mot-history-api.service'; import { MotHistory, MotStatusCodes } from '@providers/mot-history-api/mot-interfaces'; import { ConnectionStatus, NetworkStateProvider } from '@providers/network-state/network-state'; @@ -16,7 +17,6 @@ import { nonAlphaNumericValues, } from '@shared/constants/field-validators/field-validators'; import { isEmpty } from 'lodash-es'; -import {AccessibilityService} from '@providers/accessibility/accessibility.service'; @Component({ selector: 'vehicle-registration', From c1f8db1e850410d5c0554455e467f8fcbee27fb8 Mon Sep 17 00:00:00 2001 From: Rhys Lewis Date: Wed, 18 Sep 2024 11:04:07 +0100 Subject: [PATCH 3/7] wording fixed on additional evidence boxes --- .../components/vehicle-details-card/vehicle-details-card.html | 2 +- .../alternate-mot-evidence.component.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/app/pages/view-test-result/components/vehicle-details-card/vehicle-details-card.html b/src/app/pages/view-test-result/components/vehicle-details-card/vehicle-details-card.html index 2369ff8f8..a5fac1f05 100644 --- a/src/app/pages/view-test-result/components/vehicle-details-card/vehicle-details-card.html +++ b/src/app/pages/view-test-result/components/vehicle-details-card/vehicle-details-card.html @@ -68,7 +68,7 @@

Vehic diff --git a/src/app/pages/waiting-room-to-car/components/mot-components/alternate-mot-evidence/alternate-mot-evidence.component.html b/src/app/pages/waiting-room-to-car/components/mot-components/alternate-mot-evidence/alternate-mot-evidence.component.html index 00439b093..7a069f7a2 100644 --- a/src/app/pages/waiting-room-to-car/components/mot-components/alternate-mot-evidence/alternate-mot-evidence.component.html +++ b/src/app/pages/waiting-room-to-car/components/mot-components/alternate-mot-evidence/alternate-mot-evidence.component.html @@ -1,7 +1,7 @@
- + From 37c2571577f96ad0540815621a4703c2a94b5629 Mon Sep 17 00:00:00 2001 From: Rhys Lewis Date: Wed, 18 Sep 2024 11:23:51 +0100 Subject: [PATCH 4/7] fixed a bug where the confirm vrn modal would display a blue cancel button instead of black --- .../mot-failed-modal/mot-failed-modal.component.scss | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/app/pages/waiting-room-to-car/components/mot-components/mot-failed-modal/mot-failed-modal.component.scss b/src/app/pages/waiting-room-to-car/components/mot-components/mot-failed-modal/mot-failed-modal.component.scss index 21c2f9ced..dd5d59e0b 100644 --- a/src/app/pages/waiting-room-to-car/components/mot-components/mot-failed-modal/mot-failed-modal.component.scss +++ b/src/app/pages/waiting-room-to-car/components/mot-components/mot-failed-modal/mot-failed-modal.component.scss @@ -23,4 +23,8 @@ color: var(--gds-black) } + .cancel-button { + color: var(--gds-black); + } + } From f418154304b1488117382694cdc133f6e6cacc1c Mon Sep 17 00:00:00 2001 From: Rhys Lewis Date: Wed, 18 Sep 2024 11:25:38 +0100 Subject: [PATCH 5/7] Corrected wording error --- .../alternate-mot-evidence.component.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/pages/waiting-room-to-car/components/mot-components/alternate-mot-evidence/alternate-mot-evidence.component.html b/src/app/pages/waiting-room-to-car/components/mot-components/alternate-mot-evidence/alternate-mot-evidence.component.html index 7a069f7a2..c22eb22bb 100644 --- a/src/app/pages/waiting-room-to-car/components/mot-components/alternate-mot-evidence/alternate-mot-evidence.component.html +++ b/src/app/pages/waiting-room-to-car/components/mot-components/alternate-mot-evidence/alternate-mot-evidence.component.html @@ -1,7 +1,7 @@
- + From 81e4938971d231e5e5a47457e9dba39e5a9e650e Mon Sep 17 00:00:00 2001 From: Rhys Lewis Date: Wed, 18 Sep 2024 11:43:07 +0100 Subject: [PATCH 6/7] Refactored practice mode modal to support dynamic font sizes --- .../practice-mode-mot-modal.component.html | 57 ++++++++++--------- .../practice-mode-mot-modal.component.scss | 6 +- .../practice-mode-mot-modal.component.ts | 4 +- 3 files changed, 39 insertions(+), 28 deletions(-) diff --git a/src/app/pages/waiting-room-to-car/components/mot-components/practice-mode-mot-modal/practice-mode-mot-modal.component.html b/src/app/pages/waiting-room-to-car/components/mot-components/practice-mode-mot-modal/practice-mode-mot-modal.component.html index 670f27c0d..d62aa4092 100644 --- a/src/app/pages/waiting-room-to-car/components/mot-components/practice-mode-mot-modal/practice-mode-mot-modal.component.html +++ b/src/app/pages/waiting-room-to-car/components/mot-components/practice-mode-mot-modal/practice-mode-mot-modal.component.html @@ -1,35 +1,40 @@ - You are in practice mode - - - - - - - - - Pass - - - - - Fail - - - - - No Details - + + + You are in practice mode + + + + + + + + + Pass + + + + + Fail + + + + + No Details + + + - + - Cancel + Cancel + diff --git a/src/app/pages/waiting-room-to-car/components/mot-components/practice-mode-mot-modal/practice-mode-mot-modal.component.scss b/src/app/pages/waiting-room-to-car/components/mot-components/practice-mode-mot-modal/practice-mode-mot-modal.component.scss index 7eab7190c..08bc8099a 100644 --- a/src/app/pages/waiting-room-to-car/components/mot-components/practice-mode-mot-modal/practice-mode-mot-modal.component.scss +++ b/src/app/pages/waiting-room-to-car/components/mot-components/practice-mode-mot-modal/practice-mode-mot-modal.component.scss @@ -4,7 +4,7 @@ @extend .modal-alert-wrapper; .modal-alert { - width: 400px; + width: 500px; } .modal-alert-header { @@ -20,4 +20,8 @@ color: var(--gds-black) } + .cancel-button { + color: var(--gds-black); + } + } diff --git a/src/app/pages/waiting-room-to-car/components/mot-components/practice-mode-mot-modal/practice-mode-mot-modal.component.ts b/src/app/pages/waiting-room-to-car/components/mot-components/practice-mode-mot-modal/practice-mode-mot-modal.component.ts index 5f4eb3a70..091e79805 100644 --- a/src/app/pages/waiting-room-to-car/components/mot-components/practice-mode-mot-modal/practice-mode-mot-modal.component.ts +++ b/src/app/pages/waiting-room-to-car/components/mot-components/practice-mode-mot-modal/practice-mode-mot-modal.component.ts @@ -14,7 +14,9 @@ export enum PracticeModeMOTType { styleUrls: ['./practice-mode-mot-modal.component.scss'], }) export class PracticeModeMOTModal { - constructor(public modalCtrl: ModalController) {} + constructor( + public modalCtrl: ModalController, + ) {} async onConfirm(type: PracticeModeMOTType) { await this.modalCtrl.dismiss(type); From 429fdbb87e6bb88b7dfa011616bc59538b204206 Mon Sep 17 00:00:00 2001 From: Rhys Lewis Date: Wed, 18 Sep 2024 11:43:35 +0100 Subject: [PATCH 7/7] linting --- .../practice-mode-mot-modal.component.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/app/pages/waiting-room-to-car/components/mot-components/practice-mode-mot-modal/practice-mode-mot-modal.component.ts b/src/app/pages/waiting-room-to-car/components/mot-components/practice-mode-mot-modal/practice-mode-mot-modal.component.ts index 091e79805..5f4eb3a70 100644 --- a/src/app/pages/waiting-room-to-car/components/mot-components/practice-mode-mot-modal/practice-mode-mot-modal.component.ts +++ b/src/app/pages/waiting-room-to-car/components/mot-components/practice-mode-mot-modal/practice-mode-mot-modal.component.ts @@ -14,9 +14,7 @@ export enum PracticeModeMOTType { styleUrls: ['./practice-mode-mot-modal.component.scss'], }) export class PracticeModeMOTModal { - constructor( - public modalCtrl: ModalController, - ) {} + constructor(public modalCtrl: ModalController) {} async onConfirm(type: PracticeModeMOTType) { await this.modalCtrl.dismiss(type);