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:
2026-04-29 11:04:46 +02:00
parent dd8430f600
commit 47bd533179
77 changed files with 1277 additions and 993 deletions

View File

@@ -45,12 +45,12 @@ const typeColor: Record<string, string> = {
const filteredCompanies = computed(() => {
let result = companies.value ?? []
if (filterType.value) {
if (filterType.value)
result = result.filter(c => c.type === filterType.value)
}
if (search.value) {
const q = search.value.toLowerCase()
result = result.filter(c => c.name.toLowerCase().includes(q))
}
@@ -92,7 +92,8 @@ function onDeleteConfirm(company: Company) {
}
function onDeleteExecute() {
if (!deletingCompany.value) return
if (!deletingCompany.value)
return
const name = deletingCompany.value.name
deleteCompany(deletingCompany.value.id, {
@@ -129,7 +130,7 @@ function onSaved() {
<template #append>
<VBtn
variant="text"
@click="refetch()"
@click="refetch"
>
Opnieuw proberen
</VBtn>

View File

@@ -10,6 +10,7 @@ const router = useRouter()
const { data: organisation, isLoading: orgLoading, isError: orgError, refetch: refetchOrg } = useMyOrganisation()
const orgId = computed(() => organisation.value?.id ?? '')
const {
data: stats,
isLoading: statsLoading,
@@ -19,6 +20,7 @@ const {
const isOrgAdmin = computed(() => {
const role = authStore.currentOrganisation?.role
return role === 'org_admin' || authStore.isSuperAdmin
})
@@ -33,7 +35,9 @@ const isEditDialogOpen = ref(false)
const activeSubtitle = computed(() => {
const active = stats.value?.active_events_count ?? 0
if (active > 0) return `${active} actief`
if (active > 0)
return `${active} actief`
return 'Nog geen actieve evenementen'
})
@@ -56,22 +60,30 @@ function goToEvents() {
}
function formatRelativeTime(iso: string | null): string {
if (!iso) return ''
if (!iso)
return ''
const date = new Date(iso)
const diffMs = Date.now() - date.getTime()
const diffSec = Math.round(diffMs / 1000)
if (diffSec < 60) return 'zojuist'
if (diffSec < 60)
return 'zojuist'
const diffMin = Math.round(diffSec / 60)
if (diffMin < 60) return `${diffMin} min geleden`
if (diffMin < 60)
return `${diffMin} min geleden`
const diffHr = Math.round(diffMin / 60)
if (diffHr < 24) return `${diffHr} uur geleden`
if (diffHr < 24)
return `${diffHr} uur geleden`
const diffDays = Math.round(diffHr / 24)
if (diffDays < 7) return `${diffDays} dag${diffDays === 1 ? '' : 'en'} geleden`
if (diffDays < 7)
return `${diffDays} dag${diffDays === 1 ? '' : 'en'} geleden`
return date.toLocaleDateString('nl-NL', { day: 'numeric', month: 'short', year: 'numeric' })
}
function avatarInitials(name: string | null | undefined): string {
if (!name) return '?'
if (!name)
return '?'
return name
.split(' ')
.filter(Boolean)
@@ -82,6 +94,7 @@ function avatarInitials(name: string | null | undefined): string {
function describeActivity(entry: ActivityLogEntry): string {
const changed = Object.keys(entry.properties?.attributes ?? {})
const labelMap: Record<string, string> = {
name: 'naam',
slug: 'slug',
@@ -90,8 +103,11 @@ function describeActivity(entry: ActivityLogEntry): string {
phone: 'telefoonnummer',
website: 'website',
}
if (changed.length === 0) return entry.description
if (changed.length === 0)
return entry.description
const fields = changed.map(f => labelMap[f] ?? f).join(', ')
return `Wijzigde ${fields}`
}
</script>
@@ -114,7 +130,7 @@ function describeActivity(entry: ActivityLogEntry): string {
<template #append>
<VBtn
variant="text"
@click="refetchOrg()"
@click="refetchOrg"
>
Opnieuw proberen
</VBtn>
@@ -179,7 +195,7 @@ function describeActivity(entry: ActivityLogEntry): string {
<VBtn
variant="text"
size="small"
@click="refetchStats()"
@click="refetchStats"
>
Opnieuw proberen
</VBtn>
@@ -450,7 +466,7 @@ function describeActivity(entry: ActivityLogEntry): string {
<VBtn
variant="text"
size="small"
@click="refetchStats()"
@click="refetchStats"
>
Opnieuw proberen
</VBtn>

View File

@@ -61,12 +61,11 @@ const legacyGeneralKeys = ['general', 'algemeen', 'gevaarlijke-acties']
onMounted(() => {
const tab = route.query.tab as string | undefined
if (tab === 'general' || tab === 'algemeen') {
if (tab === 'general' || tab === 'algemeen')
router.replace({ path: '/organisation' })
}
else if (tab === 'gevaarlijke-acties') {
else if (tab === 'gevaarlijke-acties')
router.replace({ query: { tab: 'danger-zone' } })
}
})
const activeKey = computed({
@@ -74,6 +73,7 @@ const activeKey = computed({
const tab = route.query.tab as string | undefined
if (!tab || legacyGeneralKeys.includes(tab))
return defaultKey
return allKeys.includes(tab) ? tab : defaultKey
},
set: (key: string) => {