Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Automatically add layoutset when adding a payment task in Studio #12809

Open
5 of 6 tasks
Tracked by #10759
framitdavid opened this issue May 14, 2024 · 5 comments
Open
5 of 6 tasks
Tracked by #10759

Automatically add layoutset when adding a payment task in Studio #12809

framitdavid opened this issue May 14, 2024 · 5 comments
Assignees
Labels
feature/payment status/ready-for-dev Status: Used for issues that are ready for development. Has been through grooming.

Comments

@framitdavid
Copy link
Collaborator

framitdavid commented May 14, 2024

Description

There needs to be a layoutset associated with the payment task, to render the payment step. When adding a payment task to the process in Studio, we should automatically trigger adding the associated layoutset.

In addition, there are some requirements for the content of the payment layout - it needs to contain thePayment component. The payment layoutset should therefore include a default payment layout that contains the Payment component:

{
  "$schema": "https://altinncdn.no/toolkits/altinn-app-frontend/4/schemas/json/layout/layout.schema.v1.json",
  "data": {
    "layout": [
      {
        "id": "test",
        "type": "Payment",
        "renderAsSummary": true
      }
    ]
  }
}

This is technically all that is needed, although we should provide some more components to allow app developers to customize both the payment layout, and payment receipt layout.

Open questions:

  • Which form components should be available to add/edit in the layouts for a payment task? Are there any restrictions?
    • Only text/info components should be available. For simplicity, we should restrict to only text components.
  • Do we always need both a task layout and a receipt layout?
    • No, if no receipt layout is provided then the task layout will be used.
  • How do we specify which layout in the payment layoutset is the task layout, and which is the receipt layout?
    • In the Settings.json file for the layout-set, the receipt layout name should be specified in the pdfLayoutName field.

In scope:

  • Ensure that layoutset with default payment layout is added automatically together with payment task.

Out of scope:

Acceptance criteria

  • When a payment task is added, a new corresponding layoutset is added
    • The added layoutset contains a default layout, which is set up with the Payment component as specified above.
  • When a payment task is deleted, the corresponding layoutset is deleted.
@WilliamThorenfeldt
Copy link
Contributor

This should be made in a generic way for all tasks.
We should include custom handling of the payment task type.

@standeren
Copy link
Contributor

When doing this in a generic way we need to remember implementing it in such a way that we can see and edit the name of the layoutset. All other tasks than data-tasks should also have the possibility to delete the connected layoutset. (or is that inconsistent - UX question to consider?)

@nkylstad
Copy link
Member

I have updated the description and title of this issue. After discussion with Apps, we have found that the layoutset for payment task is always required, there is no default. The layoutset is to contain both the task layout and payment receipt layout. There are some open questions around how this is to work, and I have blocked the issue until those questions are resolved.

@nkylstad nkylstad changed the title Studio should make it possible to add custom layout for the payment receipt Automatically add layoutset when adding a payment task in Studio May 21, 2024
@nkylstad nkylstad self-assigned this May 21, 2024
@nkylstad nkylstad removed their assignment May 21, 2024
@mlqn mlqn self-assigned this May 22, 2024
@mlqn
Copy link
Contributor

mlqn commented May 22, 2024

Tested OK in dev! A new layoutset is automatically created when a new payment task is added.
Not sure if I should move this issue to Todo or Done as the automatic creation of a layoutset seems to be a subtask 🤔

@nkylstad nkylstad assigned nkylstad and unassigned mlqn May 23, 2024
@Ildest
Copy link
Contributor

Ildest commented May 28, 2024

Reviewed this issue, but we need more details in Refinement tomorrow.

@nkylstad nkylstad added status/ready-for-dev Status: Used for issues that are ready for development. Has been through grooming. and removed status/ready-for-specification Status: Used for issues that are ready for functional decription og detailed design. labels May 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature/payment status/ready-for-dev Status: Used for issues that are ready for development. Has been through grooming.
Projects
Status: 👷 In Progress
Development

No branches or pull requests

6 participants