Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
lucyjemutai committed Jul 17, 2024
1 parent 5aa7058 commit 6e0a60a
Show file tree
Hide file tree
Showing 8 changed files with 44 additions and 37 deletions.
12 changes: 0 additions & 12 deletions packages/esm-ptracker-report-app/app-menu-navigation.component.tsx

This file was deleted.

20 changes: 0 additions & 20 deletions packages/esm-ptracker-report-app/routes.json

This file was deleted.

1 change: 1 addition & 0 deletions packages/esm-ptracker-report-app/src/constants.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export const ptrackerdashboardPath = `/openmrs/reportingui/reportsapp/home.page`;
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { getAsyncLifecycle } from '@openmrs/esm-framework';

import { getSyncLifecycle } from '@openmrs/esm-framework';
import ptrackerdashboardPath from './ptracker-report-app-menu-link.component';
export const importTranslation = require.context('../translations', false, /.json$/, 'lazy');

const moduleName = '@ohri/openmrs-esm-ohri-ptracker-report-app';
Expand All @@ -11,6 +11,4 @@ const options = {

export function startupApp() {}

export const PtrackerReport = getAsyncLifecycle(() => import('./root'), options);

export const PtrackerReportLink = getAsyncLifecycle(() => import('./app-menu-navigation.component'), options);
export const versionTwoNavLink = getSyncLifecycle(ptrackerdashboardPath, options);
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import { ConfigurableLink } from '@openmrs/esm-framework';
import React from 'react';
import { useTranslation } from 'react-i18next';
import { ptrackerdashboardPath } from './constants';

const PtrackerDashboardNavigation = () => {
const { t } = useTranslation();

return <ConfigurableLink to={ptrackerdashboardPath}>{t('ptrackerReports', 'Ptracker Reports')}</ConfigurableLink>;
};

export default PtrackerDashboardNavigation;
File renamed without changes.
23 changes: 23 additions & 0 deletions packages/esm-ptracker-report-app/src/routes.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"$schema": "https://json.openmrs.org/routes.schema.json",
"backendDependencies": {
"fhir2": "^1.2.0",
"webservices.rest": "^2.24.0"
},
"pages": [
{
"component": "PtrackerReport",
"route": "ptracker-report"
}
],
"extensions": [
{
"name": "version-two-link",
"slot": "app-menu-slot",
"component": "versionTwoNavLink",
"online": true,
"offline": true
}
]
}

5 changes: 5 additions & 0 deletions packages/esm-ptracker-report-app/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"extends": "../../tsconfig.json",
"include": ["src/**/*"],
"exclude": ["src/**/*.test.tsx", "src/**/*.outdated.tsx"]
}

0 comments on commit 6e0a60a

Please sign in to comment.