Feature/warehouse
This commit is contained in:
@@ -0,0 +1,45 @@
|
||||
Vue.component('warehouse-history-modal', {
|
||||
//language=Vue
|
||||
template: `
|
||||
<tt-modal :show.sync="showModal" title="History" :delete="false" :save="false"
|
||||
@close="$emit('update:show', false)"
|
||||
>
|
||||
<tt-table
|
||||
v-if="showModal"
|
||||
:fetch-url="window['TT_CONFIG']['BASE_URL'] + '/getHistory?id=' + id"
|
||||
:config="WarehouseHistoryTableConfig" small>
|
||||
|
||||
<template v-slot:create="{ row }">
|
||||
{{ window.moment(row.create * 1000).format('DD.MM.YYYY HH:mm:ss') }}
|
||||
</template>
|
||||
|
||||
</tt-table>
|
||||
</tt-modal>
|
||||
`,
|
||||
props: {
|
||||
show: { type: Boolean, default: false },
|
||||
id: { type: Number, default: null },
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
window: window,
|
||||
showModal: false,
|
||||
WarehouseHistoryTableConfig: {
|
||||
key: 'WarehouseHistory',
|
||||
tableHeader: 'Lager Historie',
|
||||
headers: [
|
||||
{text: "Zeit", key: "create", filter: false, sortable: false},
|
||||
{text: "Feld", key: "columnHeader", filter: false, sortable: false},
|
||||
{text: "Alter Wert", key: "old_value", filter: false, sortable: false},
|
||||
{text: "Neuer Wert", key: "new_value", filter: false, sortable: false},
|
||||
{text: "Geändert von", key: "user_name", filter: false, sortable: false},
|
||||
],
|
||||
}
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
show(newVal) {
|
||||
this.showModal = newVal
|
||||
}
|
||||
}
|
||||
})
|
||||
Reference in New Issue
Block a user