fix: correct walkthrough field names in demo seed
Some checks are pending
Deploy to Production / deploy (push) Waiting to run
Test / backend-test (push) Waiting to run
Test / frontend-test (push) Waiting to run

This commit is contained in:
fullsizemalt 2025-12-12 20:15:26 -08:00
parent 981a8eded4
commit f02f0dfe72

View file

@ -149,20 +149,17 @@ async function main() {
console.log('\n📝 Creating Walkthrough History...');
for (let d = 0; d < 30; d++) {
const user = userList[Math.floor(Math.random() * userList.length)];
const startTime = daysAgo(d);
const endTime = new Date(startTime);
endTime.setMinutes(endTime.getMinutes() + 30 + Math.floor(Math.random() * 30));
const walkthrough = await prisma.dailyWalkthrough.create({
data: {
userId: user.id,
completedBy: user.id,
status: 'COMPLETED',
startedAt: daysAgo(d),
completedAt: daysAgo(d),
notes: d === 0 ? null : [
'All rooms looking good',
'Found spider mites in Flower A, treated with Pyganic',
'VPD running high, adjusted humidity',
'Reservoir topped off',
'Noticed some cal-mag deficiency in veg',
null
][Math.floor(Math.random() * 6)]
date: daysAgo(d),
startTime,
endTime
}
});