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

@@ -22,20 +22,20 @@ const { mutate: importFields, isPending } = useImportFieldsFromEvent(orgIdRef, e
const selectedEventId = ref<string | null>(null)
const eventOptions = computed(() => {
if (!events.value) return []
if (!events.value)
return []
const options: Array<{ title: string; value: string }> = []
for (const event of events.value) {
if (event.id !== props.eventId) {
if (event.id !== props.eventId)
options.push({ title: event.name, value: event.id })
}
// Also include children for festivals
if (event.children?.length) {
for (const child of event.children) {
if (child.id !== props.eventId) {
if (child.id !== props.eventId)
options.push({ title: `${event.name} > ${child.name}`, value: child.id })
}
}
}
}
@@ -47,20 +47,21 @@ const selectedEventName = computed(() =>
eventOptions.value.find(e => e.value === selectedEventId.value)?.title ?? '',
)
watch(modelValue, (open) => {
if (open) {
watch(modelValue, open => {
if (open)
selectedEventId.value = null
}
})
function onImport() {
if (!selectedEventId.value) return
if (!selectedEventId.value)
return
const name = selectedEventName.value
importFields(selectedEventId.value, {
onSuccess: (data) => {
onSuccess: data => {
const count = Array.isArray(data) ? data.length : 0
modelValue.value = false
emit('imported', count, name)
},

View File

@@ -1,6 +1,5 @@
<script setup lang="ts">
import type { RegistrationFormField } from '@/types/registration-form-field'
import type { NormalizedOption } from '@/types/registration-form-field'
import type { NormalizedOption, RegistrationFormField } from '@/types/registration-form-field'
import { FIELD_TYPE_LABELS } from '@/types/registration-field-template'
defineProps<{
@@ -13,9 +12,12 @@ defineEmits<{
}>()
function formatOptions(options: NormalizedOption[] | null): string {
if (!options?.length) return ''
if (!options?.length)
return ''
const labels = options.map(o => o.label)
if (labels.length <= 5) return labels.join(', ')
if (labels.length <= 5)
return labels.join(', ')
return `${labels.slice(0, 5).join(', ')}, +${labels.length - 5} meer`
}
</script>

View File

@@ -1,11 +1,11 @@
<script setup lang="ts">
import { VForm } from 'vuetify/components/VForm'
import type { AxiosError } from 'axios'
import { usePersonTagCategories } from '@/composables/api/usePersonTags'
import { requiredValidator } from '@core/utils/validators'
import type { RegistrationFormField, RegistrationFormFieldCreateDTO } from '@/types/registration-form-field'
import type { RegistrationFieldType, FieldDisplayWidth } from '@/types/registration-field-template'
import type { FieldDisplayWidth, RegistrationFieldType } from '@/types/registration-field-template'
import { FIELD_TYPES_WITH_OPTIONS } from '@/types/registration-field-template'
import type { AxiosError } from 'axios'
import type { ApiErrorResponse } from '@/types/auth'
const props = defineProps<{
@@ -75,7 +75,7 @@ const showOptions = computed(() =>
const showTagCategory = computed(() => form.value.field_type === 'tag_picker')
watch(modelValue, (open) => {
watch(modelValue, open => {
if (open) {
errors.value = {}
if (props.field) {
@@ -110,18 +110,19 @@ function removeOption(index: number) {
function onSubmit() {
refVForm.value?.validate().then(({ valid }) => {
if (!valid) return
if (!valid)
return
errors.value = {}
const payload: Partial<RegistrationFormFieldCreateDTO> = {
label: form.value.label,
help_text: form.value.help_text || null,
display_width: form.value.display_width,
}
if (!props.field) {
if (!props.field)
payload.field_type = form.value.field_type as RegistrationFieldType
}
if (!isHeading.value) {
payload.is_required = form.value.is_required
@@ -141,12 +142,11 @@ function onSubmit() {
payload.options = null
}
if (showTagCategory.value) {
if (showTagCategory.value)
payload.tag_categories = form.value.tag_categories.length > 0 ? form.value.tag_categories : null
}
else {
else
payload.tag_categories = null
}
}
emit('save', payload)