Commit bc2d5e91 authored by TTS Kieu Tuan Anh's avatar TTS Kieu Tuan Anh

add update category instant

parent 05ade267
...@@ -234,7 +234,7 @@ export default { ...@@ -234,7 +234,7 @@ export default {
name: "", name: "",
id: "", id: "",
ordering: "", ordering: "",
status: "", parent_id: "",
created_at: "", created_at: "",
updated_at: "", updated_at: "",
}, },
...@@ -383,7 +383,8 @@ export default { ...@@ -383,7 +383,8 @@ export default {
this.eName= item.name, this.eName= item.name,
this.eOrdering= item.ordering, this.eOrdering= item.ordering,
this.eParentId= item.parent_id, this.eParentId= item.parent_id,
this.eImage= item.images, this.eImage= item.images,
this.editedIndex = this.categories.indexOf(item),
console.log(this?.eID); console.log(this?.eID);
console.log(item); console.log(item);
}, },
...@@ -410,7 +411,10 @@ export default { ...@@ -410,7 +411,10 @@ export default {
self.$toast.success('User updated successfully!',{ self.$toast.success('User updated successfully!',{
duration: 3000 duration: 3000
}); });
console.log(response); console.log(response)
this.editedItem = response.data.data
this.$bvModal.hide('modal-edit')
Object.assign(this.categories[this.editedIndex], this.editedItem)
}) })
} catch(error){ } catch(error){
console.log(error) console.log(error)
......
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