Add calendar-based booking system: accounts, availability, admin calendar

- Customer accounts (separate auth collection) with /konto area
- Availability + AvailabilityOverrides collections driving real slot calculation
- BookingRequests with race-safe confirmation (Postgres advisory lock + transaction)
- Booking emails (request received, admin notify, confirmed, rejected, alternative proposed/accepted, cancelled)
- Confirmed online bookings auto-create a private linked video-call Event
- Custom Payload admin calendar view (month grid + day schedule)
- Wired booking widget into offer pages and /termin-buchen
This commit is contained in:
2026-08-25 16:52:34 +02:00
parent 45261a0461
commit 5d83c0dc1e
11 changed files with 611 additions and 30 deletions
+14 -2
View File
@@ -8,7 +8,7 @@ import { groupOffersByCategory } from "@/lib/angebote";
import { mainNav, ctaNav, siteConfig } from "@/lib/site";
import type { Offer } from "@/payload-types";
export function Navbar({ offers }: { offers: Offer[] }) {
export function Navbar({ offers, customerName }: { offers: Offer[]; customerName?: string | null }) {
const pathname = usePathname();
const groups = groupOffersByCategory(offers);
const [megaOpen, setMegaOpen] = useState(false);
@@ -173,7 +173,13 @@ export function Navbar({ offers }: { offers: Offer[] }) {
)}
</nav>
<div className="hidden lg:block">
<div className="hidden items-center gap-5 lg:flex">
<Link
href={customerName ? "/konto" : "/login"}
className="text-[15px] font-medium text-anouma-plum/90 transition-colors hover:text-anouma-mauve-dark"
>
{customerName ? "Mein Konto" : "Anmelden"}
</Link>
<Link
href={ctaNav.href}
className="rounded-full bg-anouma-mauve-dark px-6 py-2.5 text-sm font-medium text-white transition-colors hover:bg-anouma-plum"
@@ -300,6 +306,12 @@ export function Navbar({ offers }: { offers: Offer[] }) {
</Link>
)
)}
<Link
href={customerName ? "/konto" : "/login"}
className="border-b border-anouma-taupe/10 py-4 text-lg font-medium text-anouma-plum"
>
{customerName ? "Mein Konto" : "Anmelden"}
</Link>
<Link
href={ctaNav.href}
className="mt-6 rounded-full bg-anouma-mauve-dark px-6 py-4 text-center text-base font-medium text-white"