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:
@@ -25,6 +25,11 @@ const selectedPersonId = ref<string>('')
|
||||
const errors = ref<Record<string, string>>({})
|
||||
const showSuccess = ref(false)
|
||||
|
||||
const generalError = computed(() => {
|
||||
const keys = Object.keys(errors.value).filter(k => k !== 'person_id')
|
||||
return keys.length ? errors.value[keys[0]] : ''
|
||||
})
|
||||
|
||||
// Check for overlap warning
|
||||
const hasOverlapWarning = computed(() => {
|
||||
if (!selectedPersonId.value || !props.shift) return false
|
||||
@@ -34,7 +39,7 @@ const hasOverlapWarning = computed(() => {
|
||||
|
||||
const personItems = computed(() =>
|
||||
persons.value.map((p: Person) => ({
|
||||
title: `${p.name} — ${p.email}`,
|
||||
title: `${p.full_name} — ${p.email}`,
|
||||
value: p.id,
|
||||
props: {
|
||||
subtitle: p.crowd_type?.name ?? '',
|
||||
@@ -106,6 +111,15 @@ function onSubmit() {
|
||||
|
||||
<VDivider class="mb-4" />
|
||||
|
||||
<VAlert
|
||||
v-if="generalError"
|
||||
type="error"
|
||||
variant="tonal"
|
||||
class="mb-4"
|
||||
>
|
||||
{{ generalError }}
|
||||
</VAlert>
|
||||
|
||||
<!-- Person search -->
|
||||
<VAutocomplete
|
||||
v-model="selectedPersonId"
|
||||
|
||||
Reference in New Issue
Block a user