diff --git a/prisma/seed.ts b/prisma/seed.ts index fffd785..56f11e5 100644 --- a/prisma/seed.ts +++ b/prisma/seed.ts @@ -72,43 +72,26 @@ const colorPalettes: { solfeggioFrequencyId: number; colors: string[] }[] = [ } ]; -const subscriptionLevels = [ - { id: 1, name: 'Basic', description: 'General only' }, - { id: 2, name: 'Advanced', description: 'General + Specific' }, - { id: 3, name: 'Elite', description: 'General + Specific + Precise' } +const proclamationGroups = [ + { name: 'General', sortOrder: 0 }, + { name: 'Specific', sortOrder: 1 }, + { name: 'Precise', sortOrder: 2 }, + { name: 'Prayers', sortOrder: 3 }, + { name: 'Scripture', sortOrder: 4 } ]; +// Flat category list (formerly hierarchical parents). const proclamationCategories = [ - { id: 4, name: 'Spiritual', parentId: null }, - { id: 5, name: 'General', parentId: 4 }, - { id: 9, name: 'Specific', parentId: 4 }, - { id: 40, name: 'Precise', parentId: 4 }, - { id: 2, name: 'Physical', parentId: null }, - { id: 3, name: 'General', parentId: 2 }, - { id: 10, name: 'Specific', parentId: 2 }, - { id: 32, name: 'Precise', parentId: 2 }, - { id: 16, name: 'Mental', parentId: null }, - { id: 30, name: 'General', parentId: 16 }, - { id: 31, name: 'Specific', parentId: 16 }, - { id: 38, name: 'Precise', parentId: 16 }, - { id: 17, name: 'Custom (Client Specific)', parentId: null }, - { id: 19, name: 'Financial', parentId: null }, - { id: 28, name: 'General', parentId: 19 }, - { id: 29, name: 'Specific', parentId: 19 }, - { id: 37, name: 'Precise', parentId: 19 }, - { id: 20, name: 'Emotional', parentId: null }, - { id: 24, name: 'General', parentId: 20 }, - { id: 26, name: 'Specific', parentId: 20 }, - { id: 45, name: 'Precise', parentId: 20 }, - { id: 21, name: 'Social', parentId: null }, - { id: 22, name: 'General', parentId: 21 }, - { id: 23, name: 'Specific', parentId: 21 }, - { id: 39, name: 'Precise', parentId: 21 }, - { id: 41, name: 'Biblical', parentId: null }, - { id: 42, name: 'Personal Growth & Development', parentId: null }, - { id: 43, name: 'Prayers', parentId: 41 }, - { id: 44, name: 'Scripture', parentId: 41 }, - { id: 46, name: 'Sports', parentId: null } + { id: 4, name: 'Spiritual' }, + { id: 2, name: 'Physical' }, + { id: 16, name: 'Mental' }, + { id: 17, name: 'Custom (Client Specific)' }, + { id: 19, name: 'Financial' }, + { id: 20, name: 'Emotional' }, + { id: 21, name: 'Social' }, + { id: 41, name: 'Biblical' }, + { id: 42, name: 'Personal Growth & Development' }, + { id: 46, name: 'Sports' } ]; async function main() { @@ -130,6 +113,15 @@ async function main() { }); } + console.log('Seeding ProclamationGroup...'); + for (const group of proclamationGroups) { + await prisma.proclamationGroup.upsert({ + where: { name: group.name }, + create: group, + update: group + }); + } + console.log('Seeding ProclamationCategory...'); for (const cat of proclamationCategories) { await prisma.proclamationCategory.upsert({ @@ -139,15 +131,6 @@ async function main() { }); } - console.log('Seeding SubscriptionLevel...'); - for (const level of subscriptionLevels) { - await prisma.subscriptionLevel.upsert({ - where: { id: level.id }, - create: level, - update: level - }); - } - console.log('Seeding ColorPalette...'); for (const palette of colorPalettes) { await prisma.colorPalette.upsert({ diff --git a/src/lib/components/admin/AdminModal.svelte b/src/lib/components/admin/AdminModal.svelte index 4c4e06e..d4de85c 100644 --- a/src/lib/components/admin/AdminModal.svelte +++ b/src/lib/components/admin/AdminModal.svelte @@ -43,38 +43,18 @@ {#if open} -