From c82a0e5e1c48750797646e2c1da0cfddf95a7ad2 Mon Sep 17 00:00:00 2001 From: flfeders Date: Mon, 18 Dec 2023 19:43:50 +0100 Subject: [PATCH] Document Restructure Introduced ExternalDevices Settingspage Added DocumentDisplay.vue Component Some Changes to Spaces --- spaces/app.vue | 19 + spaces/components/DocumentDisplay.vue | 283 +++++++++++ spaces/package.json | 3 +- spaces/pages/customers/[mode]/[[id]].vue | 3 +- spaces/pages/documents.vue | 466 ++++++------------ spaces/pages/inventory/index.vue | 50 +- spaces/pages/inventory/spaces.vue | 153 ------ .../pages/inventory/spaces/[mode]/[[id]].vue | 241 +++++++++ spaces/pages/inventory/spaces/index.vue | 80 +++ spaces/pages/projects/[id].vue | 130 ++++- spaces/pages/projects/index.vue | 7 +- spaces/pages/settings/externalDevices.vue | 48 +- .../{[id].vue => [mode]/[[id]].vue} | 79 ++- spaces/stores/data.ts | 13 +- 14 files changed, 1067 insertions(+), 508 deletions(-) create mode 100644 spaces/components/DocumentDisplay.vue delete mode 100644 spaces/pages/inventory/spaces.vue create mode 100644 spaces/pages/inventory/spaces/[mode]/[[id]].vue create mode 100644 spaces/pages/inventory/spaces/index.vue rename spaces/pages/vendorinvoices/{[id].vue => [mode]/[[id]].vue} (51%) diff --git a/spaces/app.vue b/spaces/app.vue index ff877f5..185cbeb 100644 --- a/spaces/app.vue +++ b/spaces/app.vue @@ -107,6 +107,11 @@ const navLinks = [ to: "/inventory", icon: "i-heroicons-square-3-stack-3d" }, + { + label: "Lagerplätze", + to: "/inventory/spaces", + icon: "i-heroicons-square-3-stack-3d" + }, ] }, ] @@ -335,6 +340,20 @@ const items = [ height: 85vh; } +.documentList { + display: flex; + flex-direction: row; + flex-wrap: wrap; + height: 85vh; + overflow-y: scroll; + -ms-overflow-style: none; /* IE and Edge */ + scrollbar-width: none; /* Firefox */ +} + +.documentList::-webkit-scrollbar { + display: none; +} + .scrollList { overflow-y: scroll; height: 85vh; diff --git a/spaces/components/DocumentDisplay.vue b/spaces/components/DocumentDisplay.vue new file mode 100644 index 0000000..f093f1d --- /dev/null +++ b/spaces/components/DocumentDisplay.vue @@ -0,0 +1,283 @@ + + + + + \ No newline at end of file diff --git a/spaces/package.json b/spaces/package.json index a4a1146..1e5f8bc 100644 --- a/spaces/package.json +++ b/spaces/package.json @@ -45,6 +45,7 @@ "pinia": "^2.1.7", "socket.io-client": "^4.7.2", "uuidv4": "^6.2.13", - "v-calendar": "^3.1.2" + "v-calendar": "^3.1.2", + "vue-barcode-reader": "^1.0.3" } } diff --git a/spaces/pages/customers/[mode]/[[id]].vue b/spaces/pages/customers/[mode]/[[id]].vue index 7866e62..574fffb 100644 --- a/spaces/pages/customers/[mode]/[[id]].vue +++ b/spaces/pages/customers/[mode]/[[id]].vue @@ -23,7 +23,8 @@ const mode = ref(route.params.mode || "show") const customerInfo = ref({ name: "", customerNumber: 0, - infoData: {} + infoData: {}, + active: true }) //Functions diff --git a/spaces/pages/documents.vue b/spaces/pages/documents.vue index 28af8a5..cb978fa 100644 --- a/spaces/pages/documents.vue +++ b/spaces/pages/documents.vue @@ -1,176 +1,3 @@ - - + + + + \ No newline at end of file diff --git a/spaces/pages/inventory/index.vue b/spaces/pages/inventory/index.vue index b6b0a87..be3e1ae 100644 --- a/spaces/pages/inventory/index.vue +++ b/spaces/pages/inventory/index.vue @@ -3,18 +3,18 @@ definePageMeta({ middleware: "auth" }) +import {StreamBarcodeReader} from "vue-barcode-reader" + const supabase = useSupabaseClient() -const spaces = (await supabase.from("spaces").select()).data -const movements = (await supabase.from("movements").select()).data -const products = (await supabase.from("products").select()).data - +const {spaces, movements, products} = storeToRefs(useDataStore()) const searchinput = ref("") const mode = ref("") const toast = useToast() +const showReader = ref(false) const inventoryChangeData = ref({ productId: "", @@ -47,25 +47,41 @@ const createMovement = async () => { } else if (mode.value === 'change'){} inventoryChangeData.value = { - productId: "", - spaceId: "", + productId: 0, + spaceId: 0, quantity: 0 } } function checkArticle(productId) { - return products.filter(product => product.id === Number(productId)).length > 0; + return products.value.filter(product =>product.ean === productId).length > 0; } function checkSpaceId(spaceId) { - return spaces.filter(space => space.id === spaceId).length > 0; + return spaces.value.filter(space => Number(space.spaceNumber) === Number(spaceId)).length > 0; +} + +function changeFocusToSpaceId() { + document.getElementById('spaceIdInput').focus() +} + +function changeFocusToQuantity() { + document.getElementById('quantityInput').focus() } +
+ + Hochladen + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + Dokumente +
+import axios from "axios" +const {ownTenant} = storeToRefs(useDataStore()) + + +const setupPrinter = async () => { + console.log(ownTenant.value.labelPrinterIp) + let printerUri = `http://${ownTenant.value.labelPrinterIp}/pstprnt` + labelPrinterURI.value = printerUri + console.log(printerUri) +} + + +/*const printLabel = async () => { + axios + .post(labelPrinterURI.value, `^XA^FO10,20^BCN,100^FD${}^XZ` ) + .then(console.log) + .catch(console.log) + + +}*/ + + + +const labelPrinterURI = ref("") @@ -8,12 +32,32 @@ + + + + + + + Drucker Setup + + + Druck + + - + diff --git a/spaces/pages/vendorinvoices/[id].vue b/spaces/pages/vendorinvoices/[mode]/[[id]].vue similarity index 51% rename from spaces/pages/vendorinvoices/[id].vue rename to spaces/pages/vendorinvoices/[mode]/[[id]].vue index bdb3076..ba9de77 100644 --- a/spaces/pages/vendorinvoices/[id].vue +++ b/spaces/pages/vendorinvoices/[mode]/[[id]].vue @@ -1,33 +1,72 @@