diff --git a/src/dashboard/dispensing-dashboard.component.tsx b/src/dashboard/dispensing-dashboard.component.tsx index 7602349..f77493f 100644 --- a/src/dashboard/dispensing-dashboard.component.tsx +++ b/src/dashboard/dispensing-dashboard.component.tsx @@ -1,18 +1,19 @@ import React from 'react'; import { InlineNotification } from '@carbon/react'; -import Overlay from '../forms/overlay/overlay.component'; -import { PharmacyHeader } from '../pharmacy-header/pharmacy-header.component'; -import PrescriptionTabLists from '../prescriptions/prescription-tab-lists.component'; -import { useConfig } from '@openmrs/esm-framework'; import { useTranslation } from 'react-i18next'; +import { useConfig } from '@openmrs/esm-framework'; import { type PharmacyConfig } from '../config-schema'; +import { PharmacyHeader } from '../pharmacy-header/pharmacy-header.component'; +import Overlay from '../forms/overlay/overlay.component'; +import PrescriptionTabLists from '../prescriptions/prescription-tab-lists.component'; export default function DispensingDashboard() { const config = useConfig(); const { t } = useTranslation(); + if (config.dispenseBehavior.restrictTotalQuantityDispensed && config.dispenseBehavior.allowModifyingPrescription) { return ( -
+
+
{/* */} diff --git a/src/pharmacy-header/pharmacy-header.component.tsx b/src/pharmacy-header/pharmacy-header.component.tsx index 26b55bb..ed5f0ee 100644 --- a/src/pharmacy-header/pharmacy-header.component.tsx +++ b/src/pharmacy-header/pharmacy-header.component.tsx @@ -1,26 +1,26 @@ import React from 'react'; import { useTranslation } from 'react-i18next'; import { Calendar, Location } from '@carbon/react/icons'; -import { useConfig, useSession, formatDate } from '@openmrs/esm-framework'; -import PharmacyIllustration from './pharmacy-illustration.component'; +import { + formatDate, + useConfig, + useSession, + PageHeader, + PageHeaderContent, + PharmacyPictogram, +} from '@openmrs/esm-framework'; import { type PharmacyConfig } from '../config-schema'; import styles from './pharmacy-header.scss'; export const PharmacyHeader: React.FC = () => { const { t } = useTranslation(); - const userSession = useSession(); const config = useConfig(); + const userSession = useSession(); const userLocation = userSession?.sessionLocation?.display; return ( -
-
- -
-

{t('appName', config.appName)}

-

{t('home', 'Home')}

-
-
+ + } title={t('appName', config.appName)} />
@@ -30,6 +30,6 @@ export const PharmacyHeader: React.FC = () => { {formatDate(new Date(), { mode: 'standard' })}
-
+ ); }; diff --git a/src/pharmacy-header/pharmacy-header.scss b/src/pharmacy-header/pharmacy-header.scss index 52236ed..21d11f0 100644 --- a/src/pharmacy-header/pharmacy-header.scss +++ b/src/pharmacy-header/pharmacy-header.scss @@ -1,12 +1,12 @@ -@use '@carbon/styles/scss/spacing'; -@use '@carbon/styles/scss/type'; -@import '~@openmrs/esm-styleguide/src/vars'; +@use '@carbon/layout'; +@use '@carbon/type'; +@use '@openmrs/esm-styleguide/src/vars' as *; .header { @include type.type-style('body-compact-02'); - color: $text-02; - height: spacing.$spacing-12; background-color: $ui-02; + border-bottom: 1px solid $ui-03; + color: $text-02; display: flex; justify-content: space-between; } diff --git a/src/pharmacy-header/pharmacy-illustration.component.tsx b/src/pharmacy-header/pharmacy-illustration.component.tsx deleted file mode 100644 index 4e5f700..0000000 --- a/src/pharmacy-header/pharmacy-illustration.component.tsx +++ /dev/null @@ -1,30 +0,0 @@ -import React from 'react'; - -const PharmacyIllustration: React.FC = () => { - return ( - - - - - - - - - - - - - - - ); -}; - -export default PharmacyIllustration; diff --git a/src/prescriptions/prescription-tab-lists.component.tsx b/src/prescriptions/prescription-tab-lists.component.tsx index c4af7d7..291b6fd 100755 --- a/src/prescriptions/prescription-tab-lists.component.tsx +++ b/src/prescriptions/prescription-tab-lists.component.tsx @@ -1,12 +1,13 @@ import React, { useEffect, useState } from 'react'; -import { Tab, Tabs, TabList, TabPanels, Search, ComboBox } from '@carbon/react'; +import classNames from 'classnames'; +import { ComboBox, Search, Tab, Tabs, TabList, TabPanels } from '@carbon/react'; import { useTranslation } from 'react-i18next'; -import PrescriptionTabPanel from './prescription-tab-panel.component'; -import styles from './prescriptions.scss'; -import { useLocationForFiltering } from '../location/location.resource'; import { useConfig } from '@openmrs/esm-framework'; import { type SimpleLocation } from '../types'; import { type PharmacyConfig } from '../config-schema'; +import { useLocationForFiltering } from '../location/location.resource'; +import PrescriptionTabPanel from './prescription-tab-panel.component'; +import styles from './prescriptions.scss'; const PrescriptionTabLists: React.FC = () => { const { t } = useTranslation(); @@ -45,7 +46,7 @@ const PrescriptionTabLists: React.FC = () => { }; return ( -
+