Commit 72ded375 authored by TTS Kieu Tuan Anh's avatar TTS Kieu Tuan Anh

remove

parent e6ee12b8
......@@ -352,7 +352,7 @@ export default {
console.log(event)
const file = event.target.files[0]
this.url = URL.createObjectURL(file)
this.image = file;
this.image = file
console.log(file)
console.log(this.image)
},
......@@ -364,7 +364,7 @@ export default {
this.$axios
.delete(`/categories/${ID}`)
.then(response => {
this.categories.splice(this.editedIndex, 1);
this.categories.splice(this.editedIndex, 1)
self.$toast.success('Category deleted successfully!',{
duration: 3000
})
......
......@@ -183,7 +183,7 @@
</v-toolbar>
</template>
<template v-slot:item.actions="{ item }">
<v-icon small class="mr-2" @click=" editUser(item);" :id ="item.id"> mdi-pencil </v-icon>
<v-icon small class="mr-2" @click=" editUser(item)" :id ="item.id"> mdi-pencil </v-icon>
<v-icon small @click="deleteUser(item.id, item)" :id ="item.id"> mdi-delete </v-icon>
</template>
<template v-slot:no-data>
......@@ -250,7 +250,7 @@ export default {
},
computed: {
formTitle() {
return this.editedIndex === -1 ? "New Item" : "Edit Item";
return this.editedIndex === -1 ? "New Item" : "Edit Item"
},
},
watch: {
......@@ -289,14 +289,14 @@ export default {
this.$nextTick(() => {
this.editedItem = Object.assign({}, this.defaultItem)
this.editedIndex = -1
});
})
},
closeDelete() {
this.dialogDelete = false
this.$nextTick(() => {
this.editedItem = Object.assign({}, this.defaultItem)
this.editedIndex = -1
});
})
},
save() {
if (this.editedIndex > -1) {
......@@ -304,15 +304,15 @@ export default {
} else {
this.users.push(this.editedItem)
}
this.close();
this.close()
},
getUsers() {
this.$axios
.get('/users/')
.then((response) => (this.users = response.data.data.data))
.catch(function (error) {
console.log(error);
});
console.log(error)
})
},
createUser() {
const self = this
......@@ -330,7 +330,7 @@ export default {
this.$bvModal.hide('modal-login')
self.$toast.success('User created successfully!',{
duration: 3000
});
})
console.log(response)
this.editedItem = response.data.data
console.log(this.editedItem)
......@@ -343,8 +343,8 @@ export default {
this.message = errors.response.data.message
self.$toast.error('something went wrong while trying create!',{
duration: 3000
});
});
})
})
},
deleteUser(userID, index) {
const self = this
......@@ -387,7 +387,7 @@ export default {
.then(response => {
self.$toast.success('User updated successfully!',{
duration: 3000
});
})
console.log(response)
this.editedItem = response.data.data
this.$bvModal.hide('modal-edit')
......
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