diff --git a/socialdragon/assets/js/app.js b/socialdragon/assets/js/app.js index bf1073c..f5240c7 100644 --- a/socialdragon/assets/js/app.js +++ b/socialdragon/assets/js/app.js @@ -26,6 +26,10 @@ var app = new Vue({ req.open("POST", "/admin/approve/" + id); req.send(); this.showModal = false; + var index = this.items.indexOf(this.currentItem); + if (index > -1) { + this.items.splice(index, 1); + } }, rejectItem: function (id) { var req = new XMLHttpRequest(); @@ -35,6 +39,10 @@ var app = new Vue({ req.open("POST", "/admin/reject/" + id); req.send(); this.showModal = false; + var index = this.items.indexOf(this.currentItem); + if (index > -1) { + this.items.splice(index, 1); + } } } })