Skip to content

feat: [DHIS2-21175] Analytics table hooks form#865

Open
henrikmv wants to merge 10 commits intohv/feat/DHIS2-21176_AnalyticsTableHooksListfrom
hv/feat/DHIS2-21175_AnalyticsTableHooksForm
Open

feat: [DHIS2-21175] Analytics table hooks form#865
henrikmv wants to merge 10 commits intohv/feat/DHIS2-21176_AnalyticsTableHooksListfrom
hv/feat/DHIS2-21175_AnalyticsTableHooksForm

Conversation

@henrikmv
Copy link
Copy Markdown
Contributor

@henrikmv henrikmv commented Apr 12, 2026

@henrikmv henrikmv requested a review from Copilot April 12, 2026 19:17
@henrikmv henrikmv changed the base branch from dev to hv/feat/DHIS2-21176_AnalyticsTableHooksList April 12, 2026 19:17
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@sonarqubecloud
Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
1 New issue
1 New Code Smells (required ≤ 0)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants