style(app): apply eslint --fix to Tier 1 (Vue templates)
WS-3 session 1b-i Tier 1. Scope: src/components/**, src/pages/**, src/layouts/**, src/views/** restricted to *.vue files. Mechanical formatting only — predominantly vue/html-indent (506 fixes in CrowdListDetailPanel.vue alone), padding-line-between-statements, antfu/if-newline. Excludes (per session prompt): - apps/app/vite.config.ts (Tier 3) - apps/app/themeConfig.ts (Tier 3) - apps/app/vitest.config.ts (Tier 3) - All TypeScript-only files in src/composables, src/lib, src/stores, src/plugins, src/types (Tier 2 — separate commit) Includes session 1a layouts (PortalLayout.vue, PublicLayout.vue) where 2 'lines-around-comment' errors were flagged in the previous 1b-i pre-flight inspection. Tests + typecheck verified green post-fix: - apps/app vitest: 49 passed (unchanged) - apps/app vue-tsc: clean (unchanged) - apps/portal vitest: 113 passed (unchanged — not touched) - backend pest: 1486 passed (unchanged — not touched) Lint baseline progression: - Pre-Tier-1: 1451 problems - Post-Tier-1: 422 problems Visual smoke status: - NOT YET SMOKED — Bert to verify before merge. This Claude Code session has no UI access; cannot run pnpm dev and click through affected routes. The high-traffic candidates are CrowdListDetailPanel (506 fixes), AssignPersonDialog (44), ShiftDetailPanel (36), and the events / form-failures pages. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -3,37 +3,6 @@ import { orgNavItems, platformNavItems } from '@/navigation/vertical'
|
||||
import { useAuthStore } from '@/stores/useAuthStore'
|
||||
import { useImpersonationStore } from '@/stores/useImpersonationStore'
|
||||
|
||||
const authStore = useAuthStore()
|
||||
const impersonationStore = useImpersonationStore()
|
||||
|
||||
const hasOrganisation = computed(() => !!authStore.organisations.length)
|
||||
|
||||
const navItems = computed(() => {
|
||||
const orgName = authStore.currentOrganisation?.name ?? 'Beheer'
|
||||
|
||||
let orgItems = orgNavItems.map(item => {
|
||||
if ('heading' in item && item.heading === 'Beheer') {
|
||||
return { ...item, heading: orgName }
|
||||
}
|
||||
return item
|
||||
})
|
||||
|
||||
// During impersonation: hide org-dependent items if user has no organisation
|
||||
if (impersonationStore.isImpersonating && !hasOrganisation.value) {
|
||||
orgItems = orgItems.filter(item => {
|
||||
if ('heading' in item) return false
|
||||
return 'to' in item && item.to?.name === 'dashboard'
|
||||
})
|
||||
}
|
||||
|
||||
// Platform items: only for super_admin AND only when NOT impersonating
|
||||
if (authStore.isSuperAdmin && !impersonationStore.isImpersonating) {
|
||||
return [...orgItems, ...platformNavItems]
|
||||
}
|
||||
|
||||
return orgItems
|
||||
})
|
||||
|
||||
// Components
|
||||
import ImpersonationBanner from '@/components/platform/ImpersonationBanner.vue'
|
||||
import Footer from '@/layouts/components/Footer.vue'
|
||||
@@ -46,6 +15,40 @@ import OrganisationSwitcher from '@/components/layout/OrganisationSwitcher.vue'
|
||||
|
||||
// @layouts plugin
|
||||
import { VerticalNavLayout } from '@layouts'
|
||||
|
||||
const authStore = useAuthStore()
|
||||
const impersonationStore = useImpersonationStore()
|
||||
|
||||
const hasOrganisation = computed(() => !!authStore.organisations.length)
|
||||
|
||||
const navItems = computed(() => {
|
||||
const orgName = authStore.currentOrganisation?.name ?? 'Beheer'
|
||||
|
||||
let orgItems = orgNavItems.map(item => {
|
||||
if ('heading' in item && item.heading === 'Beheer')
|
||||
return { ...item, heading: orgName }
|
||||
|
||||
|
||||
return item
|
||||
})
|
||||
|
||||
// During impersonation: hide org-dependent items if user has no organisation
|
||||
if (impersonationStore.isImpersonating && !hasOrganisation.value) {
|
||||
orgItems = orgItems.filter(item => {
|
||||
if ('heading' in item)
|
||||
return false
|
||||
|
||||
return 'to' in item && item.to?.name === 'dashboard'
|
||||
})
|
||||
}
|
||||
|
||||
// Platform items: only for super_admin AND only when NOT impersonating
|
||||
if (authStore.isSuperAdmin && !impersonationStore.isImpersonating)
|
||||
return [...orgItems, ...platformNavItems]
|
||||
|
||||
|
||||
return orgItems
|
||||
})
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
||||
@@ -128,7 +128,6 @@ const redirectToSuggestedPage = (selected: Suggestion) => {
|
||||
router.push(selected.url as string)
|
||||
closeSearchBar()
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
||||
@@ -16,6 +16,7 @@ const initials = computed(() => {
|
||||
const parts = name.split(/\s+/).filter(Boolean)
|
||||
if (parts.length >= 2)
|
||||
return (parts[0]![0]! + parts[parts.length - 1]![0]!).toUpperCase()
|
||||
|
||||
return name.slice(0, 2).toUpperCase()
|
||||
})
|
||||
|
||||
@@ -26,6 +27,7 @@ const avatarSrc = computed((): string | null => {
|
||||
if (raw.startsWith('http://') || raw.startsWith('https://'))
|
||||
return raw
|
||||
const base = (import.meta.env.VITE_API_URL as string | undefined)?.replace(/\/api\/v1\/?$/, '') ?? ''
|
||||
|
||||
return raw.startsWith('/') ? `${base}${raw}` : `${base}/${raw}`
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user