Altinn / altinn-studio

Next generation open source Altinn platform and applications.
https://docs.altinn.studio
BSD 3-Clause "New" or "Revised" License
113 stars 70 forks source link

Support full configuration of SubForm component #13476

Open framitdavid opened 3 weeks ago

framitdavid commented 3 weeks ago

Background The SubForm component implemented in the following issue includes more configuration options than are currently supported in Studio. To fully utilize the SubForm component, we need to extend Studio to support all necessary configurations. That is what this issue is all about.

Requirements:

SubForm Component configuration looks like the following:

  "id": "subform-mopeder",
  "type": "SubForm",
  "textResourceBindings": {
    "title": "subform-moped.title",
    "addButton": "subform-moped.add"
  },
  "layoutSet": "moped-subform",
  "showAddButton": true,
  "showDeleteButton": true,
  "tableColumns" : [
    {
      "headerContent": "subform-moped.regno",
      "cellContent": {
        "query": "RegNo"
      }
    },
    {
      "headerContent": "subform-moped.merke",
      "cellContent": {
        "query": "Merke"
      }
    }
  ]
},

In this example, the component points to the moped-subform layoutset. In addition, it points to a dataType - that is the default data type for the layoutset?

Details on tableColumns Configuration

Based on the information above, we need a UI that allows users to select fields from the data model to use as query in cellContent. Content design is necessary to clearly communicate the purpose and of these configurations to ensure a great user experience.

### Tasks
- [ ] https://github.com/Altinn/altinn-studio/issues/13654
- [ ] https://github.com/Altinn/altinn-studio/issues/13655

Note In general, we should figure out a pattern to easily adopt new configurations as Team Apps come with new features that require new configurations.

Acceptance criteria

framitdavid commented 3 weeks ago

I have confirmed with team apps that we should allow the same layout set to be reused in multiple sub-form components. So no restrictions on that.

framitdavid commented 3 weeks ago

This issue is blocked until https://github.com/Altinn/altinn-studio/issues/13477 is merged.

standeren commented 1 week ago

I have two questions: