diff --git a/public/js/pages/WarehouseShippingNote/WarehouseShippingNote.css b/public/js/pages/WarehouseShippingNote/WarehouseShippingNote.css index 3c020b08c..73d5f00b0 100644 --- a/public/js/pages/WarehouseShippingNote/WarehouseShippingNote.css +++ b/public/js/pages/WarehouseShippingNote/WarehouseShippingNote.css @@ -184,3 +184,8 @@ input:checked + .ios-switch-slider:before { input:disabled + .ios-switch-slider { cursor: not-allowed; } + +.see-through-test-modal .modal { + position: unset !important; + background: unset !important; +} \ No newline at end of file diff --git a/public/js/pages/WarehouseShippingNote/WarehouseShippingNote.js b/public/js/pages/WarehouseShippingNote/WarehouseShippingNote.js index dcdd9fa3e..06a5c1cb9 100644 --- a/public/js/pages/WarehouseShippingNote/WarehouseShippingNote.js +++ b/public/js/pages/WarehouseShippingNote/WarehouseShippingNote.js @@ -252,11 +252,124 @@ Vue.component('warehouse-shipping-note-logs', { } }) +Vue.component('warehouse-shipping-note-see-through', { + props: ['wantedState'], + //language=Vue + template: ` + + `, + data() { + return { + currentPage: 1, + perPage: 1, + rows: [], + activeTab: 'Editieren', + window: window + } + }, + computed: { + currentRow() { + return this.rows[0]; + } + }, + methods: { + tabStyle(tab) { + return { + padding: '10px 20px', + cursor: 'pointer', + backgroundColor: this.activeTab === tab ? '#005384' : '#f7c423', + color: 'white', + border: 'none', + borderRadius: '5px', + marginRight: '10px' + }; + }, + previousNote() { + if (this.currentPage > 1) { + this.currentPage--; + this.fetchData(); + } + }, + nextNote() { + if (this.currentPage) { + this.currentPage++; + this.fetchData(); + } + }, + async changeStatus(action, row) { + this.$emit('status_to_' + action, row); + await new Promise(resolve => setTimeout(resolve, 50)); + await this.fetchData(); + }, + async fetchData() { + this.loading = true; + this.rows = []; + const response = await axios.post(window.TT_CONFIG.BASE_PATH + '/WarehouseShippingNote/get', { + pagination: {page: this.currentPage, per_page: this.perPage}, + filters: {status: this.wantedState}, + }) + + this.rows = response.data.rows; + + this.loading = false; + } + }, + mounted() { + this.fetchData(); + } +}); + // noinspection JSUnusedLocalSymbols Vue.component('warehouse-shipping-note', { //language=Vue template: ` + @@ -266,6 +379,17 @@ Vue.component('warehouse-shipping-note', { +