mirror of
https://github.com/tomru/pfadi-bussle.git
synced 2026-03-03 06:27:11 +01:00
remover booker, that's overdosed
It also brings the problem of consolidating bookers over multiple bookings. The amount of data is not justifying having it in an own entity
This commit is contained in:
@@ -21,7 +21,7 @@ export function generateCalendarEntry(booking: Booking): string {
|
||||
duration: { days: booking.days.length },
|
||||
location: 'Mömpelgardgasse 25, 72348 Rosenfeld, Deutschland',
|
||||
geo: { lat: 48.287044, lon: 8.726361 },
|
||||
description: `Gebucht auf ${booking.booker.name}
|
||||
description: `Gebucht auf ${booking.name}
|
||||
|
||||
Buchungs-Link: ${getBaseURL()}/booking/${booking.uuid}
|
||||
`,
|
||||
@@ -39,18 +39,27 @@ Buchungs-Link: ${getBaseURL()}/booking/${booking.uuid}
|
||||
}
|
||||
|
||||
export function generateBookedCalendar(bookings: Booking[]): string {
|
||||
const events = bookings.map((booking): { productId: string; calName: string; start: [number, number, number]; startOutputType: 'local' | 'utc'; duration: { days: number }; title: string; description: string; status: EventStatus } => ({
|
||||
const events = bookings.map((booking): {
|
||||
productId: string
|
||||
calName: string
|
||||
start: [number, number, number]
|
||||
startOutputType: 'local' | 'utc'
|
||||
duration: { days: number }
|
||||
title: string
|
||||
description: string
|
||||
status: EventStatus
|
||||
} => ({
|
||||
productId: 'app.vercel.pfadi-bussle/ics',
|
||||
calName: 'Pfadi-Bussle Buchungen',
|
||||
start: convertDay(booking.days[0]),
|
||||
startOutputType: 'local',
|
||||
duration: { days: booking.days.length },
|
||||
title: `Buchung ${booking.booker.name}`,
|
||||
description: `Name: ${booking.booker.name}
|
||||
title: `Buchung ${booking.name}`,
|
||||
description: `Name: ${booking.name}
|
||||
Zeitraum: ${daysFormatFrontend(booking.days)}
|
||||
|
||||
Email: ${booking.booker.email}
|
||||
Telefon: ${booking.booker.phone}
|
||||
Email: ${booking.email}
|
||||
Telefon: ${booking.phone}
|
||||
|
||||
Link: ${getBaseURL()}/admin/booking/${booking.uuid}
|
||||
`,
|
||||
|
||||
Reference in New Issue
Block a user