Skip to content

Commit

Permalink
(Chore) Refactor Service metrics extension slot (#7)
Browse files Browse the repository at this point in the history
* (Chore) Refactor Service metrics extension slot

* PR comments

* PR comments

* PR comments

* PR comments
  • Loading branch information
ODORA0 authored Feb 15, 2024
1 parent 53e14c4 commit ee49206
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 9 deletions.
4 changes: 2 additions & 2 deletions src/billable-services/dashboard/dashboard.component.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import React from 'react';
import BillableServices from '../billable-services.component';
import ServiceMetrics from './service-metrics.component';
import styles from './dashboard.scss';
import { ExtensionSlot } from '@openmrs/esm-framework';

export default function BillableServicesDashboard() {
return (
<main className={styles.container}>
<ServiceMetrics />
<ExtensionSlot name="billing-home-tiles-slot" />
<main className={styles.servicesTableContainer}>
<BillableServices />
</main>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ export default function ServiceMetrics() {
{cards.map((card) => (
<Card key={card.title} title={card.title} count={card.count} />
))}
<ExtensionSlot name="billing-home-tiles-slot" />
</section>
);
}
6 changes: 1 addition & 5 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,10 @@ 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);
export const serviceMetrics = getSyncLifecycle(ServiceMetrics, options);
export const billingForm = getSyncLifecycle(BillingForm, options);
export const billingPatientSummary = getSyncLifecycle(BillHistory, options);
export const requirePaymentModal = getSyncLifecycle(RequirePaymentModal, options);
Expand Down
2 changes: 1 addition & 1 deletion src/routes.json
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@
{
"name": "billing-home-tiles-ext",
"slot": "billing-home-tiles-slot",
"component": "billingServicesTiles"
"component": "serviceMetrics"
}
]
}

0 comments on commit ee49206

Please sign in to comment.