Initial commit: ANOUMA website with Payload CMS, WebRTC meetings, and booking system
- Next.js 16 App Router site with the ANOUMA design system - Payload CMS (PostgreSQL) for offers, events, posts and page content - WebRTC video-call system with custom signaling server - SMTP email reminders and booking-request notifications - Customer accounts, calendar-based availability, and booking workflow
This commit is contained in:
@@ -0,0 +1,69 @@
|
||||
import type { CollectionConfig } from "payload";
|
||||
import { isAdmin } from "@/access";
|
||||
|
||||
export const WEEKDAYS = [
|
||||
{ label: "Montag", value: "monday" },
|
||||
{ label: "Dienstag", value: "tuesday" },
|
||||
{ label: "Mittwoch", value: "wednesday" },
|
||||
{ label: "Donnerstag", value: "thursday" },
|
||||
{ label: "Freitag", value: "friday" },
|
||||
{ label: "Samstag", value: "saturday" },
|
||||
{ label: "Sonntag", value: "sunday" },
|
||||
] as const;
|
||||
|
||||
export const Availability: CollectionConfig = {
|
||||
slug: "availability",
|
||||
labels: {
|
||||
singular: "Verfügbarkeit",
|
||||
plural: "Verfügbarkeiten",
|
||||
},
|
||||
admin: {
|
||||
useAsTitle: "weekday",
|
||||
defaultColumns: ["weekday", "startTime", "endTime", "active"],
|
||||
group: "Buchungen",
|
||||
description: "Wiederkehrende wöchentliche Arbeitszeiten für Buchungsanfragen. Kein Eintrag = an diesem Tag nicht verfügbar.",
|
||||
},
|
||||
access: {
|
||||
read: () => true,
|
||||
create: isAdmin,
|
||||
update: isAdmin,
|
||||
delete: isAdmin,
|
||||
},
|
||||
fields: [
|
||||
{
|
||||
name: "weekday",
|
||||
type: "select",
|
||||
label: "Wochentag",
|
||||
required: true,
|
||||
options: [...WEEKDAYS],
|
||||
},
|
||||
{
|
||||
type: "row",
|
||||
fields: [
|
||||
{
|
||||
name: "startTime",
|
||||
type: "date",
|
||||
label: "Start",
|
||||
required: true,
|
||||
admin: { date: { pickerAppearance: "timeOnly", displayFormat: "HH:mm" }, width: "50%" },
|
||||
},
|
||||
{
|
||||
name: "endTime",
|
||||
type: "date",
|
||||
label: "Ende",
|
||||
required: true,
|
||||
admin: { date: { pickerAppearance: "timeOnly", displayFormat: "HH:mm" }, width: "50%" },
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
name: "active",
|
||||
type: "checkbox",
|
||||
label: "Aktiv",
|
||||
defaultValue: true,
|
||||
admin: {
|
||||
description: "Deaktivieren statt löschen, um eine Zeitspanne vorübergehend auszusetzen.",
|
||||
},
|
||||
},
|
||||
],
|
||||
};
|
||||
Reference in New Issue
Block a user