Skip to content

refactor: DataCategory N-N — remove modelId from charts and data models#713

Open
SchroterQuentin wants to merge 3 commits intomainfrom
features/data-categories-n-n
Open

refactor: DataCategory N-N — remove modelId from charts and data models#713
SchroterQuentin wants to merge 3 commits intomainfrom
features/data-categories-n-n

Conversation

@SchroterQuentin
Copy link
Member

Domain models:

  • ChartOperand: remove modelId, modelLabel
  • ChartModelLabel: delete file entirely
  • ChartInfos: remove modelsLabels (now on ChartOrganisation level)
  • ChartOrganisationInfos/TypeInfos: modelsLabels → models (ModelInfos[])
  • DataCategoryInfos: modelId → applicationId + models (ModelInfos[])
  • DataDefinitionInfos: remove modelId, add modelId to filters

Components:

  • FSBaseChartOrganisationsList: modelsLabels → models
  • FSBaseChartOrganisationTypesList: modelsLabels → models
  • FSBaseChartsList: remove modelsLabels column (Charts no longer carry it)

Domain models:
- ChartOperand: remove modelId, modelLabel
- ChartModelLabel: delete file entirely
- ChartInfos: remove modelsLabels (now on ChartOrganisation level)
- ChartOrganisationInfos/TypeInfos: modelsLabels → models (ModelInfos[])
- DataCategoryInfos: modelId → applicationId + models (ModelInfos[])
- DataDefinitionInfos: remove modelId, add modelId to filters

Components:
- FSBaseChartOrganisationsList: modelsLabels → models
- FSBaseChartOrganisationTypesList: modelsLabels → models
- FSBaseChartsList: remove modelsLabels column (Charts no longer carry it)
Copy link

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

Refactors chart/data-category/data-definition domain models to support a many-to-many relationship with models by removing modelId/modelsLabels from chart/data-definition payloads and centralizing model info via ModelInfos[], then updates list components accordingly.

Changes:

  • Remove ChartModelLabel and modelsLabels usage from chart domain models and charts list UI.
  • Replace modelsLabels with models: ModelInfos[] on ChartOrganisationInfos and ChartOrganisationTypeInfos.
  • Update DataCategoryInfos to use applicationId + models, and adjust DataDefinitionInfos/filters to remove modelId from DTO and add filtering capability.

Reviewed changes

Copilot reviewed 11 out of 11 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
src/core/foundation-core-domain/models/dataDefinitions/dataDefinitionInfos.ts Removes modelId from infos/DTO; adds modelId to filters.
src/core/foundation-core-domain/models/dataCategories/dataCategoryInfos.ts Replaces modelId with applicationId and adds models: ModelInfos[].
src/core/foundation-core-domain/models/charts/index.ts Removes barrel export of deleted ChartModelLabel.
src/core/foundation-core-domain/models/charts/chartOperand.ts Removes modelId/modelLabel from operand DTOs and model.
src/core/foundation-core-domain/models/charts/chartModelLabel.ts Deletes ChartModelLabel model.
src/core/foundation-core-domain/models/charts/chartInfos.ts Removes modelsLabels from chart infos/DTO.
src/core/foundation-core-domain/models/chartOrganisations/chartOrganisationInfos.ts Renames modelsLabelsmodels using ModelInfos[].
src/core/foundation-core-domain/models/chartOrganisationTypes/chartOrganisationTypeInfos.ts Renames modelsLabelsmodels using ModelInfos[].
src/core/foundation-core-components/components/lists/charts/FSBaseChartsList.vue Removes models column rendering and switches internal mapping/options to models.
src/core/foundation-core-components/components/lists/chartOrganisations/FSBaseChartOrganisationsList.vue Updates slot + filters to use item.models.
src/core/foundation-core-components/components/lists/chartOrganisationTypes/FSBaseChartOrganisationTypesList.vue Updates slot + filters to use item.models.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 50 to 55
export interface DataDefinitionFilters {
modelsIds?: string[] | null;
modelId?: string | null;
dataCategoryId?: string | null;
dataTable?: DataTable | null;
search?: string | null;
Copy link

Copilot AI Mar 19, 2026

Choose a reason for hiding this comment

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

DataDefinitionFilters now exposes both modelsIds and modelId. Without an explicit contract, it's unclear how callers/backends should behave when both are provided (or which one is preferred). Consider deprecating one, renaming for clarity (e.g., singular vs plural), or documenting/encoding precedence to avoid ambiguous API usage.

Copilot uses AI. Check for mistakes.
SchroterQuentin and others added 2 commits March 20, 2026 01:27
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
DataCategoryFilters: modelId → modelsIds (string array) to match
the backend core filter which accepts a list.
DataDefinitionFilters: remove redundant modelId (only modelsIds).
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