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:
@@ -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.')
|
||||
|
||||
Reference in New Issue
Block a user