<template>
    <v-data-table
        :disabled="loading"
        height="300px"
        min-height="300px"
        max-height="300px"
        width="100%"
        max-width="100%"
        dense
        :headers="headers"
        :items="result"
        :items-per-page="100"
        no-data-text="검수 이력이 없습니다."
        :sort-by="['counter']" 
        :sort-desc="[true]"
        class="elevation-0 mt-6 overflow-x-hidden overflow-y-auto"
        hide-default-footer
    >
        <template v-slot:[`item.total`]="{ item }">
            {{item.total}}
        </template>
        <template v-slot:[`item.state`]="{ item  }">
            <v-chip
                :color="item.result ===  0 ? 'error' : 'success'"  
                small
                dark
            >
                {{ item.result ===  0 ?  '실패' :'성공'  }}
            </v-chip>
        </template>
        <template v-slot:[`item.time`]="{ item  }">
            {{item.time.toFixed(2)}}
        </template>
    </v-data-table>    
</template>

<script>
export default {
    data () {
      return {
        loading: true,
        headers: [
            { text: '횟수', align: 'start', sortable: false, value: 'total',},
            { text: '검수 결과', align: 'center', value: 'state' },
        ],
      }
    },

    props: {
        step:Number,
        project:Object,
        result:Array
    },

}
</script>

<style>

</style>