1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
@extends('layouts.main')
@section('title', 'Início')
@section('header')
@include('layouts.header', [
'user' => Auth::user(),
])
@endsection
@section('nav')
@include('layouts.navigation', ['menu' => $menu])
@endsection
@section('body')
<div>
<h3 class="h3"> PDAs </h3>
<div>
@include('components.alerts')
<div class="d-flex justify-content-end mb-2">
@include('components.buttons.btn-create', [
'id' => 'pad_create',
'class' => 'btn-success',
'route' => route('pad_create'),
'content' => 'Cadastrar',
])
</div>
<div class="border rounded px-4">
<table class="table table-responsive table-hover mt-4">
<thead>
<tr>
<th scole="col">#</th>
<th scole="col">Nome</th>
<th scole="col">Início</th>
<th scole="col">Final</th>
<th scole="col">Status</th>
<th scole="col">Opções</th>
</tr>
</thead>
@php
$index_row = 1;
@endphp
<tbody>
@foreach($pads as $pad)
<tr>
<td scope="row">{{ $index_row++ }}</td>
<td>{{ $pad->nome }}</td>
<td>{{ $pad->getDateInicio() }}</td>
<td>{{ $pad->getDateFim() }}</td>
<td>{{ $pad->statusAsString() }}</td>
<td>
<div class="btn-group" role="group">
<div class="me-1">
@include('components.buttons.btn-edit', [
'btn_class' => 'btn btn-primary',
'route' => route('pad_edit', ['id' => $pad->id])
])
</div>
<div class="me-1">
@include('components.buttons.btn-delete', [
'id' => $pad->id,
'btn_class' => 'btn btn-danger',
'route' => route('pad_delete', ['id' => $pad->id])
])
</div>
</div>
</td>
</tr>
@endforeach
</tbody>
</table>
</div>
</div>
</div>
@endsection
@section('script')
<script type="text/javascript">
</script>
@endsection