feat: event registration branding with vertical wizard layout
- Add registration_banner_url, registration_welcome_text, registration_logo_url columns to events table with migration - Add uploadImage endpoint (POST .../upload-image) with form request validation for banner and logo images (jpg/png/webp, max 5MB) - Include branding fields in EventResource and PublicRegistrationDataController - Build registration settings UI in organizer event settings page with banner/logo upload and welcome text editor - Redesign portal registration page: hero banner with gradient overlay, welcome text card, vertical step navigation (desktop) / horizontal chips (mobile), two-column form fields with density="comfortable" - Update success page with event banner and consistent branding - Seed welcome text for Echt Feesten 2026 - Add 9 PHPUnit tests covering image upload, branding fields in API responses Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -132,6 +132,29 @@ export function useUpdateEvent(orgId: Ref<string>, id: Ref<string>) {
|
||||
})
|
||||
}
|
||||
|
||||
export function useUploadEventImage(orgId: Ref<string>, eventId: Ref<string>) {
|
||||
const queryClient = useQueryClient()
|
||||
|
||||
return useMutation({
|
||||
mutationFn: async ({ file, type }: { file: File; type: 'banner' | 'logo' }) => {
|
||||
const formData = new FormData()
|
||||
formData.append('image', file)
|
||||
formData.append('type', type)
|
||||
|
||||
const { data } = await apiClient.post<{ url: string }>(
|
||||
`/organisations/${orgId.value}/events/${eventId.value}/upload-image`,
|
||||
formData,
|
||||
{ headers: { 'Content-Type': 'multipart/form-data' } },
|
||||
)
|
||||
|
||||
return data.url
|
||||
},
|
||||
onSuccess: () => {
|
||||
queryClient.invalidateQueries({ queryKey: ['events', orgId.value, eventId.value] })
|
||||
},
|
||||
})
|
||||
}
|
||||
|
||||
export function useEventStats(eventId: Ref<string>) {
|
||||
return useQuery({
|
||||
queryKey: ['events', eventId, 'stats'],
|
||||
|
||||
Reference in New Issue
Block a user