feat: split name into first_name + last_name across users, persons, and companies

Cross-cutting migration affecting the entire stack:
- Database: 3 migrations splitting name columns with data migration
- Models: first_name/last_name on User, Person; contact_first_name/contact_last_name on Company; backward-compatible name accessors
- API: all resources return first_name, last_name, full_name; assignablePersons endpoint updated
- Requests: validation rules updated for all person/user/company forms
- Services: VolunteerRegistrationService, ShiftAssignmentService, InvitationService updated
- Frontend: TypeScript types, Zod schemas, all forms split into Voornaam/Achternaam fields
- Display: all person/user name references use full_name; initials use first_name[0]+last_name[0]
- Tests: all 371 tests passing
- Docs: SCHEMA.md and API.md updated

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-04-10 23:04:55 +02:00
parent bd4297f891
commit d2f282eb4c
66 changed files with 654 additions and 220 deletions

View File

@@ -16,7 +16,7 @@ const stats = [
<VCard class="mb-6">
<VCardText>
<h4 class="text-h4 mb-1">
Welkom, {{ authStore.user?.name ?? 'gebruiker' }}! 👋
Welkom, {{ authStore.user?.full_name ?? 'gebruiker' }}! 👋
</h4>
<p class="text-body-1 mb-0">
{{ authStore.currentOrganisation?.name ?? 'Geen organisatie geselecteerd' }}

View File

@@ -84,7 +84,7 @@ const statusColor: Record<PersonStatus, string> = {
}
const headers = [
{ title: 'Naam', key: 'name' },
{ title: 'Naam', key: 'full_name' },
{ title: 'E-mail', key: 'email' },
{ title: 'Crowd Type', key: 'crowd_type' },
{ title: 'Status', key: 'status' },
@@ -137,7 +137,7 @@ function onRowClick(_event: Event, row: { item: Person }) {
function onApprove(person: Person) {
approvePerson(person.id, {
onSuccess: () => {
successMessage.value = `${person.name} goedgekeurd`
successMessage.value = `${person.full_name} goedgekeurd`
showSuccess.value = true
},
})
@@ -155,7 +155,7 @@ function onDeleteConfirm(person: Person) {
function onDeleteExecute() {
if (!deletingPerson.value) return
const name = deletingPerson.value.name
const name = deletingPerson.value.full_name
deletePerson(deletingPerson.value.id, {
onSuccess: () => {
@@ -284,16 +284,16 @@ const crowdTypeOptions = computed(() => [
hover
@click:row="onRowClick"
>
<template #item.name="{ item }">
<template #item.full_name="{ item }">
<div class="d-flex align-center gap-x-3">
<VAvatar
size="32"
color="primary"
variant="tonal"
>
<span class="text-caption">{{ getInitials(item.name) }}</span>
<span class="text-caption">{{ getInitials(item.full_name) }}</span>
</VAvatar>
<span>{{ item.name }}</span>
<span>{{ item.full_name }}</span>
</div>
</template>
@@ -387,7 +387,7 @@ const crowdTypeOptions = computed(() => [
>
<VCard title="Persoon verwijderen">
<VCardText>
Weet je zeker dat je <strong>{{ deletingPerson?.name }}</strong> wilt verwijderen?
Weet je zeker dat je <strong>{{ deletingPerson?.full_name }}</strong> wilt verwijderen?
</VCardText>
<VCardActions>
<VSpacer />

View File

@@ -60,7 +60,7 @@ const filteredCompanies = computed(() => {
const headers = [
{ title: 'Naam', key: 'name' },
{ title: 'Type', key: 'type' },
{ title: 'Contactpersoon', key: 'contact_name' },
{ title: 'Contactpersoon', key: 'contact_full_name' },
{ title: 'E-mail', key: 'contact_email' },
{ title: 'Telefoon', key: 'contact_phone' },
{ title: 'Acties', key: 'actions', sortable: false, align: 'end' as const },
@@ -218,8 +218,8 @@ function onSaved() {
</VChip>
</template>
<template #item.contact_name="{ item }">
{{ item.contact_name ?? '-' }}
<template #item.contact_full_name="{ item }">
{{ item.contact_full_name ?? '-' }}
</template>
<template #item.contact_email="{ item }">

View File

@@ -60,7 +60,7 @@ const roleLabelMap: Record<string, string> = {
const memberHeaders = computed(() => {
const headers: Array<{ title: string; key: string; sortable?: boolean }> = [
{ title: 'Naam', key: 'name' },
{ title: 'Naam', key: 'full_name' },
{ title: 'E-mailadres', key: 'email' },
{ title: 'Rol', key: 'role' },
]
@@ -187,7 +187,7 @@ function confirmRevokeInvitation() {
:items-per-page="-1"
hide-default-footer
>
<template #item.name="{ item }">
<template #item.full_name="{ item }">
<div class="d-flex align-center gap-x-3">
<VAvatar
v-if="item.avatar"
@@ -200,9 +200,9 @@ function confirmRevokeInvitation() {
color="primary"
variant="tonal"
>
<span class="text-sm">{{ getInitials(item.name) }}</span>
<span class="text-sm">{{ getInitials(item.full_name) }}</span>
</VAvatar>
<span>{{ item.name }}</span>
<span>{{ item.full_name }}</span>
</div>
</template>
@@ -305,7 +305,7 @@ function confirmRevokeInvitation() {
>
<VCard title="Lid verwijderen">
<VCardText>
Weet je zeker dat je <strong>{{ memberToRemove?.name }}</strong> wilt verwijderen uit de organisatie?
Weet je zeker dat je <strong>{{ memberToRemove?.full_name }}</strong> wilt verwijderen uit de organisatie?
</VCardText>
<VCardActions>
<VSpacer />