diff --git a/app.vue b/app.vue
index cc8b19b..b9becef 100644
--- a/app.vue
+++ b/app.vue
@@ -42,7 +42,9 @@ useSeoMeta({
+
diff --git a/composables/useSupabase.js b/composables/useSupabase.js
index d55ec6a..61f6eb7 100644
--- a/composables/useSupabase.js
+++ b/composables/useSupabase.js
@@ -22,6 +22,49 @@ export const useSupabaseSelect = async (relation,select = '*', sortColumn = null
return data
}
+export const useSupabaseSelectDocuments = async (select = '*', sortColumn = null) => {
+ const supabase = useSupabaseClient()
+ const dataStore = useDataStore()
+ let data = null
+
+
+ if(sortColumn !== null ) {
+ data = (await supabase
+ .from("documents")
+ .select(select)
+ .eq("tenant", dataStore.currentTenant)
+ .order(sortColumn, {ascending: true})).data
+ } else {
+ data = (await supabase
+ .from("documents")
+ .select(select)
+ .eq("tenant", dataStore.currentTenant)).data
+ }
+
+ if(data.length > 0){
+ let paths = []
+ data.forEach(doc => {
+ paths.push(doc.path)
+ })
+
+ const {data: supabaseData,error} = await supabase.storage.from('files').createSignedUrls(paths,3600)
+
+ data = data.map((doc,index) => {
+
+ return {
+ ...doc,
+ url: supabaseData[index].signedUrl
+ }
+ })
+
+
+ }
+
+ console.log(data)
+
+ return data
+}
+
export const useSupabaseSelectSingle = async (relation,idToEq,select = '*' ) => {
const supabase = useSupabaseClient()
const dataStore = useDataStore()
diff --git a/layouts/default.vue b/layouts/default.vue
index 19aeac1..2f6e34d 100644
--- a/layouts/default.vue
+++ b/layouts/default.vue
@@ -296,6 +296,10 @@ let links = computed(() => {
label: "Vorgänge",
to: "/inventory",
icon: "i-heroicons-square-3-stack-3d"
+ },{
+ label: "Bestände",
+ to: "/inventory/stocks",
+ icon: "i-heroicons-square-3-stack-3d"
},
{
label: "Lagerplätze",
diff --git a/package-lock.json b/package-lock.json
index 865630f..35cbccf 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -48,7 +48,8 @@
"uuidv4": "^6.2.13",
"v-calendar": "^3.1.2",
"vuedraggable": "^4.1.0",
- "vuetify": "^3.4.0-beta.1"
+ "vuetify": "^3.4.0-beta.1",
+ "zebra-browser-print-wrapper": "^0.1.4"
},
"devDependencies": {
"@nuxt/devtools": "latest",
@@ -19292,6 +19293,11 @@
"url": "https://github.com/sponsors/sindresorhus"
}
},
+ "node_modules/zebra-browser-print-wrapper": {
+ "version": "0.1.4",
+ "resolved": "https://registry.npmjs.org/zebra-browser-print-wrapper/-/zebra-browser-print-wrapper-0.1.4.tgz",
+ "integrity": "sha512-w0mqnq83flxnNTgSgzkvSZWgnP/ffD0v+a5smOHUhB3UiaWqkDqIXzS6n6QnD6BBjE0qdrmlCmzoasSogEBJlw=="
+ },
"node_modules/zhead": {
"version": "2.2.4",
"resolved": "https://registry.npmjs.org/zhead/-/zhead-2.2.4.tgz",
diff --git a/package.json b/package.json
index 905b86d..e2993d5 100644
--- a/package.json
+++ b/package.json
@@ -61,6 +61,7 @@
"uuidv4": "^6.2.13",
"v-calendar": "^3.1.2",
"vuedraggable": "^4.1.0",
- "vuetify": "^3.4.0-beta.1"
+ "vuetify": "^3.4.0-beta.1",
+ "zebra-browser-print-wrapper": "^0.1.4"
}
}
diff --git a/pages/createDocument/edit/[[id]].vue b/pages/createDocument/edit/[[id]].vue
index 1666f1e..2e9c2e5 100644
--- a/pages/createDocument/edit/[[id]].vue
+++ b/pages/createDocument/edit/[[id]].vue
@@ -232,6 +232,7 @@ const saveRowDescription = () => {
}
+
const removePosition = (id) => {
let rows = itemInfo.value.rows.filter(row => row.id !== id)
/*rows = rows.sort((a,b) => a.pos - b.pos)
@@ -397,6 +398,8 @@ const saveDocument = async () => {
project: itemInfo.value.project,
documentNumber: itemInfo.value.documentNumber,
documentDate: itemInfo.value.documentDate,
+ deliveryDate: itemInfo.value.deliveryDate,
+ paymentDays: itemInfo.value.paymentDays,
deliveryDateType: itemInfo.value.deliveryDateType,
info: {
@@ -929,9 +932,10 @@ setupPage()
row.description = dataStore.getProductById(row.product).description"
>
- {{dataStore.getProductById(row.product) ?dataStore.getProductById(row.product).name : "Kein Produkt ausgewählt" }}
+ {{dataStore.getProductById(row.product) ? dataStore.getProductById(row.product).name : "Kein Produkt ausgewählt" }}
+ {{dataStore.getProductById(66)}}
import {BlobReader, BlobWriter, ZipWriter} from "@zip.js/zip.js";
+import {useSupabaseSelectDocuments} from "~/composables/useSupabase.js";
definePageMeta({
middleware: "auth"
@@ -24,15 +25,24 @@ const fileUploadFormData = ref({
let tags = dataStore.getDocumentTags
const selectedTags = ref("Eingang")
+const documents = ref([])
+
+const setupPage = async () => {
+ documents.value = await useSupabaseSelectDocuments("*, project(id,name), customer(id,name), contract(id,name), vendor(id,name), plant(id,name), vehicle(id,licensePlate), product(id,name), profile(id,fullName) ")
+}
+setupPage()
const filteredDocuments = computed(() => {
- let returnList = []
- returnList = dataStore.documents.filter(i => i.tags.filter(t => selectedTags.value === t).length > 0)
+ if(selectedTags.value !== "Archiviert") {
+ return documents.value.filter(i => i.tags.find(t => selectedTags.value === t) && !i.tags.includes("Archiviert"))
+ } else {
+ return documents.value.filter(i => i.tags.find(t => selectedTags.value === t))
+ }
+
+
- //return dataStore.documents.filter(doc => doc.tags.filter(tag => selectedTags.value.find(t => t === tag)).length > 0)
- return returnList
})
diff --git a/pages/incomingInvoices/[mode]/[[id]].vue b/pages/incomingInvoices/[mode]/[[id]].vue
index aaefd20..3447cb3 100644
--- a/pages/incomingInvoices/[mode]/[[id]].vue
+++ b/pages/incomingInvoices/[mode]/[[id]].vue
@@ -21,7 +21,7 @@ const availableDocuments = computed(() => {
//console.log(dataStore.documents.filter(i => i.tags.includes('Eingangsrechnung') && !dataStore.incominginvoices.find(x => x.document === i.id)))
//console.log(dataStore.documents.filter(i => i.tags.includes('Eingangsrechnung')).length)
- return dataStore.documents.filter(i => i.tags.includes('Eingangsrechnung') && !dataStore.incominginvoices.find(x => x.document === i.id))
+ return dataStore.documents.filter(i => i.tags.includes('Eingangsrechnung') && !i.tags.includes("Archiviert") && !dataStore.incominginvoices.find(x => x.document === i.id))
})
@@ -36,7 +36,7 @@ const itemInfo = ref({
reference: "",
date: null,
dueDate: null,
- paymentType: "",
+ paymentType: "Überweisung",
description: "",
state: "Entwurf",
accounts: [
@@ -315,6 +315,13 @@ setupPage()
+
+
+
+
{
@@ -93,7 +94,14 @@ const createMovement = async () => {
.from("movements")
.insert(movements)
.select()
- if(error) console.log(error)
+ if(error) {
+ console.log(error)
+ } else {
+ resetInput()
+ }
+
+
+
}
@@ -146,6 +154,7 @@ const findSpaceBySpaceNumber = (input) => {
const barcodeInput = ref("")
const showBarcodeTip = ref(true)
+const serialInput = ref("")
const processBarcodeInput = () => {
if(findProductByBarcodeOrEAN(barcodeInput.value) && !findSpaceBySpaceNumber(barcodeInput.value)){
@@ -380,6 +389,29 @@ const processBarcodeInput = () => {
id="quantityInput"
/>
+
+
+
+
+ +
+
+
+
+
+
+
diff --git a/pages/inventory/stocks.vue b/pages/inventory/stocks.vue
new file mode 100644
index 0000000..3777c10
--- /dev/null
+++ b/pages/inventory/stocks.vue
@@ -0,0 +1,152 @@
+
+
+
+
+
+
+
+
+
+ + Artikel
+
+
+
+
+
+
+
+
+ Spalten
+
+
+
+
+ router.push(`/products/show/${i.id}`) "
+ :empty-state="{ icon: 'i-heroicons-circle-stack-20-solid', label: 'Keine Artikel anzuzeigen' }"
+ >
+
+ {{row.name}}
+
+ {{row.name}}
+
+
+
+
+ {{`${dataStore.getStockByProductId(row.id)} ${(dataStore.units.find(unit => unit.id === row.unit) ? dataStore.units.find(unit => unit.id === row.unit).name : "")}`}}
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/pages/products/[mode]/[[id]].vue b/pages/products/[mode]/[[id]].vue
index 0a9dc2a..54f6d17 100644
--- a/pages/products/[mode]/[[id]].vue
+++ b/pages/products/[mode]/[[id]].vue
@@ -128,8 +128,11 @@ setupPage()
- Einkaufspreis: {{Number(itemInfo.purchasePrice).toFixed(2)}} €
+ Hersteller: {{itemInfo.manufacturer}}
+ Herstellernummer: {{itemInfo.manufacturerNumber}}
+ Beschreibung: {{itemInfo.description}}
+ Einkaufspreis: {{Number(itemInfo.purchasePrice).toFixed(2)}} €
-
-
+ -->
diff --git a/pages/spaces/[mode]/[[id]].vue b/pages/spaces/[mode]/[[id]].vue
index 6dbb564..0cef4e8 100644
--- a/pages/spaces/[mode]/[[id]].vue
+++ b/pages/spaces/[mode]/[[id]].vue
@@ -1,6 +1,6 @@
|