Added HistoryDisplay to IncomingInvoices
This commit is contained in:
@@ -30,6 +30,10 @@ const historyItems = computed(() => {
|
|||||||
items = dataStore.historyItems.filter(i => i.project === elementId)
|
items = dataStore.historyItems.filter(i => i.project === elementId)
|
||||||
} else if(type === "plant") {
|
} else if(type === "plant") {
|
||||||
items = dataStore.historyItems.filter(i => i.plant === elementId)
|
items = dataStore.historyItems.filter(i => i.plant === elementId)
|
||||||
|
} else if(type === "incomingInvoice") {
|
||||||
|
items = dataStore.historyItems.filter(i => i.incomingInvoice === elementId)
|
||||||
|
} else if(type === "document") {
|
||||||
|
items = dataStore.historyItems.filter(i => i.document === elementId)
|
||||||
}
|
}
|
||||||
|
|
||||||
return items.reverse()
|
return items.reverse()
|
||||||
@@ -51,6 +55,10 @@ const addHistoryItem = async () => {
|
|||||||
addHistoryItemData.value.project = elementId
|
addHistoryItemData.value.project = elementId
|
||||||
} else if(type === "plant") {
|
} else if(type === "plant") {
|
||||||
addHistoryItemData.value.plant = elementId
|
addHistoryItemData.value.plant = elementId
|
||||||
|
} else if(type === "incomingInvoice") {
|
||||||
|
addHistoryItemData.value.incomingInvoice = elementId
|
||||||
|
} else if(type === "document") {
|
||||||
|
addHistoryItemData.value.document = elementId
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
<script setup>
|
<script setup>
|
||||||
import InputGroup from "~/components/InputGroup.vue";
|
import InputGroup from "~/components/InputGroup.vue";
|
||||||
import dayjs from "dayjs";
|
import dayjs from "dayjs";
|
||||||
|
import HistoryDisplay from "~/components/HistoryDisplay.vue";
|
||||||
|
|
||||||
const dataStore = useDataStore()
|
const dataStore = useDataStore()
|
||||||
const supabase = useSupabaseClient()
|
const supabase = useSupabaseClient()
|
||||||
@@ -371,12 +372,18 @@ setupPage()
|
|||||||
>
|
>
|
||||||
Position entfernen
|
Position entfernen
|
||||||
</UButton>
|
</UButton>
|
||||||
|
<HistoryDisplay
|
||||||
|
type="incomingInvoice"
|
||||||
|
v-if="currentVendorInvoice"
|
||||||
|
:element-id="currentVendorInvoice.id"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
|
|||||||
Reference in New Issue
Block a user