feat: donations

This commit is contained in:
Benno Tielen 2026-01-06 13:34:07 +01:00
parent f210842a4a
commit 55ed5e2334
24 changed files with 15804 additions and 24 deletions

View file

@ -27,7 +27,8 @@ export default async function ParishPage ({ params }: { params: Promise<{slug: s
contact,
photo,
churches,
gallery
gallery,
content
} = parish.docs[0]
const events = await fetchEvents({ parishId: id })
const churchIds = churches.map(c => typeof c === "string" ? c : c.id)
@ -51,6 +52,7 @@ export default async function ParishPage ({ params }: { params: Promise<{slug: s
announcement={announcement && typeof announcement.document === "object" ? announcement.document.url || undefined : undefined}
calendar={calendar && typeof calendar.document === "object" ? calendar.document.url || undefined : undefined}
gallery={gallery ? transformGallery(gallery) : undefined}
content={content}
/>
<AdminMenu
collection={"parish"}

View file

@ -0,0 +1,55 @@
import { PageHeader } from '@/compositions/PageHeader/PageHeader'
import { fetchDonationForm } from '@/fetch/donationform'
import { notFound } from 'next/navigation'
import { RichText } from '@payloadcms/richtext-lexical/react'
import { Container } from '@/components/Container/Container'
import { Section } from '@/components/Section/Section'
import styles from '@/components/DonationForm/styles.module.scss'
import { Row } from '@/components/Flex/Row'
import { Col } from '@/components/Flex/Col'
import { Image } from '@/components/Image/Image'
import { getPhoto } from '@/utils/dto/gallery'
export default async function DonationPage({ params }: { params: Promise<{id: string}>}) {
const id = (await params).id;
const data = await fetchDonationForm(id);
if(!data) {
notFound()
}
const image = data.photo;
return (
<>
<PageHeader
title={'Spendenformular'}
description={'Wir freuen uns über jede Spende und wissen: „Wer gibt, empfängt!“ (Lk 6,38)'}
/>
<Container>
<Section padding={"small"} paddingBottom={"medium"}>
<Row alignItems={"center"}>
<Col>
{ typeof image == "object" && image.url &&
<Image src={image.url} width={300} height={300} alt=""/>
}
</Col>
<Col>
<RichText data={data.text} />
</Col>
</Row>
</Section>
<Section padding={"small"} paddingBottom={"large"}>
<iframe
className={styles.iframe}
scrolling="no"
src={data.url}
width="100%"
height="800px">
</iframe>
</Section>
</Container>
</>
)
}

View file

@ -0,0 +1,44 @@
import { CollectionConfig } from 'payload'
import { isAdminOrEmployee } from '@/collections/access/admin'
export const DonationForms: CollectionConfig = {
slug: 'donation-form',
labels: {
singular: {
de: 'Spendenformular'
},
plural: {
de: 'Spendenformulare'
}
},
fields: [
{
name: 'photo',
type: 'upload',
relationTo: 'media',
label: {
de: 'Bild'
},
required: true
},
{
name: 'text',
type: 'richText',
required: true
},
{
name: 'url',
type: 'text',
label: {
de: 'Link zum Spendenformular'
},
required: true
}
],
access: {
read: () => true,
create: isAdminOrEmployee(),
update: isAdminOrEmployee(),
delete: isAdminOrEmployee(),
},
}

View file

@ -1,5 +1,10 @@
import { CollectionConfig } from 'payload'
import { hide, isAdmin, isAdminOrEmployee } from '@/collections/access/admin'
import { ParagraphBlock } from '@/collections/blocks/Paragraph'
import { DocumentBlock } from '@/collections/blocks/Document'
import { DonationBlock } from '@/collections/blocks/Donation'
import { YoutubePlayerBlock } from '@/collections/blocks/YoutubePlayer'
import { DonationAppeal } from '@/collections/blocks/DonationAppeal'
export const Parish: CollectionConfig = {
slug: 'parish',
@ -88,6 +93,20 @@ export const Parish: CollectionConfig = {
rows: 15,
},
},
{
name: 'content',
label: {
de: "Extra Kontent"
},
type: 'blocks',
blocks: [
ParagraphBlock,
DocumentBlock,
DonationBlock,
YoutubePlayerBlock,
DonationAppeal
]
},
{
name: 'contact',
label: {

View file

@ -0,0 +1,14 @@
import { Block } from 'payload'
export const DonationAppeal: Block = {
slug: 'donationAppeal',
labels: {
singular: {
de: 'Spendenaufruf'
},
plural: {
de: 'Spendenaufrufe'
}
},
fields: []
}

View file

@ -0,0 +1,13 @@
import { Meta, StoryObj } from '@storybook/react'
import { DonationAppeal } from './DonationAppeal'
const meta: Meta<typeof DonationAppeal> = {
component: DonationAppeal,
}
type Story = StoryObj<typeof DonationAppeal>;
export default meta
export const Default: Story = {
args: {},
}

View file

@ -0,0 +1,74 @@
import { Button } from '@/components/Button/Button'
import styles from './styles.module.scss'
import image1 from './Spenden_Beduerftige-1.png'
import image2 from './Spenden_Asyl-1.png'
import image3 from './Spenden_Zukunft-1.png'
import image4 from './Spenden_Christophorus.png'
import Image from 'next/image'
import { Title } from '@/components/Title/Title'
const data = [
{
id: '1',
title: 'Bedürftige',
image: image1,
text: 'Auf vielfältige Weise bemühen wir uns, Bedürftige zu stärken. Bei „Essen ist fertig!“ gibt es monatlich bis zu 800 Mahlzeiten mit Nachtisch! 25 Ehrenamtliche sind im Einsatz! „Gebt Ihr ihnen zu essen“ (Mk 6,37).',
url: '/spenden/b7e42f42-3d78-4dc8-8b37-529df71c3f06'
},
{
id: '2',
title: 'Asyl',
image: image2,
text: 'Unser Einsatz mit und für Geflüchtete hat schon vielen geholfen. Oft bleiben sie mit uns in Kontakt und unterstützen uns. So umstritten das Kirchenasyl ist, dass wir als ultima ratio gewähren, wir haben dafür schon mehrere Preise bekommen und vielen richtig geholfen. „Ich war fremd, und ihr habt mich aufgenommen“ (Mt 25, 35).',
url: '/spenden/9adda877-30a1-49ef-8400-165dda401d19'
},
{
id: '3',
title: 'Zukunft',
image: image3,
text: 'Auf den Stellenabbau der Erzdiözese haben wir mit unserem „Projekt Zukunft“ reagiert. Wir refinanzieren notwendige Stellenanteile von Büro bis Kirchenmusik durch Spenden und sichern so die Basis unseres Wirkens. Wir mussten niemanden entlassen und konnten Arbeitsplätze sichern. Ein wesentlicher Grundstein, um Gemeinde vor Ort zu stärken und Zukunft zu ermöglichen! „Ich will euch Zukunft und Hoffnung geben“ (Jer 29,11).',
url: '/spenden/4d06e88f-01b3-4176-9242-de39402b49a2'
},
{
id: '4',
title: 'Christophorus',
image: image4,
text: 'Unsere Kirche ist fast immer offen als „Haus des Gebetes für alle Völker“ (Mk 11,17). Viele unterstützen gern ein konkretes Projekt, andere ganz allgemein unser Wirken. Sie überlassen es uns, wo wir es gerade für nötig erachten. Unser Traum ist weiter Wachsen nach innen (Qualität) und Wachsen nach außen (Quantität) zum ganzheitlichen Heil von uns Menschen.',
url: '/spenden/f25a9a4c-ae2d-493c-84fa-fc5479fc0eac'
}
]
export const DonationAppeal = () => {
return (
<>
<div>
<Title
title={"Unser vielfältiges Wirken lebt von der tatkräftigen und auch finanziellen Unterstützung vieler wir staunen dankbar!"}
subtitle={"Wir freuen uns über jede Spende und wissen: „Wer gibt, empfängt!“ (Lk 6,38)"}
size={"md"}
align={"center"}
/>
</div>
<div className={styles.row}>
{ data.map(appeal =>
<div key={appeal.id} className={styles.col}>
<h3>{appeal.title}</h3>
<Image src={appeal.image} alt={""} width={200} height={200} />
<p>
{appeal.text}
</p>
<p>
<Button size={"md"} href={appeal.url}>Jetzt spenden</Button>
</p>
</div>
)}
</div>
</>
)
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 54 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 61 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 54 KiB

View file

@ -0,0 +1,17 @@
@import "template";
.row {
display: flex;
flex-wrap: wrap;
gap: 20px;
}
.col {
flex: 1 0 21%;
font-size: 16px;
}
.col h3 {
color: $base-color;
border-bottom: 2px solid $shade2;
}

View file

@ -35,7 +35,7 @@ export const Title = ({title, subtitle, align = "left", size = "lg", fontStyle =
[styles.base]: color === "contrast",
[styles.contrast]: color === "base",
[styles.white]: color === "white",
[styles.small]: true,
[styles.small]: ["xl", "lg"].includes(size),
[styles.left]: align === "left",
[styles.center]: align === "center",
[faustina.className]: fontStyle == "sans-serif"

View file

@ -38,7 +38,6 @@
font-size: 33px;
font-weight: 700;
}
.small {
font-size: 25px;
font-weight: 700;

View file

@ -0,0 +1,73 @@
import { Parish } from '@/payload-types'
import { Container } from '@/components/Container/Container'
import { HTMLText } from '@/components/Text/HTMLText'
import { Section } from '@/components/Section/Section'
import { Button } from '@/components/Button/Button'
import { DonationForm } from '@/components/DonationForm/DonationForm'
import { YoutubePlayer } from '@/components/YoutubePlayer/YoutubePlayer'
import { DonationAppeal } from '@/components/DonationAppeal/DonationAppeal'
type BlocksProps = {
content: Parish['content']
}
export function ParishBlocks({ content }: BlocksProps) {
if (!content) return null;
// determine if some margin at the bottom should be added
const length = content.length;
const shouldAddMargin = content[length - 1].blockType === "text"
return (
<>
<div>
{content.map(item => {
if (item.blockType === "text" && item.content_html) {
return (
<Container key={item.id}>
<HTMLText width={item.width} html={item.content_html} />
</Container>
);
}
if (item.blockType === "document" && typeof item.file === "object") {
return (
<Container key={item.id}>
<Section padding={"medium"}>
<Button size={"lg"} href={item.file.url || "notfound"} schema={"contrast"}>{item.button}</Button>
</Section>
</Container>
)
}
if (item.blockType === "donation") {
return <Section key={item.id} padding={"small"} paddingBottom={"large"}>
<DonationForm />
</Section>
}
if (item.blockType === "youtube") {
return <Section key={item.id} padding={"small"}>
<Container>
<YoutubePlayer id={item.youtube_id} />
</Container>
</Section>
}
if (item.blockType === "donationAppeal") {
return <Section key={item.id} padding={"small"}>
<Container>
<DonationAppeal />
</Container>
</Section>
}
})}
</div>
{ shouldAddMargin &&
<Section></Section>
}
</>
)
}

21
src/fetch/donationform.ts Normal file
View file

@ -0,0 +1,21 @@
import { DonationForm } from '@/payload-types'
export async function fetchDonationForm(id: string): Promise<DonationForm | undefined> {
// const query = {
// id: {
// equals: id,
// },
// }
//
// const stringifiedQuery = stringify(
// {
// where: query,
// },
// { addQueryPrefix: true },
// )
const res = await fetch(`http://localhost:3000/api/donation-form/${id}`);
if (!res.ok) return undefined
const response = await res.json() as DonationForm;
return response
}

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,39 @@
import { MigrateUpArgs, MigrateDownArgs, sql } from '@payloadcms/db-postgres'
export async function up({ db, payload, req }: MigrateUpArgs): Promise<void> {
await db.execute(sql`
CREATE TABLE "donation_form" (
"id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL,
"photo_id" uuid NOT NULL,
"text" jsonb NOT NULL,
"url" varchar NOT NULL,
"updated_at" timestamp(3) with time zone DEFAULT now() NOT NULL,
"created_at" timestamp(3) with time zone DEFAULT now() NOT NULL
);
ALTER TABLE "pope_prayer_intentions" ALTER COLUMN "year" SET DEFAULT 2026;
ALTER TABLE "announcement" ALTER COLUMN "date" SET DEFAULT '2026-01-11T08:54:45.107Z';
ALTER TABLE "calendar" ALTER COLUMN "date" SET DEFAULT '2026-01-11T08:54:45.188Z';
ALTER TABLE "classifieds" ALTER COLUMN "until" SET DEFAULT '2026-02-05T08:54:45.242Z';
ALTER TABLE "payload_locked_documents_rels" ADD COLUMN "donation_form_id" uuid;
ALTER TABLE "donation_form" ADD CONSTRAINT "donation_form_photo_id_media_id_fk" FOREIGN KEY ("photo_id") REFERENCES "public"."media"("id") ON DELETE set null ON UPDATE no action;
CREATE INDEX "donation_form_photo_idx" ON "donation_form" USING btree ("photo_id");
CREATE INDEX "donation_form_updated_at_idx" ON "donation_form" USING btree ("updated_at");
CREATE INDEX "donation_form_created_at_idx" ON "donation_form" USING btree ("created_at");
ALTER TABLE "payload_locked_documents_rels" ADD CONSTRAINT "payload_locked_documents_rels_donation_form_fk" FOREIGN KEY ("donation_form_id") REFERENCES "public"."donation_form"("id") ON DELETE cascade ON UPDATE no action;
CREATE INDEX "payload_locked_documents_rels_donation_form_id_idx" ON "payload_locked_documents_rels" USING btree ("donation_form_id");`)
}
export async function down({ db, payload, req }: MigrateDownArgs): Promise<void> {
await db.execute(sql`
ALTER TABLE "donation_form" DISABLE ROW LEVEL SECURITY;
DROP TABLE "donation_form" CASCADE;
ALTER TABLE "payload_locked_documents_rels" DROP CONSTRAINT "payload_locked_documents_rels_donation_form_fk";
DROP INDEX "payload_locked_documents_rels_donation_form_id_idx";
ALTER TABLE "pope_prayer_intentions" ALTER COLUMN "year" SET DEFAULT 2025;
ALTER TABLE "announcement" ALTER COLUMN "date" SET DEFAULT '2025-11-23T15:05:28.806Z';
ALTER TABLE "calendar" ALTER COLUMN "date" SET DEFAULT '2025-11-23T15:05:28.910Z';
ALTER TABLE "classifieds" ALTER COLUMN "until" SET DEFAULT '2025-12-18T15:05:28.976Z';
ALTER TABLE "payload_locked_documents_rels" DROP COLUMN "donation_form_id";`)
}

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,95 @@
import { MigrateUpArgs, MigrateDownArgs, sql } from '@payloadcms/db-postgres'
export async function up({ db, payload, req }: MigrateUpArgs): Promise<void> {
await db.execute(sql`
CREATE TYPE "public"."enum_parish_blocks_text_width" AS ENUM('1/2', '3/4');
CREATE TABLE "parish_blocks_text" (
"_order" integer NOT NULL,
"_parent_id" uuid NOT NULL,
"_path" text NOT NULL,
"id" varchar PRIMARY KEY NOT NULL,
"content" jsonb NOT NULL,
"content_html" varchar,
"width" "enum_parish_blocks_text_width" DEFAULT '1/2' NOT NULL,
"block_name" varchar
);
CREATE TABLE "parish_blocks_document" (
"_order" integer NOT NULL,
"_parent_id" uuid NOT NULL,
"_path" text NOT NULL,
"id" varchar PRIMARY KEY NOT NULL,
"file_id" uuid NOT NULL,
"button" varchar DEFAULT 'Download Flyer' NOT NULL,
"block_name" varchar
);
CREATE TABLE "parish_blocks_donation" (
"_order" integer NOT NULL,
"_parent_id" uuid NOT NULL,
"_path" text NOT NULL,
"id" varchar PRIMARY KEY NOT NULL,
"block_name" varchar
);
CREATE TABLE "parish_blocks_youtube" (
"_order" integer NOT NULL,
"_parent_id" uuid NOT NULL,
"_path" text NOT NULL,
"id" varchar PRIMARY KEY NOT NULL,
"youtube_id" varchar NOT NULL,
"block_name" varchar
);
CREATE TABLE "parish_blocks_donation_appeal" (
"_order" integer NOT NULL,
"_parent_id" uuid NOT NULL,
"_path" text NOT NULL,
"id" varchar PRIMARY KEY NOT NULL,
"block_name" varchar
);
ALTER TABLE "announcement" ALTER COLUMN "date" SET DEFAULT '2026-01-11T10:35:28.881Z';
ALTER TABLE "calendar" ALTER COLUMN "date" SET DEFAULT '2026-01-11T10:35:28.965Z';
ALTER TABLE "classifieds" ALTER COLUMN "until" SET DEFAULT '2026-02-05T10:35:29.018Z';
ALTER TABLE "parish_blocks_text" ADD CONSTRAINT "parish_blocks_text_parent_id_fk" FOREIGN KEY ("_parent_id") REFERENCES "public"."parish"("id") ON DELETE cascade ON UPDATE no action;
ALTER TABLE "parish_blocks_document" ADD CONSTRAINT "parish_blocks_document_file_id_documents_id_fk" FOREIGN KEY ("file_id") REFERENCES "public"."documents"("id") ON DELETE set null ON UPDATE no action;
ALTER TABLE "parish_blocks_document" ADD CONSTRAINT "parish_blocks_document_parent_id_fk" FOREIGN KEY ("_parent_id") REFERENCES "public"."parish"("id") ON DELETE cascade ON UPDATE no action;
ALTER TABLE "parish_blocks_donation" ADD CONSTRAINT "parish_blocks_donation_parent_id_fk" FOREIGN KEY ("_parent_id") REFERENCES "public"."parish"("id") ON DELETE cascade ON UPDATE no action;
ALTER TABLE "parish_blocks_youtube" ADD CONSTRAINT "parish_blocks_youtube_parent_id_fk" FOREIGN KEY ("_parent_id") REFERENCES "public"."parish"("id") ON DELETE cascade ON UPDATE no action;
ALTER TABLE "parish_blocks_donation_appeal" ADD CONSTRAINT "parish_blocks_donation_appeal_parent_id_fk" FOREIGN KEY ("_parent_id") REFERENCES "public"."parish"("id") ON DELETE cascade ON UPDATE no action;
CREATE INDEX "parish_blocks_text_order_idx" ON "parish_blocks_text" USING btree ("_order");
CREATE INDEX "parish_blocks_text_parent_id_idx" ON "parish_blocks_text" USING btree ("_parent_id");
CREATE INDEX "parish_blocks_text_path_idx" ON "parish_blocks_text" USING btree ("_path");
CREATE INDEX "parish_blocks_document_order_idx" ON "parish_blocks_document" USING btree ("_order");
CREATE INDEX "parish_blocks_document_parent_id_idx" ON "parish_blocks_document" USING btree ("_parent_id");
CREATE INDEX "parish_blocks_document_path_idx" ON "parish_blocks_document" USING btree ("_path");
CREATE INDEX "parish_blocks_document_file_idx" ON "parish_blocks_document" USING btree ("file_id");
CREATE INDEX "parish_blocks_donation_order_idx" ON "parish_blocks_donation" USING btree ("_order");
CREATE INDEX "parish_blocks_donation_parent_id_idx" ON "parish_blocks_donation" USING btree ("_parent_id");
CREATE INDEX "parish_blocks_donation_path_idx" ON "parish_blocks_donation" USING btree ("_path");
CREATE INDEX "parish_blocks_youtube_order_idx" ON "parish_blocks_youtube" USING btree ("_order");
CREATE INDEX "parish_blocks_youtube_parent_id_idx" ON "parish_blocks_youtube" USING btree ("_parent_id");
CREATE INDEX "parish_blocks_youtube_path_idx" ON "parish_blocks_youtube" USING btree ("_path");
CREATE INDEX "parish_blocks_donation_appeal_order_idx" ON "parish_blocks_donation_appeal" USING btree ("_order");
CREATE INDEX "parish_blocks_donation_appeal_parent_id_idx" ON "parish_blocks_donation_appeal" USING btree ("_parent_id");
CREATE INDEX "parish_blocks_donation_appeal_path_idx" ON "parish_blocks_donation_appeal" USING btree ("_path");`)
}
export async function down({ db, payload, req }: MigrateDownArgs): Promise<void> {
await db.execute(sql`
ALTER TABLE "parish_blocks_text" DISABLE ROW LEVEL SECURITY;
ALTER TABLE "parish_blocks_document" DISABLE ROW LEVEL SECURITY;
ALTER TABLE "parish_blocks_donation" DISABLE ROW LEVEL SECURITY;
ALTER TABLE "parish_blocks_youtube" DISABLE ROW LEVEL SECURITY;
ALTER TABLE "parish_blocks_donation_appeal" DISABLE ROW LEVEL SECURITY;
DROP TABLE "parish_blocks_text" CASCADE;
DROP TABLE "parish_blocks_document" CASCADE;
DROP TABLE "parish_blocks_donation" CASCADE;
DROP TABLE "parish_blocks_youtube" CASCADE;
DROP TABLE "parish_blocks_donation_appeal" CASCADE;
ALTER TABLE "announcement" ALTER COLUMN "date" SET DEFAULT '2026-01-11T08:54:45.107Z';
ALTER TABLE "calendar" ALTER COLUMN "date" SET DEFAULT '2026-01-11T08:54:45.188Z';
ALTER TABLE "classifieds" ALTER COLUMN "until" SET DEFAULT '2026-02-05T08:54:45.242Z';
DROP TYPE "public"."enum_parish_blocks_text_width";`)
}

View file

@ -13,6 +13,8 @@ import * as migration_20250827_105121_new_payload_version from './20250827_10512
import * as migration_20250909_075603 from './20250909_075603';
import * as migration_20250915_075218 from './20250915_075218';
import * as migration_20251118_150529_youtube_player from './20251118_150529_youtube_player';
import * as migration_20260106_085445_donationforms from './20260106_085445_donationforms';
import * as migration_20260106_103529_donation_appeal from './20260106_103529_donation_appeal';
export const migrations = [
{
@ -88,6 +90,16 @@ export const migrations = [
{
up: migration_20251118_150529_youtube_player.up,
down: migration_20251118_150529_youtube_player.down,
name: '20251118_150529_youtube_player'
name: '20251118_150529_youtube_player',
},
{
up: migration_20260106_085445_donationforms.up,
down: migration_20260106_085445_donationforms.down,
name: '20260106_085445_donationforms',
},
{
up: migration_20260106_103529_donation_appeal.up,
down: migration_20260106_103529_donation_appeal.down,
name: '20260106_103529_donation_appeal'
},
];

View file

@ -12,10 +12,11 @@ import { ContactPersonList } from '@/components/ContactPerson/ContactPersonList'
import { Event, Worship } from '@/payload-types'
import { transformEvents } from '@/utils/dto/events'
import { tranformWorship } from '@/utils/dto/worship'
import { Button } from '@/components/Button/Button'
import { TextDiv } from '@/components/Text/TextDiv'
import { Gallery, GalleryItem } from '@/components/Gallery/Gallery'
import { CalendarAnnouncementButtons } from '@/compositions/CalendarAnnouncementButtons/CalendarAnnouncementButtons'
import { Parish as ParishEntity} from '@/payload-types'
import { ParishBlocks } from '@/compositions/Blocks/ParishBlocks'
type ParishProps = {
title: string,
@ -33,6 +34,7 @@ type ParishProps = {
announcement?: string,
calendar?: string,
gallery?: GalleryItem[]
content?: ParishEntity['content']
}
@ -49,6 +51,7 @@ export const Parish = (
events,
worship,
announcement,
content,
calendar,
gallery
}
@ -92,6 +95,12 @@ export const Parish = (
</Container>
</Section>
{ content && content.length > 0 &&
<Section padding={"small"}>
<ParishBlocks content={content} />
</Section>
}
{ gallery && gallery.length > 0 &&
<Section paddingBottom={"small"}>
<Gallery items={gallery} />

View file

@ -80,6 +80,7 @@ export interface Config {
contactPerson: ContactPerson;
locations: Location;
group: Group;
'donation-form': DonationForm;
magazine: Magazine;
documents: Document;
media: Media;
@ -103,6 +104,7 @@ export interface Config {
contactPerson: ContactPersonSelect<false> | ContactPersonSelect<true>;
locations: LocationsSelect<false> | LocationsSelect<true>;
group: GroupSelect<false> | GroupSelect<true>;
'donation-form': DonationFormSelect<false> | DonationFormSelect<true>;
magazine: MagazineSelect<false> | MagazineSelect<true>;
documents: DocumentsSelect<false> | DocumentsSelect<true>;
media: MediaSelect<false> | MediaSelect<true>;
@ -165,6 +167,55 @@ export interface Parish {
| null;
description: string;
history: string;
content?:
| (
| {
content: {
root: {
type: string;
children: {
type: string;
version: number;
[k: string]: unknown;
}[];
direction: ('ltr' | 'rtl') | null;
format: 'left' | 'start' | 'center' | 'right' | 'end' | 'justify' | '';
indent: number;
version: number;
};
[k: string]: unknown;
};
content_html?: string | null;
width: '1/2' | '3/4';
id?: string | null;
blockName?: string | null;
blockType: 'text';
}
| {
file: string | Document;
button: string;
id?: string | null;
blockName?: string | null;
blockType: 'document';
}
| {
id?: string | null;
blockName?: string | null;
blockType: 'donation';
}
| {
youtube_id: string;
id?: string | null;
blockName?: string | null;
blockType: 'youtube';
}
| {
id?: string | null;
blockName?: string | null;
blockType: 'donationAppeal';
}
)[]
| null;
contact: string;
photo: string | Media;
gallery?:
@ -187,6 +238,25 @@ export interface Church {
updatedAt: string;
createdAt: string;
}
/**
* This interface was referenced by `Config`'s JSON-Schema
* via the `definition` "documents".
*/
export interface Document {
id: string;
prefix?: string | null;
updatedAt: string;
createdAt: string;
url?: string | null;
thumbnailURL?: string | null;
filename?: string | null;
mimeType?: string | null;
filesize?: number | null;
width?: number | null;
height?: number | null;
focalX?: number | null;
focalY?: number | null;
}
/**
* This interface was referenced by `Config`'s JSON-Schema
* via the `definition` "media".
@ -291,25 +361,6 @@ export interface Announcement {
updatedAt: string;
createdAt: string;
}
/**
* This interface was referenced by `Config`'s JSON-Schema
* via the `definition` "documents".
*/
export interface Document {
id: string;
prefix?: string | null;
updatedAt: string;
createdAt: string;
url?: string | null;
thumbnailURL?: string | null;
filename?: string | null;
mimeType?: string | null;
filesize?: number | null;
width?: number | null;
height?: number | null;
focalX?: number | null;
focalY?: number | null;
}
/**
* Der Kalender wird jeden Samstag automatisch veröffentlicht.
*
@ -614,6 +665,32 @@ export interface Classified {
updatedAt: string;
createdAt: string;
}
/**
* This interface was referenced by `Config`'s JSON-Schema
* via the `definition` "donation-form".
*/
export interface DonationForm {
id: string;
photo: string | Media;
text: {
root: {
type: string;
children: {
type: string;
version: number;
[k: string]: unknown;
}[];
direction: ('ltr' | 'rtl') | null;
format: 'left' | 'start' | 'center' | 'right' | 'end' | 'justify' | '';
indent: number;
version: number;
};
[k: string]: unknown;
};
url: string;
updatedAt: string;
createdAt: string;
}
/**
* This interface was referenced by `Config`'s JSON-Schema
* via the `definition` "magazine".
@ -712,6 +789,10 @@ export interface PayloadLockedDocument {
relationTo: 'group';
value: string | Group;
} | null)
| ({
relationTo: 'donation-form';
value: string | DonationForm;
} | null)
| ({
relationTo: 'magazine';
value: string | Magazine;
@ -787,6 +868,46 @@ export interface ParishSelect<T extends boolean = true> {
};
description?: T;
history?: T;
content?:
| T
| {
text?:
| T
| {
content?: T;
content_html?: T;
width?: T;
id?: T;
blockName?: T;
};
document?:
| T
| {
file?: T;
button?: T;
id?: T;
blockName?: T;
};
donation?:
| T
| {
id?: T;
blockName?: T;
};
youtube?:
| T
| {
youtube_id?: T;
id?: T;
blockName?: T;
};
donationAppeal?:
| T
| {
id?: T;
blockName?: T;
};
};
contact?: T;
photo?: T;
gallery?:
@ -1091,6 +1212,17 @@ export interface GroupSelect<T extends boolean = true> {
updatedAt?: T;
createdAt?: T;
}
/**
* This interface was referenced by `Config`'s JSON-Schema
* via the `definition` "donation-form_select".
*/
export interface DonationFormSelect<T extends boolean = true> {
photo?: T;
text?: T;
url?: T;
updatedAt?: T;
createdAt?: T;
}
/**
* This interface was referenced by `Config`'s JSON-Schema
* via the `definition` "magazine_select".

View file

@ -38,6 +38,7 @@ import { LiturgicalCalendar } from '@/collections/LiturgicalCalendar'
import { Classifieds } from '@/collections/Classifieds'
import { MenuGlobal } from '@/globals/Menu'
import { Magazine } from '@/collections/Magazine'
import { DonationForms } from '@/collections/DonationForms'
const filename = fileURLToPath(import.meta.url)
const dirname = path.dirname(filename)
@ -90,6 +91,7 @@ export default buildConfig({
ContactPerson,
Locations,
Groups,
DonationForms,
Magazine,
Documents,
Media,