Add complate
This commit is contained in:
@@ -50,6 +50,12 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="hasPermission('apply')" class="d-flex mt-3" style="align-items: center">
|
||||
<h5>پیگیری شده :</h5>
|
||||
<el-checkbox v-model="complete" class="p-2"></el-checkbox>
|
||||
</div>
|
||||
<el-button v-if="hasPermission('apply')" class="p-2" type="primary" @click="applyComplaint">تایید</el-button>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -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')
|
||||
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
@@ -52,6 +52,12 @@
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="پیگیری شکایت" width="">
|
||||
<template slot-scope="scope">
|
||||
<span class="singleLineTxt" :title="scope.row.email"> {{ scope.row.complete ? "پیگیری شده" : "پیگیری نشده" }} </span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="نمایش" width="110" align="center">
|
||||
<template slot-scope="scope">
|
||||
<CButton
|
||||
|
||||
Reference in New Issue
Block a user