diff --git a/src/locales/enUs/translations/scheduling/index.ts b/src/locales/enUs/translations/scheduling/index.ts index b6cd4f627a..1fd39fe511 100644 --- a/src/locales/enUs/translations/scheduling/index.ts +++ b/src/locales/enUs/translations/scheduling/index.ts @@ -17,6 +17,7 @@ export default { routine: 'Routine', walkUp: 'Walk Up', }, + successfullyCreated: 'Appointment successfully created.', errors: { patientRequired: 'Patient is required.', errorCreatingAppointment: 'Error Creating Appointment!', diff --git a/src/scheduling/appointments/new/NewAppointment.tsx b/src/scheduling/appointments/new/NewAppointment.tsx index b0dddfc7a4..bde5a108d5 100644 --- a/src/scheduling/appointments/new/NewAppointment.tsx +++ b/src/scheduling/appointments/new/NewAppointment.tsx @@ -7,7 +7,7 @@ import { useDispatch } from 'react-redux' import Appointment from 'model/Appointment' import addMinutes from 'date-fns/addMinutes' import { isBefore } from 'date-fns' -import { Button } from '@hospitalrun/components' +import { Button, Toast } from '@hospitalrun/components' import useAddBreadcrumbs from '../../../breadcrumbs/useAddBreadcrumbs' import { createAppointment } from '../appointment-slice' import AppointmentDetailForm from '../AppointmentDetailForm' @@ -42,6 +42,11 @@ const NewAppointment = () => { const onNewAppointmentSaveSuccess = (newAppointment: Appointment) => { history.push(`/appointments/${newAppointment.id}`) + Toast( + 'success', + t('Success!'), + `${t('scheduling.appointment.successfullyCreated')} ${newAppointment.id}`, + ) } const onSave = () => {