From bd9f629690940399651d80090231ef0fd61c76c7 Mon Sep 17 00:00:00 2001 From: Spacelord Date: Tue, 16 May 2023 22:58:08 +0200 Subject: [PATCH] The BIG frontend update --- src/frontend/auth/login.eta.html | 12 + src/frontend/items.eta.html | 22 +- src/frontend/manage/categoryManager.eta.html | 2 +- src/frontend/manage/storageManager.eta.html | 46 +++- src/frontend/partials/controls.eta.html | 5 +- src/frontend/partials/head.eta.html | 2 +- src/frontend/style.css | 0 src/routes/api/v1/categories.ts | 2 +- src/routes/api/v1/index.ts | 5 + src/routes/frontend/items.ts | 28 +- src/routes/frontend/manage/demo.ts | 8 + src/routes/frontend/manage/index.ts | 2 + src/routes/frontend/manage/startpage.ts | 1 + src/routes/frontend/manage/storageManager.ts | 16 +- src/routes/index.ts | 4 +- static/css/dashboard.css | 15 +- static/css/login.css | 23 ++ static/js/editCategory.js | 10 +- static/js/editStorages.js | 276 ++++++++++++++++++- static/js/formHandler.js | 24 +- static/js/handleSidebarTriangles.js | 5 +- static/js/normalizeToast.js | 7 + 22 files changed, 459 insertions(+), 56 deletions(-) create mode 100644 src/frontend/auth/login.eta.html delete mode 100644 src/frontend/style.css create mode 100644 src/routes/frontend/manage/demo.ts create mode 100644 static/css/login.css create mode 100644 static/js/normalizeToast.js diff --git a/src/frontend/auth/login.eta.html b/src/frontend/auth/login.eta.html new file mode 100644 index 0000000..e112807 --- /dev/null +++ b/src/frontend/auth/login.eta.html @@ -0,0 +1,12 @@ +<%~ E.includeFile("../partials/head.eta.html", {"title": "Login"}) %> + + +
+
+
+
+

Log into AssetFlow

+
+
+ <%~ E.includeFile("../partials/foot.eta.html") %> +
diff --git a/src/frontend/items.eta.html b/src/frontend/items.eta.html index be9b031..3e76a42 100644 --- a/src/frontend/items.eta.html +++ b/src/frontend/items.eta.html @@ -3,7 +3,7 @@

Items

- +
@@ -12,6 +12,13 @@ + <% if(it.items.length == 0) { %> + + + + + + <% } %> <% it.items.forEach(function(user){ %> @@ -23,6 +30,19 @@ <% }) %>
SKUActions
No items found
+
+ <% if(it.maxPages > 1) { %> + + <% } %>
<%~ E.includeFile("partials/controlsFoot.eta.html") %> <%~ E.includeFile("partials/foot.eta.html") %> diff --git a/src/frontend/manage/categoryManager.eta.html b/src/frontend/manage/categoryManager.eta.html index 7c8ce9a..f456156 100644 --- a/src/frontend/manage/categoryManager.eta.html +++ b/src/frontend/manage/categoryManager.eta.html @@ -43,7 +43,7 @@ - +
diff --git a/src/frontend/manage/storageManager.eta.html b/src/frontend/manage/storageManager.eta.html index e316755..8ed7be8 100644 --- a/src/frontend/manage/storageManager.eta.html +++ b/src/frontend/manage/storageManager.eta.html @@ -9,7 +9,7 @@

Edit or create a storage location

- + -
+
- @@ -160,18 +162,34 @@ <% it.storLocs.forEach(function(locations){ %> - + <% }) %>
LocId Name Storage Unit Actions
<%= locations.name %><%= locations.contactInfo %> - + - +
+ + + + + + + + + +

A storage unit is a physical place, like a warehouse. This contains an address and a name. @@ -181,7 +199,7 @@ Create new unit
- +
@@ -195,10 +213,10 @@ <% }) %> diff --git a/src/frontend/partials/controls.eta.html b/src/frontend/partials/controls.eta.html index ed57b33..c6e1cdb 100644 --- a/src/frontend/partials/controls.eta.html +++ b/src/frontend/partials/controls.eta.html @@ -120,8 +120,7 @@ data-bs-target="#collapseSettingsStorages" aria-expanded="<%= it.active == 'SETT_STORE' ? 'true' : 'false'%>" aria-controls="collapseSettingsStorages"> - - + @@ -144,7 +143,7 @@ aria-expanded="<%= it.active.includes('SETT_IMPORT') ? 'true' : 'false'%>" aria-controls="collapseSettingsImport"> Import - + diff --git a/src/frontend/partials/head.eta.html b/src/frontend/partials/head.eta.html index bcff16e..4c6df7d 100644 --- a/src/frontend/partials/head.eta.html +++ b/src/frontend/partials/head.eta.html @@ -11,6 +11,7 @@ + @@ -20,7 +21,6 @@
Name<%= units.name %> <%= units.contactInfo.street %> <%= units.contactInfo.houseNumber %>, <%= units.contactInfo.city %> <%= units.contactInfo.country %> - - +