diff --git a/packages/esm-patient-common-lib/src/dashboards/DashboardExtension.tsx b/packages/esm-patient-common-lib/src/dashboards/DashboardExtension.tsx index e91d2bdfe7..176d66b4b9 100644 --- a/packages/esm-patient-common-lib/src/dashboards/DashboardExtension.tsx +++ b/packages/esm-patient-common-lib/src/dashboards/DashboardExtension.tsx @@ -3,7 +3,21 @@ import classNames from 'classnames'; import last from 'lodash-es/last'; import { useTranslation } from 'react-i18next'; import { useLocation } from 'react-router-dom'; -import { ConfigurableLink } from '@openmrs/esm-framework'; +import { + ConfigurableLink, + ActivityIcon, + ShoppingCartIcon, + MedicationIcon, + ChartAverageIcon, + CalendarHeatMapIcon, + WarningIcon, + ListCheckedIcon, + DocumentAttachmentIcon, + TableIcon, + EventScheduleIcon, +} from '@openmrs/esm-framework'; +import { Report } from '@carbon/react/icons'; +import styles from './dashboard-extension.scss'; export interface DashboardExtensionProps { path: string; @@ -22,13 +36,47 @@ export const DashboardExtension = ({ const location = useLocation(); const navLink = useMemo(() => decodeURIComponent(last(location.pathname.split('/'))), [location.pathname]); + const menuIcon = (title: string) => { + switch (title) { + case 'Patient Summary': + return ; + case 'Vitals & Biometrics': + return ; + case 'Orders': + return ; + case 'Medications': + return ; + case 'Results': + return ; + case 'Visits': + return ; + case 'Allergies': + return ; + case 'Conditions': + return ; + case 'Attachments': + return ; + case 'Programs': + return ; + case 'Appointments': + return ; + default: + return null; + } + }; + + const renderIcon = menuIcon(title); + return (
- {t(title)} + + {renderIcon} + {t(title)} +
); diff --git a/packages/esm-patient-common-lib/src/dashboards/dashboard-extension.scss b/packages/esm-patient-common-lib/src/dashboards/dashboard-extension.scss new file mode 100644 index 0000000000..d99be391a0 --- /dev/null +++ b/packages/esm-patient-common-lib/src/dashboards/dashboard-extension.scss @@ -0,0 +1,8 @@ +.menu { + display: flex; + align-items: center; +} + +.icon { + margin-right: 0.5rem; +} diff --git a/packages/esm-patient-common-lib/src/dashboards/dashboardextension.scss b/packages/esm-patient-common-lib/src/dashboards/dashboardextension.scss deleted file mode 100644 index e69de29bb2..0000000000