feat: Add fresh database setup script and media handling improvements
- Introduced a new script for setting up a fresh database with ordered migration tasks. - Added a utility function to find media by filename, improving media handling in various scripts. - Updated preload scripts to utilize the new media fetching utility. - Refactored datenschutz, impressum, and mitglied-werden fields to use stable IDs and anchor IDs. - Enhanced home and network pages to accommodate new field structures. - Added new preload script for global CMS settings. - Improved code readability and organization across multiple files.
This commit is contained in:
@@ -59,7 +59,7 @@ const juryMemberFields: Field[] = [
|
||||
const rowFields: Field[] = [text('num', 'Number'), text('label', 'Label'), textarea('body', 'Body')]
|
||||
|
||||
const partnerFields: Field[] = [
|
||||
text('id', 'Stable ID'),
|
||||
text('stableId', 'Stable ID'),
|
||||
text('name', 'Name'),
|
||||
text('role', 'Role'),
|
||||
numberField('tier', 'Tier'),
|
||||
@@ -94,6 +94,10 @@ const partnerFields: Field[] = [
|
||||
const benefitFields: Field[] = [text('num', 'Number'), text('label', 'Label'), text('sub', 'Subline')]
|
||||
const packageFields: Field[] = [text('value', 'Value'), text('title', 'Title'), textarea('desc', 'Description')]
|
||||
const formStepFields: Field[] = [text('label', 'Label')]
|
||||
const partnerDefaults = netzwerkContent.partners.items.map(({ id, ...partner }) => ({
|
||||
...partner,
|
||||
stableId: id,
|
||||
}))
|
||||
|
||||
export const netzwerkFields: Field[] = [
|
||||
{
|
||||
@@ -252,7 +256,7 @@ export const netzwerkFields: Field[] = [
|
||||
label: 'Partners',
|
||||
type: 'array',
|
||||
dbName: 'network_partners',
|
||||
defaultValue: netzwerkContent.partners.items,
|
||||
defaultValue: partnerDefaults,
|
||||
fields: partnerFields,
|
||||
},
|
||||
],
|
||||
|
||||
Reference in New Issue
Block a user