@kenyaemr/esm-facility-dashboard-app 5.4.2-pre.2358 → 5.4.2-pre.2364
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.turbo/turbo-build.log +7 -7
- package/dist/197.js +1 -1
- package/dist/294.js +1 -1
- package/dist/300.js +1 -1
- package/dist/492.js +1 -0
- package/dist/492.js.map +1 -0
- package/dist/kenyaemr-esm-facility-dashboard-app.js +1 -1
- package/dist/kenyaemr-esm-facility-dashboard-app.js.buildmanifest.json +36 -36
- package/dist/main.js +1 -1
- package/dist/main.js.map +1 -1
- package/dist/routes.json +1 -1
- package/package.json +1 -1
- package/src/air/air.component.tsx +21 -0
- package/src/config-schema.ts +6 -0
- package/src/index.ts +4 -0
- package/src/reports/reports.component.tsx +22 -0
- package/src/routes.json +9 -0
- package/translations/am.json +2 -0
- package/translations/en.json +2 -0
- package/translations/sw.json +2 -0
- package/dist/972.js +0 -1
- package/dist/972.js.map +0 -1
package/dist/routes.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"$schema":"https://json.openmrs.org/routes.schema.json","backendDependencies":{"kenyaemrCharts":"^1.6.7"},"extensions":[{"component":"surveillanceDashboardLink","name":"surveillance-dashboard-link","slot":"facility-dashboard-left-panel-slot"},{"component":"aboveSiteDashboardLink","name":"above-site-dashboard-link","slot":"facility-dashboard-left-panel-slot"}],"workspaces":[],"modals":[],"pages":[{"component":"root","route":"facility-dashboard"}],"version":"5.4.2-pre.
|
|
1
|
+
{"$schema":"https://json.openmrs.org/routes.schema.json","backendDependencies":{"kenyaemrCharts":"^1.6.7"},"extensions":[{"component":"surveillanceDashboardLink","name":"surveillance-dashboard-link","slot":"facility-dashboard-left-panel-slot"},{"component":"aboveSiteDashboardLink","name":"above-site-dashboard-link","slot":"facility-dashboard-left-panel-slot"},{"component":"airDashboardLink","name":"air-dashboard-link","slot":"facility-dashboard-left-panel-slot"},{"component":"reportsboardLink","name":"reports-dashboard-link","slot":"facility-dashboard-left-panel-slot"}],"workspaces":[],"modals":[],"pages":[{"component":"root","route":"facility-dashboard"}],"version":"5.4.2-pre.2364"}
|
package/package.json
CHANGED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { ConfigurableLink, useConfig } from '@openmrs/esm-framework';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { useTranslation } from 'react-i18next';
|
|
4
|
+
import { FacilityDashboardConfigObject } from '../config-schema';
|
|
5
|
+
|
|
6
|
+
const Air = () => {
|
|
7
|
+
const { t } = useTranslation();
|
|
8
|
+
const { showAirAndReportLinks } = useConfig<FacilityDashboardConfigObject>();
|
|
9
|
+
const link = '/openmrs/facilityreporting/facilityReportingHome.page';
|
|
10
|
+
|
|
11
|
+
if (!showAirAndReportLinks) {
|
|
12
|
+
return null;
|
|
13
|
+
}
|
|
14
|
+
return (
|
|
15
|
+
<ConfigurableLink to={link} className={`cds--side-nav__link`}>
|
|
16
|
+
{t('air', 'Air')}
|
|
17
|
+
</ConfigurableLink>
|
|
18
|
+
);
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
export default Air;
|
package/src/config-schema.ts
CHANGED
|
@@ -6,8 +6,14 @@ export const configSchema = {
|
|
|
6
6
|
_description: 'Facility dashboard link for superset analytics',
|
|
7
7
|
_default: 'https://odoosuperset.kenyahmis.org/superset/dashboard/11/',
|
|
8
8
|
},
|
|
9
|
+
showAirAndReportLinks: {
|
|
10
|
+
_type: Type.Boolean,
|
|
11
|
+
_description: 'Show Air and Report links on facility dashboard',
|
|
12
|
+
_default: false,
|
|
13
|
+
},
|
|
9
14
|
};
|
|
10
15
|
|
|
11
16
|
export type FacilityDashboardConfigObject = {
|
|
12
17
|
facilityDashboardAboveSiteUrl: string;
|
|
18
|
+
showAirAndReportLinks: boolean;
|
|
13
19
|
};
|
package/src/index.ts
CHANGED
|
@@ -3,6 +3,8 @@ import { configSchema } from './config-schema';
|
|
|
3
3
|
import { moduleName } from './constants';
|
|
4
4
|
import Root from './root.component';
|
|
5
5
|
import { createLeftPanelLink } from './left-pannel-link.component';
|
|
6
|
+
import Air from './air/air.component';
|
|
7
|
+
import Reports from './reports/reports.component';
|
|
6
8
|
|
|
7
9
|
const options = {
|
|
8
10
|
featureName: 'esm-facility-dashboard-app',
|
|
@@ -26,3 +28,5 @@ export const aboveSiteDashboardLink = getSyncLifecycle(
|
|
|
26
28
|
createLeftPanelLink({ title: 'Above site Dashboard', name: 'above-site' }),
|
|
27
29
|
options,
|
|
28
30
|
);
|
|
31
|
+
export const airDashboardLink = getSyncLifecycle(Air, options);
|
|
32
|
+
export const reportsboardLink = getSyncLifecycle(Reports, options);
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { ConfigurableLink, useConfig } from '@openmrs/esm-framework';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { useTranslation } from 'react-i18next';
|
|
4
|
+
import { FacilityDashboardConfigObject } from '../config-schema';
|
|
5
|
+
|
|
6
|
+
const Reports = () => {
|
|
7
|
+
const { t } = useTranslation();
|
|
8
|
+
const { showAirAndReportLinks } = useConfig<FacilityDashboardConfigObject>();
|
|
9
|
+
|
|
10
|
+
const link = '/openmrs/kenyaemr/reports/reportsHome.page';
|
|
11
|
+
|
|
12
|
+
if (!showAirAndReportLinks) {
|
|
13
|
+
return null;
|
|
14
|
+
}
|
|
15
|
+
return (
|
|
16
|
+
<ConfigurableLink to={link} className={`cds--side-nav__link`}>
|
|
17
|
+
{t('Reports', 'Reports')}
|
|
18
|
+
</ConfigurableLink>
|
|
19
|
+
);
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
export default Reports;
|
package/src/routes.json
CHANGED
|
@@ -13,6 +13,15 @@
|
|
|
13
13
|
"component": "aboveSiteDashboardLink",
|
|
14
14
|
"name": "above-site-dashboard-link",
|
|
15
15
|
"slot": "facility-dashboard-left-panel-slot"
|
|
16
|
+
},{
|
|
17
|
+
"component": "airDashboardLink",
|
|
18
|
+
"name": "air-dashboard-link",
|
|
19
|
+
"slot": "facility-dashboard-left-panel-slot"
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
"component": "reportsboardLink",
|
|
23
|
+
"name": "reports-dashboard-link",
|
|
24
|
+
"slot": "facility-dashboard-left-panel-slot"
|
|
16
25
|
}
|
|
17
26
|
],
|
|
18
27
|
"workspaces": [],
|
package/translations/am.json
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"aboveSiteDashboard": "ከጣቢያ በላይ ዳሽቦርድ",
|
|
3
3
|
"aboveSiteFacilityDashboard": "ከጣቢያ በላይ የተቋም ዳሽቦርድ",
|
|
4
|
+
"air": "Air",
|
|
4
5
|
"cumulativeProgressDelayedEAC": "ዘግይቶ EACን በመፍታት የተጠራቀመ ሂደት",
|
|
5
6
|
"cumulativeProgressDnapcrPending": "የHEI PCR ውጤቶችን በመፍታት የተጠራቀመ ሂደት",
|
|
6
7
|
"cumulativeProgressHeiFinalOutcomes": "የHEI የመጨረሻ ውጤትን በመፍታት የተጠራቀመ ሂደት",
|
|
@@ -55,6 +56,7 @@
|
|
|
55
56
|
"progressInAddressingLinkedToArt": "ከኤአርቲ ጋር ያለውን ትስስር በመፍታት ላይ ያለው ሂደት",
|
|
56
57
|
"progressTracker": "የሂደት መከታተያ",
|
|
57
58
|
"realTimeGapReview": "የእውነተኛ ጊዜ ክፍተት ግምገማ",
|
|
59
|
+
"Reports": "Reports",
|
|
58
60
|
"startDate": "የመጀመሪያ ቀን",
|
|
59
61
|
"surveillance": "ክትትል",
|
|
60
62
|
"surveillanceSummary": "የክትትል ማጠቃለያ",
|
package/translations/en.json
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"aboveSiteDashboard": "Above site facility Dashboard",
|
|
3
3
|
"aboveSiteFacilityDashboard": "Above site facility Dashboard",
|
|
4
|
+
"air": "Air",
|
|
4
5
|
"cumulativeProgressDelayedEAC": "Cumulative Progress in addressing delayed EAC",
|
|
5
6
|
"cumulativeProgressDnapcrPending": "Cumulative Progress in addressing HEI PCR results",
|
|
6
7
|
"cumulativeProgressHeiFinalOutcomes": "Cumulative progress in addressing HEI final outcome",
|
|
@@ -55,6 +56,7 @@
|
|
|
55
56
|
"progressInAddressingLinkedToArt": "Progress in addressing Linkage to ART",
|
|
56
57
|
"progressTracker": "Progress tracker",
|
|
57
58
|
"realTimeGapReview": "Realtime gap review",
|
|
59
|
+
"Reports": "Reports",
|
|
58
60
|
"startDate": "Start date",
|
|
59
61
|
"surveillance": "Surveillance",
|
|
60
62
|
"surveillanceSummary": "Surveillance Summary",
|
package/translations/sw.json
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"aboveSiteDashboard": "Above Site Dashboard",
|
|
3
3
|
"aboveSiteFacilityDashboard": "Above site facility Dashboard",
|
|
4
|
+
"air": "Air",
|
|
4
5
|
"cumulativeProgressDelayedEAC": "Cumulative Progress in addressing delayed EAC",
|
|
5
6
|
"cumulativeProgressDnapcrPending": "Cumulative Progress in addressing HEI PCR results",
|
|
6
7
|
"cumulativeProgressHeiFinalOutcomes": "Cumulative progress in addressing HEI final outcome",
|
|
@@ -55,6 +56,7 @@
|
|
|
55
56
|
"progressInAddressingLinkedToArt": "Progress in addressing Linkage to ART",
|
|
56
57
|
"progressTracker": "Progress tracker",
|
|
57
58
|
"realTimeGapReview": "Realtime gap review",
|
|
59
|
+
"Reports": "Reports",
|
|
58
60
|
"startDate": "Start date",
|
|
59
61
|
"surveillance": "Surveillance",
|
|
60
62
|
"surveillanceSummary": "Surveillance Summary",
|