From 6e516e2c228f9ea8feaea61bd31b6329103d75bd Mon Sep 17 00:00:00 2001 From: Fernando Terra Date: Thu, 7 Dec 2023 17:18:24 -0300 Subject: [PATCH 1/4] feat: display email in bold style --- frontend/src/pages/FormBCeIDPage.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/src/pages/FormBCeIDPage.vue b/frontend/src/pages/FormBCeIDPage.vue index 26284707de..a8b3fadd46 100644 --- a/frontend/src/pages/FormBCeIDPage.vue +++ b/frontend/src/pages/FormBCeIDPage.vue @@ -396,7 +396,7 @@ const scrollToNewContact = () => {
  • You must be able to receive email at - {{ submitterContact.email }} + {{ submitterContact.email }}
  • From bf2193acec99326ecbf207c593b5b2c7dc581379 Mon Sep 17 00:00:00 2001 From: Fernando Terra Date: Thu, 7 Dec 2023 17:37:19 -0300 Subject: [PATCH 2/4] feat: update deletion toast messages --- frontend/src/App.vue | 6 +++--- frontend/src/pages/bceidform/AddressWizardStep.vue | 2 +- frontend/src/pages/bceidform/ContactWizardStep.vue | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/frontend/src/App.vue b/frontend/src/App.vue index bb8dba8fbb..fa8f5b559c 100644 --- a/frontend/src/App.vue +++ b/frontend/src/App.vue @@ -43,9 +43,9 @@ const openToast = (event: ModalNotification) => { const deleteContentModal = () => { openToast({ // message: `“${modalContent.value.message}” additional ${modalContent.value.kind} was deleted successfully`, - message: "", - kind: 'Success', - toastTitle: modalContent.value.toastTitle, + message: modalContent.value.toastTitle, + kind: "Success", + toastTitle: "Success", active: true, handler: () => {} }) diff --git a/frontend/src/pages/bceidform/AddressWizardStep.vue b/frontend/src/pages/bceidform/AddressWizardStep.vue index 7f4fefcfcd..942c5605a9 100644 --- a/frontend/src/pages/bceidform/AddressWizardStep.vue +++ b/frontend/src/pages/bceidform/AddressWizardStep.vue @@ -121,7 +121,7 @@ const handleRemove = (index: number) => { bus.emit({ message: selectedAddress, kind: "address", - toastTitle: "The additional address was deleted", + toastTitle: `“${selectedAddress}” additional address was deleted`, handler: removeAddress(index), active: true, }); diff --git a/frontend/src/pages/bceidform/ContactWizardStep.vue b/frontend/src/pages/bceidform/ContactWizardStep.vue index 0d5a997bf5..2ef3d638c0 100644 --- a/frontend/src/pages/bceidform/ContactWizardStep.vue +++ b/frontend/src/pages/bceidform/ContactWizardStep.vue @@ -123,7 +123,7 @@ const handleRemove = (index: number) => { bus.emit({ message: selectedContact, kind: "contact", - toastTitle: "The additional contact was deleted", + toastTitle: `“${selectedContact}” additional contact was deleted`, handler: removeContact(index), active: true, }); From 7bc713eaa3d38166d86e7205c34946f88af66eda Mon Sep 17 00:00:00 2001 From: Fernando Terra Date: Thu, 7 Dec 2023 17:53:26 -0300 Subject: [PATCH 3/4] refactor: use properties with corresponding names --- frontend/src/App.vue | 4 ++-- frontend/src/dto/CommonTypesDto.ts | 1 + frontend/src/pages/bceidform/AddressWizardStep.vue | 5 +++-- frontend/src/pages/bceidform/ContactWizardStep.vue | 5 +++-- 4 files changed, 9 insertions(+), 6 deletions(-) diff --git a/frontend/src/App.vue b/frontend/src/App.vue index fa8f5b559c..ef0f0b513a 100644 --- a/frontend/src/App.vue +++ b/frontend/src/App.vue @@ -43,7 +43,7 @@ const openToast = (event: ModalNotification) => { const deleteContentModal = () => { openToast({ // message: `“${modalContent.value.message}” additional ${modalContent.value.kind} was deleted successfully`, - message: modalContent.value.toastTitle, + message: modalContent.value.message, kind: "Success", toastTitle: "Success", active: true, @@ -78,7 +78,7 @@ toastBus.on(openToast) Are you sure you want to delete "{{ modalContent.message }}" additional + >Are you sure you want to delete "{{ modalContent.name }}" additional {{ modalContent.kind }}? diff --git a/frontend/src/dto/CommonTypesDto.ts b/frontend/src/dto/CommonTypesDto.ts index 7e989a547b..7d68daf02c 100644 --- a/frontend/src/dto/CommonTypesDto.ts +++ b/frontend/src/dto/CommonTypesDto.ts @@ -86,6 +86,7 @@ export interface Submitter { } export interface ModalNotification { + name?: string; message: string; kind: string; toastTitle: string; diff --git a/frontend/src/pages/bceidform/AddressWizardStep.vue b/frontend/src/pages/bceidform/AddressWizardStep.vue index 942c5605a9..bd016c840f 100644 --- a/frontend/src/pages/bceidform/AddressWizardStep.vue +++ b/frontend/src/pages/bceidform/AddressWizardStep.vue @@ -119,9 +119,10 @@ const handleRemove = (index: number) => { ? formData.location.addresses[index].locationName : "Address #" + index; bus.emit({ - message: selectedAddress, + name: selectedAddress, + toastTitle: "Success", kind: "address", - toastTitle: `“${selectedAddress}” additional address was deleted`, + message: `“${selectedAddress}” additional address was deleted`, handler: removeAddress(index), active: true, }); diff --git a/frontend/src/pages/bceidform/ContactWizardStep.vue b/frontend/src/pages/bceidform/ContactWizardStep.vue index 2ef3d638c0..7f1bca6abc 100644 --- a/frontend/src/pages/bceidform/ContactWizardStep.vue +++ b/frontend/src/pages/bceidform/ContactWizardStep.vue @@ -121,9 +121,10 @@ const handleRemove = (index: number) => { ? `${formData.location.contacts[index].firstName} ${formData.location.contacts[index].lastName}` : "Contact #" + index; bus.emit({ - message: selectedContact, + name: selectedContact, + toastTitle: "Success", kind: "contact", - toastTitle: `“${selectedContact}” additional contact was deleted`, + message: `“${selectedContact}” additional contact was deleted`, handler: removeContact(index), active: true, }); From 908026dc943b3caaaf3ce7388cc689ea4d18b9d9 Mon Sep 17 00:00:00 2001 From: Fernando Terra Date: Thu, 7 Dec 2023 21:07:37 -0300 Subject: [PATCH 4/4] test: fix unit test --- .../tests/unittests/pages/bceidform/ContactWizardStep.spec.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/frontend/tests/unittests/pages/bceidform/ContactWizardStep.spec.ts b/frontend/tests/unittests/pages/bceidform/ContactWizardStep.spec.ts index 06be29b0ee..51dd40e1a2 100644 --- a/frontend/tests/unittests/pages/bceidform/ContactWizardStep.spec.ts +++ b/frontend/tests/unittests/pages/bceidform/ContactWizardStep.spec.ts @@ -43,7 +43,8 @@ describe("ContactWizardStep.vue", () => { await wrapper.find("#deleteContact_1").trigger("click"); expect(payload!).toMatchObject({ - message: "Contact #1", + name: "Contact #1", + message: "“Contact #1” additional contact was deleted", kind: "contact", }); });