diff --git a/packages/esm-appointments-app/src/header/appointments-header.component.tsx b/packages/esm-appointments-app/src/header/appointments-header.component.tsx
index 69cbc521a0..8c117cedbd 100644
--- a/packages/esm-appointments-app/src/header/appointments-header.component.tsx
+++ b/packages/esm-appointments-app/src/header/appointments-header.component.tsx
@@ -1,32 +1,18 @@
-import React, { useCallback, useMemo } from 'react';
+import React from 'react';
import dayjs from 'dayjs';
import { useTranslation } from 'react-i18next';
-import { MultiSelect } from '@carbon/react';
import { PageHeader, PageHeaderContent, AppointmentsPictogram, OpenmrsDatePicker } from '@openmrs/esm-framework';
import { omrsDateFormat } from '../constants';
-import { useAppointmentServices } from '../hooks/useAppointmentService';
-import { useAppointmentsStore, setSelectedDate, setAppointmentServiceTypes } from '../store';
+import { useAppointmentsStore, setSelectedDate } from '../store';
import styles from './appointments-header.scss';
interface AppointmentHeaderProps {
title: string;
- showServiceTypeFilter?: boolean;
}
-const AppointmentsHeader: React.FC
= ({ title, showServiceTypeFilter }) => {
+const AppointmentsHeader: React.FC = ({ title }) => {
const { t } = useTranslation();
- const { selectedDate, appointmentServiceTypes } = useAppointmentsStore();
- const { serviceTypes } = useAppointmentServices();
-
- const handleChangeServiceTypeFilter = useCallback(({ selectedItems }) => {
- const selectedUuids = selectedItems.map((item) => item.id);
- setAppointmentServiceTypes(selectedUuids);
- }, []);
-
- const serviceTypeOptions = useMemo(
- () => serviceTypes?.map((item) => ({ id: item.uuid, label: item.name })) ?? [],
- [serviceTypes],
- );
+ const { selectedDate } = useAppointmentsStore();
return (
@@ -39,17 +25,6 @@ const AppointmentsHeader: React.FC = ({ title, showServi
onChange={(date) => setSelectedDate(dayjs(date).startOf('day').format(omrsDateFormat))}
value={dayjs(selectedDate).toDate()}
/>
- {showServiceTypeFilter && (
- (item ? item.label : '')}
- label={t('filterAppointmentsByServiceType', 'Filter appointments by service type')}
- onChange={handleChangeServiceTypeFilter}
- type="inline"
- selectedItems={serviceTypeOptions.filter((item) => appointmentServiceTypes.includes(item.id))}
- />
- )}