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:
@@ -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 />
|
||||
|
||||
Reference in New Issue
Block a user