Added Checks
Added Documents to Inventoryitems and Checks
This commit is contained in:
@@ -161,6 +161,12 @@ export const useDataStore = defineStore('data', () => {
|
||||
labelSingle: "Projekttyp",
|
||||
redirect: true,
|
||||
historyItemHolder: "projecttype"
|
||||
},
|
||||
checks: {
|
||||
label: "Überprüfungen",
|
||||
labelSingle: "Überprüfung",
|
||||
redirect: true,
|
||||
historyItemHolder: "check"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -868,7 +874,7 @@ export const useDataStore = defineStore('data', () => {
|
||||
//console.log(supabaseData)
|
||||
await generateHistoryItems(dataType, supabaseData[0])
|
||||
|
||||
if(!["statementallocations", "productcategories", "projecttypes"].includes(dataType) ){
|
||||
if(!["statementallocations", "productcategories", "projecttypes", "checks"].includes(dataType) ){
|
||||
await eval( dataType + '.value.push(' + JSON.stringify(...supabaseData) + ')')
|
||||
}
|
||||
|
||||
@@ -1235,6 +1241,10 @@ export const useDataStore = defineStore('data', () => {
|
||||
return documents.value.filter(item => item.profile === profileId && !item.tags.includes("Archiviert"))
|
||||
})
|
||||
|
||||
const getDocumentsByInventoryItemId = computed(() => (itemId) => {
|
||||
return documents.value.filter(item => item.inventoryitem === itemId && !item.tags.includes("Archiviert"))
|
||||
})
|
||||
|
||||
const getDocumentsByPlantId = computed(() => (itemId) => {
|
||||
return documents.value.filter(item => item.plant === itemId && !item.tags.includes("Archiviert"))
|
||||
})
|
||||
@@ -1243,6 +1253,10 @@ export const useDataStore = defineStore('data', () => {
|
||||
return documents.value.filter(item => item.contract === itemId && !item.tags.includes("Archiviert"))
|
||||
})
|
||||
|
||||
const getDocumentsByCheckId = computed(() => (itemId) => {
|
||||
return documents.value.filter(item => item.check === itemId && !item.tags.includes("Archiviert"))
|
||||
})
|
||||
|
||||
const getDocumentsByVehicleId = computed(() => (itemId) => {
|
||||
return documents.value.filter(item => item.vehicle === itemId && !item.tags.includes("Archiviert"))
|
||||
})
|
||||
@@ -1780,8 +1794,10 @@ export const useDataStore = defineStore('data', () => {
|
||||
getContactsByVendorId,
|
||||
getDocumentsByProjectId,
|
||||
getDocumentsByProfileId,
|
||||
getDocumentsByInventoryItemId,
|
||||
getDocumentsByPlantId,
|
||||
getDocumentsByContractId,
|
||||
getDocumentsByCheckId,
|
||||
getDocumentsByVehicleId,
|
||||
getDocumentsByProductId,
|
||||
getDocumentsByVendorId,
|
||||
|
||||
Reference in New Issue
Block a user