Skip to content

Commit

Permalink
Merge pull request #1636 from samuelmale/OHRI-1824
Browse files Browse the repository at this point in the history
(chore) Properly setup patient commons and fix lint errors
  • Loading branch information
pirupius authored Sep 6, 2023
2 parents 7d44f94 + 718c47e commit 829833f
Show file tree
Hide file tree
Showing 5 changed files with 1,150 additions and 122 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
},
"devDependencies": {
"@openmrs/esm-framework": "next",
"@openmrs/esm-patient-common-lib": "next",
"@swc/cli": "^0.1.57",
"@swc/core": "^1.2.165",
"@swc/jest": "^0.2.20",
Expand Down
1 change: 0 additions & 1 deletion packages/esm-commons-lib/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@
"react-i18next": "^11.18.6"
},
"devDependencies": {
"@openmrs/esm-patient-common-lib": "5.x",
"enzyme": "^3.11.0",
"enzyme-adapter-react-16": "^1.15.6",
"webpack": "^5.74.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,11 +76,7 @@ function FormRenderTest() {
};

const formValidation = () => {
handleFormValidation(schemaInput, dataTypeToRenderingMap).then((response) => {
const [errorsArray, warningsArray] = response;
console.log('errors:', errorsArray);
console.log('warnings:', warningsArray);
});
handleFormValidation(schemaInput, dataTypeToRenderingMap);
};

const handleFormSubmission = (e) => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
import React, { useEffect, useState } from 'react';
import { useTranslation } from 'react-i18next';
import { OHRIProgrammeSummaryTiles, getReportingCohort } from '@ohri/openmrs-esm-ohri-commons-lib';
import { clientsEnrolledToCare } from '../../constants';
import { getTotalPregnantWomen } from '../../api/api';
import { getTotalDeliveries } from '../../api/api';
import { getHivExposedInfants } from '../../api/api';
import { OHRIProgrammeSummaryTiles } from '@ohri/openmrs-esm-ohri-commons-lib';
import { getTotalDeliveries, getHivExposedInfants, getTotalPregnantWomen } from '../../api/api';

function MaternalChildSummaryTiles({ launchWorkSpace }) {
const { t } = useTranslation();
Expand All @@ -13,23 +10,23 @@ function MaternalChildSummaryTiles({ launchWorkSpace }) {
const [totalDeliveries, setTotalDeliveries] = useState(0);
const [hivExposedInfants, setHivExposedInfants] = useState(0);

useEffect(() => {
getTotalPregnantWomen().then(count => {
setTotalPregnantWomen(count);
});
}, []);
useEffect(() => {
getTotalPregnantWomen().then((count) => {
setTotalPregnantWomen(count);
});
}, []);

useEffect(() => {
getTotalDeliveries().then(count => {
setTotalDeliveries(count);
});
}, []);
useEffect(() => {
getTotalDeliveries().then((count) => {
setTotalDeliveries(count);
});
}, []);

useEffect(() => {
getHivExposedInfants().then(count => {
setHivExposedInfants(count);
});
}, []);
useEffect(() => {
getHivExposedInfants().then((count) => {
setHivExposedInfants(count);
});
}, []);

const tiles = [
{
Expand Down
Loading

0 comments on commit 829833f

Please sign in to comment.