<template>
    
     <modal
    name="show-crm-selfsignup"
    :scrollable="true"
    width="600px"
    height="auto"
    :draggable="true"
    :resizable="true"
    :header-bg-variant="null"
  >
    <b-row class="d-flex justify-content-between mb-2 mt-1">
      <b-col class="d-flex modal-text-color ml-2" cols="8">
        <div class="d-flex align-self-center justify-content-center rounded-div mr-2 mt-1">
          <font-awesome-icon icon="clock" class="align-self-center" />
        </div>
        <div class="pt-1">
          <div class="inline-block akkurat-regular min-header-text"></div>
          <div class="akkurat-bold max-header-text">Registros de CRM</div>
        </div>
      </b-col>
      <b-col class="d-flex justify-content-end mr-2 mt-1">
        <span class="close-icon" @click="closeModal">
          <font-awesome-icon icon="times" class="align-self-center" />
        </span>
      </b-col>
    </b-row>

    <div class="custom-body">
      <b-row>

        <b-col md='12'>

<table class="table">
        <thead>
          <tr class="text-center">
            <th>
              Usuário
            </th>
            <th>
              Motivo
            </th>
            <th>
              Descrição
            </th>
            <th>
              Data
            </th>
          </tr>
        </thead>

        <tbody>

<tr v-for=" status in  crm" :key='status.id'>
  <td>{{status.user.name}}</td>
  <td>{{status.motive}}</td>
  <td>{{status.description}}</td>
  <td>{{status.created_at | formatDateTimeDDMMAAAA}}</td>
</tr>

        </tbody>

</table>

        </b-col>
      </b-row>

<b-row>
        <b-col class="text-center" md="12">

<p>
          <b-button class="btn shadow-none border-0 btn-default" @click="closeModal">Fechar</b-button>

</p>

        
        </b-col>
      </b-row>


    </div>

     </modal>

</template>

<script>
export default {
    name: 'show-crm-selfsignup',
    props:{
        crm:{
            type: Array,
            default: () => { return []}
        }
    },
    methods:{
closeModal(){
    this.$modal.hide('show-crm-selfsignup');
}
    }
}
</script>
