All pages active

This commit is contained in:
Marcelo Dares
2026-01-02 16:56:09 +00:00
parent 363c9fbf4f
commit d172eaf629
11 changed files with 2990 additions and 67 deletions

View File

@@ -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");
}