feature: image card block element

This commit is contained in:
Benno Tielen 2026-04-11 15:16:51 +02:00
parent e17c161ee3
commit b0e7463090
20 changed files with 64095 additions and 391 deletions

View file

@ -7,6 +7,7 @@ import { GalleryBlock } from '@/collections/blocks/Gallery'
import { DonationBlock } from '@/collections/blocks/Donation' import { DonationBlock } from '@/collections/blocks/Donation'
import { ButtonBlock } from '@/collections/blocks/Button' import { ButtonBlock } from '@/collections/blocks/Button'
import { YoutubePlayerBlock } from '@/collections/blocks/YoutubePlayer' import { YoutubePlayerBlock } from '@/collections/blocks/YoutubePlayer'
import { ImageCardsBlock } from '@/collections/blocks/ImageCards'
import { isPublishedPublic } from '@/collections/access/public' import { isPublishedPublic } from '@/collections/access/public'
@ -64,6 +65,7 @@ export const Blog: CollectionConfig = {
GalleryBlock, GalleryBlock,
YoutubePlayerBlock, YoutubePlayerBlock,
ButtonBlock, ButtonBlock,
ImageCardsBlock,
], ],
required: true, required: true,
}, },

View file

@ -20,6 +20,7 @@ import { CollapsibleImageWithTextBlock } from '@/collections/blocks/CollapsibleI
import { EventsBlock } from '@/collections/blocks/Events' import { EventsBlock } from '@/collections/blocks/Events'
import { PublicationAndNewsletterBlock } from '@/collections/blocks/PublicationAndNewsletter' import { PublicationAndNewsletterBlock } from '@/collections/blocks/PublicationAndNewsletter'
import { ContactPersonBlock } from '@/collections/blocks/ContactPersonBlock' import { ContactPersonBlock } from '@/collections/blocks/ContactPersonBlock'
import { ImageCardsBlock } from '@/collections/blocks/ImageCards'
import { isPublishedPublic } from '@/collections/access/public' import { isPublishedPublic } from '@/collections/access/public'
export const Pages: CollectionConfig = { export const Pages: CollectionConfig = {
@ -100,6 +101,7 @@ export const Pages: CollectionConfig = {
MassTimesBlock, MassTimesBlock,
EventsBlock, EventsBlock,
ContactPersonBlock, ContactPersonBlock,
ImageCardsBlock,
], ],
}, },
], ],

View file

@ -5,6 +5,8 @@ import { DocumentBlock } from '@/collections/blocks/Document'
import { DonationBlock } from '@/collections/blocks/Donation' import { DonationBlock } from '@/collections/blocks/Donation'
import { YoutubePlayerBlock } from '@/collections/blocks/YoutubePlayer' import { YoutubePlayerBlock } from '@/collections/blocks/YoutubePlayer'
import { DonationAppeal } from '@/collections/blocks/DonationAppeal' import { DonationAppeal } from '@/collections/blocks/DonationAppeal'
import { ImageCardsBlock } from '@/collections/blocks/ImageCards'
import { TitleBlock } from '@/collections/blocks/Title'
import { isPublishedPublic } from '@/collections/access/public' import { isPublishedPublic } from '@/collections/access/public'
export const Parish: CollectionConfig = { export const Parish: CollectionConfig = {
@ -118,7 +120,9 @@ export const Parish: CollectionConfig = {
DocumentBlock, DocumentBlock,
DonationBlock, DonationBlock,
YoutubePlayerBlock, YoutubePlayerBlock,
DonationAppeal DonationAppeal,
ImageCardsBlock,
TitleBlock,
] ]
}, },
{ {

View file

@ -0,0 +1,54 @@
import { Block } from 'payload'
export const ImageCardsBlock: Block = {
slug: 'imageCards',
labels: {
singular: { de: 'Bildkarten' },
plural: { de: 'Bildkarten' },
},
fields: [
{
name: 'items',
label: { de: 'Karten' },
type: 'array',
required: true,
minRows: 1,
fields: [
{
name: 'title',
label: { de: 'Titel' },
type: 'text',
required: true,
},
{
name: 'image',
label: { de: 'Bild' },
type: 'upload',
relationTo: 'media',
required: true,
},
{
name: 'link',
label: { de: 'Verknüpfung (Seite oder Gruppe)' },
type: 'relationship',
relationTo: ['pages', 'group'],
required: false,
admin: {
condition: (_, siblingData) => !siblingData?.customLink,
},
},
{
name: 'customLink',
label: { de: 'Eigener Link (URL)' },
type: 'text',
required: false,
admin: {
condition: (_, siblingData) => !siblingData?.link,
description:
'Alternative zu "Verknüpfung". Nur eins von beiden kann gesetzt werden.',
},
},
],
},
],
}

View file

@ -52,5 +52,22 @@ export const TitleBlock: Block = {
], ],
defaultValue: 'left', defaultValue: 'left',
}, },
{
name: 'color',
type: 'select',
label: {
de: 'Farbe',
},
required: true,
defaultValue: 'base',
options: [
{ label: 'Grundfarbe', value: 'base' },
{ label: 'Abstufung 1', value: 'shade1' },
{ label: 'Abstufung 2', value: 'shade2' },
{ label: 'Abstufung 3', value: 'shade3' },
{ label: 'Kontrastfarbe', value: 'contrast' },
{ label: 'Kontrast Abstufung 1', value: 'contrastShade1' },
],
},
], ],
} }

View file

@ -4,17 +4,17 @@ import Link from 'next/link'
export type ImageCardProps = { export type ImageCardProps = {
src: string, src: string,
title: string, title: string,
href: string href?: string
} }
export const ImageCard = ({src, title, href}: ImageCardProps) => { export const ImageCard = ({src, title, href}: ImageCardProps) => {
return ( const card = (
<Link href={href}>
<div className={styles.container} style={{ backgroundImage: `url(${encodeURI(src)})` }}> <div className={styles.container} style={{ backgroundImage: `url(${encodeURI(src)})` }}>
<div className={styles.title}> <div className={styles.title}>
{title} {title}
</div> </div>
</div> </div>
</Link>
) )
return href ? <Link href={href}>{card}</Link> : card
} }

View file

@ -7,7 +7,7 @@ type TitleProps = {
align?: 'left' | 'center'; align?: 'left' | 'center';
size?: 'xl' | 'lg' | 'md' | "sm"; size?: 'xl' | 'lg' | 'md' | "sm";
fontStyle?: 'serif' | 'sans-serif' fontStyle?: 'serif' | 'sans-serif'
color?: "base" | "contrast" | "white", color?: "base" | "shade1" | "shade2" | "shade3" | "contrast" | "contrastShade1" | "white",
cancelled?: boolean, cancelled?: boolean,
} }
@ -17,7 +17,11 @@ export const Title = ({title, subtitle, align = "left", size = "lg", fontStyle =
<h2 className={classNames({ <h2 className={classNames({
[styles.title]: true, [styles.title]: true,
[styles.base]: color === "base", [styles.base]: color === "base",
[styles.shade1]: color === "shade1",
[styles.shade2]: color === "shade2",
[styles.shade3]: color === "shade3",
[styles.contrast]: color === "contrast", [styles.contrast]: color === "contrast",
[styles.contrastShade1]: color === "contrastShade1",
[styles.white]: color === "white", [styles.white]: color === "white",
[styles.extraLarge]: size === "xl", [styles.extraLarge]: size === "xl",
[styles.large]: size === "lg", [styles.large]: size === "lg",
@ -33,6 +37,10 @@ export const Title = ({title, subtitle, align = "left", size = "lg", fontStyle =
[styles.subtitle]: true, [styles.subtitle]: true,
[styles.base]: color === "contrast", [styles.base]: color === "contrast",
[styles.contrast]: color === "base", [styles.contrast]: color === "base",
[styles.shade1]: color === "shade1",
[styles.shade2]: color === "shade2",
[styles.shade3]: color === "shade3",
[styles.contrastShade1]: color === "contrastShade1",
[styles.white]: color === "white", [styles.white]: color === "white",
[styles.small]: ["xl", "lg"].includes(size), [styles.small]: ["xl", "lg"].includes(size),
[styles.left]: align === "left", [styles.left]: align === "left",

View file

@ -16,10 +16,26 @@
color: $base-color; color: $base-color;
} }
.shade1 {
color: $shade1;
}
.shade2 {
color: $shade2;
}
.shade3 {
color: $shade3;
}
.contrast { .contrast {
color: $contrast-color; color: $contrast-color;
} }
.contrastShade1 {
color: $contrast-shade1;
}
.white { .white {
color: $shade3; color: $shade3;
} }

View file

@ -20,6 +20,7 @@ import { getPhoto } from '@/utils/dto/gallery'
import { BlogSliderBlock } from '@/compositions/Blocks/BlogSliderBlock' import { BlogSliderBlock } from '@/compositions/Blocks/BlogSliderBlock'
import { MassTimesBlock } from '@/compositions/Blocks/MassTimesBlock' import { MassTimesBlock } from '@/compositions/Blocks/MassTimesBlock'
import { EventsBlock } from '@/compositions/Blocks/EventsBlock' import { EventsBlock } from '@/compositions/Blocks/EventsBlock'
import { ImageCardsBlock } from '@/compositions/Blocks/ImageCardsBlock'
type BlocksProps = { type BlocksProps = {
content: Blog['content']['content'] | NonNullable<Page['content']> content: Blog['content']['content'] | NonNullable<Page['content']>
@ -137,6 +138,7 @@ export function Blocks({ content }: BlocksProps) {
subtitle={item.subtitle || undefined} subtitle={item.subtitle || undefined}
size={item.size as 'xl' | 'lg' | 'md' | 'sm' | undefined} size={item.size as 'xl' | 'lg' | 'md' | 'sm' | undefined}
align={item.align as 'left' | 'center' | undefined} align={item.align as 'left' | 'center' | undefined}
color={item.color as 'base' | 'shade1' | 'shade2' | 'shade3' | 'contrast' | 'contrastShade1' | undefined}
/> />
</Container> </Container>
) )
@ -233,6 +235,10 @@ export function Blocks({ content }: BlocksProps) {
) )
} }
if (item.blockType === 'imageCards') {
return <ImageCardsBlock key={item.id} items={item.items} />
}
if (item.blockType === 'contactPersonBlock') { if (item.blockType === 'contactPersonBlock') {
const contact = typeof item.contact === 'object' const contact = typeof item.contact === 'object'
? item.contact ? item.contact

View file

@ -0,0 +1,57 @@
import { Group, Media, Page } from '@/payload-types'
import { Container } from '@/components/Container/Container'
import { Section } from '@/components/Section/Section'
import { ImageCard } from '@/components/ImageCard/ImageCard'
import { getPhoto } from '@/utils/dto/gallery'
import styles from './imageCardsBlock.module.scss'
export type ImageCardsBlockItem = {
title: string
image: string | Media
link?:
| { relationTo: 'pages'; value: string | Page }
| { relationTo: 'group'; value: string | Group }
| null
customLink?: string | null
id?: string | null
}
type ImageCardsBlockProps = {
items: ImageCardsBlockItem[]
}
const resolveHref = (item: ImageCardsBlockItem): string | undefined => {
if (item.link && typeof item.link.value === 'object') {
if (item.link.relationTo === 'pages' && item.link.value.slug) {
return `/${item.link.value.slug}`
}
if (item.link.relationTo === 'group' && item.link.value.slug) {
return `/gruppe/${item.link.value.slug}`
}
}
return item.customLink ?? undefined
}
export const ImageCardsBlock = ({ items }: ImageCardsBlockProps) => {
return (
<Container>
<Section padding={"small"}>
<div className={styles.grid}>
{items.map((item) => {
const photo = getPhoto('thumbnail', item.image)
if (!photo) return null
return (
<ImageCard
key={item.id ?? item.title}
src={photo.src}
title={item.title}
href={resolveHref(item)}
/>
)
})}
</div>
</Section>
</Container>
)
}

View file

@ -6,6 +6,8 @@ import { Button } from '@/components/Button/Button'
import { DonationForm } from '@/components/DonationForm/DonationForm' import { DonationForm } from '@/components/DonationForm/DonationForm'
import { YoutubePlayer } from '@/components/YoutubePlayer/YoutubePlayer' import { YoutubePlayer } from '@/components/YoutubePlayer/YoutubePlayer'
import { DonationAppeal } from '@/components/DonationAppeal/DonationAppeal' import { DonationAppeal } from '@/components/DonationAppeal/DonationAppeal'
import { ImageCardsBlock } from '@/compositions/Blocks/ImageCardsBlock'
import { Title } from '@/components/Title/Title'
type BlocksProps = { type BlocksProps = {
content: Parish['content'] content: Parish['content']
@ -55,6 +57,24 @@ export function ParishBlocks({ content }: BlocksProps) {
</Section> </Section>
} }
if (item.blockType === "imageCards") {
return <ImageCardsBlock key={item.id} items={item.items} />
}
if (item.blockType === "title") {
return (
<Container key={item.id}>
<Title
title={item.title}
subtitle={item.subtitle || undefined}
size={item.size as 'xl' | 'lg' | 'md' | 'sm' | undefined}
align={item.align as 'left' | 'center' | undefined}
color={item.color as 'base' | 'shade1' | 'shade2' | 'shade3' | 'contrast' | 'contrastShade1' | undefined}
/>
</Container>
)
}
if (item.blockType === "donationAppeal") { if (item.blockType === "donationAppeal") {
return <Section key={item.id} padding={"small"}> return <Section key={item.id} padding={"small"}>
<Container> <Container>

View file

@ -0,0 +1,13 @@
.grid {
display: grid;
gap: 1.5rem;
grid-template-columns: 1fr;
@media (min-width: 640px) {
grid-template-columns: repeat(2, 1fr);
}
@media (min-width: 1024px) {
grid-template-columns: repeat(3, 1fr);
}
}

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,295 @@
import { MigrateUpArgs, MigrateDownArgs, sql } from '@payloadcms/db-postgres'
export async function up({ db, payload, req }: MigrateUpArgs): Promise<void> {
await db.execute(sql`
CREATE TABLE "parish_blocks_image_cards_items" (
"_order" integer NOT NULL,
"_parent_id" varchar NOT NULL,
"id" varchar PRIMARY KEY NOT NULL,
"title" varchar,
"image_id" uuid,
"custom_link" varchar
);
CREATE TABLE "parish_blocks_image_cards" (
"_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_v_blocks_image_cards_items" (
"_order" integer NOT NULL,
"_parent_id" uuid NOT NULL,
"id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL,
"title" varchar,
"image_id" uuid,
"custom_link" varchar,
"_uuid" varchar
);
CREATE TABLE "_parish_v_blocks_image_cards" (
"_order" integer NOT NULL,
"_parent_id" uuid NOT NULL,
"_path" text NOT NULL,
"id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL,
"_uuid" varchar,
"block_name" varchar
);
CREATE TABLE "blog_blocks_image_cards_items" (
"_order" integer NOT NULL,
"_parent_id" varchar NOT NULL,
"id" varchar PRIMARY KEY NOT NULL,
"title" varchar,
"image_id" uuid,
"custom_link" varchar
);
CREATE TABLE "blog_blocks_image_cards" (
"_order" integer NOT NULL,
"_parent_id" uuid NOT NULL,
"_path" text NOT NULL,
"id" varchar PRIMARY KEY NOT NULL,
"block_name" varchar
);
CREATE TABLE "_blog_v_blocks_image_cards_items" (
"_order" integer NOT NULL,
"_parent_id" uuid NOT NULL,
"id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL,
"title" varchar,
"image_id" uuid,
"custom_link" varchar,
"_uuid" varchar
);
CREATE TABLE "_blog_v_blocks_image_cards" (
"_order" integer NOT NULL,
"_parent_id" uuid NOT NULL,
"_path" text NOT NULL,
"id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL,
"_uuid" varchar,
"block_name" varchar
);
CREATE TABLE "pages_blocks_image_cards_items" (
"_order" integer NOT NULL,
"_parent_id" varchar NOT NULL,
"id" varchar PRIMARY KEY NOT NULL,
"title" varchar,
"image_id" uuid,
"custom_link" varchar
);
CREATE TABLE "pages_blocks_image_cards" (
"_order" integer NOT NULL,
"_parent_id" uuid NOT NULL,
"_path" text NOT NULL,
"id" varchar PRIMARY KEY NOT NULL,
"block_name" varchar
);
CREATE TABLE "pages_rels" (
"id" serial PRIMARY KEY NOT NULL,
"order" integer,
"parent_id" uuid NOT NULL,
"path" varchar NOT NULL,
"pages_id" uuid,
"group_id" uuid
);
CREATE TABLE "_pages_v_blocks_image_cards_items" (
"_order" integer NOT NULL,
"_parent_id" uuid NOT NULL,
"id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL,
"title" varchar,
"image_id" uuid,
"custom_link" varchar,
"_uuid" varchar
);
CREATE TABLE "_pages_v_blocks_image_cards" (
"_order" integer NOT NULL,
"_parent_id" uuid NOT NULL,
"_path" text NOT NULL,
"id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL,
"_uuid" varchar,
"block_name" varchar
);
CREATE TABLE "_pages_v_rels" (
"id" serial PRIMARY KEY NOT NULL,
"order" integer,
"parent_id" uuid NOT NULL,
"path" varchar NOT NULL,
"pages_id" uuid,
"group_id" uuid
);
ALTER TABLE "announcement" ALTER COLUMN "date" SET DEFAULT '2026-04-12T11:40:57.328Z';
ALTER TABLE "calendar" ALTER COLUMN "date" SET DEFAULT '2026-04-12T11:40:57.621Z';
ALTER TABLE "classifieds" ALTER COLUMN "until" SET DEFAULT '2026-05-10T11:40:57.679Z';
ALTER TABLE "parish_rels" ADD COLUMN "pages_id" uuid;
ALTER TABLE "parish_rels" ADD COLUMN "group_id" uuid;
ALTER TABLE "_parish_v_rels" ADD COLUMN "pages_id" uuid;
ALTER TABLE "_parish_v_rels" ADD COLUMN "group_id" uuid;
ALTER TABLE "blog_rels" ADD COLUMN "pages_id" uuid;
ALTER TABLE "blog_rels" ADD COLUMN "group_id" uuid;
ALTER TABLE "_blog_v_rels" ADD COLUMN "pages_id" uuid;
ALTER TABLE "_blog_v_rels" ADD COLUMN "group_id" uuid;
ALTER TABLE "parish_blocks_image_cards_items" ADD CONSTRAINT "parish_blocks_image_cards_items_image_id_media_id_fk" FOREIGN KEY ("image_id") REFERENCES "public"."media"("id") ON DELETE set null ON UPDATE no action;
ALTER TABLE "parish_blocks_image_cards_items" ADD CONSTRAINT "parish_blocks_image_cards_items_parent_id_fk" FOREIGN KEY ("_parent_id") REFERENCES "public"."parish_blocks_image_cards"("id") ON DELETE cascade ON UPDATE no action;
ALTER TABLE "parish_blocks_image_cards" ADD CONSTRAINT "parish_blocks_image_cards_parent_id_fk" FOREIGN KEY ("_parent_id") REFERENCES "public"."parish"("id") ON DELETE cascade ON UPDATE no action;
ALTER TABLE "_parish_v_blocks_image_cards_items" ADD CONSTRAINT "_parish_v_blocks_image_cards_items_image_id_media_id_fk" FOREIGN KEY ("image_id") REFERENCES "public"."media"("id") ON DELETE set null ON UPDATE no action;
ALTER TABLE "_parish_v_blocks_image_cards_items" ADD CONSTRAINT "_parish_v_blocks_image_cards_items_parent_id_fk" FOREIGN KEY ("_parent_id") REFERENCES "public"."_parish_v_blocks_image_cards"("id") ON DELETE cascade ON UPDATE no action;
ALTER TABLE "_parish_v_blocks_image_cards" ADD CONSTRAINT "_parish_v_blocks_image_cards_parent_id_fk" FOREIGN KEY ("_parent_id") REFERENCES "public"."_parish_v"("id") ON DELETE cascade ON UPDATE no action;
ALTER TABLE "blog_blocks_image_cards_items" ADD CONSTRAINT "blog_blocks_image_cards_items_image_id_media_id_fk" FOREIGN KEY ("image_id") REFERENCES "public"."media"("id") ON DELETE set null ON UPDATE no action;
ALTER TABLE "blog_blocks_image_cards_items" ADD CONSTRAINT "blog_blocks_image_cards_items_parent_id_fk" FOREIGN KEY ("_parent_id") REFERENCES "public"."blog_blocks_image_cards"("id") ON DELETE cascade ON UPDATE no action;
ALTER TABLE "blog_blocks_image_cards" ADD CONSTRAINT "blog_blocks_image_cards_parent_id_fk" FOREIGN KEY ("_parent_id") REFERENCES "public"."blog"("id") ON DELETE cascade ON UPDATE no action;
ALTER TABLE "_blog_v_blocks_image_cards_items" ADD CONSTRAINT "_blog_v_blocks_image_cards_items_image_id_media_id_fk" FOREIGN KEY ("image_id") REFERENCES "public"."media"("id") ON DELETE set null ON UPDATE no action;
ALTER TABLE "_blog_v_blocks_image_cards_items" ADD CONSTRAINT "_blog_v_blocks_image_cards_items_parent_id_fk" FOREIGN KEY ("_parent_id") REFERENCES "public"."_blog_v_blocks_image_cards"("id") ON DELETE cascade ON UPDATE no action;
ALTER TABLE "_blog_v_blocks_image_cards" ADD CONSTRAINT "_blog_v_blocks_image_cards_parent_id_fk" FOREIGN KEY ("_parent_id") REFERENCES "public"."_blog_v"("id") ON DELETE cascade ON UPDATE no action;
ALTER TABLE "pages_blocks_image_cards_items" ADD CONSTRAINT "pages_blocks_image_cards_items_image_id_media_id_fk" FOREIGN KEY ("image_id") REFERENCES "public"."media"("id") ON DELETE set null ON UPDATE no action;
ALTER TABLE "pages_blocks_image_cards_items" ADD CONSTRAINT "pages_blocks_image_cards_items_parent_id_fk" FOREIGN KEY ("_parent_id") REFERENCES "public"."pages_blocks_image_cards"("id") ON DELETE cascade ON UPDATE no action;
ALTER TABLE "pages_blocks_image_cards" ADD CONSTRAINT "pages_blocks_image_cards_parent_id_fk" FOREIGN KEY ("_parent_id") REFERENCES "public"."pages"("id") ON DELETE cascade ON UPDATE no action;
ALTER TABLE "pages_rels" ADD CONSTRAINT "pages_rels_parent_fk" FOREIGN KEY ("parent_id") REFERENCES "public"."pages"("id") ON DELETE cascade ON UPDATE no action;
ALTER TABLE "pages_rels" ADD CONSTRAINT "pages_rels_pages_fk" FOREIGN KEY ("pages_id") REFERENCES "public"."pages"("id") ON DELETE cascade ON UPDATE no action;
ALTER TABLE "pages_rels" ADD CONSTRAINT "pages_rels_group_fk" FOREIGN KEY ("group_id") REFERENCES "public"."group"("id") ON DELETE cascade ON UPDATE no action;
ALTER TABLE "_pages_v_blocks_image_cards_items" ADD CONSTRAINT "_pages_v_blocks_image_cards_items_image_id_media_id_fk" FOREIGN KEY ("image_id") REFERENCES "public"."media"("id") ON DELETE set null ON UPDATE no action;
ALTER TABLE "_pages_v_blocks_image_cards_items" ADD CONSTRAINT "_pages_v_blocks_image_cards_items_parent_id_fk" FOREIGN KEY ("_parent_id") REFERENCES "public"."_pages_v_blocks_image_cards"("id") ON DELETE cascade ON UPDATE no action;
ALTER TABLE "_pages_v_blocks_image_cards" ADD CONSTRAINT "_pages_v_blocks_image_cards_parent_id_fk" FOREIGN KEY ("_parent_id") REFERENCES "public"."_pages_v"("id") ON DELETE cascade ON UPDATE no action;
ALTER TABLE "_pages_v_rels" ADD CONSTRAINT "_pages_v_rels_parent_fk" FOREIGN KEY ("parent_id") REFERENCES "public"."_pages_v"("id") ON DELETE cascade ON UPDATE no action;
ALTER TABLE "_pages_v_rels" ADD CONSTRAINT "_pages_v_rels_pages_fk" FOREIGN KEY ("pages_id") REFERENCES "public"."pages"("id") ON DELETE cascade ON UPDATE no action;
ALTER TABLE "_pages_v_rels" ADD CONSTRAINT "_pages_v_rels_group_fk" FOREIGN KEY ("group_id") REFERENCES "public"."group"("id") ON DELETE cascade ON UPDATE no action;
CREATE INDEX "parish_blocks_image_cards_items_order_idx" ON "parish_blocks_image_cards_items" USING btree ("_order");
CREATE INDEX "parish_blocks_image_cards_items_parent_id_idx" ON "parish_blocks_image_cards_items" USING btree ("_parent_id");
CREATE INDEX "parish_blocks_image_cards_items_image_idx" ON "parish_blocks_image_cards_items" USING btree ("image_id");
CREATE INDEX "parish_blocks_image_cards_order_idx" ON "parish_blocks_image_cards" USING btree ("_order");
CREATE INDEX "parish_blocks_image_cards_parent_id_idx" ON "parish_blocks_image_cards" USING btree ("_parent_id");
CREATE INDEX "parish_blocks_image_cards_path_idx" ON "parish_blocks_image_cards" USING btree ("_path");
CREATE INDEX "_parish_v_blocks_image_cards_items_order_idx" ON "_parish_v_blocks_image_cards_items" USING btree ("_order");
CREATE INDEX "_parish_v_blocks_image_cards_items_parent_id_idx" ON "_parish_v_blocks_image_cards_items" USING btree ("_parent_id");
CREATE INDEX "_parish_v_blocks_image_cards_items_image_idx" ON "_parish_v_blocks_image_cards_items" USING btree ("image_id");
CREATE INDEX "_parish_v_blocks_image_cards_order_idx" ON "_parish_v_blocks_image_cards" USING btree ("_order");
CREATE INDEX "_parish_v_blocks_image_cards_parent_id_idx" ON "_parish_v_blocks_image_cards" USING btree ("_parent_id");
CREATE INDEX "_parish_v_blocks_image_cards_path_idx" ON "_parish_v_blocks_image_cards" USING btree ("_path");
CREATE INDEX "blog_blocks_image_cards_items_order_idx" ON "blog_blocks_image_cards_items" USING btree ("_order");
CREATE INDEX "blog_blocks_image_cards_items_parent_id_idx" ON "blog_blocks_image_cards_items" USING btree ("_parent_id");
CREATE INDEX "blog_blocks_image_cards_items_image_idx" ON "blog_blocks_image_cards_items" USING btree ("image_id");
CREATE INDEX "blog_blocks_image_cards_order_idx" ON "blog_blocks_image_cards" USING btree ("_order");
CREATE INDEX "blog_blocks_image_cards_parent_id_idx" ON "blog_blocks_image_cards" USING btree ("_parent_id");
CREATE INDEX "blog_blocks_image_cards_path_idx" ON "blog_blocks_image_cards" USING btree ("_path");
CREATE INDEX "_blog_v_blocks_image_cards_items_order_idx" ON "_blog_v_blocks_image_cards_items" USING btree ("_order");
CREATE INDEX "_blog_v_blocks_image_cards_items_parent_id_idx" ON "_blog_v_blocks_image_cards_items" USING btree ("_parent_id");
CREATE INDEX "_blog_v_blocks_image_cards_items_image_idx" ON "_blog_v_blocks_image_cards_items" USING btree ("image_id");
CREATE INDEX "_blog_v_blocks_image_cards_order_idx" ON "_blog_v_blocks_image_cards" USING btree ("_order");
CREATE INDEX "_blog_v_blocks_image_cards_parent_id_idx" ON "_blog_v_blocks_image_cards" USING btree ("_parent_id");
CREATE INDEX "_blog_v_blocks_image_cards_path_idx" ON "_blog_v_blocks_image_cards" USING btree ("_path");
CREATE INDEX "pages_blocks_image_cards_items_order_idx" ON "pages_blocks_image_cards_items" USING btree ("_order");
CREATE INDEX "pages_blocks_image_cards_items_parent_id_idx" ON "pages_blocks_image_cards_items" USING btree ("_parent_id");
CREATE INDEX "pages_blocks_image_cards_items_image_idx" ON "pages_blocks_image_cards_items" USING btree ("image_id");
CREATE INDEX "pages_blocks_image_cards_order_idx" ON "pages_blocks_image_cards" USING btree ("_order");
CREATE INDEX "pages_blocks_image_cards_parent_id_idx" ON "pages_blocks_image_cards" USING btree ("_parent_id");
CREATE INDEX "pages_blocks_image_cards_path_idx" ON "pages_blocks_image_cards" USING btree ("_path");
CREATE INDEX "pages_rels_order_idx" ON "pages_rels" USING btree ("order");
CREATE INDEX "pages_rels_parent_idx" ON "pages_rels" USING btree ("parent_id");
CREATE INDEX "pages_rels_path_idx" ON "pages_rels" USING btree ("path");
CREATE INDEX "pages_rels_pages_id_idx" ON "pages_rels" USING btree ("pages_id");
CREATE INDEX "pages_rels_group_id_idx" ON "pages_rels" USING btree ("group_id");
CREATE INDEX "_pages_v_blocks_image_cards_items_order_idx" ON "_pages_v_blocks_image_cards_items" USING btree ("_order");
CREATE INDEX "_pages_v_blocks_image_cards_items_parent_id_idx" ON "_pages_v_blocks_image_cards_items" USING btree ("_parent_id");
CREATE INDEX "_pages_v_blocks_image_cards_items_image_idx" ON "_pages_v_blocks_image_cards_items" USING btree ("image_id");
CREATE INDEX "_pages_v_blocks_image_cards_order_idx" ON "_pages_v_blocks_image_cards" USING btree ("_order");
CREATE INDEX "_pages_v_blocks_image_cards_parent_id_idx" ON "_pages_v_blocks_image_cards" USING btree ("_parent_id");
CREATE INDEX "_pages_v_blocks_image_cards_path_idx" ON "_pages_v_blocks_image_cards" USING btree ("_path");
CREATE INDEX "_pages_v_rels_order_idx" ON "_pages_v_rels" USING btree ("order");
CREATE INDEX "_pages_v_rels_parent_idx" ON "_pages_v_rels" USING btree ("parent_id");
CREATE INDEX "_pages_v_rels_path_idx" ON "_pages_v_rels" USING btree ("path");
CREATE INDEX "_pages_v_rels_pages_id_idx" ON "_pages_v_rels" USING btree ("pages_id");
CREATE INDEX "_pages_v_rels_group_id_idx" ON "_pages_v_rels" USING btree ("group_id");
ALTER TABLE "parish_rels" ADD CONSTRAINT "parish_rels_pages_fk" FOREIGN KEY ("pages_id") REFERENCES "public"."pages"("id") ON DELETE cascade ON UPDATE no action;
ALTER TABLE "parish_rels" ADD CONSTRAINT "parish_rels_group_fk" FOREIGN KEY ("group_id") REFERENCES "public"."group"("id") ON DELETE cascade ON UPDATE no action;
ALTER TABLE "_parish_v_rels" ADD CONSTRAINT "_parish_v_rels_pages_fk" FOREIGN KEY ("pages_id") REFERENCES "public"."pages"("id") ON DELETE cascade ON UPDATE no action;
ALTER TABLE "_parish_v_rels" ADD CONSTRAINT "_parish_v_rels_group_fk" FOREIGN KEY ("group_id") REFERENCES "public"."group"("id") ON DELETE cascade ON UPDATE no action;
ALTER TABLE "blog_rels" ADD CONSTRAINT "blog_rels_pages_fk" FOREIGN KEY ("pages_id") REFERENCES "public"."pages"("id") ON DELETE cascade ON UPDATE no action;
ALTER TABLE "blog_rels" ADD CONSTRAINT "blog_rels_group_fk" FOREIGN KEY ("group_id") REFERENCES "public"."group"("id") ON DELETE cascade ON UPDATE no action;
ALTER TABLE "_blog_v_rels" ADD CONSTRAINT "_blog_v_rels_pages_fk" FOREIGN KEY ("pages_id") REFERENCES "public"."pages"("id") ON DELETE cascade ON UPDATE no action;
ALTER TABLE "_blog_v_rels" ADD CONSTRAINT "_blog_v_rels_group_fk" FOREIGN KEY ("group_id") REFERENCES "public"."group"("id") ON DELETE cascade ON UPDATE no action;
CREATE INDEX "parish_rels_pages_id_idx" ON "parish_rels" USING btree ("pages_id");
CREATE INDEX "parish_rels_group_id_idx" ON "parish_rels" USING btree ("group_id");
CREATE INDEX "_parish_v_rels_pages_id_idx" ON "_parish_v_rels" USING btree ("pages_id");
CREATE INDEX "_parish_v_rels_group_id_idx" ON "_parish_v_rels" USING btree ("group_id");
CREATE INDEX "blog_rels_pages_id_idx" ON "blog_rels" USING btree ("pages_id");
CREATE INDEX "blog_rels_group_id_idx" ON "blog_rels" USING btree ("group_id");
CREATE INDEX "_blog_v_rels_pages_id_idx" ON "_blog_v_rels" USING btree ("pages_id");
CREATE INDEX "_blog_v_rels_group_id_idx" ON "_blog_v_rels" USING btree ("group_id");`)
}
export async function down({ db, payload, req }: MigrateDownArgs): Promise<void> {
await db.execute(sql`
ALTER TABLE "parish_blocks_image_cards_items" DISABLE ROW LEVEL SECURITY;
ALTER TABLE "parish_blocks_image_cards" DISABLE ROW LEVEL SECURITY;
ALTER TABLE "_parish_v_blocks_image_cards_items" DISABLE ROW LEVEL SECURITY;
ALTER TABLE "_parish_v_blocks_image_cards" DISABLE ROW LEVEL SECURITY;
ALTER TABLE "blog_blocks_image_cards_items" DISABLE ROW LEVEL SECURITY;
ALTER TABLE "blog_blocks_image_cards" DISABLE ROW LEVEL SECURITY;
ALTER TABLE "_blog_v_blocks_image_cards_items" DISABLE ROW LEVEL SECURITY;
ALTER TABLE "_blog_v_blocks_image_cards" DISABLE ROW LEVEL SECURITY;
ALTER TABLE "pages_blocks_image_cards_items" DISABLE ROW LEVEL SECURITY;
ALTER TABLE "pages_blocks_image_cards" DISABLE ROW LEVEL SECURITY;
ALTER TABLE "pages_rels" DISABLE ROW LEVEL SECURITY;
ALTER TABLE "_pages_v_blocks_image_cards_items" DISABLE ROW LEVEL SECURITY;
ALTER TABLE "_pages_v_blocks_image_cards" DISABLE ROW LEVEL SECURITY;
ALTER TABLE "_pages_v_rels" DISABLE ROW LEVEL SECURITY;
DROP TABLE "parish_blocks_image_cards_items" CASCADE;
DROP TABLE "parish_blocks_image_cards" CASCADE;
DROP TABLE "_parish_v_blocks_image_cards_items" CASCADE;
DROP TABLE "_parish_v_blocks_image_cards" CASCADE;
DROP TABLE "blog_blocks_image_cards_items" CASCADE;
DROP TABLE "blog_blocks_image_cards" CASCADE;
DROP TABLE "_blog_v_blocks_image_cards_items" CASCADE;
DROP TABLE "_blog_v_blocks_image_cards" CASCADE;
DROP TABLE "pages_blocks_image_cards_items" CASCADE;
DROP TABLE "pages_blocks_image_cards" CASCADE;
DROP TABLE "pages_rels" CASCADE;
DROP TABLE "_pages_v_blocks_image_cards_items" CASCADE;
DROP TABLE "_pages_v_blocks_image_cards" CASCADE;
DROP TABLE "_pages_v_rels" CASCADE;
ALTER TABLE "parish_rels" DROP CONSTRAINT "parish_rels_pages_fk";
ALTER TABLE "parish_rels" DROP CONSTRAINT "parish_rels_group_fk";
ALTER TABLE "_parish_v_rels" DROP CONSTRAINT "_parish_v_rels_pages_fk";
ALTER TABLE "_parish_v_rels" DROP CONSTRAINT "_parish_v_rels_group_fk";
ALTER TABLE "blog_rels" DROP CONSTRAINT "blog_rels_pages_fk";
ALTER TABLE "blog_rels" DROP CONSTRAINT "blog_rels_group_fk";
ALTER TABLE "_blog_v_rels" DROP CONSTRAINT "_blog_v_rels_pages_fk";
ALTER TABLE "_blog_v_rels" DROP CONSTRAINT "_blog_v_rels_group_fk";
DROP INDEX "parish_rels_pages_id_idx";
DROP INDEX "parish_rels_group_id_idx";
DROP INDEX "_parish_v_rels_pages_id_idx";
DROP INDEX "_parish_v_rels_group_id_idx";
DROP INDEX "blog_rels_pages_id_idx";
DROP INDEX "blog_rels_group_id_idx";
DROP INDEX "_blog_v_rels_pages_id_idx";
DROP INDEX "_blog_v_rels_group_id_idx";
ALTER TABLE "announcement" ALTER COLUMN "date" SET DEFAULT '2026-04-12T08:36:37.826Z';
ALTER TABLE "calendar" ALTER COLUMN "date" SET DEFAULT '2026-04-12T08:36:38.113Z';
ALTER TABLE "classifieds" ALTER COLUMN "until" SET DEFAULT '2026-05-09T08:36:38.168Z';
ALTER TABLE "parish_rels" DROP COLUMN "pages_id";
ALTER TABLE "parish_rels" DROP COLUMN "group_id";
ALTER TABLE "_parish_v_rels" DROP COLUMN "pages_id";
ALTER TABLE "_parish_v_rels" DROP COLUMN "group_id";
ALTER TABLE "blog_rels" DROP COLUMN "pages_id";
ALTER TABLE "blog_rels" DROP COLUMN "group_id";
ALTER TABLE "_blog_v_rels" DROP COLUMN "pages_id";
ALTER TABLE "_blog_v_rels" DROP COLUMN "group_id";`)
}

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,60 @@
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_title_size" AS ENUM('xl', 'lg', 'md', 'sm');
CREATE TYPE "public"."enum_parish_blocks_title_align" AS ENUM('left', 'center');
CREATE TYPE "public"."enum__parish_v_blocks_title_size" AS ENUM('xl', 'lg', 'md', 'sm');
CREATE TYPE "public"."enum__parish_v_blocks_title_align" AS ENUM('left', 'center');
CREATE TABLE "parish_blocks_title" (
"_order" integer NOT NULL,
"_parent_id" uuid NOT NULL,
"_path" text NOT NULL,
"id" varchar PRIMARY KEY NOT NULL,
"title" varchar,
"subtitle" varchar,
"size" "enum_parish_blocks_title_size" DEFAULT 'lg',
"align" "enum_parish_blocks_title_align" DEFAULT 'left',
"block_name" varchar
);
CREATE TABLE "_parish_v_blocks_title" (
"_order" integer NOT NULL,
"_parent_id" uuid NOT NULL,
"_path" text NOT NULL,
"id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL,
"title" varchar,
"subtitle" varchar,
"size" "enum__parish_v_blocks_title_size" DEFAULT 'lg',
"align" "enum__parish_v_blocks_title_align" DEFAULT 'left',
"_uuid" varchar,
"block_name" varchar
);
ALTER TABLE "announcement" ALTER COLUMN "date" SET DEFAULT '2026-04-12T11:52:47.682Z';
ALTER TABLE "calendar" ALTER COLUMN "date" SET DEFAULT '2026-04-12T11:52:47.973Z';
ALTER TABLE "classifieds" ALTER COLUMN "until" SET DEFAULT '2026-05-10T11:52:48.026Z';
ALTER TABLE "parish_blocks_title" ADD CONSTRAINT "parish_blocks_title_parent_id_fk" FOREIGN KEY ("_parent_id") REFERENCES "public"."parish"("id") ON DELETE cascade ON UPDATE no action;
ALTER TABLE "_parish_v_blocks_title" ADD CONSTRAINT "_parish_v_blocks_title_parent_id_fk" FOREIGN KEY ("_parent_id") REFERENCES "public"."_parish_v"("id") ON DELETE cascade ON UPDATE no action;
CREATE INDEX "parish_blocks_title_order_idx" ON "parish_blocks_title" USING btree ("_order");
CREATE INDEX "parish_blocks_title_parent_id_idx" ON "parish_blocks_title" USING btree ("_parent_id");
CREATE INDEX "parish_blocks_title_path_idx" ON "parish_blocks_title" USING btree ("_path");
CREATE INDEX "_parish_v_blocks_title_order_idx" ON "_parish_v_blocks_title" USING btree ("_order");
CREATE INDEX "_parish_v_blocks_title_parent_id_idx" ON "_parish_v_blocks_title" USING btree ("_parent_id");
CREATE INDEX "_parish_v_blocks_title_path_idx" ON "_parish_v_blocks_title" USING btree ("_path");`)
}
export async function down({ db, payload, req }: MigrateDownArgs): Promise<void> {
await db.execute(sql`
ALTER TABLE "parish_blocks_title" DISABLE ROW LEVEL SECURITY;
ALTER TABLE "_parish_v_blocks_title" DISABLE ROW LEVEL SECURITY;
DROP TABLE "parish_blocks_title" CASCADE;
DROP TABLE "_parish_v_blocks_title" CASCADE;
ALTER TABLE "announcement" ALTER COLUMN "date" SET DEFAULT '2026-04-12T11:40:57.328Z';
ALTER TABLE "calendar" ALTER COLUMN "date" SET DEFAULT '2026-04-12T11:40:57.621Z';
ALTER TABLE "classifieds" ALTER COLUMN "until" SET DEFAULT '2026-05-10T11:40:57.679Z';
DROP TYPE "public"."enum_parish_blocks_title_size";
DROP TYPE "public"."enum_parish_blocks_title_align";
DROP TYPE "public"."enum__parish_v_blocks_title_size";
DROP TYPE "public"."enum__parish_v_blocks_title_align";`)
}

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,31 @@
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_title_color" AS ENUM('base', 'shade1', 'shade2', 'shade3', 'contrast', 'contrastShade1');
CREATE TYPE "public"."enum__parish_v_blocks_title_color" AS ENUM('base', 'shade1', 'shade2', 'shade3', 'contrast', 'contrastShade1');
CREATE TYPE "public"."enum_pages_blocks_title_color" AS ENUM('base', 'shade1', 'shade2', 'shade3', 'contrast', 'contrastShade1');
CREATE TYPE "public"."enum__pages_v_blocks_title_color" AS ENUM('base', 'shade1', 'shade2', 'shade3', 'contrast', 'contrastShade1');
ALTER TABLE "announcement" ALTER COLUMN "date" SET DEFAULT '2026-04-12T12:46:39.042Z';
ALTER TABLE "calendar" ALTER COLUMN "date" SET DEFAULT '2026-04-12T12:46:39.348Z';
ALTER TABLE "classifieds" ALTER COLUMN "until" SET DEFAULT '2026-05-10T12:46:39.403Z';
ALTER TABLE "parish_blocks_title" ADD COLUMN "color" "enum_parish_blocks_title_color" DEFAULT 'base';
ALTER TABLE "_parish_v_blocks_title" ADD COLUMN "color" "enum__parish_v_blocks_title_color" DEFAULT 'base';
ALTER TABLE "pages_blocks_title" ADD COLUMN "color" "enum_pages_blocks_title_color" DEFAULT 'base';
ALTER TABLE "_pages_v_blocks_title" ADD COLUMN "color" "enum__pages_v_blocks_title_color" DEFAULT 'base';`)
}
export async function down({ db, payload, req }: MigrateDownArgs): Promise<void> {
await db.execute(sql`
ALTER TABLE "announcement" ALTER COLUMN "date" SET DEFAULT '2026-04-12T11:52:47.682Z';
ALTER TABLE "calendar" ALTER COLUMN "date" SET DEFAULT '2026-04-12T11:52:47.973Z';
ALTER TABLE "classifieds" ALTER COLUMN "until" SET DEFAULT '2026-05-10T11:52:48.026Z';
ALTER TABLE "parish_blocks_title" DROP COLUMN "color";
ALTER TABLE "_parish_v_blocks_title" DROP COLUMN "color";
ALTER TABLE "pages_blocks_title" DROP COLUMN "color";
ALTER TABLE "_pages_v_blocks_title" DROP COLUMN "color";
DROP TYPE "public"."enum_parish_blocks_title_color";
DROP TYPE "public"."enum__parish_v_blocks_title_color";
DROP TYPE "public"."enum_pages_blocks_title_color";
DROP TYPE "public"."enum__pages_v_blocks_title_color";`)
}

View file

@ -27,6 +27,9 @@ import * as migration_20260319_224419 from './20260319_224419';
import * as migration_20260408_115618 from './20260408_115618'; import * as migration_20260408_115618 from './20260408_115618';
import * as migration_20260408_143149 from './20260408_143149'; import * as migration_20260408_143149 from './20260408_143149';
import * as migration_20260409_083638 from './20260409_083638'; import * as migration_20260409_083638 from './20260409_083638';
import * as migration_20260410_114057_imagecards_block from './20260410_114057_imagecards_block';
import * as migration_20260410_115248_parish_title_block from './20260410_115248_parish_title_block';
import * as migration_20260410_124639 from './20260410_124639';
export const migrations = [ export const migrations = [
{ {
@ -172,6 +175,21 @@ export const migrations = [
{ {
up: migration_20260409_083638.up, up: migration_20260409_083638.up,
down: migration_20260409_083638.down, down: migration_20260409_083638.down,
name: '20260409_083638' name: '20260409_083638',
},
{
up: migration_20260410_114057_imagecards_block.up,
down: migration_20260410_114057_imagecards_block.down,
name: '20260410_114057_imagecards_block',
},
{
up: migration_20260410_115248_parish_title_block.up,
down: migration_20260410_115248_parish_title_block.down,
name: '20260410_115248_parish_title_block',
},
{
up: migration_20260410_124639.up,
down: migration_20260410_124639.down,
name: '20260410_124639'
}, },
]; ];

View file

@ -235,6 +235,39 @@ export interface Parish {
blockName?: string | null; blockName?: string | null;
blockType: 'donationAppeal'; blockType: 'donationAppeal';
} }
| {
items: {
title: string;
image: string | Media;
link?:
| ({
relationTo: 'pages';
value: string | Page;
} | null)
| ({
relationTo: 'group';
value: string | Group;
} | null);
/**
* Alternative zu "Verknüpfung". Nur eins von beiden kann gesetzt werden.
*/
customLink?: string | null;
id?: string | null;
}[];
id?: string | null;
blockName?: string | null;
blockType: 'imageCards';
}
| {
title: string;
subtitle?: string | null;
size?: ('xl' | 'lg' | 'md' | 'sm') | null;
align?: ('left' | 'center') | null;
color: 'base' | 'shade1' | 'shade2' | 'shade3' | 'contrast' | 'contrastShade1';
id?: string | null;
blockName?: string | null;
blockType: 'title';
}
)[] )[]
| null; | null;
contact: string; contact: string;
@ -367,385 +400,6 @@ export interface Media {
}; };
}; };
} }
/**
* This interface was referenced by `Config`'s JSON-Schema
* via the `definition` "worship".
*/
export interface Worship {
id: string;
date: string;
location: string | Church;
type: 'MASS' | 'FAMILY' | 'WORD';
title?: string | null;
cancelled: boolean;
liturgicalDay?: string | null;
celebrant?: string | null;
description?: string | null;
generated?: boolean | null;
updatedAt: string;
createdAt: string;
}
/**
* This interface was referenced by `Config`'s JSON-Schema
* via the `definition` "popePrayerIntentions".
*/
export interface PopePrayerIntention {
id: string;
year: number;
month: '01' | '02' | '03' | '04' | '05' | '06' | '07' | '08' | '09' | '10' | '11' | '12';
title: string;
prayer: string;
updatedAt: string;
createdAt: string;
}
/**
* Die Vermeldungen werden jeden Samstag automatisch veröffentlicht.
*
* This interface was referenced by `Config`'s JSON-Schema
* via the `definition` "announcement".
*/
export interface Announcement {
id: string;
date: string;
parish: (string | Parish)[];
document: string | Document;
updatedAt: string;
createdAt: string;
}
/**
* Der Kalender wird jeden Samstag automatisch veröffentlicht.
*
* This interface was referenced by `Config`'s JSON-Schema
* via the `definition` "calendar".
*/
export interface Calendar {
id: string;
date: string;
parish: (string | Parish)[];
document: string | Document;
updatedAt: string;
createdAt: string;
}
/**
* This interface was referenced by `Config`'s JSON-Schema
* via the `definition` "blog".
*/
export interface Blog {
id: string;
photo?: (string | null) | Media;
title: string;
content: {
excerpt: string;
content: (
| {
content: {
root: {
type: string;
children: {
type: any;
version: number;
[k: string]: unknown;
}[];
direction: ('ltr' | 'rtl') | null;
format: 'left' | 'start' | 'center' | 'right' | 'end' | 'justify' | '';
indent: number;
version: number;
};
[k: string]: unknown;
};
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';
}
| {
title: string;
description: string;
email: string;
id?: string | null;
blockName?: string | null;
blockType: 'contactform';
}
| {
items: {
photo: string | Media;
id?: string | null;
}[];
id?: string | null;
blockName?: string | null;
blockType: 'gallery';
}
| {
youtube_id: string;
id?: string | null;
blockName?: string | null;
blockType: 'youtube';
}
| {
text: string;
url: string;
id?: string | null;
blockName?: string | null;
blockType: 'button';
}
)[];
};
configuration: {
showOnFrontpage: boolean;
displayFromDate?: string | null;
displayTillDate?: string | null;
parish?: (string | Parish)[] | null;
};
updatedAt: string;
createdAt: string;
_status?: ('draft' | 'published') | null;
}
/**
* This interface was referenced by `Config`'s JSON-Schema
* via the `definition` "highlight".
*/
export interface Highlight {
id: string;
from: string;
until: string;
date: string;
link?:
| ({
relationTo: 'event';
value: string | Event;
} | null)
| ({
relationTo: 'blog';
value: string | Blog;
} | null)
| ({
relationTo: 'worship';
value: string | Worship;
} | null);
text: string;
updatedAt: string;
createdAt: string;
}
/**
* This interface was referenced by `Config`'s JSON-Schema
* via the `definition` "event".
*/
export interface Event {
id: string;
title: string;
date: string;
location: string | Location;
parish?: (string | Parish)[] | null;
group?: (string | Group)[] | null;
contact?: (string | null) | ContactPerson;
shortDescription: string;
description: string;
rsvpLink?: string | null;
photo?: (string | null) | Media;
flyer?: (string | null) | Document;
cancelled: boolean;
isRecurring: boolean;
updatedAt: string;
createdAt: string;
_status?: ('draft' | 'published') | null;
}
/**
* This interface was referenced by `Config`'s JSON-Schema
* via the `definition` "locations".
*/
export interface Location {
id: string;
name: string;
address?: string | null;
/**
* @minItems 2
* @maxItems 2
*/
coordinates?: [number, number] | null;
notes?: string | null;
barrierFree?: boolean | null;
updatedAt: string;
createdAt: string;
}
/**
* This interface was referenced by `Config`'s JSON-Schema
* via the `definition` "group".
*/
export interface Group {
id: string;
photo?: (string | null) | Media;
name: string;
/**
* Slug der Gruppe (z.B. "ministrant" Gruppenseite ist zu finden unter /gruppe/ministrant)
*/
slug: string;
shortDescription: string;
text?: {
root: {
type: string;
children: {
type: any;
version: number;
[k: string]: unknown;
}[];
direction: ('ltr' | 'rtl') | null;
format: 'left' | 'start' | 'center' | 'right' | 'end' | 'justify' | '';
indent: number;
version: number;
};
[k: string]: unknown;
} | null;
content?:
| (
| {
content: {
root: {
type: string;
children: {
type: any;
version: number;
[k: string]: unknown;
}[];
direction: ('ltr' | 'rtl') | null;
format: 'left' | 'start' | 'center' | 'right' | 'end' | 'justify' | '';
indent: number;
version: number;
};
[k: string]: unknown;
};
width: '1/2' | '3/4';
id?: string | null;
blockName?: string | null;
blockType: 'text';
}
| {
items: {
photo: string | Media;
id?: string | null;
}[];
id?: string | null;
blockName?: string | null;
blockType: 'gallery';
}
| {
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';
}
| {
title: string;
description: string;
email: string;
id?: string | null;
blockName?: string | null;
blockType: 'contactform';
}
| {
text: string;
url: string;
id?: string | null;
blockName?: string | null;
blockType: 'button';
}
)[]
| null;
updatedAt: string;
createdAt: string;
_status?: ('draft' | 'published') | null;
}
/**
* This interface was referenced by `Config`'s JSON-Schema
* via the `definition` "contactPerson".
*/
export interface ContactPerson {
id: string;
photo?: (string | null) | Media;
name: string;
role?: string | null;
email?: string | null;
telephone?: string | null;
updatedAt: string;
createdAt: string;
}
/**
* Dieser Bereich des Dashboards ermöglicht die umfassende Verwaltung aller veröffentlichten Kleinanzeigen für freiwillige Tätigkeiten. Hier können Administratoren Inserate einsehen, bearbeiten, veröffentlichen und entfernen, um die Qualität und Relevanz der angebotenen Möglichkeiten sicherzustellen.
*
* This interface was referenced by `Config`'s JSON-Schema
* via the `definition` "classifieds".
*/
export interface Classified {
id: string;
until: string;
text: {
root: {
type: string;
children: {
type: any;
version: number;
[k: string]: unknown;
}[];
direction: ('ltr' | 'rtl') | null;
format: 'left' | 'start' | 'center' | 'right' | 'end' | 'justify' | '';
indent: number;
version: number;
};
[k: string]: unknown;
};
email: string;
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: any;
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 * This interface was referenced by `Config`'s JSON-Schema
* via the `definition` "pages". * via the `definition` "pages".
@ -794,6 +448,7 @@ export interface Page {
subtitle?: string | null; subtitle?: string | null;
size?: ('xl' | 'lg' | 'md' | 'sm') | null; size?: ('xl' | 'lg' | 'md' | 'sm') | null;
align?: ('left' | 'center') | null; align?: ('left' | 'center') | null;
color: 'base' | 'shade1' | 'shade2' | 'shade3' | 'contrast' | 'contrastShade1';
id?: string | null; id?: string | null;
blockName?: string | null; blockName?: string | null;
blockType: 'title'; blockType: 'title';
@ -933,12 +588,437 @@ export interface Page {
blockName?: string | null; blockName?: string | null;
blockType: 'contactPersonBlock'; blockType: 'contactPersonBlock';
} }
| {
items: {
title: string;
image: string | Media;
link?:
| ({
relationTo: 'pages';
value: string | Page;
} | null)
| ({
relationTo: 'group';
value: string | Group;
} | null);
/**
* Alternative zu "Verknüpfung". Nur eins von beiden kann gesetzt werden.
*/
customLink?: string | null;
id?: string | null;
}[];
id?: string | null;
blockName?: string | null;
blockType: 'imageCards';
}
)[] )[]
| null; | null;
updatedAt: string; updatedAt: string;
createdAt: string; createdAt: string;
_status?: ('draft' | 'published') | null; _status?: ('draft' | 'published') | null;
} }
/**
* This interface was referenced by `Config`'s JSON-Schema
* via the `definition` "contactPerson".
*/
export interface ContactPerson {
id: string;
photo?: (string | null) | Media;
name: string;
role?: string | null;
email?: string | null;
telephone?: string | null;
updatedAt: string;
createdAt: string;
}
/**
* This interface was referenced by `Config`'s JSON-Schema
* via the `definition` "group".
*/
export interface Group {
id: string;
photo?: (string | null) | Media;
name: string;
/**
* Slug der Gruppe (z.B. "ministrant" Gruppenseite ist zu finden unter /gruppe/ministrant)
*/
slug: string;
shortDescription: string;
text?: {
root: {
type: string;
children: {
type: any;
version: number;
[k: string]: unknown;
}[];
direction: ('ltr' | 'rtl') | null;
format: 'left' | 'start' | 'center' | 'right' | 'end' | 'justify' | '';
indent: number;
version: number;
};
[k: string]: unknown;
} | null;
content?:
| (
| {
content: {
root: {
type: string;
children: {
type: any;
version: number;
[k: string]: unknown;
}[];
direction: ('ltr' | 'rtl') | null;
format: 'left' | 'start' | 'center' | 'right' | 'end' | 'justify' | '';
indent: number;
version: number;
};
[k: string]: unknown;
};
width: '1/2' | '3/4';
id?: string | null;
blockName?: string | null;
blockType: 'text';
}
| {
items: {
photo: string | Media;
id?: string | null;
}[];
id?: string | null;
blockName?: string | null;
blockType: 'gallery';
}
| {
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';
}
| {
title: string;
description: string;
email: string;
id?: string | null;
blockName?: string | null;
blockType: 'contactform';
}
| {
text: string;
url: string;
id?: string | null;
blockName?: string | null;
blockType: 'button';
}
)[]
| null;
updatedAt: string;
createdAt: string;
_status?: ('draft' | 'published') | null;
}
/**
* This interface was referenced by `Config`'s JSON-Schema
* via the `definition` "worship".
*/
export interface Worship {
id: string;
date: string;
location: string | Church;
type: 'MASS' | 'FAMILY' | 'WORD';
title?: string | null;
cancelled: boolean;
liturgicalDay?: string | null;
celebrant?: string | null;
description?: string | null;
generated?: boolean | null;
updatedAt: string;
createdAt: string;
}
/**
* This interface was referenced by `Config`'s JSON-Schema
* via the `definition` "popePrayerIntentions".
*/
export interface PopePrayerIntention {
id: string;
year: number;
month: '01' | '02' | '03' | '04' | '05' | '06' | '07' | '08' | '09' | '10' | '11' | '12';
title: string;
prayer: string;
updatedAt: string;
createdAt: string;
}
/**
* Die Vermeldungen werden jeden Samstag automatisch veröffentlicht.
*
* This interface was referenced by `Config`'s JSON-Schema
* via the `definition` "announcement".
*/
export interface Announcement {
id: string;
date: string;
parish: (string | Parish)[];
document: string | Document;
updatedAt: string;
createdAt: string;
}
/**
* Der Kalender wird jeden Samstag automatisch veröffentlicht.
*
* This interface was referenced by `Config`'s JSON-Schema
* via the `definition` "calendar".
*/
export interface Calendar {
id: string;
date: string;
parish: (string | Parish)[];
document: string | Document;
updatedAt: string;
createdAt: string;
}
/**
* This interface was referenced by `Config`'s JSON-Schema
* via the `definition` "blog".
*/
export interface Blog {
id: string;
photo?: (string | null) | Media;
title: string;
content: {
excerpt: string;
content: (
| {
content: {
root: {
type: string;
children: {
type: any;
version: number;
[k: string]: unknown;
}[];
direction: ('ltr' | 'rtl') | null;
format: 'left' | 'start' | 'center' | 'right' | 'end' | 'justify' | '';
indent: number;
version: number;
};
[k: string]: unknown;
};
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';
}
| {
title: string;
description: string;
email: string;
id?: string | null;
blockName?: string | null;
blockType: 'contactform';
}
| {
items: {
photo: string | Media;
id?: string | null;
}[];
id?: string | null;
blockName?: string | null;
blockType: 'gallery';
}
| {
youtube_id: string;
id?: string | null;
blockName?: string | null;
blockType: 'youtube';
}
| {
text: string;
url: string;
id?: string | null;
blockName?: string | null;
blockType: 'button';
}
| {
items: {
title: string;
image: string | Media;
link?:
| ({
relationTo: 'pages';
value: string | Page;
} | null)
| ({
relationTo: 'group';
value: string | Group;
} | null);
/**
* Alternative zu "Verknüpfung". Nur eins von beiden kann gesetzt werden.
*/
customLink?: string | null;
id?: string | null;
}[];
id?: string | null;
blockName?: string | null;
blockType: 'imageCards';
}
)[];
};
configuration: {
showOnFrontpage: boolean;
displayFromDate?: string | null;
displayTillDate?: string | null;
parish?: (string | Parish)[] | null;
};
updatedAt: string;
createdAt: string;
_status?: ('draft' | 'published') | null;
}
/**
* This interface was referenced by `Config`'s JSON-Schema
* via the `definition` "highlight".
*/
export interface Highlight {
id: string;
from: string;
until: string;
date: string;
link?:
| ({
relationTo: 'event';
value: string | Event;
} | null)
| ({
relationTo: 'blog';
value: string | Blog;
} | null)
| ({
relationTo: 'worship';
value: string | Worship;
} | null);
text: string;
updatedAt: string;
createdAt: string;
}
/**
* This interface was referenced by `Config`'s JSON-Schema
* via the `definition` "event".
*/
export interface Event {
id: string;
title: string;
date: string;
location: string | Location;
parish?: (string | Parish)[] | null;
group?: (string | Group)[] | null;
contact?: (string | null) | ContactPerson;
shortDescription: string;
description: string;
rsvpLink?: string | null;
photo?: (string | null) | Media;
flyer?: (string | null) | Document;
cancelled: boolean;
isRecurring: boolean;
updatedAt: string;
createdAt: string;
_status?: ('draft' | 'published') | null;
}
/**
* This interface was referenced by `Config`'s JSON-Schema
* via the `definition` "locations".
*/
export interface Location {
id: string;
name: string;
address?: string | null;
/**
* @minItems 2
* @maxItems 2
*/
coordinates?: [number, number] | null;
notes?: string | null;
barrierFree?: boolean | null;
updatedAt: string;
createdAt: string;
}
/**
* Dieser Bereich des Dashboards ermöglicht die umfassende Verwaltung aller veröffentlichten Kleinanzeigen für freiwillige Tätigkeiten. Hier können Administratoren Inserate einsehen, bearbeiten, veröffentlichen und entfernen, um die Qualität und Relevanz der angebotenen Möglichkeiten sicherzustellen.
*
* This interface was referenced by `Config`'s JSON-Schema
* via the `definition` "classifieds".
*/
export interface Classified {
id: string;
until: string;
text: {
root: {
type: string;
children: {
type: any;
version: number;
[k: string]: unknown;
}[];
direction: ('ltr' | 'rtl') | null;
format: 'left' | 'start' | 'center' | 'right' | 'end' | 'justify' | '';
indent: number;
version: number;
};
[k: string]: unknown;
};
email: string;
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: any;
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 * This interface was referenced by `Config`'s JSON-Schema
* via the `definition` "prayers". * via the `definition` "prayers".
@ -1290,6 +1370,32 @@ export interface ParishSelect<T extends boolean = true> {
id?: T; id?: T;
blockName?: T; blockName?: T;
}; };
imageCards?:
| T
| {
items?:
| T
| {
title?: T;
image?: T;
link?: T;
customLink?: T;
id?: T;
};
id?: T;
blockName?: T;
};
title?:
| T
| {
title?: T;
subtitle?: T;
size?: T;
align?: T;
color?: T;
id?: T;
blockName?: T;
};
}; };
contact?: T; contact?: T;
photo?: T; photo?: T;
@ -1451,6 +1557,21 @@ export interface BlogSelect<T extends boolean = true> {
id?: T; id?: T;
blockName?: T; blockName?: T;
}; };
imageCards?:
| T
| {
items?:
| T
| {
title?: T;
image?: T;
link?: T;
customLink?: T;
id?: T;
};
id?: T;
blockName?: T;
};
}; };
}; };
configuration?: configuration?:
@ -1659,6 +1780,7 @@ export interface PagesSelect<T extends boolean = true> {
subtitle?: T; subtitle?: T;
size?: T; size?: T;
align?: T; align?: T;
color?: T;
id?: T; id?: T;
blockName?: T; blockName?: T;
}; };
@ -1788,6 +1910,21 @@ export interface PagesSelect<T extends boolean = true> {
id?: T; id?: T;
blockName?: T; blockName?: T;
}; };
imageCards?:
| T
| {
items?:
| T
| {
title?: T;
image?: T;
link?: T;
customLink?: T;
id?: T;
};
id?: T;
blockName?: T;
};
}; };
updatedAt?: T; updatedAt?: T;
createdAt?: T; createdAt?: T;