@extends('layouts.app')

@section('title',"Entidades")

@section('content')

@if (session('create_entidad'))
    <div class="alert alert-success">
        {{ session('create_entidad') }}
    </div>
@endif
<div class="card">
	<div class="card-header header-elements-inline">
		<h5 class="card-title"><i class="icon-clipboard "></i> Registros Entidad</h5>
		<div class="header-elements">
			<div class="list-icons">
        		<a class="list-icons-item" data-action="collapse"></a>
        		<a class="list-icons-item" data-action="reload"></a>
        		<a class="list-icons-item" data-action="remove"></a>
        	</div>
    	</div>
	</div>	
	<div class="card-body mt-2">
		<div class="row">
			@include('layouts.buttons.button-create',['buttons'=> array(
	                array(
	                  'modal'=>'no',
	                  'url'=>url('entidad/create'),
	                  'class'=>" btn btn-primary",
	                  'icon'=>"icon-database-add",
	                  'text' => "Agregar Entidad"
	                )
            )])	
		</div>
	</div>
	<table class="table table-bordered table-hover datatable  ">
		<thead>
			<tr>
				<th>Codigo</th>
				<th>Tipo de documento</th>
				<th>Ruc</th>
				<th>Nombre o Razon social</th>
				<th>Acciones</th>
			</tr>
		</thead>
	</table>
</div>
	@section('scripts')
	<script>
		var url = 'entidad';
		var columns = [
                {data: 'id'},
                {data: 'identidad_document'},
                {data: 'numero'},
                {data: 'nombre1'},
                {data: 'action' , orderable: false, searchable: false},
            ];</script>
	<script src="{!! asset('assets/datatables/datatables_basic.js') !!}"></script>
	@endsection
@endsection