-
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 : Users should only be able to edit the latest MNCH visit/e… #1721
Conversation
Co-authored-by: GitHub Actions <[email protected]>
…SF-IGHS#1704) * OHRI-1995 MDR TB Enrolment table under TB program management menu * Add hook to check for outcome * Use a useEffect hook in the table component * Update config and component
Co-authored-by: GitHub Actions <[email protected]>
…hboard (UCSF-IGHS#1723) Co-authored-by: lucyjemutai <[email protected]>
Co-authored-by: GitHub Actions <[email protected]>
packages/esm-commons-lib/src/components/encounter-list/encounter-list.component.tsx
Outdated
Show resolved
Hide resolved
@Herobiam The requirement of the issue says this has to be default to MNCH but am pretty sure this will affect all encounter lists since these changes are in the encounter list component in the shared commons lib |
@ODORA0 i have made changes as per your comment above |
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.
LGTM
packages/esm-commons-lib/src/components/encounter-list/encounter-list.component.tsx
Outdated
Show resolved
Hide resolved
packages/esm-commons-lib/src/components/encounter-list/encounter-list.component.tsx
Outdated
Show resolved
Hide resolved
packages/esm-commons-lib/src/components/encounter-list/encounter-list.component.tsx
Outdated
Show resolved
Hide resolved
@@ -198,6 +200,7 @@ export const EncounterList: React.FC<EncounterListProps> = ({ | |||
workspaceWindowSize, | |||
); | |||
}} | |||
disabled={actionItem.label == 'Edit form' && disableEdit == true && findEncounterLatestDateIndex(encounters) != encounterIndex} |
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.
This logic looks very specific and doesn't look like something that can be reused because
- The condition to disable the action seems to be based off the words
Edit form
which would break the moment the text changes - This doesn't play well with scenarios where actions are from multiple forms
My suggestion would be moving this logic away from here and adding it to the actions with the individual programs.
…F-IGHS#1725) * Connect the TB dashboard tiles with the mamba reports * updated * updated * Update * Update tb-summary-tiles.component.tsx * Update mambaReport.test.ts * Update mambaReport.test.ts --------- Co-authored-by: lucyjemutai <[email protected]>
Co-authored-by: GitHub Actions <[email protected]>
Co-authored-by: GitHub Actions <[email protected]>
UCSF-IGHS#1742) * OHRI-2048 Update package index.ts to syncronously load pages and extensions * Remove unused async import
* (chore) Add encounter tile related mock data * (chore) Add obs base table related mock data --------- Co-authored-by: Cynthia Kamau <[email protected]>
Co-authored-by: GitHub Actions <[email protected]>
* OHRI-2051 update metadata to use config in covid esm * Remove constants, refactor api and minor changes to config * Remove identifiers obj in configSchema * Add config schema file to startupApp function in index * Configure formNames * Add cohorts node to interface
Deleted covid outcomes tag.
…IGHS#1750) * OHRI-2043 Yarn v4 and migrates monorepo to use yarn workspaces * updates ci publish to yarn
…CSF-IGHS#1736) * OHRI-2053: config refactor * cleanup * OHRI-2053 Cacx form names added to config * removed constants file * updated interface
…nd extensions (UCSF-IGHS#1752) * HIV - Update package index.ts to syncronously load pages and extensions * removing the unused 'getAsyncLifecycle'
…UCSF-IGHS#1739) * PMTCT - update metadata to use config instead of constants * Update config-schema.ts * Update art-linkage-action.ts * Update current-ptracker-action.ts * Update infant-postnatal-care.component.tsx * Update antenatal-care.component.tsx * Update labour-delivery.component.tsx * Update postnatal-care.component.tsx * Update current-pregnancy.component.tsx * Update hiv-exposed-infant.component.tsx * Update api.ts * Update config-schema.ts * Update art-linkage-action.ts * Update current-ptracker-action.ts * Update infant-postnatal-care.component.tsx * Update antenatal-care.component.tsx * Update labour-delivery.component.tsx * Update postnatal-care.component.tsx * Update current-pregnancy.component.tsx * Update hiv-exposed-infant.component.tsx * removing un-used encTypes * Update current-pregnancy.component.tsx
* (chore) testing pre-release ci * fixes jest-dom import * adds version to root package.json * yarn version tweaks * specifies action branches * adds git fetch step * adds more git branch commands * checkout dev * env check * fixes to version check * adds changesetBaseRefs to .yarnrc.yml * deletes test commands * tweaks to publish scripts * npmAuthToken * fixes import * failing tests * makes test threshold zero * removes duplicate publish script * clean up
…GHS#1756) * OHRI-2086 tests added * cleanup
…ma) (UCSF-IGHS#1741) * ohri-2025 making hiv-app configurable (moved constants to config-schema) * OHRI-2025 Corrections to config-schema * Destructuring the configs for shorter names * ohri-2052 removing duplicated concepts references
* OHRI-2106 fixed failing tests * cleanup * more cleanup
* OHRI-2050 replace momentjs with dayjs * updates openmrs dependencies * updates yarn.lock
PR moved to #1772 |
…ncounter
Requirements
OHRI-123 My PR title
.Summary
OHRI-1857
This feature should not allow users to go back and edit fields from a previous encounters. E.g if a pregnancy has a first ANC entered and a follow-up ANC encounter/visit added then user should not be able to edit the 1st ANC but editing for the latest follow up encounter/visit should still be possible.
Screenshots
Screen.Recording.2023-12-13.at.4.15.15.PM.mov
Related Issue
Other