diff --git a/pages/admin/complaint/_item.vue b/pages/admin/complaint/_item.vue
index 47fd71f..b05b21d 100644
--- a/pages/admin/complaint/_item.vue
+++ b/pages/admin/complaint/_item.vue
@@ -50,6 +50,12 @@
+
+
پیگیری شده :
+
+
+ تایید
+
@@ -64,7 +70,9 @@ export default {
async asyncData({ $axios, params, query, error }) {},
data() {
return {
- complaint: null
+ complaint: null,
+ complete:false
+
}
},
@@ -72,9 +80,23 @@ export default {
beforeMount() {
this.$axios.get(`/api/admin/complaint/${this.$route.params.item}`).then(res => {
this.complaint = res.data
+ this.complete = res.data.complete
})
},
- methods: {}
+ methods: {
+ hasPermission(permission) {
+ if (this.$auth.loggedIn) return this.$auth.user.permissions.includes(permission)
+ else return false
+ },
+ applyComplaint(){
+ this.$axios.put(`/api/admin/complaint/${this.$route.params.item}`,{ complete: this.complete }).then(res => {
+ this.complaint = res.data
+ this.complete = res.data.complete
+ this.$router.push('/admin/complaint')
+
+ })
+ }
+ }
}
diff --git a/pages/admin/complaint/index.vue b/pages/admin/complaint/index.vue
index 40c545e..7bfc328 100644
--- a/pages/admin/complaint/index.vue
+++ b/pages/admin/complaint/index.vue
@@ -52,6 +52,12 @@
+
+
+ {{ scope.row.complete ? "پیگیری شده" : "پیگیری نشده" }}
+
+
+