-
Notifications
You must be signed in to change notification settings - Fork 23
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
feat: [DHIS2-18325] Show orgunit selector in the new event form #3879
Open
henrikmv
wants to merge
27
commits into
master
Choose a base branch
from
hv/feat/DHIS2-18325_showOrgUnitSelectorInNewEventForm
base: master
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.
+144
−85
Open
Changes from all commits
Commits
Show all changes
27 commits
Select commit
Hold shift + click to select a range
ed2b1dc
feat: add org unit field to form with validation
henrikmv e5c91e7
feat: set orgunit for event
henrikmv 87782ae
Merge remote-tracking branch 'origin/master' into hv/feat/DHIS2-18325…
henrikmv e7614f1
feat: add to redux
henrikmv 1ce0a2c
feat: disable org unit in scope selector
henrikmv 08fa169
feat: add selected org unit to payload
henrikmv 587a441
feat: auto select orgUnit
henrikmv 5056f96
feat: show form without selected org unit
henrikmv c93d7b6
feat: add orgunit selector to schedule form
henrikmv 8fb93ca
fix: temp
henrikmv b240a15
fix: style for schedule
henrikmv 0a9847d
fix: code clean up
henrikmv 3274b43
fix: fix map center point when no org unit
henrikmv 3ee7546
Merge remote-tracking branch 'origin/master' into hv/feat/DHIS2-18325…
henrikmv 7f6d2eb
Revert "Merge remote-tracking branch 'origin/master' into hv/feat/DHI…
henrikmv d9561ed
Merge remote-tracking branch 'origin/master' into hv/feat/DHIS2-18325…
henrikmv 4cae9b6
Revert "Merge remote-tracking branch 'origin/master' into hv/feat/DHI…
henrikmv 831354a
feat: validation org unit in schedule
henrikmv 757df72
Merge remote-tracking branch 'origin/master' into hv/feat/DHIS2-18325…
henrikmv 8c02cc1
fix: nameing of date component
henrikmv eecfaa0
fix: schedule date automatically info bow
henrikmv ca17101
fix: remove cy test that clears the org unit
henrikmv 22f2c8d
fix: cy test
henrikmv 621ff6f
fix: add deleted cy test
henrikmv 2ee02e2
fix: simplify pull request
henrikmv dfb4f7c
Merge remote-tracking branch 'origin/master' into hv/feat/DHIS2-18325…
henrikmv c2fbae8
Merge remote-tracking branch 'origin/master' into hv/feat/DHIS2-18325…
henrikmv 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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,4 +17,5 @@ export type Props = { | |
onStartAgain: () => void, | ||
formIsOpen: boolean, | ||
children: Node, | ||
isReadOnly?: boolean, | ||
}; |
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
5 changes: 5 additions & 0 deletions
5
...dules/capture-core/components/WidgetEnrollmentEventNew/DataEntry/fieldValidators/index.js
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,5 @@ | ||
// @flow | ||
export { getCategoryOptionsValidatorContainers } from './categoryOptions.validatorContainersGetter'; | ||
export { getEventDateValidatorContainers } from './eventDate.validatorContainersGetter'; | ||
export { getNoteValidatorContainers } from './note.validatorContainersGetter'; | ||
export { getOrgUnitValidatorContainers } from './orgUnit.validatorContainersGetter'; |
15 changes: 15 additions & 0 deletions
15
...s/WidgetEnrollmentEventNew/DataEntry/fieldValidators/orgUnit.validatorContainersGetter.js
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,15 @@ | ||
// @flow | ||
import { isValidOrgUnit } from 'capture-core-utils/validators/form'; | ||
import i18n from '@dhis2/d2-i18n'; | ||
|
||
const validateOrgUnit = (value?: ?Object) => isValidOrgUnit(value); | ||
|
||
export const getOrgUnitValidatorContainers = () => { | ||
const validatorContainers = [ | ||
{ | ||
validator: validateOrgUnit, | ||
message: i18n.t('Please provide an valid organisation unit'), | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can we use There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I agree, that is a great idea! |
||
}, | ||
]; | ||
return validatorContainers; | ||
}; |
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
Oops, something went wrong.
Oops, something went wrong.
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.
Should the center where the map opens change when a different orgUnit is selected?
Screen.Recording.2025-01-09.at.10.16.25.mov