Vue.component('warehouse-administration', { //language=Vue template: `
`, data() { return { isLoading: false, window: window, }; }, methods: { async createLocationsForAllEmployees() { this.isLoading = true; const response = await axios.get(window.TT_CONFIG.BASE_URL + '/createLocations'); if (response.data.success) { this.window.notify('success', response.data.message || 'Lagerorte wurden erfolgreich erstellt.'); } else { this.window.notify('error', response.data.message || 'Fehler beim Erstellen der Lagerorte.'); } this.isLoading = false; }, async updateAllSalesPrices() { this.isLoading = true; const response = await axios.get(window.TT_CONFIG.BASE_PATH + '/WarehouseArticle/updatePrices'); if (response.data.success) { this.window.notify('success', 'Verkaufspreise wurden erfolgreich aktualisiert.'); } else { this.window.notify('error', 'Fehler beim Aktualisieren der Verkaufspreise.'); } this.isLoading = false; }, sleep(ms) { return new Promise(resolve => setTimeout(resolve, ms)); } } });