pridana komponenta pre FullScreenLoader,

pozity FullScreenLoader po pridani BugAdd a pri nacitani Dashboard
This commit is contained in:
2025-05-06 08:56:07 +02:00
parent 1eda8f80bf
commit 726a9b0f43
3 changed files with 54 additions and 4 deletions

View File

@ -1,4 +1,6 @@
<template>
<FullScreenLoader v-if="loading" />
<div id="bug-add">
<h1>Pridať nový bug</h1>
@ -103,9 +105,11 @@
<script>
import { backend } from "../backend";
import FullScreenLoader from "../components/FullScreenLoader.vue";
export default {
name: "BugAdd",
components: { FullScreenLoader },
data() {
return {
bugReport: {
@ -116,6 +120,7 @@ export default {
files: [],
},
selectedFiles: [],
loading: false,
};
},
methods: {
@ -140,6 +145,7 @@ export default {
}
},
submitForm() {
this.loading = true;
// Vytvorenie FormData objektu pre odoslanie súborov
const formData = new FormData();
formData.append("title", this.bugReport.title);
@ -168,13 +174,15 @@ export default {
)
.then((result) => {
console.log(result);
this.resetForm();
this.$router.push("/");
})
.catch((error) => {
console.log(error);
})
.finally(() => {
this.loading = false;
});
// this.resetForm();
// this.$router.push("/");
},
resetForm() {
this.bugReport = {

View File

@ -1,4 +1,6 @@
<template>
<FullScreenLoader v-if="loading" />
<div id="dashboard">
<div id="inbox">
<h2>Nezaradené</h2>
@ -138,14 +140,17 @@ function isDragable(element) {
import ReportBox from "../components/ReportBox.vue";
import draggable from "vuedraggable";
import { backend } from "../backend";
import FullScreenLoader from "../components/FullScreenLoader.vue";
export default {
components: {
ReportBox,
draggable,
FullScreenLoader,
},
data() {
return {
loading: false,
itemsUncategorized: [],
itemsWaiting: [],
itemsInProgress: [],
@ -153,12 +158,14 @@ export default {
};
},
methods: {
loadData() {
loadData(use_loader = true) {
if (use_loader) this.loading = true;
backend.getAllGrouped(Array(0, 1, 2, 3)).then((all_grouped) => {
this.itemsUncategorized = all_grouped[0];
this.itemsWaiting = all_grouped[1];
this.itemsInProgress = all_grouped[2];
this.itemsBlocked = all_grouped[3];
if (use_loader) this.loading = false;
});
},
getDataByStatus(report_status) {