Skip to content

Commit

Permalink
Add shortcult link to 2.x
Browse files Browse the repository at this point in the history
  • Loading branch information
CynthiaKamau committed Jul 16, 2024
1 parent 79d4a06 commit 8d50ed5
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 0 deletions.
15 changes: 15 additions & 0 deletions src/app-menu-navigation/app-menu-navigation.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import { ConfigurableLink } from "@openmrs/esm-framework";
import React from "react";
import { useTranslation } from "react-i18next";
import { versionTwoPath } from "../constants";

const VersionTwoNavigationButton = () => {
const { t } = useTranslation();
return (
<ConfigurableLink to={versionTwoPath}>
{t("rwandaEmr2", "Rwanda EMR 2.X")}
</ConfigurableLink>
);
};

export default VersionTwoNavigationButton;
1 change: 1 addition & 0 deletions src/constants.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export const versionTwoPath = `/openmrs/`;
6 changes: 6 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import { createOHRIPatientChartSideNavLink } from "@ohri/openmrs-esm-ohri-common
import { createDashboardLink } from "@openmrs/esm-patient-common-lib";
import { dashboardMeta } from "./dashboard.meta";
import AllEncounters from "./encounters/encounters.component";
import versionTwoNavigationButton from "./app-menu-navigation/app-menu-navigation";

const moduleName = "@ohri/openmrs-esm-rwanda-app";

Expand Down Expand Up @@ -59,3 +60,8 @@ export const encountersDashboardLink = getSyncLifecycle(
);

export const allEncounters = getSyncLifecycle(AllEncounters, options);

export const versionTwoNavLink = getSyncLifecycle(
versionTwoNavigationButton,
options
);
7 changes: 7 additions & 0 deletions src/routes.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,13 @@
"name": "care-and-treatment-ext",
"slot": "care-and-treatment-slot",
"component": "careAndTreatmentDashboard"
},
{
"name": "version-two-link",
"slot": "app-menu-slot",
"component": "versionTwoNavLink",
"online": true,
"offline": true
}
]
}

0 comments on commit 8d50ed5

Please sign in to comment.