All pages active
This commit is contained in:
@@ -40,6 +40,48 @@ async function main() {
|
||||
},
|
||||
});
|
||||
|
||||
await prisma.orgSettings.upsert({
|
||||
where: { orgId: org.id },
|
||||
update: {},
|
||||
create: {
|
||||
orgId: org.id,
|
||||
timezone: "UTC",
|
||||
shiftChangeCompMin: 10,
|
||||
lunchBreakMin: 30,
|
||||
stoppageMultiplier: 1.5,
|
||||
oeeAlertThresholdPct: 90,
|
||||
performanceThresholdPct: 85,
|
||||
qualitySpikeDeltaPct: 5,
|
||||
alertsJson: {
|
||||
oeeDropEnabled: true,
|
||||
performanceDegradationEnabled: true,
|
||||
qualitySpikeEnabled: true,
|
||||
predictiveOeeDeclineEnabled: true,
|
||||
},
|
||||
defaultsJson: {
|
||||
moldTotal: 1,
|
||||
moldActive: 1,
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
const existingShift = await prisma.orgShift.findFirst({
|
||||
where: { orgId: org.id },
|
||||
});
|
||||
|
||||
if (!existingShift) {
|
||||
await prisma.orgShift.create({
|
||||
data: {
|
||||
orgId: org.id,
|
||||
name: "Shift 1",
|
||||
startTime: "06:00",
|
||||
endTime: "15:00",
|
||||
sortOrder: 1,
|
||||
enabled: true,
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
console.log("Seeded admin user");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user