<div class="card" id="appTipoDocumentos" v-cloak>
    <div class="card-header">
        <div class="card-head-row">
            <div class="card-title">Listado de Tipos de Documentos</div>
            <div class="card-tools">
                <a href="#" class="btn btn-light" style="box-shadow: 2px 6px 15px 0px #ddd;" @click.prevent="modalGuardar">
                    <span class="btn-label">
                        <i class="fa fa-plus"></i>
                    </span>
                    Agregar
                </a>
            </div>
        </div>
    </div>
    <div class="card-body">
        <div class="table-responsive">
            <table class="table table-striped table-hover table-sm" id="tabla_impuestos">
                <thead>
                    <tr class="border-0">
                        <th>Código</th>
                        <th>Descripción</th>
                        <th class="text-center">Predeterminado</th>
                        <th class="text-center">Acciones</th>
                    </tr>
                </thead>
                <tbody>
                    <tr v-for="row in tipoDocumentos">
                        <td>{{ row.tipodoc_codigo }}</td>
                        <td>{{ row.tipodoc_descripcion }}</td>
                        <td class="text-center">
                            <a href="#" title="Modificar estatus" @click.prevent="modificarEstatus(row.tipodoc_id, 'estatus'+row.tipodoc_id)">
                                <span :id="'estatus'+row.tipodoc_id" v-if="row.tipodoc_predeterminado == 1">SI</span>
                                <span :id="'estatus'+row.tipodoc_id" v-else>NO</span>
                            </a>
                        </td>
                        <td class="text-center">
                            <div class="form-button-action">
                                <button type="button" title="Editar" class="btn btn-link btn-primary" @click="ver(row.tipodoc_id, row.tipodoc_codigo, row.tipodoc_descripcion, row.tipodoc_predeterminado)">
                                    <i class="fa fa-edit"></i>
                                </button>
                                <button type="button" title="Eliminar" class="btn btn-link text-dark" @click="eliminar(row.tipodoc_id, row.tipodoc_codigo)">
                                    <i class="fa fa-trash"></i>
                                </button>
                            </div>
                        </td>
                    </tr>
                </tbody>
            </table>
        </div>
    </div>
    <?php include 'modaleditarguardar.php'; ?>
</div>
<script src="<?= ruta_base() ?>public/assetsvuejs/tipodocumentos/tipodocumentos.js"></script>
