refactor(portal): move stores and rename portal auth store

- apps/portal/src/stores/useAuthStore.ts →
  apps/app/src/stores/portal/usePortalAuthStore.ts. The export and
  defineStore id are renamed (useAuthStore → usePortalAuthStore,
  'auth' → 'portalAuth') so it can coexist with the organizer's
  apps/app/src/stores/useAuthStore. Lazy import inside
  resetPortalStoresSync() updated to the new path.
- apps/portal/src/stores/usePortalStore.ts →
  apps/app/src/stores/portal/usePortalStore.ts (no name change —
  apps/app does not have a usePortalStore).

All call sites in moved pages/components now import from
@/stores/portal/{usePortalStore,usePortalAuthStore} and call
usePortalAuthStore() instead of useAuthStore().

PR-B2 will merge this back into a single context-aware auth store.

Also includes the C.1 page meta-block updates (layout: 'PortalLayout'
| 'PublicLayout', context: 'portal') that were left unstaged after
the page-rename commit picked up only the path change.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-05-05 19:06:08 +02:00
parent 98ec51fcbd
commit 4fe1a0c517
15 changed files with 44 additions and 40 deletions

View File

@@ -1,7 +1,7 @@
<script setup lang="ts">
import { useAuthStore } from '@/stores/useAuthStore'
import { usePortalAuthStore } from '@/stores/portal/usePortalAuthStore'
const authStore = useAuthStore()
const authStore = usePortalAuthStore()
const router = useRouter()
const userInitials = computed(() => {

View File

@@ -1,5 +1,5 @@
<script setup lang="ts">
import { usePortalStore } from '@/stores/usePortalStore'
import { usePortalStore } from '@/stores/portal/usePortalStore'
defineProps<{
eventId: string

View File

@@ -1,6 +1,6 @@
<script setup lang="ts">
import StatusCard from '@/components/portal/StatusCard.vue'
import { usePortalStore } from '@/stores/usePortalStore'
import { usePortalStore } from '@/stores/portal/usePortalStore'
import { useMyShifts } from '@/composables/api/usePortalShifts'
import type { PortalPersonPayload } from '@/types/portal'