Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

O3-2822 Hide the tiles on the billing services management page #4

Merged
merged 1 commit into from
Feb 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/billable-services/dashboard/service-metrics.component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { ErrorState } from '@openmrs/esm-patient-common-lib';
import { useBillableServices } from '../billable-service.resource';
import Card from '../../metrics-cards/card.component';
import styles from '../../metrics-cards/metrics-cards.scss';
import { ExtensionSlot } from '@openmrs/esm-framework';

export default function ServiceMetrics() {
const { t } = useTranslation();
Expand Down Expand Up @@ -35,6 +36,7 @@ export default function ServiceMetrics() {
{cards.map((card) => (
<Card key={card.title} title={card.title} count={card.count} />
))}
<ExtensionSlot name="billing-home-tiles-slot" />
Copy link
Contributor

Choose a reason for hiding this comment

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

Thanks @ODORA0 , i think you could add a config to enable people who want to hide the tiles to do so

Copy link
Member Author

Choose a reason for hiding this comment

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

@CynthiaKamau Wouldn't having this as an extension still makes it configurable for any usecase?

Copy link
Contributor

Choose a reason for hiding this comment

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

yes it would, i guess people who dont want it can do it in their config

</section>
);
}
7 changes: 7 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ import BillingForm from './billing-form/billing-form.component';
import RequirePaymentModal from './modal/require-payment-modal.component';
import RootComponent from './root.component';
import VisitAttributeTags from './invoice/payments/visit-tags/visit-attribute.component';
import BillableServicesDashboard from './billable-services/dashboard/dashboard.component';
import ServiceMetrics from './billable-services/dashboard/service-metrics.component';

const moduleName = '@openmrs/esm-billing-app';

Expand Down Expand Up @@ -39,6 +41,11 @@ export const billingSummaryDashboardLink = getSyncLifecycle(
options,
);

export const billingServicesTiles = getSyncLifecycle(ServiceMetrics, {
featureName: 'billing-home-tiles',
moduleName,
});

export const billableServicesCardLink = getSyncLifecycle(BillableServicesCardLink, options);
export const billableServicesHome = getSyncLifecycle(BillableServiceHome, options);
export const billingCheckInForm = getSyncLifecycle(BillingCheckInForm, options);
Expand Down
5 changes: 5 additions & 0 deletions src/routes.json
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,11 @@
"component": "visitAttributeTags",
"slot": "patient-banner-tags-slot",
"order": 2
},
{
"name": "billing-home-tiles-ext",
"slot": "billing-home-tiles-slot",
"component": "billingServicesTiles"
}
]
}
Loading