From cfc28c5959234136aa66f86a55a9ccc62f508795 Mon Sep 17 00:00:00 2001 From: Spacelord Date: Mon, 22 May 2023 18:39:47 +0200 Subject: [PATCH] Current (non-working-frontend) state --- prisma/schema.prisma | 2 +- src/frontend/items.eta.html | 92 ++++++++-- src/frontend/partials/controls.eta.html | 98 ++++------- src/frontend/partials/head.eta.html | 6 +- src/routes/api/v1/index.ts | 3 +- src/routes/api/v1/items.ts | 212 ++++++++++++++++++++++++ src/routes/frontend/items.ts | 6 +- static/css/dashboard.css | 9 +- static/js/confettiHeader.js | 12 ++ static/logo.png | Bin 0 -> 72379 bytes static/logo/Design_Logo_Black.svg | 1 + static/logo/Design_Logo_white.svg | 1 + static/logo/Design_icon.svg | 1 + 13 files changed, 354 insertions(+), 89 deletions(-) create mode 100644 src/routes/api/v1/items.ts create mode 100644 static/js/confettiHeader.js create mode 100644 static/logo.png create mode 100644 static/logo/Design_Logo_Black.svg create mode 100644 static/logo/Design_Logo_white.svg create mode 100644 static/logo/Design_icon.svg diff --git a/prisma/schema.prisma b/prisma/schema.prisma index 61eecb0..b22e360 100644 --- a/prisma/schema.prisma +++ b/prisma/schema.prisma @@ -85,7 +85,6 @@ model itemCategory { Item Item[] } -/// TODO: Add relationship to StorageUnit, Item and if necessary to StorageLocation. model contactInfo { id Int @id @default(autoincrement()) type contactType @default(person) @@ -101,6 +100,7 @@ model contactInfo { Item Item[] } +/// TODO: Allow multiple types to be used? enum contactType { storageUnit owner diff --git a/src/frontend/items.eta.html b/src/frontend/items.eta.html index 8d04c74..965e467 100644 --- a/src/frontend/items.eta.html +++ b/src/frontend/items.eta.html @@ -1,8 +1,80 @@ <%~ E.includeFile("partials/head.eta.html", {"title": "Items"}) %> <%~ E.includeFile("partials/controls.eta.html", {"active": "Items"}) %> + +

Items

+
+ +
@@ -30,27 +102,27 @@ <% } else if(user.status == "stolen") { %> <% } else if(user.status == "lost") { %> - + <% } else if(user.status == "borrowed") { %> - + <% } %> <% }) %>
<%= user.status %><%= user.status %><%= user.status %><%= user.status %><%= user.status %>Edit
-
+
<% if(it.maxPages > 1) { %> + <% } %>
diff --git a/src/frontend/partials/controls.eta.html b/src/frontend/partials/controls.eta.html index df601fa..2732a35 100644 --- a/src/frontend/partials/controls.eta.html +++ b/src/frontend/partials/controls.eta.html @@ -1,39 +1,32 @@ - + + -
- -
- -