Skip to content

Move groupware account switcher and store into shared package #1973

@kulmann

Description

@kulmann

Initial Checklist

  • I understand this is a user story and questions should be posted in the Community Discussions
  • I searched issues and couldn’t find anything (or linked relevant results below)

User Story

  • As a developer, I want to re-use the account switcher from the mail app for another app so that I don't have to copy all the code.

User Value

DX / DRY

Acceptance Criteria

  • move shared code to web-pkg:
    • accounts pinia store -> web-pkg/src/composables/piniaStores/groupware/groupwareAccounts.ts
    • account fetching logic -> web-pkg/src/composables/groupware/useLoadAccounts.ts
    • account switcher -> web-pkg/src/components/Groupware/Accounts/MailAccountsSwitch.vue
  • each groupware app (mail / contacts / in the future also calendar) triggers fetching accounts on first visit if necessary
  • must be possible to run a callback after an account gets selected (maybe just by using a watcher on the selected account in the pinia store), so that e.g. the Mail App can select the active mailbox and fetch emails after the account has been switched.

Metadata

Metadata

Assignees

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions