Skip to content

Commit

Permalink
Merge pull request #1631 from lucyjemutai/OHRI-1808
Browse files Browse the repository at this point in the history
OHRI-1808: Unable to launch Dispensing from the perspective
  • Loading branch information
kajambiya authored Aug 24, 2023
2 parents 86a1c60 + 85a09d3 commit a9dcb7d
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@ import React, { useEffect } from 'react';
import { attach, detach, ExtensionSlot } from '@openmrs/esm-framework';

const DispensingDashboard = () => {
useEffect(() => {
attach('ohri-dashboard-dispensing-slot', 'dispensing-dashboard');
return () => detach('ohri-dashboard-dispensing-slot', 'dispensing-dashboard');
}, []);

return <ExtensionSlot name="ohri-dashboard-dispensing-slot" state={{}} />;
};

Expand Down
8 changes: 7 additions & 1 deletion packages/esm-ohri-core-app/src/routes.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,13 @@
{
"name": "dispensing-ohri-dashboard-ext",
"slot": "dashboard-links-slot",
"component": "dispensingLink"
"component": "dispensingLink",
"meta": {
"title": "Dispensing",
"name": "dispensing",
"slot": "ohri-dispensing-dashboard-slot",
"isLink": true
}
},
{
"name": "ohri-dispensing-dashboard",
Expand Down

0 comments on commit a9dcb7d

Please sign in to comment.