Compare commits

..

No commits in common. "dabdfbd2db1169c3413d177cf7ab757c654eef5c" and "efdd00d2f0709e23e3f194173474b10dc93ffccd" have entirely different histories.

16 changed files with 97 additions and 28239 deletions

View file

@ -49,33 +49,18 @@ all:
- from: st-antonius.hl-mutter-teresa-chemnitz.de - from: st-antonius.hl-mutter-teresa-chemnitz.de
to: hl-mutter-teresa-chemnitz.de to: hl-mutter-teresa-chemnitz.de
to_path: /gemeinde/st-antonius to_path: /gemeinde/st-antonius
- from: www.st-antonius.hl-mutter-teresa-chemnitz.de
to: hl-mutter-teresa-chemnitz.de
to_path: /gemeinde/st-antonius
- from: st-franziskus.hl-mutter-teresa-chemnitz.de - from: st-franziskus.hl-mutter-teresa-chemnitz.de
to: hl-mutter-teresa-chemnitz.de to: hl-mutter-teresa-chemnitz.de
to_path: /gemeinde/st-franziskus to_path: /gemeinde/st-franziskus
- from: www.st-franziskus.hl-mutter-teresa-chemnitz.de
to: hl-mutter-teresa-chemnitz.de
to_path: /gemeinde/st-franziskus
- from: st-johannes-nepomuk.hl-mutter-teresa-chemnitz.de - from: st-johannes-nepomuk.hl-mutter-teresa-chemnitz.de
to: hl-mutter-teresa-chemnitz.de to: hl-mutter-teresa-chemnitz.de
to_path: /gemeinde/st-johannes-nepomuk to_path: /gemeinde/st-johannes-nepomuk
- from: www.st-johannes-nepomuk.hl-mutter-teresa-chemnitz.de
to: hl-mutter-teresa-chemnitz.de
to_path: /gemeinde/st-johannes-nepomuk
- from: st-joseph.hl-mutter-teresa-chemnitz.de - from: st-joseph.hl-mutter-teresa-chemnitz.de
to: hl-mutter-teresa-chemnitz.de to: hl-mutter-teresa-chemnitz.de
to_path: /gemeinde/st-joseph to_path: /gemeinde/st-joseph
- from: www.st-joseph.hl-mutter-teresa-chemnitz.de
to: hl-mutter-teresa-chemnitz.de
to_path: /gemeinde/st-joseph
- from: st-marien.hl-mutter-teresa-chemnitz.de - from: st-marien.hl-mutter-teresa-chemnitz.de
to: hl-mutter-teresa-chemnitz.de to: hl-mutter-teresa-chemnitz.de
to_path: /gemeinde/st-marien-zschopau to_path: /gemeinde/st-marien-zschopau
- from: www.st-marien.hl-mutter-teresa-chemnitz.de
to: hl-mutter-teresa-chemnitz.de
to_path: /gemeinde/st-marien-zschopau
# App environments # App environments
app_environments: app_environments:

View file

@ -3,6 +3,7 @@ import { Section } from '@/components/Section/Section'
import { Container } from '@/components/Container/Container' import { Container } from '@/components/Container/Container'
import { Title } from '@/components/Title/Title' import { Title } from '@/components/Title/Title'
import { P } from '@/components/Text/Paragraph' import { P } from '@/components/Text/Paragraph'
import { DonationForm } from '@/components/DonationForm/DonationForm'
import { ClassifiedsFromApi } from '@/components/Classifieds/ClassifiedsFromApi' import { ClassifiedsFromApi } from '@/components/Classifieds/ClassifiedsFromApi'
export const dynamic = 'force-dynamic' export const dynamic = 'force-dynamic'
@ -43,7 +44,7 @@ export default function Page() {
</Container> </Container>
</Section> </Section>
{/* DonationForm used to be here */} <DonationForm />
<Section padding={"small"} paddingBottom={"large"}> <Section padding={"small"} paddingBottom={"large"}>
<Container> <Container>

View file

@ -2,8 +2,12 @@ import { PageHeader } from '@/compositions/PageHeader/PageHeader'
import { fetchDonationForm } from '@/fetch/donationform' import { fetchDonationForm } from '@/fetch/donationform'
import { notFound } from 'next/navigation' import { notFound } from 'next/navigation'
import { RichText } from '@/components/Text/RichText' import { RichText } from '@/components/Text/RichText'
import { Container } from '@/components/Container/Container'
import { Section } from '@/components/Section/Section' import { Section } from '@/components/Section/Section'
import { DonationForm } from '@/components/DonationForm/DonationForm' import styles from '@/components/DonationForm/styles.module.scss'
import { Row } from '@/components/Flex/Row'
import { Col } from '@/components/Flex/Col'
import Image from 'next/image'
export default async function DonationPage({ params }: { params: Promise<{id: string}>}) { export default async function DonationPage({ params }: { params: Promise<{id: string}>}) {
const id = (await params).id; const id = (await params).id;
@ -22,14 +26,29 @@ export default async function DonationPage({ params }: { params: Promise<{id: st
description={'Wir freuen uns über jede Spende und wissen: „Wer gibt, empfängt!“ (Lk 6,38)'} description={'Wir freuen uns über jede Spende und wissen: „Wer gibt, empfängt!“ (Lk 6,38)'}
/> />
<Section padding={"small"} paddingBottom={"large"}> <Container>
<DonationForm <Section padding={"small"} paddingBottom={"medium"}>
url={data.url} <Row alignItems={"center"}>
photoUrl={typeof image == "object" && image?.url ? image.url : undefined} <Col>
> { typeof image == "object" && image.url &&
<RichText data={data.text} /> <Image src={image.url} width={300} height={300} alt="" unoptimized={false}/>
</DonationForm> }
</Section> </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

@ -1,6 +1,5 @@
import { CollectionConfig } from 'payload' import { CollectionConfig } from 'payload'
import { hide, isAdminOrEmployee } from '@/collections/access/admin' import { hide, isAdminOrEmployee } from '@/collections/access/admin'
import { revalidateTagHook } from '@/utils/revalidate'
export const ContactPerson: CollectionConfig = { export const ContactPerson: CollectionConfig = {
slug: 'contactPerson', slug: 'contactPerson',
@ -55,10 +54,4 @@ export const ContactPerson: CollectionConfig = {
update: isAdminOrEmployee(), update: isAdminOrEmployee(),
delete: isAdminOrEmployee(), delete: isAdminOrEmployee(),
}, },
hooks: {
// Pages and events embed contacts via relationships, so their caches
// hold a copy of the contact and must be invalidated on change.
afterChange: [revalidateTagHook('pages'), revalidateTagHook('events')],
afterDelete: [revalidateTagHook('pages'), revalidateTagHook('events')],
},
} }

View file

@ -12,14 +12,6 @@ export const DonationForms: CollectionConfig = {
} }
}, },
fields: [ fields: [
{
name: 'title',
type: 'text',
label: {
de: 'Titel'
},
required: true
},
{ {
name: 'photo', name: 'photo',
type: 'upload', type: 'upload',
@ -27,6 +19,7 @@ export const DonationForms: CollectionConfig = {
label: { label: {
de: 'Bild' de: 'Bild'
}, },
required: true
}, },
{ {
name: 'text', name: 'text',
@ -43,7 +36,6 @@ export const DonationForms: CollectionConfig = {
} }
], ],
admin: { admin: {
useAsTitle: 'title',
hidden: hide hidden: hide
}, },
access: { access: {

View file

@ -10,15 +10,5 @@ export const DonationBlock: Block = {
de: 'Spendeformular' de: 'Spendeformular'
} }
}, },
fields: [ fields: []
{
name: 'form',
type: 'relationship',
relationTo: 'donation-form',
label: {
de: 'Spendenformular'
},
required: true,
}
]
} }

View file

@ -8,29 +8,4 @@ const meta: Meta<typeof DonationForm> = {
type Story = StoryObj<typeof DonationForm> type Story = StoryObj<typeof DonationForm>
export default meta export default meta
export const Default: Story = { export const Default: Story = {}
args: {
title: 'Ihre Hilfe kommt an',
url: 'https://spenden.tools/37111/Formular/SpendenFormularId/318?KostenstelleId=0',
children: (
<>
<p>
Mit Ihrer Spende leisten Sie einen wertvollen Beitrag für unsere Arbeit. Ihr Engagement ermöglicht es uns,
Menschen in Not zu helfen und ihnen eine bessere Zukunft zu ermöglichen.
</p>
<p>
<strong>Konto:</strong> Pfarrei Heilige Drei Könige<br/>
<strong>IBAN:</strong> DE1237 0601 9360 0044 9006
</p>
</>
),
},
}
export const WithPhoto: Story = {
args: {
...Default.args,
title: undefined,
photoUrl: 'https://picsum.photos/600/400',
},
}

View file

@ -1,43 +1,43 @@
import { ReactNode } from 'react'
import Image from 'next/image'
import { Container } from '@/components/Container/Container' import { Container } from '@/components/Container/Container'
import { Title } from '@/components/Title/Title' import { Title } from '@/components/Title/Title'
import { RichText } from '@/components/Text/RichText' import { Row } from '@/components/Flex/Row'
import { DonationForm as DonationFormDoc } from '@/payload-types'
import styles from "./styles.module.scss" import styles from "./styles.module.scss"
type DonationFormProps = { export const DonationForm = () => {
title?: string
photoUrl?: string
url: string
children: ReactNode
}
export const DonationForm = ({ title, photoUrl, url, children }: DonationFormProps) => {
return ( return (
<> <>
{title && <Container>
<Container> <Title
<Title title={'Ihre Hilfe kommt an'}
title={title} fontStyle={"sans-serif"}
fontStyle={"sans-serif"} size={'md'}
size={'md'} />
/> </Container>
</Container>
}
<div className={styles.container}> <div className={styles.container}>
<div className={styles.col1}> <div className={styles.col1}>
{photoUrl && <p>
<Image className={styles.photo} src={photoUrl} width={300} height={300} alt="" /> Mit Ihrer Spende leisten Sie einen wertvollen Beitrag für unsere Arbeit. Ihr Engagement ermöglicht es uns,
} Menschen in Not zu helfen und ihnen eine bessere Zukunft zu ermöglichen.
{children} </p>
<p>
Spenden Sie jetzt und unterstützen Sie unsere Mission! Nutzen Sie dazu einfach das Spendenformular nebenan oder überweisen Sie direkt auf unser Konto:<br/>
</p>
<p>
<strong>Konto:</strong> Pfarrei Heilige Drei Könige<br/>
<strong>IBAN:</strong> DE1237 0601 9360 0044 9006
</p>
<p>
Jede Spende, egal ob groß oder klein, macht einen Unterschied. Von Herzen danken wir Ihnen für Ihre Unterstützung!
</p>
</div> </div>
<div className={styles.col2}> <div className={styles.col2}>
<iframe <iframe
className={styles.iframe} className={styles.iframe}
scrolling="no" scrolling="no"
src={url} src="https://spenden.tools/37111/Formular/SpendenFormularId/318?KostenstelleId=0"
width="100%" width="100%"
height="800px"> height="800px">
</iframe> </iframe>
@ -46,20 +46,3 @@ export const DonationForm = ({ title, photoUrl, url, children }: DonationFormPro
</> </>
) )
} }
// Renders a DonationForms document linked from a "donation" block.
export const DonationBlockForm = ({ form }: { form: string | DonationFormDoc }) => {
if (typeof form !== 'object') {
return null
}
return (
<DonationForm
title={form.title}
url={form.url}
photoUrl={typeof form.photo === 'object' && form.photo?.url ? form.photo.url : undefined}
>
<RichText data={form.text} />
</DonationForm>
)
}

View file

@ -19,14 +19,6 @@
margin-block-start: 0; margin-block-start: 0;
} }
.photo {
display: block;
width: 100%;
height: auto;
margin-bottom: 20px;
border-radius: 4px;
}
.col2 { .col2 {
width: 600px; width: 600px;
} }

View file

@ -6,7 +6,7 @@ import { Button } from '@/components/Button/Button'
import { ContactSection } from '@/compositions/ContactSection/ContactSection' import { ContactSection } from '@/compositions/ContactSection/ContactSection'
import { Gallery } from '@/components/Gallery/Gallery' import { Gallery } from '@/components/Gallery/Gallery'
import { transformGallery } from '@/utils/dto/gallery' import { transformGallery } from '@/utils/dto/gallery'
import { DonationBlockForm } from '@/components/DonationForm/DonationForm' import { DonationForm } from '@/components/DonationForm/DonationForm'
import { YoutubePlayer } from '@/components/YoutubePlayer/YoutubePlayer' import { YoutubePlayer } from '@/components/YoutubePlayer/YoutubePlayer'
import { PageHeader } from '@/compositions/PageHeader/PageHeader' import { PageHeader } from '@/compositions/PageHeader/PageHeader'
import { Title } from '@/components/Title/Title' import { Title } from '@/components/Title/Title'
@ -87,7 +87,7 @@ export function Blocks({ content }: BlocksProps) {
if (item.blockType === 'donation') { if (item.blockType === 'donation') {
return <Section key={item.id} padding={'small'} paddingBottom={'large'}> return <Section key={item.id} padding={'small'} paddingBottom={'large'}>
<DonationBlockForm form={item.form} /> <DonationForm />
</Section> </Section>
} }

View file

@ -3,7 +3,7 @@ import { Container } from '@/components/Container/Container'
import { HTMLText } from '@/components/Text/HTMLText' import { HTMLText } from '@/components/Text/HTMLText'
import { Section } from '@/components/Section/Section' import { Section } from '@/components/Section/Section'
import { Button } from '@/components/Button/Button' import { Button } from '@/components/Button/Button'
import { DonationBlockForm } 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 { ImageCardsBlock } from '@/compositions/Blocks/ImageCardsBlock'
@ -56,7 +56,7 @@ export function ParishBlocks({ content }: BlocksProps) {
if (item.blockType === "donation") { if (item.blockType === "donation") {
return <Section key={item.id} padding={"small"} paddingBottom={"large"}> return <Section key={item.id} padding={"small"} paddingBottom={"large"}>
<DonationBlockForm form={item.form} /> <DonationForm />
</Section> </Section>
} }

View file

@ -28,6 +28,5 @@ export async function fetchPageBySlug(
return unstable_cache(fetchPage, ['pages', slug], { return unstable_cache(fetchPage, ['pages', slug], {
tags: ['pages', `pages-${slug}`], tags: ['pages', `pages-${slug}`],
revalidate: 3600,
})() })()
} }

View file

@ -1,117 +0,0 @@
import { MigrateUpArgs, MigrateDownArgs, sql } from '@payloadcms/db-postgres'
// The "donation" block used to render a hardcoded form in DonationForm.tsx. Existing
// blocks now link to this standard donation-form document instead.
const STANDARD_TITLE = 'Ihre Hilfe kommt an'
const STANDARD_URL = 'https://spenden.tools/37111/Formular/SpendenFormularId/318?KostenstelleId=0'
// "text" is required, so the standard form starts with an empty rich text document.
const EMPTY_TEXT = {
root: { type: 'root', children: [], direction: null, format: '', indent: 0, version: 1 },
}
const DONATION_BLOCK_TABLES = [
'pages_blocks_donation',
'_pages_v_blocks_donation',
'blog_blocks_donation',
'_blog_v_blocks_donation',
'parish_blocks_donation',
'_parish_v_blocks_donation',
'group_blocks_donation',
'_group_v_blocks_donation',
]
export async function up({ db, payload, req }: MigrateUpArgs): Promise<void> {
await db.execute(sql`
ALTER TABLE "announcement" ALTER COLUMN "date" SET DEFAULT '2026-10-11T07:54:03.780Z';
ALTER TABLE "calendar" ALTER COLUMN "date" SET DEFAULT '2026-10-11T07:54:04.080Z';
ALTER TABLE "classifieds" ALTER COLUMN "until" SET DEFAULT '2026-11-07T08:54:04.107Z';
ALTER TABLE "donation_form" ALTER COLUMN "photo_id" DROP NOT NULL;
ALTER TABLE "parish_blocks_donation" ADD COLUMN "form_id" uuid;
ALTER TABLE "_parish_v_blocks_donation" ADD COLUMN "form_id" uuid;
ALTER TABLE "blog_blocks_donation" ADD COLUMN "form_id" uuid;
ALTER TABLE "_blog_v_blocks_donation" ADD COLUMN "form_id" uuid;
ALTER TABLE "group_blocks_donation" ADD COLUMN "form_id" uuid;
ALTER TABLE "_group_v_blocks_donation" ADD COLUMN "form_id" uuid;
ALTER TABLE "donation_form" ADD COLUMN "title" varchar;
ALTER TABLE "pages_blocks_donation" ADD COLUMN "form_id" uuid;
ALTER TABLE "_pages_v_blocks_donation" ADD COLUMN "form_id" uuid;
ALTER TABLE "parish_blocks_donation" ADD CONSTRAINT "parish_blocks_donation_form_id_donation_form_id_fk" FOREIGN KEY ("form_id") REFERENCES "public"."donation_form"("id") ON DELETE set null ON UPDATE no action;
ALTER TABLE "_parish_v_blocks_donation" ADD CONSTRAINT "_parish_v_blocks_donation_form_id_donation_form_id_fk" FOREIGN KEY ("form_id") REFERENCES "public"."donation_form"("id") ON DELETE set null ON UPDATE no action;
ALTER TABLE "blog_blocks_donation" ADD CONSTRAINT "blog_blocks_donation_form_id_donation_form_id_fk" FOREIGN KEY ("form_id") REFERENCES "public"."donation_form"("id") ON DELETE set null ON UPDATE no action;
ALTER TABLE "_blog_v_blocks_donation" ADD CONSTRAINT "_blog_v_blocks_donation_form_id_donation_form_id_fk" FOREIGN KEY ("form_id") REFERENCES "public"."donation_form"("id") ON DELETE set null ON UPDATE no action;
ALTER TABLE "group_blocks_donation" ADD CONSTRAINT "group_blocks_donation_form_id_donation_form_id_fk" FOREIGN KEY ("form_id") REFERENCES "public"."donation_form"("id") ON DELETE set null ON UPDATE no action;
ALTER TABLE "_group_v_blocks_donation" ADD CONSTRAINT "_group_v_blocks_donation_form_id_donation_form_id_fk" FOREIGN KEY ("form_id") REFERENCES "public"."donation_form"("id") ON DELETE set null ON UPDATE no action;
ALTER TABLE "pages_blocks_donation" ADD CONSTRAINT "pages_blocks_donation_form_id_donation_form_id_fk" FOREIGN KEY ("form_id") REFERENCES "public"."donation_form"("id") ON DELETE set null ON UPDATE no action;
ALTER TABLE "_pages_v_blocks_donation" ADD CONSTRAINT "_pages_v_blocks_donation_form_id_donation_form_id_fk" FOREIGN KEY ("form_id") REFERENCES "public"."donation_form"("id") ON DELETE set null ON UPDATE no action;
CREATE INDEX "parish_blocks_donation_form_idx" ON "parish_blocks_donation" USING btree ("form_id");
CREATE INDEX "_parish_v_blocks_donation_form_idx" ON "_parish_v_blocks_donation" USING btree ("form_id");
CREATE INDEX "blog_blocks_donation_form_idx" ON "blog_blocks_donation" USING btree ("form_id");
CREATE INDEX "_blog_v_blocks_donation_form_idx" ON "_blog_v_blocks_donation" USING btree ("form_id");
CREATE INDEX "group_blocks_donation_form_idx" ON "group_blocks_donation" USING btree ("form_id");
CREATE INDEX "_group_v_blocks_donation_form_idx" ON "_group_v_blocks_donation" USING btree ("form_id");
CREATE INDEX "pages_blocks_donation_form_idx" ON "pages_blocks_donation" USING btree ("form_id");
CREATE INDEX "_pages_v_blocks_donation_form_idx" ON "_pages_v_blocks_donation" USING btree ("form_id");`)
// Existing forms predate the title field.
await db.execute(sql`UPDATE "donation_form" SET "title" = 'Spendenformular' WHERE "title" IS NULL;`)
await db.execute(sql`ALTER TABLE "donation_form" ALTER COLUMN "title" SET NOT NULL;`)
// Reuse the standard form if it already exists, otherwise create it.
const existing = await db.execute(sql`SELECT "id" FROM "donation_form" WHERE "url" = ${STANDARD_URL} LIMIT 1;`)
const standardId = (existing.rows[0]?.id ??
(
await db.execute(sql`
INSERT INTO "donation_form" ("title", "text", "url")
VALUES (${STANDARD_TITLE}, ${JSON.stringify(EMPTY_TEXT)}::jsonb, ${STANDARD_URL})
RETURNING "id";`)
).rows[0].id) as string
// Link every existing donation block (including saved versions) to it, since "form" is required.
for (const table of DONATION_BLOCK_TABLES) {
await db.execute(sql`UPDATE ${sql.identifier(table)} SET "form_id" = ${standardId} WHERE "form_id" IS NULL;`)
}
}
export async function down({ db, payload, req }: MigrateDownArgs): Promise<void> {
// Forms without a photo (such as the standard form created above) can't exist in the old schema.
await db.execute(sql`DELETE FROM "donation_form" WHERE "photo_id" IS NULL;`)
await db.execute(sql`
ALTER TABLE "parish_blocks_donation" DROP CONSTRAINT "parish_blocks_donation_form_id_donation_form_id_fk";
ALTER TABLE "_parish_v_blocks_donation" DROP CONSTRAINT "_parish_v_blocks_donation_form_id_donation_form_id_fk";
ALTER TABLE "blog_blocks_donation" DROP CONSTRAINT "blog_blocks_donation_form_id_donation_form_id_fk";
ALTER TABLE "_blog_v_blocks_donation" DROP CONSTRAINT "_blog_v_blocks_donation_form_id_donation_form_id_fk";
ALTER TABLE "group_blocks_donation" DROP CONSTRAINT "group_blocks_donation_form_id_donation_form_id_fk";
ALTER TABLE "_group_v_blocks_donation" DROP CONSTRAINT "_group_v_blocks_donation_form_id_donation_form_id_fk";
ALTER TABLE "pages_blocks_donation" DROP CONSTRAINT "pages_blocks_donation_form_id_donation_form_id_fk";
ALTER TABLE "_pages_v_blocks_donation" DROP CONSTRAINT "_pages_v_blocks_donation_form_id_donation_form_id_fk";
DROP INDEX "parish_blocks_donation_form_idx";
DROP INDEX "_parish_v_blocks_donation_form_idx";
DROP INDEX "blog_blocks_donation_form_idx";
DROP INDEX "_blog_v_blocks_donation_form_idx";
DROP INDEX "group_blocks_donation_form_idx";
DROP INDEX "_group_v_blocks_donation_form_idx";
DROP INDEX "pages_blocks_donation_form_idx";
DROP INDEX "_pages_v_blocks_donation_form_idx";
ALTER TABLE "announcement" ALTER COLUMN "date" SET DEFAULT '2026-07-26T09:04:34.613Z';
ALTER TABLE "calendar" ALTER COLUMN "date" SET DEFAULT '2026-07-26T09:04:34.950Z';
ALTER TABLE "classifieds" ALTER COLUMN "until" SET DEFAULT '2026-08-20T09:04:35.030Z';
ALTER TABLE "donation_form" ALTER COLUMN "photo_id" SET NOT NULL;
ALTER TABLE "parish_blocks_donation" DROP COLUMN "form_id";
ALTER TABLE "_parish_v_blocks_donation" DROP COLUMN "form_id";
ALTER TABLE "blog_blocks_donation" DROP COLUMN "form_id";
ALTER TABLE "_blog_v_blocks_donation" DROP COLUMN "form_id";
ALTER TABLE "group_blocks_donation" DROP COLUMN "form_id";
ALTER TABLE "_group_v_blocks_donation" DROP COLUMN "form_id";
ALTER TABLE "donation_form" DROP COLUMN "title";
ALTER TABLE "pages_blocks_donation" DROP COLUMN "form_id";
ALTER TABLE "_pages_v_blocks_donation" DROP COLUMN "form_id";`)
}

View file

@ -55,7 +55,6 @@ import * as migration_20260716_090032_add_user_parish_page_assignments from './2
import * as migration_20260716_113205_add_blog_pinned from './20260716_113205_add_blog_pinned'; import * as migration_20260716_113205_add_blog_pinned from './20260716_113205_add_blog_pinned';
import * as migration_20260721_090435_add_mass_times_range from './20260721_090435_add_mass_times_range'; import * as migration_20260721_090435_add_mass_times_range from './20260721_090435_add_mass_times_range';
import * as migration_20260828_100000_add_fifth_week_of_month from './20260828_100000_add_fifth_week_of_month'; import * as migration_20260828_100000_add_fifth_week_of_month from './20260828_100000_add_fifth_week_of_month';
import * as migration_20261008_075404_donation_form_title_and_block_link from './20261008_075404_donation_form_title_and_block_link';
export const migrations = [ export const migrations = [
{ {
@ -336,16 +335,11 @@ export const migrations = [
{ {
up: migration_20260721_090435_add_mass_times_range.up, up: migration_20260721_090435_add_mass_times_range.up,
down: migration_20260721_090435_add_mass_times_range.down, down: migration_20260721_090435_add_mass_times_range.down,
name: '20260721_090435_add_mass_times_range', name: '20260721_090435_add_mass_times_range'
}, },
{ {
up: migration_20260828_100000_add_fifth_week_of_month.up, up: migration_20260828_100000_add_fifth_week_of_month.up,
down: migration_20260828_100000_add_fifth_week_of_month.down, down: migration_20260828_100000_add_fifth_week_of_month.down,
name: '20260828_100000_add_fifth_week_of_month', name: '20260828_100000_add_fifth_week_of_month',
}, },
{
up: migration_20261008_075404_donation_form_title_and_block_link.up,
down: migration_20261008_075404_donation_form_title_and_block_link.down,
name: '20261008_075404_donation_form_title_and_block_link'
},
]; ];

View file

@ -225,7 +225,6 @@ export interface Parish {
blockType: 'document'; blockType: 'document';
} }
| { | {
form: string | DonationForm;
id?: string | null; id?: string | null;
blockName?: string | null; blockName?: string | null;
blockType: 'donation'; blockType: 'donation';
@ -255,7 +254,7 @@ export interface Parish {
value: string | Group; value: string | Group;
} | null); } | null);
/** /**
* Alternative zu "Verknüpfung", z.B. für externe Seiten oder PDF-Dokumente. * Alternative zu "Verknüpfung". Nur eins von beiden kann gesetzt werden.
*/ */
customLink?: string | null; customLink?: string | null;
id?: string | null; id?: string | null;
@ -410,33 +409,6 @@ export interface Document {
focalX?: number | null; focalX?: number | null;
focalY?: number | null; focalY?: number | null;
} }
/**
* This interface was referenced by `Config`'s JSON-Schema
* via the `definition` "donation-form".
*/
export interface DonationForm {
id: string;
title: string;
photo?: (string | null) | 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` "media". * via the `definition` "media".
@ -595,7 +567,6 @@ export interface Page {
blockType: 'contactform'; blockType: 'contactform';
} }
| { | {
form: string | DonationForm;
id?: string | null; id?: string | null;
blockName?: string | null; blockName?: string | null;
blockType: 'donation'; blockType: 'donation';
@ -783,7 +754,7 @@ export interface Page {
value: string | Group; value: string | Group;
} | null); } | null);
/** /**
* Alternative zu "Verknüpfung", z.B. für externe Seiten oder PDF-Dokumente. * Alternative zu "Verknüpfung". Nur eins von beiden kann gesetzt werden.
*/ */
customLink?: string | null; customLink?: string | null;
id?: string | null; id?: string | null;
@ -895,7 +866,6 @@ export interface Group {
blockType: 'document'; blockType: 'document';
} }
| { | {
form: string | DonationForm;
id?: string | null; id?: string | null;
blockName?: string | null; blockName?: string | null;
blockType: 'donation'; blockType: 'donation';
@ -941,7 +911,7 @@ export interface Group {
value: string | Group; value: string | Group;
} | null); } | null);
/** /**
* Alternative zu "Verknüpfung", z.B. für externe Seiten oder PDF-Dokumente. * Alternative zu "Verknüpfung". Nur eins von beiden kann gesetzt werden.
*/ */
customLink?: string | null; customLink?: string | null;
id?: string | null; id?: string | null;
@ -1135,7 +1105,6 @@ export interface Blog {
blockType: 'document'; blockType: 'document';
} }
| { | {
form: string | DonationForm;
id?: string | null; id?: string | null;
blockName?: string | null; blockName?: string | null;
blockType: 'donation'; blockType: 'donation';
@ -1185,7 +1154,7 @@ export interface Blog {
value: string | Group; value: string | Group;
} | null); } | null);
/** /**
* Alternative zu "Verknüpfung", z.B. für externe Seiten oder PDF-Dokumente. * Alternative zu "Verknüpfung". Nur eins von beiden kann gesetzt werden.
*/ */
customLink?: string | null; customLink?: string | null;
id?: string | null; id?: string | null;
@ -1335,6 +1304,32 @@ export interface Classified {
updatedAt: string; updatedAt: string;
createdAt: 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".
@ -1714,7 +1709,6 @@ export interface ParishSelect<T extends boolean = true> {
donation?: donation?:
| T | T
| { | {
form?: T;
id?: T; id?: T;
blockName?: T; blockName?: T;
}; };
@ -1924,7 +1918,6 @@ export interface BlogSelect<T extends boolean = true> {
donation?: donation?:
| T | T
| { | {
form?: T;
id?: T; id?: T;
blockName?: T; blockName?: T;
}; };
@ -2146,7 +2139,6 @@ export interface GroupSelect<T extends boolean = true> {
donation?: donation?:
| T | T
| { | {
form?: T;
id?: T; id?: T;
blockName?: T; blockName?: T;
}; };
@ -2249,7 +2241,6 @@ export interface GroupSelect<T extends boolean = true> {
* via the `definition` "donation-form_select". * via the `definition` "donation-form_select".
*/ */
export interface DonationFormSelect<T extends boolean = true> { export interface DonationFormSelect<T extends boolean = true> {
title?: T;
photo?: T; photo?: T;
text?: T; text?: T;
url?: T; url?: T;
@ -2351,7 +2342,6 @@ export interface PagesSelect<T extends boolean = true> {
donation?: donation?:
| T | T
| { | {
form?: T;
id?: T; id?: T;
blockName?: T; blockName?: T;
}; };