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

@@ -75,7 +75,7 @@ async function executeReassign(assignment: ShiftAssignment) {
shiftId: assignment.shift_id,
personId: assignment.person_id,
})
successMessage.value = `${assignment.person?.name ?? 'Persoon'} opnieuw toegewezen`
successMessage.value = `${assignment.person?.full_name ?? 'Persoon'} opnieuw toegewezen`
showSuccess.value = true
}
catch {
@@ -186,7 +186,7 @@ const successMessage = ref('')
function onApprove(assignment: ShiftAssignment) {
approveAssignment(assignment.id, {
onSuccess: () => {
successMessage.value = `${assignment.person?.name ?? 'Toewijzing'} goedgekeurd`
successMessage.value = `${assignment.person?.full_name ?? 'Toewijzing'} goedgekeurd`
showSuccess.value = true
},
})
@@ -199,7 +199,7 @@ function onCancel(assignment: ShiftAssignment) {
function onCancelExecute() {
if (!cancellingAssignment.value) return
const name = cancellingAssignment.value.person?.name ?? 'Toewijzing'
const name = cancellingAssignment.value.person?.full_name ?? 'Toewijzing'
cancelAssignment(cancellingAssignment.value.id, {
onSuccess: () => {
@@ -224,7 +224,7 @@ function onReject(assignment: ShiftAssignment) {
function onRejectExecute() {
if (!rejectingAssignment.value) return
const name = rejectingAssignment.value.person?.name ?? 'Toewijzing'
const name = rejectingAssignment.value.person?.full_name ?? 'Toewijzing'
rejectAssignment(
{
@@ -644,14 +644,14 @@ function fillRateColor(): string {
variant="tonal"
>
<span class="text-caption">
{{ assignment.person ? getInitials(assignment.person.name) : '?' }}
{{ assignment.person ? getInitials(assignment.person.full_name) : '?' }}
</span>
</VAvatar>
<div style="min-width: 0;" class="flex-grow-1">
<div class="d-flex align-center gap-x-2 flex-wrap">
<span class="text-body-2 font-weight-medium text-truncate">
{{ assignment.person?.name ?? 'Onbekend' }}
{{ assignment.person?.full_name ?? 'Onbekend' }}
</span>
<VChip
v-if="assignment.status === ShiftAssignmentStatus.REJECTED"
@@ -775,7 +775,7 @@ function fillRateColor(): string {
<VCard title="Toewijzing afwijzen">
<VCardText>
Weet je zeker dat je de toewijzing van
<strong>{{ rejectingAssignment?.person?.name ?? 'deze persoon' }}</strong>
<strong>{{ rejectingAssignment?.person?.full_name ?? 'deze persoon' }}</strong>
wilt afwijzen?
<VTextarea
@@ -814,7 +814,7 @@ function fillRateColor(): string {
<VCard title="Toewijzing annuleren">
<VCardText>
Weet je zeker dat je de toewijzing van
<strong>{{ cancellingAssignment?.person?.name ?? 'deze persoon' }}</strong>
<strong>{{ cancellingAssignment?.person?.full_name ?? 'deze persoon' }}</strong>
wilt annuleren?
</VCardText>
<VCardActions>
@@ -877,7 +877,7 @@ function fillRateColor(): string {
Vrijwilliger opnieuw toewijzen?
</VCardTitle>
<VCardText class="px-5">
<strong>{{ reassigningAssignment?.person?.name ?? 'Deze persoon' }}</strong>
<strong>{{ reassigningAssignment?.person?.full_name ?? 'Deze persoon' }}</strong>
heeft zichzelf afgemeld voor deze shift. Weet je zeker dat je deze
persoon opnieuw wilt toewijzen?
</VCardText>