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:
@@ -16,7 +16,9 @@ final class CompanyResource extends JsonResource
|
||||
'organisation_id' => $this->organisation_id,
|
||||
'name' => $this->name,
|
||||
'type' => $this->type,
|
||||
'contact_name' => $this->contact_name,
|
||||
'contact_first_name' => $this->contact_first_name,
|
||||
'contact_last_name' => $this->contact_last_name,
|
||||
'contact_full_name' => $this->contact_full_name,
|
||||
'contact_email' => $this->contact_email,
|
||||
'contact_phone' => $this->contact_phone,
|
||||
'persons_count' => $this->whenCounted('persons'),
|
||||
|
||||
@@ -13,7 +13,9 @@ final class MeResource extends JsonResource
|
||||
{
|
||||
return [
|
||||
'id' => $this->id,
|
||||
'name' => $this->name,
|
||||
'first_name' => $this->first_name,
|
||||
'last_name' => $this->last_name,
|
||||
'full_name' => $this->full_name,
|
||||
'email' => $this->email,
|
||||
'timezone' => $this->timezone,
|
||||
'locale' => $this->locale,
|
||||
|
||||
@@ -13,7 +13,9 @@ final class MemberResource extends JsonResource
|
||||
{
|
||||
return [
|
||||
'id' => $this->id,
|
||||
'name' => $this->name,
|
||||
'first_name' => $this->first_name,
|
||||
'last_name' => $this->last_name,
|
||||
'full_name' => $this->full_name,
|
||||
'email' => $this->email,
|
||||
'role' => $this->pivot?->role,
|
||||
'avatar' => $this->avatar,
|
||||
|
||||
@@ -14,7 +14,9 @@ final class PersonResource extends JsonResource
|
||||
return [
|
||||
'id' => $this->id,
|
||||
'event_id' => $this->event_id,
|
||||
'name' => $this->name,
|
||||
'first_name' => $this->first_name,
|
||||
'last_name' => $this->last_name,
|
||||
'full_name' => $this->full_name,
|
||||
'email' => $this->email,
|
||||
'phone' => $this->phone,
|
||||
'status' => $this->status,
|
||||
@@ -33,7 +35,9 @@ final class PersonResource extends JsonResource
|
||||
'match_id' => $match->id,
|
||||
'matched_user' => [
|
||||
'id' => $match->matchedUser->id,
|
||||
'name' => $match->matchedUser->name,
|
||||
'first_name' => $match->matchedUser->first_name,
|
||||
'last_name' => $match->matchedUser->last_name,
|
||||
'full_name' => $match->matchedUser->full_name,
|
||||
'email' => $match->matchedUser->email,
|
||||
],
|
||||
'matched_on' => $match->matched_on->value,
|
||||
|
||||
@@ -13,7 +13,9 @@ final class UserResource extends JsonResource
|
||||
{
|
||||
return [
|
||||
'id' => $this->id,
|
||||
'name' => $this->name,
|
||||
'first_name' => $this->first_name,
|
||||
'last_name' => $this->last_name,
|
||||
'full_name' => $this->full_name,
|
||||
'email' => $this->email,
|
||||
'roles' => $this->getRoleNames()->values()->all(),
|
||||
'timezone' => $this->timezone,
|
||||
|
||||
Reference in New Issue
Block a user