diff --git a/backend/prisma/seed.ts b/backend/prisma/seed.ts index da64364..c7a0fc9 100644 --- a/backend/prisma/seed.ts +++ b/backend/prisma/seed.ts @@ -284,6 +284,123 @@ async function main() { } } + // ============================================ + // DEMO BATCHES + // ============================================ + const owner = await prisma.user.findUnique({ where: { email: ownerEmail } }); + const flowerRoom = await prisma.facilityRoom.findFirst({ where: { code: 'FLO' } }); + const vegRoom = await prisma.facilityRoom.findFirst({ where: { code: 'VEG' } }); + + const demoBatches = [ + { + name: 'B-2026-01-GG4', + strain: 'Gorilla Glue #4', + startDate: new Date('2026-01-01'), + status: 'ACTIVE', + plantCount: 48, + source: 'CLONE', + stage: 'FLOWER', + roomId: flowerRoom?.id + }, + { + name: 'B-2025-12-KM', + strain: 'Kush Mints', + startDate: new Date('2025-12-15'), + harvestDate: new Date('2026-01-08'), + status: 'HARVESTED', + plantCount: 36, + source: 'CLONE', + stage: 'DRY' + }, + { + name: 'B-2026-01-GDP', + strain: 'Grand Daddy Purple', + startDate: new Date('2026-01-05'), + status: 'ACTIVE', + plantCount: 24, + source: 'SEED', + stage: 'VEG', + roomId: vegRoom?.id + } + ]; + + for (const b of demoBatches) { + const existing = await prisma.batch.findFirst({ where: { name: b.name } }); + if (!existing) { + await prisma.batch.create({ data: b as any }); + console.log(`Created Batch: ${b.name} (${b.strain})`); + } + } + + // ============================================ + // DEMO TASKS + // ============================================ + const demoTasks = [ + { + title: 'IPM Treatment - Flower Room', + description: 'Apply weekly IPM spray to all flower room plants', + status: 'PENDING', + priority: 'HIGH', + dueDate: new Date(Date.now() - 2 * 24 * 60 * 60 * 1000), // 2 days overdue + assignedToId: owner?.id + }, + { + title: 'Nutrient Tank pH Calibration', + description: 'Calibrate pH meters and check EC levels in all nutrient tanks', + status: 'PENDING', + priority: 'MEDIUM', + dueDate: new Date(Date.now() - 1 * 24 * 60 * 60 * 1000), // 1 day overdue + assignedToId: owner?.id + }, + { + title: 'HVAC Filter Replacement', + description: 'Replace HEPA filters in all grow rooms', + status: 'PENDING', + priority: 'LOW', + dueDate: new Date(Date.now() + 3 * 24 * 60 * 60 * 1000), // Due in 3 days + assignedToId: owner?.id + }, + { + title: 'Weekly Crop Steering Review', + description: 'Review VPD charts and adjust environmental targets', + status: 'IN_PROGRESS', + priority: 'HIGH', + dueDate: new Date(Date.now() + 1 * 24 * 60 * 60 * 1000), + assignedToId: owner?.id + } + ]; + + for (const t of demoTasks) { + const existing = await prisma.task.findFirst({ where: { title: t.title } }); + if (!existing) { + await prisma.task.create({ data: t as any }); + console.log(`Created Task: ${t.title}`); + } + } + + // ============================================ + // PULSE SENSOR MAPPING + // ============================================ + // Map Pulse sensor device 11666 to Flower Room + if (flowerRoom) { + const existingSensor = await prisma.sensor.findFirst({ + where: { externalId: '11666', type: 'VPD' } + }); + if (!existingSensor) { + await prisma.sensor.create({ + data: { + name: 'Veridian Demo Pulse', + type: 'VPD', + externalId: '11666', + location: 'Flower Room', + status: 'ACTIVE', + roomId: flowerRoom.id + } as any + }); + console.log('Created Pulse sensor mapping for device 11666'); + } + } + console.log('Seeding complete.'); } diff --git a/frontend/android/app/src/main/res/mipmap-hdpi/ic_launcher.png b/frontend/android/app/src/main/res/mipmap-hdpi/ic_launcher.png index 22f0493..c6a11c0 100644 Binary files a/frontend/android/app/src/main/res/mipmap-hdpi/ic_launcher.png and b/frontend/android/app/src/main/res/mipmap-hdpi/ic_launcher.png differ diff --git a/frontend/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png b/frontend/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png index 22f0493..c6a11c0 100644 Binary files a/frontend/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png and b/frontend/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png differ diff --git a/frontend/android/app/src/main/res/mipmap-mdpi/ic_launcher.png b/frontend/android/app/src/main/res/mipmap-mdpi/ic_launcher.png index 22f0493..c6a11c0 100644 Binary files a/frontend/android/app/src/main/res/mipmap-mdpi/ic_launcher.png and b/frontend/android/app/src/main/res/mipmap-mdpi/ic_launcher.png differ diff --git a/frontend/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png b/frontend/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png index 22f0493..c6a11c0 100644 Binary files a/frontend/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png and b/frontend/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png differ diff --git a/frontend/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/frontend/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png index 22f0493..c6a11c0 100644 Binary files a/frontend/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png and b/frontend/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png differ diff --git a/frontend/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png b/frontend/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png index 22f0493..c6a11c0 100644 Binary files a/frontend/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png and b/frontend/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png differ diff --git a/frontend/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/frontend/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png index 22f0493..c6a11c0 100644 Binary files a/frontend/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png and b/frontend/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png differ diff --git a/frontend/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png b/frontend/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png index 22f0493..c6a11c0 100644 Binary files a/frontend/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png and b/frontend/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png differ diff --git a/frontend/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/frontend/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png index 22f0493..c6a11c0 100644 Binary files a/frontend/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png and b/frontend/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png differ diff --git a/frontend/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png b/frontend/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png index 22f0493..c6a11c0 100644 Binary files a/frontend/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png and b/frontend/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png differ diff --git a/frontend/public/icons/icon-512.png b/frontend/public/icons/icon-512.png index 8fe3024..c6a11c0 100644 Binary files a/frontend/public/icons/icon-512.png and b/frontend/public/icons/icon-512.png differ