diff --git a/frontend/src/App.vue b/frontend/src/App.vue index bb8dba8fbb..ef0f0b513a 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.message, + kind: "Success", + toastTitle: "Success", active: true, handler: () => {} }) @@ -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/FormBCeIDPage.vue b/frontend/src/pages/FormBCeIDPage.vue index 9e4489c15f..a6e0602776 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 }}
  • diff --git a/frontend/src/pages/bceidform/AddressWizardStep.vue b/frontend/src/pages/bceidform/AddressWizardStep.vue index 7f4fefcfcd..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: "The 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 61dc55e8e5..44b4ec5464 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: "The additional contact was deleted", + message: `“${selectedContact}” additional contact was deleted`, handler: removeContact(index), active: true, }); 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", }); });