Vue.component('warehouse-history-modal', { //language=Vue template: ` `, 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 } } }) Vue.component('tt-expandable-shopping-cart', { props: { cartItems: Array, }, data() { return { isExpanded: false, }; }, methods: { }, template: `

Einkaufswagen

Der Einkaufswagen ist leer.

` }); //TODO: put this in its own file //TODO: also for tt-crud or vuehelper create a check for utility folder and include all js files in there to allow adding custom components that are not part of the core //TODO: also add a component for a switch like this as we will need it more often either with value or doing redirect on click Vue.component('warehouse-administration-switch', { //language=Vue template: `
`, props: ['value'], data() { return { isOverflowing: false, showDropdown: false, window: window, }; }, mounted() { this.checkOverflow(); window.addEventListener('resize', this.checkOverflow); }, beforeDestroy() { window.removeEventListener('resize', this.checkOverflow); }, methods: { checkOverflow() { this.isOverflowing = window.innerWidth < 650 }, }, })