Added HistoryDisplay.vue to Projects and Plants
Visual Restructure in Plants
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user