Feature/add warehouse e shop order items

This commit is contained in:
Luca Haid
2024-07-31 10:26:10 +00:00
parent e42ce449e3
commit e2288ba6cd
4 changed files with 54 additions and 2 deletions
@@ -1,3 +1,4 @@
// noinspection JSUnusedLocalSymbols
Vue.component('warehouse-e-shop-order', {
//language=Vue
template: `
@@ -5,7 +6,17 @@ Vue.component('warehouse-e-shop-order', {
<tt-table-crud @openHistory="historyModal = true; historyModalId = $event.id">
<template v-slot:create="{ row }">
{{ new Date(row.create * 1000).toLocaleDateString() }}
{{ window.moment(row.create * 1000).format('DD.MM.YYYY HH:mm:ss') }}
</template>
<template v-slot:expandedRow="{ row }">
<div>
<ul class="list-group" v-if="articleItems && articleItems[row.id]">
<li class="list-group-item" v-for="item in articleItems[row.id]">
Menge: {{ item.quantity }} | {{ item.articlePacketTitle || item.articleTitle }}
</li>
</ul>
</div>
</template>
</tt-table-crud>
@@ -13,7 +24,13 @@ Vue.component('warehouse-e-shop-order', {
</tt-card>
`, data() {
return {
window: window, historyModal: false, historyModalId: null,
window: window, historyModal: false, historyModalId: null, articleItems: null
}
},
async mounted() {
const response = await axios.get(`${window['TT_CONFIG']['BASE_PATH']}/WarehouseEShopOrder/getAllItemsPerOrder`);
console.log(response.data);
this.articleItems = response.data;
}
})