-
Notifications
You must be signed in to change notification settings - Fork 40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
OHRI-1857 restrict edit to latest mch visit #1772
Draft
pirupius
wants to merge
14
commits into
dev
Choose a base branch
from
OHRI-1857/restrict-edit-to-latest-mch-visit
base: dev
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
f8234a8
OHRI-1857 : Users should only be able to edit the latest MNCH visit/e…
Herobiam 1f40173
changed from checking the actionItem index to label
Herobiam f5f5bc2
removed logs
Herobiam 3fcebdf
added an optional prop on the encounter list component to disable edit
Herobiam 4eb3b10
fixed lint
Herobiam ad8e7f7
OHRI-1857 : Users should only be able to edit the latest MNCH visit/e…
Herobiam 898946a
changed from checking the actionItem index to label
Herobiam ec8d418
removed logs
Herobiam a932fce
added an optional prop on the encounter list component to disable edit
Herobiam 9f91a91
fixed lint
Herobiam ed51836
added mock for test
Herobiam 53ca360
OHRI-1857 : Users should only be able to edit the latest MNCH visit/e…
Herobiam 0c48e2f
added an optional prop on the encounter list component to disable edit
Herobiam 3f3acf5
changed the check from label to the action index
Herobiam File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
import { OpenmrsEncounter } from '@openmrs/openmrs-form-engine-lib/src/api/types'; | ||
export const mockEncounters: OpenmrsEncounter[] = [ | ||
{ | ||
uuid: '2d8969e4-0b6b-4091-b918-edea29ccbc6c', | ||
encounterDatetime: '2023-10-24T12:38:00.000+0000', | ||
encounterType: '', | ||
location: '', | ||
patient: '', | ||
encounterProviders: [ | ||
{ | ||
uuid: '35ebbdfa-0eeb-44b8-8d00-5548ad5f0190', | ||
provider: { | ||
uuid: 'e3b1f354-da0e-40e3-b77b-493d8e86db3c', | ||
name: 'Ff8e2 b400A Fcd3C', | ||
}, | ||
}, | ||
], | ||
obs: [], | ||
form: { | ||
uuid: '60252155-f40d-3084-9d8e-5b7c8fafc68a', | ||
name: 'Labour & Delivery Form', | ||
}, | ||
}, | ||
{ | ||
uuid: 'e61810e9-cab0-403d-aea0-a08c66d17317', | ||
encounterDatetime: '2023-09-25T14:00:54.000+0000', | ||
encounterType: '', | ||
location: '', | ||
patient: '', | ||
encounterProviders: [], | ||
obs: [], | ||
form: { | ||
uuid: '2105c8ae-1935-375c-a7cc-e2ca04c8f6be', | ||
name: 'Mother - Postnatal Form', | ||
}, | ||
}, | ||
{ | ||
uuid: '65f7acf8-c610-46d2-a836-142776365cf7', | ||
encounterDatetime: '2023-09-25T13:58:47.000+0000', | ||
encounterType: { | ||
uuid: '2678423c-0523-4d76-b0da-18177b439eed', | ||
display: 'Labor and Delivery', | ||
name: 'Labor and Delivery', | ||
description: 'Labor and delivery visit by a mother', | ||
retired: false, | ||
links: [ | ||
{ | ||
rel: 'self', | ||
uri: 'http://ohri-namibia-dev.globalhealthapp.net/openmrs/ws/rest/v1/encountertype/2678423c-0523-4d76-b0da-18177b439eed', | ||
resourceAlias: 'encountertype', | ||
}, | ||
{ | ||
rel: 'full', | ||
uri: 'http://ohri-namibia-dev.globalhealthapp.net/openmrs/ws/rest/v1/encountertype/2678423c-0523-4d76-b0da-18177b439eed?v=full', | ||
resourceAlias: 'encountertype', | ||
}, | ||
], | ||
resourceVersion: '1.8', | ||
}, | ||
location: { | ||
uuid: 'Sf8ctjA7qjo', | ||
name: 'Opuwo Clinic', | ||
}, | ||
patient: { | ||
uuid: '1ffd8210-0098-4a9a-8706-e87bac8d1b32', | ||
display: '10350A230066 - Maria Niilenge', | ||
}, | ||
encounterProviders: [ | ||
{ | ||
uuid: '751cf65d-6238-4f06-8245-c2d6d002d4e0', | ||
provider: { | ||
uuid: 'f677d8be-4961-4f37-a361-7f5f8977495d', | ||
name: 'PTracker_PMTCT PTracker_PMTCT', | ||
}, | ||
}, | ||
], | ||
obs: [], | ||
form: { | ||
uuid: '60252155-f40d-3084-9d8e-5b7c8fafc68a', | ||
name: 'Labour & Delivery Form', | ||
}, | ||
}, | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You could use the inNull function from lodash