Skip to content

πŸ”§ Move the invite-link builder into the invitations storeΒ #4518

Description

@PierreBrisorgueil

What β€” move the duplicated invite-link builder into the invitations store.

Why β€” the same four-line method exists in both invitation views, each with its own caller. The two views already share a store, so there is an obvious single home for it.

Scope β€” src/modules/invitations/views/invitations.admin.view.vue and invitations.account.view.vue; move to src/modules/invitations/stores/invitations.store.js.

Two implementation details that are easy to get wrong:

  • It takes a token argument, so a plain Pinia getter will not do β€” it must be either a getter that returns a function or an action. Pick one and be consistent with the store's existing style.
  • Inside the store there is no this.config. The store already imports the config service at the top of the file β€” use that import.

Preserve the current behaviour exactly: return null for a falsy token, and URL-encode the token.

Sequencing: blocked by #4517 β€” touches the same two views. Land #4517 first, then rebase this one.

Definition of done: store unit tests cover the null-token and encoding cases, the invitations suite passes, and the method no longer exists in either view.

Scope: validated 2026-07-28
Created via /dev:issue


Baseline: line numbers and counts here were verified against master @ d246bc14 (2026-07-28). Master moves β€” re-verify against current master before starting; the invariants above are what must hold regardless of where the code has drifted to.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions