Added HistoryDisplay.vue to Projects and Plants

Visual Restructure in Plants
This commit is contained in:
2024-01-12 18:38:26 +01:00
parent 291b0350e8
commit 05130052af
5 changed files with 81 additions and 29 deletions

View File

@@ -23,9 +23,13 @@ const historyItems = computed(() => {
let items = []
if(type === "customer") {
items = dataStore.getHistoryItemsByCustomer(elementId)
items = dataStore.historyItems.filter(i => i.customer === elementId)
} else if(type === "vendor") {
items = dataStore.getHistoryItemsByVendor(elementId)
items = dataStore.historyItems.filter(i => i.vendor === elementId)
} else if(type === "project") {
items = dataStore.historyItems.filter(i => i.project === elementId)
} else if(type === "plant") {
items = dataStore.historyItems.filter(i => i.plant === elementId)
}
return items.reverse()
@@ -41,6 +45,12 @@ const addHistoryItem = async () => {
if(type === "customer") {
addHistoryItemData.value.customer = elementId
} else if(type === "vendor") {
addHistoryItemData.value.vendor = elementId
} else if(type === "project") {
addHistoryItemData.value.project = elementId
} else if(type === "plant") {
addHistoryItemData.value.plant = elementId
}