feat: [DHIS2-21175] Analytics table hooks form#865
Open
henrikmv wants to merge 10 commits intohv/feat/DHIS2-21176_AnalyticsTableHooksListfrom
Open
feat: [DHIS2-21175] Analytics table hooks form#865henrikmv wants to merge 10 commits intohv/feat/DHIS2-21176_AnalyticsTableHooksListfrom
henrikmv wants to merge 10 commits intohv/feat/DHIS2-21176_AnalyticsTableHooksListfrom
Conversation
There was a problem hiding this comment.
Pull request overview
Adds create/edit form support for the Analytics Table Hooks model section (DHIS2-21175), wiring it into the existing FormBase + schema-driven validation approach used across the app.
Changes:
- Introduces new New and Edit pages for
analyticsTableHooks. - Adds a dedicated form fields component with conditional inputs based on selected phase.
- Expands the zod schema to include a form schema, defaults/validation helpers, and field filters for edit fetching.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| src/pages/analyticsTableHooks/New.tsx | Adds the “create new analytics table hook” form page using FormBase. |
| src/pages/analyticsTableHooks/Edit.tsx | Adds the “edit analytics table hook” page with a react-query fetch and FormBase. |
| src/pages/analyticsTableHooks/form/AnalyticsTableHookFormFields.tsx | Implements the form UI, including phase selection and conditional table-type selects + SQL text area. |
| src/pages/analyticsTableHooks/form/analyticsTableHookSchema.ts | Introduces analyticsTableHookFormSchema, conditional validation, and initialValues/validate. |
| src/pages/analyticsTableHooks/form/fieldFilters.ts | Defines the fields list used when fetching a hook for editing. |
| src/pages/analyticsTableHooks/form/index.ts | Re-exports the new form schema alongside the existing list schema. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…at/DHIS2-21175_AnalyticsTableHooksForm
…esource table types
|
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.




DHIS2-21175