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:
@@ -4,6 +4,7 @@ import { dutchPlural } from '@/lib/dutch-plural'
|
||||
import { useAuthStore } from '@/stores/useAuthStore'
|
||||
import { useOrganisationStore } from '@/stores/useOrganisationStore'
|
||||
import EditEventDialog from '@/components/events/EditEventDialog.vue'
|
||||
import RegistrationLinkCard from '@/components/events/RegistrationLinkCard.vue'
|
||||
import type { EventStatus } from '@/types/event'
|
||||
|
||||
const route = useRoute()
|
||||
@@ -177,6 +178,12 @@ const backRoute = computed(() => {
|
||||
</VBtn>
|
||||
</div>
|
||||
|
||||
<!-- Registration link (top-level events only) -->
|
||||
<RegistrationLinkCard
|
||||
v-if="!event.parent_event_id"
|
||||
:event="event"
|
||||
/>
|
||||
|
||||
<!-- Horizontal tabs -->
|
||||
<VTabs
|
||||
:model-value="activeTab"
|
||||
|
||||
73
apps/app/src/components/events/RegistrationLinkCard.vue
Normal file
73
apps/app/src/components/events/RegistrationLinkCard.vue
Normal file
@@ -0,0 +1,73 @@
|
||||
<script setup lang="ts">
|
||||
import type { EventItem } from '@/types/event'
|
||||
|
||||
const props = defineProps<{
|
||||
event: EventItem
|
||||
}>()
|
||||
|
||||
const portalBaseUrl = import.meta.env.VITE_PORTAL_URL || 'https://portal.crewli.app'
|
||||
|
||||
const registrationUrl = computed(() =>
|
||||
`${portalBaseUrl}/register/${props.event.slug}`,
|
||||
)
|
||||
|
||||
const isRegistrationOpen = computed(() =>
|
||||
props.event.status === 'registration_open',
|
||||
)
|
||||
|
||||
const copied = ref(false)
|
||||
|
||||
async function copyLink() {
|
||||
await navigator.clipboard.writeText(registrationUrl.value)
|
||||
copied.value = true
|
||||
setTimeout(() => { copied.value = false }, 2000)
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<VCard
|
||||
v-if="event"
|
||||
variant="outlined"
|
||||
class="mb-4"
|
||||
>
|
||||
<VCardText>
|
||||
<div class="d-flex align-center justify-space-between flex-wrap ga-2">
|
||||
<div>
|
||||
<div class="text-subtitle-2 text-medium-emphasis mb-1">
|
||||
Vrijwilligersregistratie
|
||||
</div>
|
||||
<template v-if="isRegistrationOpen">
|
||||
<code class="text-body-2">{{ registrationUrl }}</code>
|
||||
</template>
|
||||
<template v-else>
|
||||
<span class="text-body-2 text-medium-emphasis">
|
||||
Zet de status op 'Registratie open' om het formulier te activeren.
|
||||
</span>
|
||||
</template>
|
||||
</div>
|
||||
<div
|
||||
v-if="isRegistrationOpen"
|
||||
class="d-flex ga-2"
|
||||
>
|
||||
<VBtn
|
||||
size="small"
|
||||
variant="outlined"
|
||||
prepend-icon="tabler-copy"
|
||||
@click="copyLink"
|
||||
>
|
||||
{{ copied ? 'Gekopieerd!' : 'Kopieer link' }}
|
||||
</VBtn>
|
||||
<VBtn
|
||||
size="small"
|
||||
variant="outlined"
|
||||
prepend-icon="tabler-external-link"
|
||||
:href="registrationUrl"
|
||||
target="_blank"
|
||||
>
|
||||
Open formulier
|
||||
</VBtn>
|
||||
</div>
|
||||
</div>
|
||||
</VCardText>
|
||||
</VCard>
|
||||
</template>
|
||||
Reference in New Issue
Block a user