<div id="mainTwo" v-cloak>
	<div class="animated fadeIn">
		<div class="col s12 card-panel white" style="margin-top: 75px;">
			<h4 id="CRMtitle">CRM</h4>

			<!--Tabla de registros-->
			<br>
			<table-dialvox
				:headers="headers"
				:data="registros"
				:options="options"
				:loading="loading"
				@delete="del($event)"
				@edit="edit($event)"
				@fields="fields($event)"
				@categories="categories($event)"
				@search="texto = $event"
			></table-dialvox>
			<br>
			<pagination-dialvox
				v-model="pagina"
				:count="cuenta"
			></pagination-dialvox>
			<br>
			<?php if ($_SESSION["Grupo"] == GRUPO_ADMINS) {?>
				<div class="center" id="botonCrear">
					<a class="waves-effect waves-light btn blue lighten-2 " href="#" @click.prevent="toggle('add')">{{traducirFrase("Nuevo CRM")}}</a>
				</div>
			<?php }?>
		</div>
	</div>
	<?php require_once "modals" . DIRECTORY_SEPARATOR . "add.php";?>
	<?php require_once "modals" . DIRECTORY_SEPARATOR . "edit.php";?>
	<?php require_once "modals" . DIRECTORY_SEPARATOR . "fields.php";?>
	<?php require_once "modals" . DIRECTORY_SEPARATOR . "categories.php";?>
</div>
<!-- END MAIN -->
<!-- ================================================
    Scripts
    ================================================ -->
<?php require_once "script.php";?>