<template>
  <div class="approval-box tbl-wrap tbl2">
    <table class="tbl data">
      <tbody>
        <tr class="thead">
          <td rowspan="2" class="th">승인자</td>
          <td v-for="(item, idx) of sanctns" :key="idx">{{ item.clsfNm }}</td>
        </tr>
        <tr>
          <td v-for="(item, idx) of sanctns" :key="idx">
            <template v-if="item.confmAt === 'A'">
              <p v-if="item.sanctnSe === 'sanctn_agncy'">(대결)</p>
              <p class="name">{{ item.confmerNm }}</p>
              <small class="date">{{ new Date(item.sanctnDe).toISOString().split('T')[0] }}</small>
            </template>
            <template v-else-if="item.confmAt === 'R'">
              <p class="name">반려</p>
            </template>
          </td>
        </tr>
      </tbody>
    </table>
  </div>
</template>
<script>
export default {
  props: {
    sanctns: {
      type: Array,
      default: () => [],
    }
  },
}
</script>