Skip to content

Commit

Permalink
Fix pick patient error (#217)
Browse files Browse the repository at this point in the history
Fix pick patient error (#217)
  • Loading branch information
jabahum authored Apr 17, 2024
1 parent 2dab85b commit 77f907a
Show file tree
Hide file tree
Showing 16 changed files with 597 additions and 1,824 deletions.
11 changes: 3 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"packages/*"
],
"scripts": {
"start": "openmrs develop --backend http://194.163.171.253:8282 --sources 'packages/esm-*-app'",
"start": "openmrs develop",
"ci:publish": "lerna publish from-package --yes",
"ci:prepublish": "lerna publish from-package --no-git-reset --yes --dist-tag next",
"release": "lerna version --no-git-tag-version",
Expand All @@ -34,15 +34,10 @@
"swr": "^2.1.1",
"zod": "^3.22.4"
},
"peerDependencies": {
"@openmrs/openmrs-form-engine-lib": "5.x"
},
"devDependencies": {
"@carbon/react": "^1.14.0",
"@ohri/openmrs-esm-ohri-commons-lib": "next",
"@openmrs/esm-framework": "next",
"@openmrs/esm-patient-common-lib": "next",
"@openmrs/esm-styleguide": "^5.1.0",
"@openmrs/esm-styleguide": "next",
"@swc/cli": "^0.1.57",
"@swc/core": "^1.3.6",
"@swc/jest": "^0.2.23",
Expand Down Expand Up @@ -100,4 +95,4 @@
"@carbon/react": "1.13.0"
},
"packageManager": "yarn@3.2.4"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import { mockCareProgramsResponse, mockEnrolledProgramsResponse, mockLocationsRe
import { createProgramEnrollment, updateProgramEnrollment } from './programs.resource';
import ProgramsForm from './programs-form.component';
import { mockPatient } from '../../../../__mocks__/patient.mock';
import { CloseWorkspaceOptions } from '@openmrs/esm-patient-common-lib';

const testProps = {
closeWorkspace: jest.fn(),
Expand Down Expand Up @@ -176,5 +177,13 @@ describe('ProgramsForm', () => {
});

function renderProgramsForm(programEnrollmentUuidToEdit?: string) {
render(<ProgramsForm {...testProps} programEnrollmentId={programEnrollmentUuidToEdit} />);
render(
<ProgramsForm
closeWorkspaceWithSavedChanges={function (closeWorkspaceOptions?: CloseWorkspaceOptions): void {
throw new Error('Function not implemented.');
}}
{...testProps}
programEnrollmentId={programEnrollmentUuidToEdit}
/>,
);
}
Original file line number Diff line number Diff line change
Expand Up @@ -219,15 +219,6 @@ function ActiveVisitsReceptionTable() {
<p className={styles.content}>{t('noPatientsToDisplay', 'No patients to display')}</p>
<p className={styles.helper}>{t('checkFilters', 'Check the filters above')}</p>
</div>
<p className={styles.separator}>{t('or', 'or')}</p>
<Button
kind="ghost"
size="sm"
renderIcon={(props) => <Add size={16} {...props} />}
onClick={() => setShowOverlay(true)}
>
{t('addPatientToList', 'Add patient to list')}
</Button>
</Tile>
</div>
) : null}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -254,15 +254,6 @@ const ActiveVisitsTable: React.FC<ActiveVisitsTableProps> = ({ status }) => {
<p className={styles.content}>{t('noPatientsToDisplay', 'No patients to display')}</p>
<p className={styles.helper}>{t('checkFilters', 'Check the filters above')}</p>
</div>
<p className={styles.separator}>{t('or', 'or')}</p>
<Button
kind="ghost"
size="sm"
renderIcon={(props) => <Add size={16} {...props} />}
onClick={() => setShowOverlay(true)}
>
{t('addPatientToList', 'Add patient to list')}
</Button>
</Tile>
</div>
) : null}
Expand Down
Loading

0 comments on commit 77f907a

Please sign in to comment.