diff --git a/frontend/src/components/consultant/EditConsultant.tsx b/frontend/src/components/consultant/EditConsultant.tsx index 1ca15e51..80453591 100644 --- a/frontend/src/components/consultant/EditConsultant.tsx +++ b/frontend/src/components/consultant/EditConsultant.tsx @@ -28,7 +28,7 @@ export const EditConsultant = () => { .filter(x => x.email === consultant.email) .find(x => x.slug !== params.id && x._id !== params.id)); - useEntityChangedToast(model?._id); + useEntityChangedToast(consultant._id); const docTitle = consultant._id ? 'consultantEdit' : 'consultantNew'; useDocumentTitle(docTitle, {name: `${consultant.firstName} ${consultant.name}`}); diff --git a/frontend/src/components/project/EditProject.tsx b/frontend/src/components/project/EditProject.tsx index a30c4257..932d0da3 100644 --- a/frontend/src/components/project/EditProject.tsx +++ b/frontend/src/components/project/EditProject.tsx @@ -43,7 +43,7 @@ export const EditProject = () => { const hasProjectMonths = useSelector((state: ConfacState) => state.projectsMonth.some(pm => pm.projectId === params.id)); const [needsSync, setNeedsSync] = useState<{consultant: boolean, client: boolean}>({consultant: false, client: false}); - useEntityChangedToast(model?._id); + useEntityChangedToast(project._id); const docTitle = consultant._id ? 'projectEdit' : 'projectNew'; useDocumentTitle(docTitle, {consultant: consultant.firstName, client: client.name}); diff --git a/frontend/src/components/project/EditProjectMonths.tsx b/frontend/src/components/project/EditProjectMonths.tsx index ce9b539f..1e2698c1 100644 --- a/frontend/src/components/project/EditProjectMonths.tsx +++ b/frontend/src/components/project/EditProjectMonths.tsx @@ -28,7 +28,7 @@ export const EditProjectMonths = () => { const model = useProjectsMonth(params.projectMonthId); const [projectMonth, setProjectMonth] = useState((model && model.details) || getNewProjectMonth()); - useEntityChangedToast(model?._id); + useEntityChangedToast(projectMonth._id); const docTitle = projectMonth._id ? 'projectMonthEdit' : 'projectMonthNew'; const consultantName = (model && model.consultantName) || '';