@extends('layouts.app')

@section('title',"Motivos")

@section('content')
@if (session('create'))
    <div class="alert alert-success">
        {{ session('create') }}
    </div>
@endif
<div class="card">
	<div class="card-header header-elements-inline">
		<h5 class="card-title"><i class="icon-clipboard "></i> Motivos </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">
		<div class="row">
			<div class="col-12">			
				@include('layouts.buttons.button-create',['buttons'=> array(
	                array(
	                  'modal'=>'si',
	                  'url'=>'#',
	                  'class'=>" btn btn-primary",
	                  'icon'=>"icon-database-add",
	                  'text' => "Crear motivo"
	                )
            	)])	
			</div>
		</div>
	</div>
	<table class="table table-bordered table-hover datatable">
		<thead>
			<tr>
				<th>id</th>
				<th>Motivo </th>
				<th>Accion</th>
			</tr>
		</thead>
	</table>
</div>
@include('Visitas.views.add.motivos')
<div class="response-ajax"></div>
	@section('scripts')
	<script>
		const url ="{{url('motivos')}}";
		const columns = [
			        {data: 'id'},
			        {data: 'motivo'},
			        {data: 'action'},
			    ];
		</script>
		<script src="{!! asset('assets/datatables/datatables_basic.js') !!}"></script>
	@endsection
@endsection