This commit is contained in:
Swift
2024-02-02 12:35:35 +03:30
parent 980763fd6e
commit b14c480f17
7 changed files with 211 additions and 8 deletions
+4 -4
View File
@@ -85,10 +85,10 @@
:key="index + Math.random() + 2"
class="ml-2 mb-2"
style="cursor: pointer"
:type="hasPermission(item.value) ? 'success' : 'primary'"
:type="hasPermission(item?.value) ? 'success' : 'primary'"
disable-transitions
@click="addPermission(item.value)"
>{{ item.name }}
@click="addPermission(item?.value)"
>{{ item.name || item.value }}
</el-tag>
</div>
</CCardBody>
@@ -223,7 +223,7 @@ export default {
})
},
getPermissionName(value) {
return this.permissions.filter(item => item.value === value)[0].name
return this.permissions.filter(item => item.value === value)[0]?.name || value
},
addPermission(val) {
if (!this.admin.permissions.includes(val)) this.admin.permissions.push(val)
+57
View File
@@ -0,0 +1,57 @@
<template>
<div>
</div>
</template>
<script>
export default {
name: 'AdminComplaintDetails',
layout: 'admin',
async asyncData({ $axios, params, query, error }) {
},
data() {
return {
}
},
computed: {
},
methods: {
}
}
</script>
<style lang="scss">
.progressBar {
.el-progress-bar__inner {
left: auto;
right: 0;
text-align: left;
}
}
.btn-upload {
background-color: cornflowerblue;
padding: .5rem 1rem;
border-radius: .5rem;
cursor: pointer;
color: white;
float: left;
}
.space {
margin: 5rem;
}
</style>
+90
View File
@@ -0,0 +1,90 @@
<template>
<div>
<CustomSubHeader>
<CBreadcrumb class="border-0 mb-0"> شکایات </CBreadcrumb>
</CustomSubHeader>
<CCard>
<CCardHeader>
<slot name="header">
<CIcon name="cil-grid" />
شکایات
</slot>
</CCardHeader>
<CCardBody>
<el-table :data="filteredByType" style="width: 100%">
<el-table-column type="index" label="#"> </el-table-column>
<el-table-column prop="caption" label="کد ملی" width="">
<template slot-scope="scope">
<span class="singleLineTxt" :title="scope.row.national"> {{ scope.row.national }} </span>
</template>
</el-table-column>
<el-table-column prop="caption" label="متن" width="">
<template slot-scope="scope">
<span class="singleLineTxt" :title="scope.row.caption"> {{ scope.row.caption }} </span>
</template>
</el-table-column>
<el-table-column prop="caption" label="تاریخ ایجاد" width="">
<template slot-scope="scope">
<span> {{ $jDate(scope.row.created_at) }} </span>
</template>
</el-table-column>
<el-table-column prop="caption" label="شماره تماس" width="">
<template slot-scope="scope">
<span class="singleLineTxt" :title="scope.row.phoneNumber"> {{ scope.row.phoneNumber }} </span>
</template>
</el-table-column>
<el-table-column prop="caption" label="ایمیل" width="">
<template slot-scope="scope">
<span class="singleLineTxt" :title="scope.row.email"> {{ scope.row.email }} </span>
</template>
</el-table-column>
<el-table-column label="ویرایش" width="110" align="center">
<template slot-scope="scope">
<CButton
:key="scope.row._id + type"
color="success"
variant="outline"
:to="{ name: 'admin-complaint-details', params: { item: scope.row._id } }"
>
<i class="fal fa-eye"></i>
</CButton>
</template>
</el-table-column>
</el-table>
</CCardBody>
</CCard>
</div>
</template>
<script>
export default {
name: 'AdminComplaintsList',
layout: 'admin',
async asyncData({ $axios, error }) {
},
data() {
return {
}
},
computed: {
},
methods: {
}
}
</script>