Commit 05ade267 authored by TTS Kieu Tuan Anh's avatar TTS Kieu Tuan Anh

add create category instant

parent feefefc1
......@@ -335,6 +335,9 @@ export default {
self.$toast.success('Category created successfully!', {
duration: 3000
})
this.editedItem = response.data.data
console.log(this.editedItem)
this.categories.push(this.editedItem)
})
.catch(errors => {
this.$bvModal.hide('modal-create')
......@@ -354,6 +357,7 @@ export default {
console.log(this.image)
},
deleteCategory(ID,index) {
const self = this
this.editedIndex = this.categories.indexOf(index);
if(confirm("Do you really want to delete?")){
try{
......
......@@ -382,7 +382,6 @@ export default {
try{
axios
.put(`http://127.0.0.1:8000/api/users/${this?.eID}`,{
email: this.eEmail,
password: this.ePassword,
name:this.eName,} )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment