Skip to content

Filter elements shown in summary of subforms #3153

@kentare

Description

@kentare

Description

Context

In a given subform, we can have up to 400 fields. As the number of subforms increases, the visual clutter also increases. We need a way to prioritize the information shown to the user initially, minimizing visual clutter while still offering a way for users to view the full summary. The PDF is still required to contain all the fields and the generation will not be affected by eventual filtering in the summary.

Proposed solution 1

#2471

Propsed solution 2

Current Example of Summary Component:

{ 
  "id": "summary",
  "type": "Summary2",
  "target": {
    "id": "Hovedskjema",
    "type": "layoutSet"
  }
}

Current Example of a Standard Input Component:

{ 
  "id": "input",
  "type": "Input",
  "dataModelBindings": {
    "simpleBinding": "my.input.value"
  }
}

Expected Behavior

  • By default, all components will be shown
  • Optionally tag components with includeInSummary: true (or similar) that will be shown in the summary if filtered by "included".
  • Optionally add filters to Summary2 component
  • If filter is added, users can toggle an option to switch between the filters, overriding the default filter. (In the example below, default is included but can be overridden by hideEmpty or all.

Example of Updated Summary Component:

{ 
  "id": "summary",
  "type": "Summary2",
  "target": {
    "id": "Hovedskjema",
    "type": "layoutSet"
  },
  "filters": {
    "options": ["all", "included", "hideEmpty"],
    "default": "included"
  }
}

Example of Updated Standard Input Component:

{ 
  "id": "input",
  "type": "Input",
  "dataModelBindings": {
    "simpleBinding": "my.input.value"
  },
  "includeInSummary": true
}

Proposed solution 3

Specify a layoutSet to be used in the summary that is different from the layoutSet used in the subform. Similar to specifying the layoutSet for PDF generation.

Should include a way for user to toggle between subform layoutSet (full information) and the custom layoutset (part of the information)

Additional Information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/summaryrelated to summaries/read-only data representationkind/feature-requestNew feature or requestorg/brgIssues relevant for Brønnøysundregistrene.

    Type

    No type

    Projects

    Status

    No status

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions