diff --git a/pages/admin/complaint/_item.vue b/pages/admin/complaint/_item.vue index ec7d672..3b39381 100644 --- a/pages/admin/complaint/_item.vue +++ b/pages/admin/complaint/_item.vue @@ -1,35 +1,74 @@ @@ -44,8 +83,8 @@ export default { .btn-upload { background-color: cornflowerblue; - padding: .5rem 1rem; - border-radius: .5rem; + padding: 0.5rem 1rem; + border-radius: 0.5rem; cursor: pointer; color: white; float: left; @@ -54,4 +93,8 @@ export default { .space { margin: 5rem; } +.ui-box { + background-color: white; + border-radius: 10px; +} diff --git a/pages/admin/complaint/index.vue b/pages/admin/complaint/index.vue index 275ee0a..ed25d28 100644 --- a/pages/admin/complaint/index.vue +++ b/pages/admin/complaint/index.vue @@ -13,35 +13,40 @@ - + - + + + + + - + - + - + - + @@ -53,7 +58,7 @@ :key="scope.row._id + type" color="success" variant="outline" - :to="{ name: 'admin-complaint-details', params: { item: scope.row._id } }" + :to="{ name: 'admin-complaint-item', params: { item: scope.row._id } }" > @@ -70,21 +75,38 @@ export default { name: 'AdminComplaintsList', layout: 'admin', async asyncData({ $axios, error }) { - - + }, data() { return { - + complaint:null } }, computed: { + }, + mounted(){ + + this.$axios.get('/api/admin/complaint').then(res=>{ + this.complaint = res.data + console.log(res.data) + + }).catch(err=>{ + console.log(err) + }) + + }, methods: { + + + + } -} + + } + diff --git a/pages/complaint/index.vue b/pages/complaint/index.vue index 3bd391c..6780ca5 100644 --- a/pages/complaint/index.vue +++ b/pages/complaint/index.vue @@ -154,33 +154,33 @@
- +
- +
- +
- +
- +
- +
- +
انتخاب نحوه پاسخ دهی:
{ + this.waiting = false + + + this.$message({ + type: 'success', + message: "با موفقیت ثبت شد" + }) + + this.form = { + fullName: '', + national: '', + phoneNumber: '', + deviceNumber: '', + email: '', + receptionCode: '', + caption: '', + callType: true, + } + }).catch(error => { + + + if (error.response.status === 422) { + this.validation = error.response.data.validation + this.hasValidationError = true + this.waiting = false + } else + this.$message({ + type: 'error', + message: error.response.data.message + }) + }) + + } } }