- Add Error Msg
This commit is contained in:
parent
010d7b2e34
commit
7c22db073a
2 changed files with 11 additions and 2 deletions
2
public/js/app.js
vendored
2
public/js/app.js
vendored
File diff suppressed because one or more lines are too long
|
|
@ -12,6 +12,7 @@
|
|||
</div>
|
||||
<div class="card-body FoldersPage">
|
||||
<div v-show="alertVisible" class="alert alert-success" role="alert">{{alertMsg}}</div>
|
||||
<div v-show="alertErrorVisible" class="alert alert-danger" role="alert">{{alertMsg}}</div>
|
||||
<VueNestable v-model="nestableItems" @change="changeOrder" :hooks="{'beforeMove': beforeMove}">
|
||||
<VueNestableHandle slot-scope="{ item }" :item="item">
|
||||
<span>
|
||||
|
|
@ -133,6 +134,7 @@
|
|||
folderId: "",
|
||||
alertMsg: '',
|
||||
alertVisible: false,
|
||||
alertErrorVisible: false,
|
||||
staticFolders: []
|
||||
}
|
||||
},
|
||||
|
|
@ -200,7 +202,7 @@
|
|||
},
|
||||
addFolder() {
|
||||
if (this.newFolderFR.length < 1){
|
||||
this.showAlert("Nom du dossier vide.");
|
||||
this.showAlertError("Nom du dossier vide.");
|
||||
return;
|
||||
}
|
||||
this.done = false;
|
||||
|
|
@ -317,6 +319,13 @@
|
|||
setTimeout(() => {
|
||||
this.alertVisible = false;
|
||||
}, 1800);
|
||||
},
|
||||
showAlertError(msg) {
|
||||
this.alertMsg = msg;
|
||||
this.alertErrorVisible = true;
|
||||
setTimeout(() => {
|
||||
this.alertErrorVisible = false;
|
||||
}, 1800);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue