Skip to content

Commit

Permalink
O3-2849: Appointments: Fix updates/mutations when adding new appointm…
Browse files Browse the repository at this point in the history
…ents
  • Loading branch information
mogoodrich committed Feb 22, 2024
1 parent 4d8ab44 commit 4d78a4b
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ const AppointmentsForm: React.FC<AppointmentsFormProps> = ({
context,
closeWorkspace,
}) => {
const { mutate: mutateAppointments } = useMutateAppointments();
const { mutateAppointments } = useMutateAppointments();
const editedAppointmentTimeFormat = new Date(appointment?.startDateTime).getHours() >= 12 ? 'PM' : 'AM';
const defaultTimeFormat = appointment?.startDateTime
? editedAppointmentTimeFormat
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export function useMutateAppointments() {
);

return {
mutate: mutateAppointments,
mutateAppointments,
};
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ interface ActionMenuProps {
export const ActionsMenu = ({ appointment, useBahmniUI }: ActionMenuProps) => {
const { t } = useTranslation();
const { bahmniAppointmentsUiBaseUrl } = useConfig();
const { mutate: mutateAppointments } = useMutateAppointments();
const { mutateAppointments } = useMutateAppointments();

const { status } = appointment;
const disableActions = status === 'Completed' || status === 'Missed' || status === 'Cancelled';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ type RenderStatusProps = {
};

const RenderStatus = ({ status, t, appointmentUuid }: RenderStatusProps) => {
const { mutate: mutateAppointments } = useMutateAppointments();
const { mutateAppointments } = useMutateAppointments();
switch (status) {
case 'Completed':
return (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ interface ChangeStatusDialogProps {

const CheckInAppointmentModal: React.FC<ChangeStatusDialogProps> = ({ closeCheckInModal, appointmentUuid }) => {
const { t } = useTranslation();
const { mutate: mutateAppointments } = useMutateAppointments();
const { mutateAppointments } = useMutateAppointments();
const [checkInTime, setCheckInTime] = useState(dayjs(new Date()).format('hh:mm'));
const [isSubmitting, setIsSubmitting] = useState(false);

Expand Down

1 comment on commit 4d78a4b

@mogoodrich
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@denniskigen follow up commit for a nit of yours I agreed with and forgot to add...

Please sign in to comment.