From 58a36d36ec50cb0db7c180e8a9c12c9ff8995e80 Mon Sep 17 00:00:00 2001 From: grey Date: Mon, 1 May 2023 18:36:24 +0200 Subject: [PATCH] - migrated old page to new partials - fixed setDemoData endpoint --- prisma/schema.prisma | 8 ++-- src/frontend/demopage.eta.html | 2 +- src/frontend/head.eta.html | 2 +- src/frontend/publicInfoPage.eta.html | 25 ++---------- src/routes/dev/setDemoData.ts | 61 ++++++++-------------------- 5 files changed, 26 insertions(+), 72 deletions(-) diff --git a/prisma/schema.prisma b/prisma/schema.prisma index 181ad78..fa19a9d 100644 --- a/prisma/schema.prisma +++ b/prisma/schema.prisma @@ -34,8 +34,8 @@ model Item { manufacturer String category Category status Status - StorageLocation StorageLocation @relation(fields: [storageLocationId], references: [id]) - storageLocationId Int + StorageLocation StorageLocation? @relation(fields: [storageLocationId], references: [id]) + storageLocationId Int? createdAt DateTime @default(now()) updatedAt DateTime @updatedAt } @@ -43,8 +43,8 @@ model Item { model StorageLocation { id Int @id @default(autoincrement()) name String - storageBuilding StorageBuilding @relation(fields: [storageBuildingId], references: [id]) - storageBuildingId Int + storageBuilding StorageBuilding? @relation(fields: [storageBuildingId], references: [id]) + storageBuildingId Int? Item Item[] } diff --git a/src/frontend/demopage.eta.html b/src/frontend/demopage.eta.html index 17e503a..8ce42be 100644 --- a/src/frontend/demopage.eta.html +++ b/src/frontend/demopage.eta.html @@ -1,4 +1,4 @@ -<%~ E.includeFile("head.eta.html") %> +<%~ E.includeFile("head.eta.html", {"title": "Bootstrap Demo Page"}) %>