-
Notifications
You must be signed in to change notification settings - Fork 24
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-16262] Support Custom Layout for Enrollment Pages #3481
feat: [DHIS2-16262] Support Custom Layout for Enrollment Pages #3481
Conversation
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.
Great job on this feature 👏 ! The code is very well structured and easy to follow
const renderWidget = (widget: ColumnConfig, availableWidgets, props) => { | ||
const { type } = widget; | ||
|
||
if (type.toLowerCase() === WidgetTypes.COMPONENT) { |
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.
Are we going to support other types of widgets in the future?
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.
Thanks for the review! Yes, we will extend this config to also support Enrollment Dashboard plugins. 😊
https://dhis2.atlassian.net/browse/DHIS2-16305
…_CustomEnrollmentOverviewSchema # Conflicts: # i18n/en.pot
🚀 Deployed on https://deploy-preview-3481--dhis2-capture.netlify.app |
…_CustomEnrollmentOverviewSchema # Conflicts: # i18n/en.pot # src/core_modules/capture-core/components/Pages/EnrollmentEditEvent/EnrollmentEditEventPage.component.js # src/core_modules/capture-core/components/Pages/EnrollmentEditEvent/EnrollmentEditEventPage.container.js # src/core_modules/capture-core/components/Pages/EnrollmentEditEvent/EnrollmentEditEventPage.types.js # src/core_modules/capture-core/components/WidgetEventEdit/WidgetEventEdit.container.js # src/core_modules/capture-core/components/WidgetEventEdit/widgetEventEdit.types.js
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.
Tested successfully on 2.41,2.40.3,2.39.5,2.38.7 versions
# [100.54.0](v100.53.1...v100.54.0) (2024-02-04) ### Features * [DHIS2-16262] Support Custom Layout for Enrollment Pages ([#3481](#3481)) ([9cc3d70](9cc3d70))
🎉 This PR is included in version 100.54.0 🎉 The release is available on:
Your semantic-release bot 📦🚀 |
Support building a custom enrollment dashboard layout, using a custom config stored in the data store.
The system administrator should be able to design, reorder, hide and lock a dashboard for a program.
Overview
Each enrollment page has a separate key and config in the data store:
We will check this key for a custom page layout, or fallback to the default one stored under
DefaultPageLayout
in each page.Some components will also have additional settings that can be overridden by the config.
Supported components
Examples
Custom config to build the default enrollment dashboard (Child Programme):
Optional parameters
All parts of the config is optional. You can choose to:
Images
Example: