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:
@@ -18,7 +18,8 @@ const isEdit = computed(() => !!props.company)
|
||||
const form = ref({
|
||||
name: '',
|
||||
type: 'supplier' as Company['type'],
|
||||
contact_name: '',
|
||||
contact_first_name: '',
|
||||
contact_last_name: '',
|
||||
contact_email: '',
|
||||
contact_phone: '',
|
||||
})
|
||||
@@ -44,7 +45,8 @@ watch(() => props.company, (c) => {
|
||||
form.value = {
|
||||
name: c.name,
|
||||
type: c.type,
|
||||
contact_name: c.contact_name ?? '',
|
||||
contact_first_name: c.contact_first_name ?? '',
|
||||
contact_last_name: c.contact_last_name ?? '',
|
||||
contact_email: c.contact_email ?? '',
|
||||
contact_phone: c.contact_phone ?? '',
|
||||
}
|
||||
@@ -55,7 +57,8 @@ function resetForm() {
|
||||
form.value = {
|
||||
name: '',
|
||||
type: 'supplier',
|
||||
contact_name: '',
|
||||
contact_first_name: '',
|
||||
contact_last_name: '',
|
||||
contact_email: '',
|
||||
contact_phone: '',
|
||||
}
|
||||
@@ -76,7 +79,8 @@ function onSubmit() {
|
||||
const payload = {
|
||||
name: form.value.name,
|
||||
type: form.value.type,
|
||||
contact_name: form.value.contact_name || null,
|
||||
contact_first_name: form.value.contact_first_name || null,
|
||||
contact_last_name: form.value.contact_last_name || null,
|
||||
contact_email: form.value.contact_email || null,
|
||||
contact_phone: form.value.contact_phone || null,
|
||||
}
|
||||
@@ -140,11 +144,25 @@ function onSubmit() {
|
||||
:error-messages="errors.type"
|
||||
/>
|
||||
</VCol>
|
||||
<VCol cols="12">
|
||||
<VCol
|
||||
cols="12"
|
||||
md="6"
|
||||
>
|
||||
<AppTextField
|
||||
v-model="form.contact_name"
|
||||
label="Contactpersoon"
|
||||
:error-messages="errors.contact_name"
|
||||
v-model="form.contact_first_name"
|
||||
label="Voornaam contactpersoon"
|
||||
:error-messages="errors.contact_first_name"
|
||||
autocomplete="one-time-code"
|
||||
/>
|
||||
</VCol>
|
||||
<VCol
|
||||
cols="12"
|
||||
md="6"
|
||||
>
|
||||
<AppTextField
|
||||
v-model="form.contact_last_name"
|
||||
label="Achternaam contactpersoon"
|
||||
:error-messages="errors.contact_last_name"
|
||||
autocomplete="one-time-code"
|
||||
/>
|
||||
</VCol>
|
||||
|
||||
Reference in New Issue
Block a user