Update Laravel to 7.0

This commit is contained in:
George Frederick "Buzz" Beurling
2020-06-20 17:03:30 -04:00
parent f104c1b61b
commit 8866cafd31
57 changed files with 8739 additions and 2281 deletions

View File

@@ -82,7 +82,7 @@
<p class="my-auto ml-3">N'utilise pas un horaire</p>
@endif
</div>
<div>
<div style="height: 2.7rem;overflow: hidden">
{!! $event_type->admin_desc !!}
</div>
<div class="row">
@@ -93,7 +93,7 @@
</div>
<div class="col-md-4 text-right">
@if($event_type->id != 1)
<button class="btn btn-danger btn-just-icon">
<button class="btn btn-danger btn-just-icon" onclick="deleteEventType({{$event_type->id}})">
<i class="fas fa-trash-alt"></i>
</button>
@else
@@ -107,6 +107,9 @@
</div>
</div>
@endforeach
<div class="col-12 text-right">
<a class="btn btn-primary" href="/admin/config/instruction/event_type/create">Ajouter un type d'évenement</a>
</div>
</div>
</div>
</div>
@@ -146,5 +149,45 @@
},
date: new Date(end)
});
function deleteEventType(id)
{
Swal.fire({
title: 'Êtes vous certain ?',
text: "Vous ne pourrez annuler cette action",
type: 'warning',
showCancelButton: true,
confirmButtonColor: '#3085d6',
cancelButtonColor: '#d33',
confirmButtonText: 'Oui',
cancelButtonText: 'Non'
}).then((result) => {
if (result.value) {
let request = $.ajax({
url: "/api/eventType/"+id,
method: "DELETE",
data: { api_token : api_token },
dataType: "html"
});
request.done(function (msg) {
Swal.fire(
'Supprimé!',
'Le type d\'évenement a été supprimé',
'success'
).then(() => {
window.location.href = '/admin/config/instruction';
});
});
request.fail(function (jqXHR, textStatus) {
Swal.fire({
type: 'error',
title: 'Oops...',
text: 'Le type d\'évenement n\'a pas pus être supprimé',
footer: '<small>'+textStatus+'</small>'
})
})
}
});
}
</script>
@endsection