<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>
