File: /var/www/vhost/disk-apps/sigedo-dev.allup.com.co/resources/views/userprograms/list.blade.php
@extends('layouts.master')
@section('page-css')
<link rel="stylesheet" href="{{ asset('assets/styles/vendor/datatables.min.css') }}">
@endsection
@section('main-content')
<div class="breadcrumb">
<h1>{{ $user->name }} {{ $user->last_name }}</h1>
<ul>
<li><a href="{{ route('users.index') }}">@lang('users')</a></li>
<li>@lang('userprograms')</li>
</ul>
@can('userprogram_create')
<div class="d-sm-flex positionButtonCreate">
<span class="m-auto"></span>
<a class="btn btn-primary mb-sm-0 mb-3 print-invoice"
href="{{ route('userprograms.create', ['user_id' => $user->id]) }}">@lang('create_userprogram')</a>
</div>
@endcan
</div>
<div class="separator-breadcrumb border-top"></div>
<section class="contact-list">
<div class="row">
<div class="col-md-12 mb-4">
<div class="card text-left">
<div class="card-body">
<div class="table-responsive">
<table id="table-list" class="display table " style="width:100%">
<thead>
<tr>
<th>@lang('institution')</th>
<th>@lang('program')</th>
<th>@lang('rotation')</th>
<th>@lang('service')</th>
<th>@lang('covenant')</th>
<th>@lang('rotation_start_date')</th>
<th>@lang('rotation_end_date')</th>
<th>@lang('actions')</th>
</tr>
</thead>
<tbody>
@foreach ($user->userprograms as $userprogram)
<tr>
<td>{{ $userprogram->institution->name }}</td>
<td>{{ $userprogram->program->name }}</td>
<td>{{ $userprogram->rotation->name }}</td>
<td>{{ $userprogram->service->name }}</td>
<td>{{ $userprogram->covenant->name }}</td>
<td>{{ $userprogram->rotation_start_date }}</td>
<td>{{ $userprogram->rotation_end_date }}</td>
<td>
@can('userprogram_edit')
<a href="{{ route('userprograms.edit', ['user_id' => $user->id, 'userprogram_id' => $userprogram->id]) }}"
class="ul-link-action text-success" data-toggle="tooltip"
data-placement="top" title="@lang('edit')">
<i class="i-Edit"></i>
</a>
@endcan
@can('userprogram_destroy')
<span class="ul-link-action text-danger mr-1" data-toggle="tooltip"
data-placement="top" title="@lang('delete')"
onclick="deleteRegistry({{ $user->id }}, {{ $userprogram->id }})">
<i class="i-Eraser-2"></i>
</span>
@endcan
</td>
</tr>
@endforeach
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
</section>
@endsection
@section('page-js')
<script src="{{ asset('assets/js/vendor/datatables.min.js') }}"></script>
<script src="{{ asset('assets/js/tooltip.script.js') }}"></script>
<script src="{{ asset('js/views/userprograms.js') }}"></script>
<script>
$("#table-list").DataTable({
order: [],
pageLength: 100,
language: {
url: "https://cdn.datatables.net/plug-ins/1.10.19/i18n/"+ '{{ config("customize.language_tables") }}'
}
});
</script>
@endsection