Compare commits
No commits in common. "dabdfbd2db1169c3413d177cf7ab757c654eef5c" and "efdd00d2f0709e23e3f194173474b10dc93ffccd" have entirely different histories.
dabdfbd2db
...
efdd00d2f0
16 changed files with 97 additions and 28239 deletions
|
|
@ -49,33 +49,18 @@ all:
|
|||
- from: st-antonius.hl-mutter-teresa-chemnitz.de
|
||||
to: hl-mutter-teresa-chemnitz.de
|
||||
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
|
||||
to: hl-mutter-teresa-chemnitz.de
|
||||
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
|
||||
to: hl-mutter-teresa-chemnitz.de
|
||||
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
|
||||
to: hl-mutter-teresa-chemnitz.de
|
||||
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
|
||||
to: hl-mutter-teresa-chemnitz.de
|
||||
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:
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@ import { Section } from '@/components/Section/Section'
|
|||
import { Container } from '@/components/Container/Container'
|
||||
import { Title } from '@/components/Title/Title'
|
||||
import { P } from '@/components/Text/Paragraph'
|
||||
import { DonationForm } from '@/components/DonationForm/DonationForm'
|
||||
import { ClassifiedsFromApi } from '@/components/Classifieds/ClassifiedsFromApi'
|
||||
|
||||
export const dynamic = 'force-dynamic'
|
||||
|
|
@ -43,7 +44,7 @@ export default function Page() {
|
|||
</Container>
|
||||
</Section>
|
||||
|
||||
{/* DonationForm used to be here */}
|
||||
<DonationForm />
|
||||
|
||||
<Section padding={"small"} paddingBottom={"large"}>
|
||||
<Container>
|
||||
|
|
|
|||
|
|
@ -2,8 +2,12 @@ import { PageHeader } from '@/compositions/PageHeader/PageHeader'
|
|||
import { fetchDonationForm } from '@/fetch/donationform'
|
||||
import { notFound } from 'next/navigation'
|
||||
import { RichText } from '@/components/Text/RichText'
|
||||
import { Container } from '@/components/Container/Container'
|
||||
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}>}) {
|
||||
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)'}
|
||||
/>
|
||||
|
||||
<Section padding={"small"} paddingBottom={"large"}>
|
||||
<DonationForm
|
||||
url={data.url}
|
||||
photoUrl={typeof image == "object" && image?.url ? image.url : undefined}
|
||||
>
|
||||
<RichText data={data.text} />
|
||||
</DonationForm>
|
||||
</Section>
|
||||
<Container>
|
||||
<Section padding={"small"} paddingBottom={"medium"}>
|
||||
<Row alignItems={"center"}>
|
||||
<Col>
|
||||
{ typeof image == "object" && image.url &&
|
||||
<Image src={image.url} width={300} height={300} alt="" unoptimized={false}/>
|
||||
}
|
||||
</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>
|
||||
</>
|
||||
)
|
||||
}
|
||||
|
|
@ -1,6 +1,5 @@
|
|||
import { CollectionConfig } from 'payload'
|
||||
import { CollectionConfig } from 'payload'
|
||||
import { hide, isAdminOrEmployee } from '@/collections/access/admin'
|
||||
import { revalidateTagHook } from '@/utils/revalidate'
|
||||
|
||||
export const ContactPerson: CollectionConfig = {
|
||||
slug: 'contactPerson',
|
||||
|
|
@ -55,10 +54,4 @@ export const ContactPerson: CollectionConfig = {
|
|||
update: 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')],
|
||||
},
|
||||
}
|
||||
|
|
@ -12,14 +12,6 @@ export const DonationForms: CollectionConfig = {
|
|||
}
|
||||
},
|
||||
fields: [
|
||||
{
|
||||
name: 'title',
|
||||
type: 'text',
|
||||
label: {
|
||||
de: 'Titel'
|
||||
},
|
||||
required: true
|
||||
},
|
||||
{
|
||||
name: 'photo',
|
||||
type: 'upload',
|
||||
|
|
@ -27,6 +19,7 @@ export const DonationForms: CollectionConfig = {
|
|||
label: {
|
||||
de: 'Bild'
|
||||
},
|
||||
required: true
|
||||
},
|
||||
{
|
||||
name: 'text',
|
||||
|
|
@ -43,7 +36,6 @@ export const DonationForms: CollectionConfig = {
|
|||
}
|
||||
],
|
||||
admin: {
|
||||
useAsTitle: 'title',
|
||||
hidden: hide
|
||||
},
|
||||
access: {
|
||||
|
|
|
|||
|
|
@ -10,15 +10,5 @@ export const DonationBlock: Block = {
|
|||
de: 'Spendeformular'
|
||||
}
|
||||
},
|
||||
fields: [
|
||||
{
|
||||
name: 'form',
|
||||
type: 'relationship',
|
||||
relationTo: 'donation-form',
|
||||
label: {
|
||||
de: 'Spendenformular'
|
||||
},
|
||||
required: true,
|
||||
}
|
||||
]
|
||||
fields: []
|
||||
}
|
||||
|
|
@ -8,29 +8,4 @@ const meta: Meta<typeof DonationForm> = {
|
|||
type Story = StoryObj<typeof DonationForm>
|
||||
export default meta
|
||||
|
||||
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',
|
||||
},
|
||||
}
|
||||
export const Default: Story = {}
|
||||
|
|
|
|||
|
|
@ -1,43 +1,43 @@
|
|||
import { ReactNode } from 'react'
|
||||
import Image from 'next/image'
|
||||
import { Container } from '@/components/Container/Container'
|
||||
import { Title } from '@/components/Title/Title'
|
||||
import { RichText } from '@/components/Text/RichText'
|
||||
import { DonationForm as DonationFormDoc } from '@/payload-types'
|
||||
import { Row } from '@/components/Flex/Row'
|
||||
import styles from "./styles.module.scss"
|
||||
|
||||
type DonationFormProps = {
|
||||
title?: string
|
||||
photoUrl?: string
|
||||
url: string
|
||||
children: ReactNode
|
||||
}
|
||||
|
||||
export const DonationForm = ({ title, photoUrl, url, children }: DonationFormProps) => {
|
||||
export const DonationForm = () => {
|
||||
return (
|
||||
<>
|
||||
{title &&
|
||||
<Container>
|
||||
<Title
|
||||
title={title}
|
||||
fontStyle={"sans-serif"}
|
||||
size={'md'}
|
||||
/>
|
||||
</Container>
|
||||
}
|
||||
<Container>
|
||||
<Title
|
||||
title={'Ihre Hilfe kommt an'}
|
||||
fontStyle={"sans-serif"}
|
||||
size={'md'}
|
||||
/>
|
||||
</Container>
|
||||
|
||||
<div className={styles.container}>
|
||||
<div className={styles.col1}>
|
||||
{photoUrl &&
|
||||
<Image className={styles.photo} src={photoUrl} width={300} height={300} alt="" />
|
||||
}
|
||||
{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>
|
||||
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 className={styles.col2}>
|
||||
<iframe
|
||||
className={styles.iframe}
|
||||
scrolling="no"
|
||||
src={url}
|
||||
src="https://spenden.tools/37111/Formular/SpendenFormularId/318?KostenstelleId=0"
|
||||
width="100%"
|
||||
height="800px">
|
||||
</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>
|
||||
)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -19,14 +19,6 @@
|
|||
margin-block-start: 0;
|
||||
}
|
||||
|
||||
.photo {
|
||||
display: block;
|
||||
width: 100%;
|
||||
height: auto;
|
||||
margin-bottom: 20px;
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
.col2 {
|
||||
width: 600px;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ import { Button } from '@/components/Button/Button'
|
|||
import { ContactSection } from '@/compositions/ContactSection/ContactSection'
|
||||
import { Gallery } from '@/components/Gallery/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 { PageHeader } from '@/compositions/PageHeader/PageHeader'
|
||||
import { Title } from '@/components/Title/Title'
|
||||
|
|
@ -87,7 +87,7 @@ export function Blocks({ content }: BlocksProps) {
|
|||
|
||||
if (item.blockType === 'donation') {
|
||||
return <Section key={item.id} padding={'small'} paddingBottom={'large'}>
|
||||
<DonationBlockForm form={item.form} />
|
||||
<DonationForm />
|
||||
</Section>
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ 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 { DonationBlockForm } from '@/components/DonationForm/DonationForm'
|
||||
import { DonationForm } from '@/components/DonationForm/DonationForm'
|
||||
import { YoutubePlayer } from '@/components/YoutubePlayer/YoutubePlayer'
|
||||
import { DonationAppeal } from '@/components/DonationAppeal/DonationAppeal'
|
||||
import { ImageCardsBlock } from '@/compositions/Blocks/ImageCardsBlock'
|
||||
|
|
@ -56,7 +56,7 @@ export function ParishBlocks({ content }: BlocksProps) {
|
|||
|
||||
if (item.blockType === "donation") {
|
||||
return <Section key={item.id} padding={"small"} paddingBottom={"large"}>
|
||||
<DonationBlockForm form={item.form} />
|
||||
<DonationForm />
|
||||
</Section>
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -28,6 +28,5 @@ export async function fetchPageBySlug(
|
|||
|
||||
return unstable_cache(fetchPage, ['pages', slug], {
|
||||
tags: ['pages', `pages-${slug}`],
|
||||
revalidate: 3600,
|
||||
})()
|
||||
}
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
|
|
@ -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";`)
|
||||
}
|
||||
|
|
@ -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_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_20261008_075404_donation_form_title_and_block_link from './20261008_075404_donation_form_title_and_block_link';
|
||||
|
||||
export const migrations = [
|
||||
{
|
||||
|
|
@ -336,16 +335,11 @@ export const migrations = [
|
|||
{
|
||||
up: migration_20260721_090435_add_mass_times_range.up,
|
||||
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,
|
||||
down: migration_20260828_100000_add_fifth_week_of_month.down,
|
||||
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'
|
||||
},
|
||||
];
|
||||
|
|
|
|||
|
|
@ -225,7 +225,6 @@ export interface Parish {
|
|||
blockType: 'document';
|
||||
}
|
||||
| {
|
||||
form: string | DonationForm;
|
||||
id?: string | null;
|
||||
blockName?: string | null;
|
||||
blockType: 'donation';
|
||||
|
|
@ -255,7 +254,7 @@ export interface Parish {
|
|||
value: string | Group;
|
||||
} | 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;
|
||||
id?: string | null;
|
||||
|
|
@ -410,33 +409,6 @@ export interface Document {
|
|||
focalX?: 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
|
||||
* via the `definition` "media".
|
||||
|
|
@ -595,7 +567,6 @@ export interface Page {
|
|||
blockType: 'contactform';
|
||||
}
|
||||
| {
|
||||
form: string | DonationForm;
|
||||
id?: string | null;
|
||||
blockName?: string | null;
|
||||
blockType: 'donation';
|
||||
|
|
@ -783,7 +754,7 @@ export interface Page {
|
|||
value: string | Group;
|
||||
} | 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;
|
||||
id?: string | null;
|
||||
|
|
@ -895,7 +866,6 @@ export interface Group {
|
|||
blockType: 'document';
|
||||
}
|
||||
| {
|
||||
form: string | DonationForm;
|
||||
id?: string | null;
|
||||
blockName?: string | null;
|
||||
blockType: 'donation';
|
||||
|
|
@ -941,7 +911,7 @@ export interface Group {
|
|||
value: string | Group;
|
||||
} | 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;
|
||||
id?: string | null;
|
||||
|
|
@ -1135,7 +1105,6 @@ export interface Blog {
|
|||
blockType: 'document';
|
||||
}
|
||||
| {
|
||||
form: string | DonationForm;
|
||||
id?: string | null;
|
||||
blockName?: string | null;
|
||||
blockType: 'donation';
|
||||
|
|
@ -1185,7 +1154,7 @@ export interface Blog {
|
|||
value: string | Group;
|
||||
} | 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;
|
||||
id?: string | null;
|
||||
|
|
@ -1335,6 +1304,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: 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
|
||||
* via the `definition` "prayers".
|
||||
|
|
@ -1714,7 +1709,6 @@ export interface ParishSelect<T extends boolean = true> {
|
|||
donation?:
|
||||
| T
|
||||
| {
|
||||
form?: T;
|
||||
id?: T;
|
||||
blockName?: T;
|
||||
};
|
||||
|
|
@ -1924,7 +1918,6 @@ export interface BlogSelect<T extends boolean = true> {
|
|||
donation?:
|
||||
| T
|
||||
| {
|
||||
form?: T;
|
||||
id?: T;
|
||||
blockName?: T;
|
||||
};
|
||||
|
|
@ -2146,7 +2139,6 @@ export interface GroupSelect<T extends boolean = true> {
|
|||
donation?:
|
||||
| T
|
||||
| {
|
||||
form?: T;
|
||||
id?: T;
|
||||
blockName?: T;
|
||||
};
|
||||
|
|
@ -2249,7 +2241,6 @@ export interface GroupSelect<T extends boolean = true> {
|
|||
* via the `definition` "donation-form_select".
|
||||
*/
|
||||
export interface DonationFormSelect<T extends boolean = true> {
|
||||
title?: T;
|
||||
photo?: T;
|
||||
text?: T;
|
||||
url?: T;
|
||||
|
|
@ -2351,7 +2342,6 @@ export interface PagesSelect<T extends boolean = true> {
|
|||
donation?:
|
||||
| T
|
||||
| {
|
||||
form?: T;
|
||||
id?: T;
|
||||
blockName?: T;
|
||||
};
|
||||
|
|
|
|||
Loading…
Reference in a new issue