diff --git a/client/src/app/pages/assessment/components/assessment-actions/components/dynamic-assessment-actions-row.tsx b/client/src/app/pages/assessment/components/assessment-actions/components/dynamic-assessment-actions-row.tsx index 5c928916e0..bf77aa71fc 100644 --- a/client/src/app/pages/assessment/components/assessment-actions/components/dynamic-assessment-actions-row.tsx +++ b/client/src/app/pages/assessment/components/assessment-actions/components/dynamic-assessment-actions-row.tsx @@ -190,6 +190,7 @@ const DynamicAssessmentActionsRow: FunctionComponent< assessmentId: assessment.id, applicationName: application?.name, applicationId: application?.id, + archetypeName: archetype?.name, archetypeId: archetype?.id, }).then(() => { createAssessment(); @@ -263,6 +264,7 @@ const DynamicAssessmentActionsRow: FunctionComponent< assessmentId: assessment.id, applicationName: application?.name, applicationId: application?.id, + archetypeName: archetype?.name, archetypeId: archetype?.id, }); }} diff --git a/client/src/app/pages/assessment/components/assessment-wizard/assessment-wizard.tsx b/client/src/app/pages/assessment/components/assessment-wizard/assessment-wizard.tsx index ed8e3140a7..9a06372c86 100644 --- a/client/src/app/pages/assessment/components/assessment-wizard/assessment-wizard.tsx +++ b/client/src/app/pages/assessment/components/assessment-wizard/assessment-wizard.tsx @@ -447,6 +447,7 @@ export const AssessmentWizard: React.FC = ({ assessmentId: assessment.id, applicationName: assessment.application?.name, applicationId: assessment.application?.id, + archetypeName: assessment.archetype?.name, archetypeId: assessment.archetype?.id, }); } else { @@ -455,6 +456,7 @@ export const AssessmentWizard: React.FC = ({ assessmentId: assessment.id, applicationName: assessment.application?.name, applicationId: assessment.application?.id, + archetypeName: assessment.archetype?.name, archetypeId: assessment.archetype?.id, }); } diff --git a/client/src/app/queries/assessments.ts b/client/src/app/queries/assessments.ts index b3796cbe07..8128ba75b4 100644 --- a/client/src/app/queries/assessments.ts +++ b/client/src/app/queries/assessments.ts @@ -107,7 +107,7 @@ export const useUpdateAssessmentMutation = ( }; export const useDeleteAssessmentMutation = ( - onSuccess?: (applicationName: string) => void, + onSuccess?: (name: string) => void, onError?: (err: AxiosError) => void ) => { const queryClient = useQueryClient(); @@ -117,6 +117,7 @@ export const useDeleteAssessmentMutation = ( assessmentId: number; applicationName?: string; applicationId?: number; + archetypeName?: string; archetypeId?: number; }) => { const deletedAssessment = deleteAssessment(args.assessmentId); @@ -138,7 +139,8 @@ export const useDeleteAssessmentMutation = ( return deletedAssessment; }, onSuccess: (_, args) => { - onSuccess && onSuccess(args?.applicationName || "Unknown"); + onSuccess && + onSuccess(args?.applicationName || args?.archetypeName || "Unknown"); }, onError: onError, });