Altinn / altinn-studio

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

Inconsistent usage of storageKey for layout set #12957

Open standeren opened 2 weeks ago

standeren commented 2 weeks ago

Description of the bug

We have two different storageKeys for storing the selected layout set in local storage;

When clicking the Gå til Lage from process-editor after created a custom receipt, we are setting the layout set in order to go directly to the correct layout set, but it does not work as per now, since we are updating a different key in storage than the key that decides what layout set to show in Lage-page.

We must keep one of these keys in local storage. In order to separate the selected layout set between apps, if app-devs are working in different apps that uses the same layout set names, we should add the [APP_NAME] to the storage key.

We probably should clean up the disposed key in users local storage as well.

Steps To Reproduce

Have the storage section in the developer tool open and change layout set in lage-page and see that selectedFormLayoutSet key with layout set as value is added to storage. Go to process editor and open custom receipt and click on Gå til Lage and see that layoutSet/[APP_NAME] key with receipt layout set name as value is added to storage, but selectedFormLayoutSet value is not updated. Going to Lage-page from recept will then show you the lay out set that is stored in the selectedFormLayoutSet and not in layoutSet/[APP_NAME].

Additional Information

No response