From 3569c9ed4be8e5f230633ce5e61117fb3ae98f27 Mon Sep 17 00:00:00 2001 From: Spacelord Date: Fri, 12 May 2023 23:57:21 +0200 Subject: [PATCH] Updated styles and Added storageManager. - Dark/White-mode support - Collapsible navs - Renamed items template. - StorageBuilding's are now StorageUnit's - Formatting, general cleanup, some bug fixing. --- README.md | 15 +++- allowedStaticPaths.json | 3 +- prisma/schema.prisma | 22 ++--- .../{allItems.eta.html => items.eta.html} | 6 +- src/frontend/manage/storageManager.eta.html | 75 +++++++++++++++++ src/frontend/partials/controls.eta.html | 83 ++++++++++++------- src/frontend/partials/foot.eta.html | 2 - src/frontend/partials/head.eta.html | 35 ++++++-- src/routes/frontend/dashboard.ts | 1 + src/routes/frontend/items.ts | 2 +- src/routes/frontend/manage/index.ts | 2 + src/routes/frontend/manage/storageManager.ts | 15 ++++ static/css/dashboard.css | 17 ++-- static/js/editStorages.js | 23 +++++ 14 files changed, 236 insertions(+), 65 deletions(-) rename src/frontend/{allItems.eta.html => items.eta.html} (92%) create mode 100644 src/frontend/manage/storageManager.eta.html create mode 100644 src/routes/frontend/manage/storageManager.ts create mode 100644 static/js/editStorages.js diff --git a/README.md b/README.md index e753842..9c4b11d 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,15 @@ # Assetflow -## Theme? -https://bootswatch.com/darkly/ +Assetflow is an inventory management solution targeted at the event industry. + +## Formats and conventions (WiP) + +SKU +Stock Keeping Unit + +LocID +LocID_Regal16_Fach7 + +StorageLocation_LocID_Regal16_Fach7 + + diff --git a/allowedStaticPaths.json b/allowedStaticPaths.json index 90f1a70..006c273 100644 --- a/allowedStaticPaths.json +++ b/allowedStaticPaths.json @@ -9,7 +9,8 @@ "/bootstrap/dist/css/bootstrap.min.css.map", "/@popperjs/core/dist/umd/popper.min.js", "/@popperjs/core/dist/umd/popper.min.js.map", - "/bootstrap/dist/js/bootstrap.bundle.min.js.map" + "/bootstrap/dist/js/bootstrap.bundle.min.js.map", + "/bootstrap-icons/font/fonts/bootstrap-icons.woff" ], "debugMode": false } diff --git a/prisma/schema.prisma b/prisma/schema.prisma index 825d9f6..519607a 100644 --- a/prisma/schema.prisma +++ b/prisma/schema.prisma @@ -13,14 +13,14 @@ datasource db { // https://github.com/pantharshit00/prisma-docs-generator generator docs { provider = "node node_modules/prisma-docs-generator" - output = "../docs" + output = "../docs" } // https://github.com/notiz-dev/prisma-dbml-generator // Viewer: https://dbdiagram.io/d generator dbml { - provider = "prisma-dbml-generator" - output = "../docs" + provider = "prisma-dbml-generator" + output = "../docs" outputName = "schema.dbml" projectName = "AssetFlow" } @@ -34,7 +34,7 @@ enum Status { model Item { id Int @id @default(autoincrement()) - SKU String? @unique + SKU String? @unique Amount Int Comment String? name String @@ -50,14 +50,14 @@ model Item { } model StorageLocation { - id Int @id @default(autoincrement()) - name String - storageBuilding StorageBuilding? @relation(fields: [storageBuildingId], references: [id]) - storageBuildingId Int? - Item Item[] + id Int @id @default(autoincrement()) + name String @unique + storageUnit StorageUnit? @relation(fields: [storageUnitId], references: [id]) + storageUnitId Int? + Item Item[] } -model StorageBuilding { +model StorageUnit { id Int @id @default(autoincrement()) name String street String @@ -70,7 +70,7 @@ model StorageBuilding { model Category { id Int @id @default(autoincrement()) - name String @unique + name String @unique description String? Item Item[] } diff --git a/src/frontend/allItems.eta.html b/src/frontend/items.eta.html similarity index 92% rename from src/frontend/allItems.eta.html rename to src/frontend/items.eta.html index 7caac5f..0343f4b 100644 --- a/src/frontend/allItems.eta.html +++ b/src/frontend/items.eta.html @@ -5,20 +5,18 @@ - + - <% it.items.forEach(function(user){ %> - + - <% }) %> diff --git a/src/frontend/manage/storageManager.eta.html b/src/frontend/manage/storageManager.eta.html new file mode 100644 index 0000000..6e53d4e --- /dev/null +++ b/src/frontend/manage/storageManager.eta.html @@ -0,0 +1,75 @@ +<%~ E.includeFile("../partials/head.eta.html", {"title": "Settings - Storage Manager"}) %> <%~ E.includeFile("../partials/controls.eta.html", {"active": "SETT_STORE"}) %> + +

Storages

+ +
+
+
+ +
#SKU Name StatusSKU Actions
<%= user.id %><%= user.SKU %> <%= user.name %> <%= user.status %><%= user.SKU %> Edit
+ + + + + + + + + + + +
LocIdNameStorage UnitActions
+ +
+
+ + + + + + + + + + + + + + + +<%~ E.includeFile("../partials/controlsFoot.eta.html") %> <%~ E.includeFile("../partials/foot.eta.html") %> diff --git a/src/frontend/partials/controls.eta.html b/src/frontend/partials/controls.eta.html index b10d089..3f9fc35 100644 --- a/src/frontend/partials/controls.eta.html +++ b/src/frontend/partials/controls.eta.html @@ -10,12 +10,9 @@ aria-label="Toggle navigation"> - - -
- -
+ +
#NameAddressActions