From c7b6a2fc3d9e5f1f0532d20c8b86c43e2827eef4 Mon Sep 17 00:00:00 2001 From: Scott J Dickerson Date: Thu, 21 Sep 2023 14:01:58 -0400 Subject: [PATCH] Import questionnaire form - fix success toast message The message displayed on successful import of a questionnaire did not exist in the translation file. The message key now uses an existing message to say: "Questionnaire was successfully created." Signed-off-by: Scott J Dickerson --- .../import-questionnaire-form.tsx | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/client/src/app/pages/assessment-management/import-questionnaire-form/import-questionnaire-form.tsx b/client/src/app/pages/assessment-management/import-questionnaire-form/import-questionnaire-form.tsx index abb3b72634..4e4e58f677 100644 --- a/client/src/app/pages/assessment-management/import-questionnaire-form/import-questionnaire-form.tsx +++ b/client/src/app/pages/assessment-management/import-questionnaire-form/import-questionnaire-form.tsx @@ -56,12 +56,13 @@ export const ImportQuestionnaireForm: React.FC< trigger, } = methods; - const onHandleSuccessfullQuestionnaireCreation = ( - response: Questionnaire - ) => { + const onHandleSuccessfulQuestionnaireCreation = (response: Questionnaire) => { onSaved(response); pushNotification({ - title: t("toastr.success.questionnaireCreated"), + title: t("toastr.success.createWhat", { + type: t("terms.questionnaire"), + what: response.name, + }), variant: "success", }); onSaved(); @@ -75,7 +76,7 @@ export const ImportQuestionnaireForm: React.FC< }; const { mutate: createQuestionnaire } = useCreateQuestionnaireMutation( - onHandleSuccessfullQuestionnaireCreation, + onHandleSuccessfulQuestionnaireCreation, onHandleFailedQuestionnaireCreation );