feat: add CMS inquiries and group bookings

This commit is contained in:
2026-09-17 15:48:40 +02:00
parent 97dd32a2b4
commit a2b3e99174
28 changed files with 1200 additions and 45 deletions
+21 -7
View File
@@ -4,7 +4,7 @@ import { Section, SectionHeading } from "@/components/Section";
import { ContactForm } from "@/components/ContactForm";
import { AngebotCard } from "@/components/AngebotCard";
import { Reveal } from "@/components/Reveal";
import { getBookingGlobal, getContactGlobal, getSEOSettingsGlobal } from "@/lib/payload/globals";
import { getBookingGlobal, getSEOSettingsGlobal } from "@/lib/payload/globals";
import { getOffers } from "@/lib/payload/content";
import { moodForOffer } from "@/lib/angebote";
import { mediaUrl } from "@/lib/payload/media";
@@ -36,7 +36,7 @@ export async function generateMetadata(): Promise<Metadata> {
}
export default async function TerminBuchenPage() {
const [booking, contact, offers] = await Promise.all([getBookingGlobal(), getContactGlobal(), getOffers()]);
const [booking, offers] = await Promise.all([getBookingGlobal(), getOffers()]);
const bookableOffers = offers.filter((offer) => offer.bookable);
const siteUrl = await getSiteUrl();
@@ -56,8 +56,25 @@ export default async function TerminBuchenPage() {
crumbs={[{ title: "Termin buchen" }]}
/>
<Section tone="cream">
<div className="mx-auto grid max-w-4xl gap-5 md:grid-cols-2">
<a href="#freie-termine" className="rounded-3xl bg-white p-7 transition-transform hover:-translate-y-1">
<p className="text-xs font-medium uppercase tracking-[0.18em] text-anouma-dustyrose">Direkt buchen</p>
<h2 className="mt-3 font-serif text-2xl font-medium text-anouma-plum">Freien Termin auswählen</h2>
<p className="mt-3 text-sm leading-relaxed text-anouma-plum/80">Wähle ein Angebot, einen freien Tag und eine passende Uhrzeit im Kalender.</p>
<span className="mt-5 inline-flex rounded-full bg-anouma-mauve-dark px-5 py-2.5 text-sm font-medium text-white">Zum Kalender</span>
</a>
<a href="/kontakt?subject=Terminanfrage" className="rounded-3xl bg-anouma-plum p-7 transition-transform hover:-translate-y-1">
<p className="text-xs font-medium uppercase tracking-[0.18em] text-anouma-cream-light/75">Persönlich abstimmen</p>
<h2 className="mt-3 font-serif text-2xl font-medium text-white">Anfrage stellen</h2>
<p className="mt-3 text-sm leading-relaxed text-white/80">Wenn du keinen freien Kalendertermin brauchst oder etwas Besonderes besprechen möchtest.</p>
<span className="mt-5 inline-flex rounded-full bg-white px-5 py-2.5 text-sm font-medium text-anouma-plum">Zur Kontaktseite</span>
</a>
</div>
</Section>
{bookableOffers.length > 0 && (
<Section tone="plain">
<Section tone="plain" id="freie-termine">
<SectionHeading eyebrow="Angebot auswählen" title="Wofür möchtest du einen Termin?" />
<div className="mt-14 grid gap-6 sm:grid-cols-2 lg:grid-cols-3">
{bookableOffers.map((offer, i) => (
@@ -105,14 +122,11 @@ export default async function TerminBuchenPage() {
/>
<div className="mt-10">
<ContactForm
toEmail={contact.email}
subjectPrefix="Terminanfrage über anouma.org"
type="appointment"
submitLabel="Terminanfrage senden"
/>
</div>
{booking.formNote && (
<p className="mt-8 text-sm leading-relaxed text-anouma-plum/80">{booking.formNote}</p>
)}
</div>
</Section>
</>