feat: implement newsletter subscription feature with new forms and database structure

- Added new newsletter subscription functionality to the participation page.
- Created a new `NewsletterForm` component to handle user subscriptions.
- Introduced `NewsletterSubscriptions` collection to manage subscriptions in the database.
- Developed migration script to set up necessary database tables and fields for the newsletter feature.
- Refactored participation content to remove deprecated newsletter phase data and integrate new structure.
- Updated the `Participation` page to utilize the new newsletter form and handle different application phases.
This commit is contained in:
syntaxbullet
2026-07-13 13:37:03 +02:00
parent 64049baef0
commit bd2e99ca91
20 changed files with 1033 additions and 566 deletions

View File

@@ -6,6 +6,7 @@ import { mediaByFilename } from './mediaByFilename'
import { defaultApplicationPhaseData } from '@/spa/applicationPhase'
import { defaultFooterData, defaultHeaderData } from '@/spa/cmsNavigation'
import { defaultNewsletterFormData } from '@/spa/newsletterForm'
import { defaultSiteSettings } from '@/spa/siteSettings'
async function main() {
@@ -59,6 +60,11 @@ async function main() {
context: { disableRevalidate: true },
data: defaultApplicationPhaseData as never,
}),
payload.updateGlobal({
slug: 'newsletter-form',
context: { disableRevalidate: true },
data: defaultNewsletterFormData as never,
}),
])
payload.logger.info('Preloaded global CMS settings.')