mirror of
https://gitlab.com/TheGamecraft/c-cms.git
synced 2026-04-21 10:49:10 -04:00
ALPHA 3.0.3
This commit is contained in:
331
resources/views/admin/inventory/booking.blade.php
Normal file
331
resources/views/admin/inventory/booking.blade.php
Normal file
@@ -0,0 +1,331 @@
|
||||
@extends('layouts.admin.main')
|
||||
|
||||
@section('content')
|
||||
<div class="col-md-12">
|
||||
@foreach ($schedules as $schedule)
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<strong class="card-title">Réservation de matériel du {{$schedule->date}}</strong>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<?php
|
||||
$remove = [0 => ""];
|
||||
$n1_p1_items = array_diff(explode("-",$schedule->n1_p1_item),$remove);
|
||||
$n1_p2_items = array_diff(explode("-",$schedule->n1_p2_item),$remove);
|
||||
$n2_p1_items = array_diff(explode("-",$schedule->n2_p1_item),$remove);
|
||||
$n2_p2_items = array_diff(explode("-",$schedule->n2_p2_item),$remove);
|
||||
$n3_p1_items = array_diff(explode("-",$schedule->n3_p1_item),$remove);
|
||||
$n3_p2_items = array_diff(explode("-",$schedule->n3_p2_item),$remove);
|
||||
?>
|
||||
<table id="data_{{$schedule->id}}" class="table">
|
||||
<thead class="thead-dark">
|
||||
<tr>
|
||||
<th>Niveau</th>
|
||||
<th style="width:45%">1er Période</th>
|
||||
<th style="width:45%">2e Période</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>1</th>
|
||||
<td>
|
||||
<table class="table float center" style="border:none; max-width:80%; margin:auto;">
|
||||
<tbody>
|
||||
<tr style="border:none;">
|
||||
<td style="border:none; width:50%">{{ \App\User::find($schedule->data['n1_p1_instructor'])->fullname()}}</td>
|
||||
<td style="border:none;width:50%">{{ $schedule->data['n1_p1_ocom'].' - '.$schedule->data['n1_p1_name']}}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<hr>
|
||||
@if (!count($n1_p1_items) == 0)
|
||||
<table class="table float center" style="border:none; max-width:80%; margin:auto;">
|
||||
<thead>
|
||||
<tr style="border:none;">
|
||||
<th style="border:none;">ID</th>
|
||||
<th style="border:none;">Item</th>
|
||||
<th style="border:none;">Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach ($n1_p1_items as $item)
|
||||
<tr style="border:none;">
|
||||
<td style="border:none; width:10%">{{$item}}</td>
|
||||
<td style="border:none;">{{\App\Item::find($item)->name}}</td>
|
||||
<td style="border:none;">{{\App\Item::find($item)->desc}}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
@else
|
||||
<div style="text-align:center;"><span class="badge badge-danger" style="display: initial;">Aucune réservation de matériel</span></div>
|
||||
@endif
|
||||
</td>
|
||||
<td>
|
||||
<table class="table float center" style="border:none; max-width:80%; margin:auto;">
|
||||
<tbody>
|
||||
<tr style="border:none;">
|
||||
<td style="border:none; width:50%">{{ \App\User::find($schedule->data['n1_p2_instructor'])->fullname()}}</td>
|
||||
<td style="border:none;width:50%">{{ $schedule->data['n1_p2_ocom'].' - '.$schedule->data['n1_p2_name']}}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<hr>
|
||||
@if (!count($n1_p2_items) == 0)
|
||||
<table class="table float center" style="border:none; max-width:80%; margin:auto;">
|
||||
<thead>
|
||||
<tr style="border:none;">
|
||||
<th style="border:none;">ID</th>
|
||||
<th style="border:none;">Item</th>
|
||||
<th style="border:none;">Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach ($n1_p2_items as $item)
|
||||
<tr style="border:none;">
|
||||
<td style="border:none; width:10%">{{$item}}</td>
|
||||
<td style="border:none;">{{\App\Item::find($item)->name}}</td>
|
||||
<td style="border:none;">{{\App\Item::find($item)->desc}}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
@else
|
||||
<div style="text-align:center;"><span class="badge badge-danger" style="display: initial;">Aucune réservation de matériel</span></div>
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>2</th>
|
||||
<td>
|
||||
<table class="table float center" style="border:none; max-width:80%; margin:auto;">
|
||||
<tbody>
|
||||
<tr style="border:none;">
|
||||
<td style="border:none; width:50%">{{ \App\User::find($schedule->data['n2_p1_instructor'])->fullname()}}</td>
|
||||
<td style="border:none;width:50%">{{ $schedule->data['n2_p1_ocom'].' - '.$schedule->data['n2_p1_name']}}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<hr>
|
||||
@if (!count($n2_p1_items) == 0)
|
||||
<table class="table float center" style="border:none; max-width:80%; margin:auto;">
|
||||
<thead>
|
||||
<tr style="border:none;">
|
||||
<th style="border:none;">ID</th>
|
||||
<th style="border:none;">Item</th>
|
||||
<th style="border:none;">Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach ($n2_p1_items as $item)
|
||||
<tr style="border:none;">
|
||||
<td style="border:none; width:10%">{{$item}}</td>
|
||||
<td style="border:none;">{{\App\Item::find($item)->name}}</td>
|
||||
<td style="border:none;">{{\App\Item::find($item)->desc}}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
@else
|
||||
<div style="text-align:center;"><span class="badge badge-danger" style="display: initial;">Aucune réservation de matériel</span></div>
|
||||
@endif
|
||||
</td>
|
||||
<td>
|
||||
<table class="table float center" style="border:none; max-width:80%; margin:auto;">
|
||||
<tbody>
|
||||
<tr style="border:none;">
|
||||
<td style="border:none; width:50%">{{ \App\User::find($schedule->data['n2_p2_instructor'])->fullname()}}</td>
|
||||
<td style="border:none;width:50%">{{ $schedule->data['n2_p2_ocom'].' - '.$schedule->data['n2_p2_name']}}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<hr>
|
||||
@if (!count($n2_p2_items) == 0)
|
||||
<table class="table float center" style="border:none; max-width:80%; margin:auto;">
|
||||
<thead>
|
||||
<tr style="border:none;">
|
||||
<th style="border:none;">ID</th>
|
||||
<th style="border:none;">Item</th>
|
||||
<th style="border:none;">Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach ($n2_p2_items as $item)
|
||||
<tr style="border:none;">
|
||||
<td style="border:none; width:10%">{{$item}}</td>
|
||||
<td style="border:none;">{{\App\Item::find($item)->name}}</td>
|
||||
<td style="border:none;">{{\App\Item::find($item)->desc}}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
@else
|
||||
<div style="text-align:center;"><span class="badge badge-danger" style="display: initial;">Aucune réservation de matériel</span></div>
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>3</th>
|
||||
<td>
|
||||
<table class="table float center" style="border:none; max-width:80%; margin:auto;">
|
||||
<tbody>
|
||||
<tr style="border:none;">
|
||||
<td style="border:none; width:50%">{{ \App\User::find($schedule->data['n3_p1_instructor'])->fullname()}}</td>
|
||||
<td style="border:none;width:50%">{{ $schedule->data['n3_p1_ocom'].' - '.$schedule->data['n3_p1_name']}}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<hr>
|
||||
@if (!count($n3_p1_items) == 0)
|
||||
<table class="table float center" style="border:none; max-width:80%; margin:auto;">
|
||||
<thead>
|
||||
<tr style="border:none;">
|
||||
<th style="border:none;">ID</th>
|
||||
<th style="border:none;">Item</th>
|
||||
<th style="border:none;">Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach ($n3_p1_items as $item)
|
||||
<tr style="border:none;">
|
||||
<td style="border:none; width:10%">{{$item}}</td>
|
||||
<td style="border:none;">{{\App\Item::find($item)->name}}</td>
|
||||
<td style="border:none;">{{\App\Item::find($item)->desc}}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
@else
|
||||
<div style="text-align:center;"><span class="badge badge-danger" style="display: initial;">Aucune réservation de matériel</span></div>
|
||||
@endif
|
||||
</td>
|
||||
<td>
|
||||
<table class="table float center" style="border:none; max-width:80%; margin:auto;">
|
||||
<tbody>
|
||||
<tr style="border:none;">
|
||||
<td style="border:none; width:50%">{{ \App\User::find($schedule->data['n3_p2_instructor'])->fullname()}}</td>
|
||||
<td style="border:none;width:50%">{{ $schedule->data['n3_p2_ocom'].' - '.$schedule->data['n3_p2_name']}}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<hr>
|
||||
@if (!count($n3_p2_items) == 0)
|
||||
<table class="table float center" style="border:none; max-width:80%; margin:auto;">
|
||||
<thead>
|
||||
<tr style="border:none;">
|
||||
<th style="border:none;">ID</th>
|
||||
<th style="border:none;">Item</th>
|
||||
<th style="border:none;">Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach ($n3_p2_items as $item)
|
||||
<tr style="border:none;">
|
||||
<td style="border:none; width:10%">{{$item}}</td>
|
||||
<td style="border:none;">{{\App\Item::find($item)->name}}</td>
|
||||
<td style="border:none;">{{\App\Item::find($item)->desc}}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
@else
|
||||
<div style="text-align:center;"><span class="badge badge-danger" style="display: initial;">Aucune réservation de matériel</span></div>
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
@endforeach
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@section('breadcrumb')
|
||||
<div class="breadcrumbs">
|
||||
<div class="col-sm-4">
|
||||
<div class="page-header float-left">
|
||||
<div class="page-title">
|
||||
<h1>Inventaire</h1>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-8">
|
||||
<div class="page-header float-right">
|
||||
<div class="page-title">
|
||||
<ol class="breadcrumb text-right">
|
||||
<li class="active">Inventaire</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@section('custom_scripts')
|
||||
<script src="/assets/admin/assets/js/lib/data-table/datatables.min.js"></script>
|
||||
<script src="/assets/admin/assets/js/lib/data-table/dataTables.bootstrap.min.js"></script>
|
||||
<script src="/assets/admin/assets/js/lib/data-table/dataTables.buttons.min.js"></script>
|
||||
<script src="/assets/admin/assets/js/lib/data-table/buttons.bootstrap.min.js"></script>
|
||||
<script src="/assets/admin/assets/js/lib/data-table/jszip.min.js"></script>
|
||||
<script src="/assets/admin/assets/js/lib/data-table/pdfmake.min.js"></script>
|
||||
<script src="/assets/admin/assets/js/lib/data-table/vfs_fonts.js"></script>
|
||||
<script src="/assets/admin/assets/js/lib/data-table/buttons.html5.min.js"></script>
|
||||
<script src="/assets/admin/assets/js/lib/data-table/buttons.print.min.js"></script>
|
||||
<script src="/assets/admin/assets/js/lib/data-table/buttons.colVis.min.js"></script>
|
||||
<script src="/assets/admin/assets/js/lib/data-table/datatables-init.js"></script>
|
||||
|
||||
@foreach ($schedules as $schedule)
|
||||
<script>
|
||||
(function($) {
|
||||
$(document).ready(function() {
|
||||
$('#data_{{$schedule->id}}').DataTable({
|
||||
"order": [[ 0, "asc" ]],
|
||||
"lengthMenu": [[25, 50, -1], [25, 50, "All"]],
|
||||
});
|
||||
} );
|
||||
})(jQuery);
|
||||
</script>
|
||||
@endforeach
|
||||
|
||||
<script type="text/javascript">
|
||||
function deleteEvent(pid){
|
||||
swal({
|
||||
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) {
|
||||
|
||||
(function($) {
|
||||
$.post('/api/item/delete?api_token='+api_token, { id: pid } , function(data) {
|
||||
console.log('Delete');
|
||||
});
|
||||
|
||||
|
||||
})(jQuery);
|
||||
|
||||
swal(
|
||||
'Supprimé!',
|
||||
"L'item a été supprimé",
|
||||
'success'
|
||||
).then((result) => {
|
||||
if (result.value) {
|
||||
location.reload();
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
</script>
|
||||
@endsection
|
||||
117
resources/views/admin/inventory/index.blade.php
Normal file
117
resources/views/admin/inventory/index.blade.php
Normal file
@@ -0,0 +1,117 @@
|
||||
@extends('layouts.admin.main')
|
||||
|
||||
@section('content')
|
||||
<div class="col-md-12">
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<strong class="card-title">Inventaire <a href="#"><i class="fa fa-question-circle" aria-hidden="true"></i>
|
||||
</a></strong>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<a name="add" id="add" class="btn btn-primary btn-block" href="/admin/item/add" role="button">Ajouter un item a l'inventaire</a>
|
||||
<hr>
|
||||
<table id="log-data" class="table table-striped table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>ID </th>
|
||||
<th>Nom</th>
|
||||
<th>Description</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach ($items as $item)
|
||||
<tr>
|
||||
<td style="width:5%;">{{$item->id}}</td>
|
||||
<td>{{$item->name}}</td>
|
||||
<td>{{$item->desc}}</td>
|
||||
<td style="width: 12%;"><a href="/admin/item/edit/{{$item->id}}" type="button" class="btn btn-secondary"><i class="fa fa-cog"></i> Modifier</a><a type="button" class="btn btn-danger" onclick="deleteEvent({{$item->id}});"><i class="fa fa-times-circle" style="color:white;"></i></a></td>
|
||||
</tr>
|
||||
@endforeach
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@section('breadcrumb')
|
||||
<div class="breadcrumbs">
|
||||
<div class="col-sm-4">
|
||||
<div class="page-header float-left">
|
||||
<div class="page-title">
|
||||
<h1>Inventaire</h1>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-8">
|
||||
<div class="page-header float-right">
|
||||
<div class="page-title">
|
||||
<ol class="breadcrumb text-right">
|
||||
<li class="active">Inventaire</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@section('custom_scripts')
|
||||
<script src="/assets/admin/assets/js/lib/data-table/datatables.min.js"></script>
|
||||
<script src="/assets/admin/assets/js/lib/data-table/dataTables.bootstrap.min.js"></script>
|
||||
<script src="/assets/admin/assets/js/lib/data-table/dataTables.buttons.min.js"></script>
|
||||
<script src="/assets/admin/assets/js/lib/data-table/buttons.bootstrap.min.js"></script>
|
||||
<script src="/assets/admin/assets/js/lib/data-table/jszip.min.js"></script>
|
||||
<script src="/assets/admin/assets/js/lib/data-table/pdfmake.min.js"></script>
|
||||
<script src="/assets/admin/assets/js/lib/data-table/vfs_fonts.js"></script>
|
||||
<script src="/assets/admin/assets/js/lib/data-table/buttons.html5.min.js"></script>
|
||||
<script src="/assets/admin/assets/js/lib/data-table/buttons.print.min.js"></script>
|
||||
<script src="/assets/admin/assets/js/lib/data-table/buttons.colVis.min.js"></script>
|
||||
<script src="/assets/admin/assets/js/lib/data-table/datatables-init.js"></script>
|
||||
|
||||
<script type="text/javascript">
|
||||
(function($) {
|
||||
$(document).ready(function() {
|
||||
$('#log-data').DataTable({
|
||||
"order": [[ 0, "desc" ]],
|
||||
"lengthMenu": [[25, 50, -1], [25, 50, "All"]],
|
||||
});
|
||||
} );
|
||||
})(jQuery);
|
||||
|
||||
function deleteEvent(pid){
|
||||
swal({
|
||||
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) {
|
||||
|
||||
(function($) {
|
||||
$.post('/api/item/delete?api_token='+api_token, { id: pid } , function(data) {
|
||||
console.log('Delete');
|
||||
});
|
||||
|
||||
|
||||
})(jQuery);
|
||||
|
||||
swal(
|
||||
'Supprimé!',
|
||||
"L'item a été supprimé",
|
||||
'success'
|
||||
).then((result) => {
|
||||
if (result.value) {
|
||||
location.reload();
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
</script>
|
||||
@endsection
|
||||
161
resources/views/admin/inventory/show.blade.php
Normal file
161
resources/views/admin/inventory/show.blade.php
Normal file
@@ -0,0 +1,161 @@
|
||||
@extends('layouts.admin.main')
|
||||
|
||||
@section('content')
|
||||
<div class="col-md-12">
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<strong class="card-title">Matériel {{$schedule->data['n'.$niveau.'_p'.$periode.'_name']}} - {{$schedule->data['n'.$niveau.'_p'.$periode.'_ocom']}}<a href="#"><i class="fa fa-question-circle" aria-hidden="true"></i>
|
||||
</a></strong>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="row">
|
||||
<div class="col-6">
|
||||
<h3>Matériel Réservé</h3>
|
||||
<br>
|
||||
<p>Cliquer sur la flèche a droite d'un item pour annuler la réservation</p>
|
||||
<hr>
|
||||
<table id="log-data" class="table table-striped table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Nom</th>
|
||||
<th>Description</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach ($items as $item)
|
||||
@if ($item !== null)
|
||||
<tr>
|
||||
<td>{{$item->name}}</td>
|
||||
<td>{{$item->desc}}</td>
|
||||
<td style="width: 12%;"><form action="/admin/inventory/remove/{{$schedule->id}}/{{$periode}}/{{$niveau}}" method="post">{{ csrf_field() }}<button type="submit" name="remove" value="{{$item->id}}" class="btn btn-danger"><i class="fa fa-arrow-right" style="color:white;"></i></button></form></td>
|
||||
</tr>
|
||||
@endif
|
||||
@endforeach
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="col-6">
|
||||
<h3>Matériel Disponible</h3>
|
||||
<br>
|
||||
<p>Cliquer sur la flèche a gauche d'un item pour le réserver</p>
|
||||
<hr>
|
||||
<table id="log-data_2" class="table table-striped table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th></th>
|
||||
<th>Nom</th>
|
||||
<th>Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach ($dispo_item as $item)
|
||||
@if ($item !== null)
|
||||
<tr>
|
||||
<td style="width: 12%;"><form action="/admin/inventory/add/{{$schedule->id}}/{{$periode}}/{{$niveau}}" method="post">{{ csrf_field() }}<button type="submit" name="add" class="btn btn-success" value="{{$item->id}}"><i class="fa fa-arrow-left" style="color:white;"></i></button></form></td>
|
||||
<td>{{$item->name}}</td>
|
||||
<td>{{$item->desc}}</td>
|
||||
</tr>
|
||||
@endif
|
||||
@endforeach
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<hr>
|
||||
<a href="/admin/calendar" class="btn btn-primary btn-block">Retour a l'horaire</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@section('breadcrumb')
|
||||
<div class="breadcrumbs">
|
||||
<div class="col-sm-4">
|
||||
<div class="page-header float-left">
|
||||
<div class="page-title">
|
||||
<h1>Inventaire</h1>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-8">
|
||||
<div class="page-header float-right">
|
||||
<div class="page-title">
|
||||
<ol class="breadcrumb text-right">
|
||||
<li class="active">Inventaire</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@section('custom_scripts')
|
||||
<script src="/assets/admin/assets/js/lib/data-table/datatables.min.js"></script>
|
||||
<script src="/assets/admin/assets/js/lib/data-table/dataTables.bootstrap.min.js"></script>
|
||||
<script src="/assets/admin/assets/js/lib/data-table/dataTables.buttons.min.js"></script>
|
||||
<script src="/assets/admin/assets/js/lib/data-table/buttons.bootstrap.min.js"></script>
|
||||
<script src="/assets/admin/assets/js/lib/data-table/jszip.min.js"></script>
|
||||
<script src="/assets/admin/assets/js/lib/data-table/pdfmake.min.js"></script>
|
||||
<script src="/assets/admin/assets/js/lib/data-table/vfs_fonts.js"></script>
|
||||
<script src="/assets/admin/assets/js/lib/data-table/buttons.html5.min.js"></script>
|
||||
<script src="/assets/admin/assets/js/lib/data-table/buttons.print.min.js"></script>
|
||||
<script src="/assets/admin/assets/js/lib/data-table/buttons.colVis.min.js"></script>
|
||||
<script src="/assets/admin/assets/js/lib/data-table/datatables-init.js"></script>
|
||||
|
||||
<script type="text/javascript">
|
||||
(function($) {
|
||||
$(document).ready(function() {
|
||||
$('#log-data').DataTable({
|
||||
"order": [[ 0, "desc" ]],
|
||||
"lengthMenu": [[25, 50, -1], [25, 50, "All"]],
|
||||
});
|
||||
} );
|
||||
})(jQuery);
|
||||
|
||||
(function($) {
|
||||
$(document).ready(function() {
|
||||
$('#log-data_2').DataTable({
|
||||
"order": [[ 0, "desc" ]],
|
||||
"lengthMenu": [[25, 50, -1], [25, 50, "All"]],
|
||||
});
|
||||
} );
|
||||
})(jQuery);
|
||||
|
||||
function deleteEvent(pid){
|
||||
swal({
|
||||
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) {
|
||||
|
||||
(function($) {
|
||||
$.post('/api/item/delete?api_token='+api_token, { id: pid } , function(data) {
|
||||
console.log('Delete');
|
||||
});
|
||||
|
||||
|
||||
})(jQuery);
|
||||
|
||||
swal(
|
||||
'Supprimé!',
|
||||
"L'item a été supprimé",
|
||||
'success'
|
||||
).then((result) => {
|
||||
if (result.value) {
|
||||
location.reload();
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
</script>
|
||||
@endsection
|
||||
75
resources/views/admin/item/add.blade.php
Normal file
75
resources/views/admin/item/add.blade.php
Normal file
@@ -0,0 +1,75 @@
|
||||
@extends('layouts.admin.main')
|
||||
|
||||
@section('content')
|
||||
<div class="col-md-12">
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<strong class="card-title">Ajouter un item dans l'inventaire</strong>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<form action="/admin/item/add" method="post">
|
||||
@csrf
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<div class="form-group">
|
||||
<label for="name">Nom</label>
|
||||
<input type="text" class="form-control" name="name" id="name" aria-describedby="helpname" placeholder="Projecteur" required>
|
||||
<small id="helpname" class="form-text text-muted">Nom</small>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<div class="form-group">
|
||||
<label for="desc">Description</label>
|
||||
<textarea class="form-control" name="desc" id="desc" rows="5" required></textarea>
|
||||
<small id="helpname" class="form-text text-muted">Description de l'item</small>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<button type="submit" class="btn btn-primary">Submit</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@section('breadcrumb')
|
||||
<div class="breadcrumbs">
|
||||
<div class="col-sm-4">
|
||||
<div class="page-header float-left">
|
||||
<div class="page-title">
|
||||
<h1>Inventaire</h1>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-8">
|
||||
<div class="page-header float-right">
|
||||
<div class="page-title">
|
||||
<ol class="breadcrumb text-right">
|
||||
<li class="active">Inventaire</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@section('custom_scripts')
|
||||
<script src="/assets/admin/assets/js/lib/data-table/datatables.min.js"></script>
|
||||
<script src="/assets/admin/assets/js/lib/data-table/dataTables.bootstrap.min.js"></script>
|
||||
<script src="/assets/admin/assets/js/lib/data-table/dataTables.buttons.min.js"></script>
|
||||
<script src="/assets/admin/assets/js/lib/data-table/buttons.bootstrap.min.js"></script>
|
||||
<script src="/assets/admin/assets/js/lib/data-table/jszip.min.js"></script>
|
||||
<script src="/assets/admin/assets/js/lib/data-table/pdfmake.min.js"></script>
|
||||
<script src="/assets/admin/assets/js/lib/data-table/vfs_fonts.js"></script>
|
||||
<script src="/assets/admin/assets/js/lib/data-table/buttons.html5.min.js"></script>
|
||||
<script src="/assets/admin/assets/js/lib/data-table/buttons.print.min.js"></script>
|
||||
<script src="/assets/admin/assets/js/lib/data-table/buttons.colVis.min.js"></script>
|
||||
<script src="/assets/admin/assets/js/lib/data-table/datatables-init.js"></script>
|
||||
|
||||
@endsection
|
||||
75
resources/views/admin/item/edit.blade.php
Normal file
75
resources/views/admin/item/edit.blade.php
Normal file
@@ -0,0 +1,75 @@
|
||||
@extends('layouts.admin.main')
|
||||
|
||||
@section('content')
|
||||
<div class="col-md-12">
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<strong class="card-title">Ajouter un item dans l'inventaire</strong>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<form action="/admin/item/edit/{{$item->id}}" method="post">
|
||||
@csrf
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<div class="form-group">
|
||||
<label for="name">Nom</label>
|
||||
<input type="text" class="form-control" name="name" id="name" aria-describedby="helpname" placeholder="Projecteur" value="{{$item->name}}" required>
|
||||
<small id="helpname" class="form-text text-muted">Nom</small>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<div class="form-group">
|
||||
<label for="desc">Description</label>
|
||||
<textarea class="form-control" name="desc" id="desc" rows="5" required>{{$item->desc}}</textarea>
|
||||
<small id="helpname" class="form-text text-muted">Description de l'item</small>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<button type="submit" class="btn btn-primary">Submit</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@section('breadcrumb')
|
||||
<div class="breadcrumbs">
|
||||
<div class="col-sm-4">
|
||||
<div class="page-header float-left">
|
||||
<div class="page-title">
|
||||
<h1>Inventaire</h1>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-8">
|
||||
<div class="page-header float-right">
|
||||
<div class="page-title">
|
||||
<ol class="breadcrumb text-right">
|
||||
<li class="active">Inventaire</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@section('custom_scripts')
|
||||
<script src="/assets/admin/assets/js/lib/data-table/datatables.min.js"></script>
|
||||
<script src="/assets/admin/assets/js/lib/data-table/dataTables.bootstrap.min.js"></script>
|
||||
<script src="/assets/admin/assets/js/lib/data-table/dataTables.buttons.min.js"></script>
|
||||
<script src="/assets/admin/assets/js/lib/data-table/buttons.bootstrap.min.js"></script>
|
||||
<script src="/assets/admin/assets/js/lib/data-table/jszip.min.js"></script>
|
||||
<script src="/assets/admin/assets/js/lib/data-table/pdfmake.min.js"></script>
|
||||
<script src="/assets/admin/assets/js/lib/data-table/vfs_fonts.js"></script>
|
||||
<script src="/assets/admin/assets/js/lib/data-table/buttons.html5.min.js"></script>
|
||||
<script src="/assets/admin/assets/js/lib/data-table/buttons.print.min.js"></script>
|
||||
<script src="/assets/admin/assets/js/lib/data-table/buttons.colVis.min.js"></script>
|
||||
<script src="/assets/admin/assets/js/lib/data-table/datatables-init.js"></script>
|
||||
|
||||
@endsection
|
||||
@@ -4,31 +4,30 @@
|
||||
<div class="col-md-12">
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<strong class="card-title">Messages au staff<a href="#"><i class="fa fa-question-circle" aria-hidden="true"></i>
|
||||
<strong class="card-title">Ajouter un poste <a href="#"><i class="fa fa-question-circle" aria-hidden="true"></i>
|
||||
</a></strong>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<ul class="nav nav-tabs" id="myTab" role="tablist">
|
||||
@foreach ($jobs as $job)
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" id="{{$job->name}}-tab" data-toggle="tab" href="#{{$job->name}}" role="tab" aria-controls="{{$job->name}}" aria-selected="false">{{$job->name}}</a>
|
||||
</li>
|
||||
@endforeach
|
||||
</ul>
|
||||
<form>
|
||||
<div class="tab-content pl-3 p-1" id="myTabContent">
|
||||
@foreach ($jobs as $job)
|
||||
<div class="tab-pane fade" id="{{$job->name}}" role="tabpanel" aria-labelledby="{{$job->name}}-tab">
|
||||
<h3>{{ $job->desc }}</h3>
|
||||
<form action="/admin/config/job/add" method="post">
|
||||
|
||||
@csrf
|
||||
|
||||
<div id="myTabContent">
|
||||
<div id="name" role="tabpanel">
|
||||
<div class="form-group">
|
||||
<label for="name">Nom du poste</label>
|
||||
<input type="text" class="form-control" name="name" id="name" aria-describedby="helpId" placeholder="" required>
|
||||
<small id="helpId" class="form-text text-muted">Nom du poste</small>
|
||||
</div>
|
||||
<div class="row form-group">
|
||||
<div class="col-12"><textarea name="desc_{{$job->id}}" id="desc_{{$job->id}}" rows="9" class="form-control"></textarea>
|
||||
<div class="col-12"><textarea name="desc" id="desc" rows="9" class="form-control" required></textarea>
|
||||
<small class="form-text text-muted">Description du poste</small></div>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="row form-group">
|
||||
<div class="col col-md-3"><label for="text-input" class=" form-control-label">Niveau d'accès</label></div>
|
||||
<div class="col col-md-3">
|
||||
<select name="event_type" id="event_type" class="form-control">
|
||||
<select name="acces_level" id="acces_level" class="form-control" required>
|
||||
<option value="0">Cadet</option>
|
||||
<option value="regular">Staff</option>
|
||||
<option value="pilotage">Officer</option>
|
||||
@@ -39,89 +38,87 @@
|
||||
<div class="col col-md-3"><label for="text-input" class=" form-control-label">Horaire détaillé</label><small class="form-text text-muted"> L'utilisateur avec ce poste peut t'il consulter les détails de l'horaire</small></div>
|
||||
<div class="col col-md-3" style="margin: auto;">
|
||||
<label for="disabled-input" class=" form-control-label"></label>
|
||||
<label class="switch switch-3d switch-primary mr-3" style="margin-left: 3rem;"><input id="is_event_mandatory" name="is_event_mandatory" class="switch-input" checked="true" type="checkbox"><span class="switch-label"></span><span class="switch-handle"></span></label>
|
||||
<label class="switch switch-3d switch-primary mr-3" style="margin-left: 3rem;"><input id="schedule_see" name="schedule_see" class="switch-input" type="checkbox"><span class="switch-label"></span><span class="switch-handle"></span></label>
|
||||
</div>
|
||||
<div class="col col-md-3"><label for="text-input" class=" form-control-label">Modification horaire</label><small class="form-text text-muted"> L'utilisateur avec ce poste peut t'il ajouter, modifier et supprimer des événements a l'horaire</small></div>
|
||||
<div class="col col-md-3" style="margin: auto;">
|
||||
<label for="disabled-input" class=" form-control-label"></label>
|
||||
<label class="switch switch-3d switch-primary mr-3" style="margin-left: 3rem;"><input id="is_event_mandatory" name="is_event_mandatory" class="switch-input" checked="true" type="checkbox"><span class="switch-label"></span><span class="switch-handle"></span></label>
|
||||
<label class="switch switch-3d switch-primary mr-3" style="margin-left: 3rem;"><input id="schedule_edit" name="schedule_edit" class="switch-input" type="checkbox"><span class="switch-label"></span><span class="switch-handle"></span></label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row form-group">
|
||||
<div class="col col-md-3"><label for="text-input" class=" form-control-label">Notifiation horaire</label><small class="form-text text-muted"> L'utilisateur avec ce poste doit t-il recevoir des notifiation pour tous les changements a l'horaire.</small></div>
|
||||
<div class="col col-md-3" style="margin: auto;">
|
||||
<label for="disabled-input" class=" form-control-label"></label>
|
||||
<label class="switch switch-3d switch-primary mr-3" style="margin-left: 3rem;"><input id="is_event_mandatory" name="is_event_mandatory" class="switch-input" checked="true" type="checkbox"><span class="switch-label"></span><span class="switch-handle"></span></label>
|
||||
<label class="switch switch-3d switch-primary mr-3" style="margin-left: 3rem;"><input id="schedule_notify" name="schedule_notify" class="switch-input" type="checkbox"><span class="switch-label"></span><span class="switch-handle"></span></label>
|
||||
</div>
|
||||
<div class="col col-md-3"><label for="text-input" class=" form-control-label">Consultation messages</label><small class="form-text text-muted"> L'utilisateur avec ce poste peut t'il consulter les messages</small></div>
|
||||
<div class="col col-md-3" style="margin: auto;">
|
||||
<label for="disabled-input" class=" form-control-label"></label>
|
||||
<label class="switch switch-3d switch-primary mr-3" style="margin-left: 3rem;"><input id="is_event_mandatory" name="is_event_mandatory" class="switch-input" checked="true" type="checkbox"><span class="switch-label"></span><span class="switch-handle"></span></label>
|
||||
<label class="switch switch-3d switch-primary mr-3" style="margin-left: 3rem;"><input id="message_see" name="message_see" class="switch-input" type="checkbox"><span class="switch-label"></span><span class="switch-handle"></span></label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row form-group">
|
||||
<div class="col col-md-3"><label for="text-input" class=" form-control-label">Modification messages</label><small class="form-text text-muted"> L'utilisateur avec ce poste peut t'il ajouter, modifier et supprimer des messages</small></div>
|
||||
<div class="col col-md-3" style="margin: auto;">
|
||||
<label for="disabled-input" class=" form-control-label"></label>
|
||||
<label class="switch switch-3d switch-primary mr-3" style="margin-left: 3rem;"><input id="is_event_mandatory" name="is_event_mandatory" class="switch-input" checked="true" type="checkbox"><span class="switch-label"></span><span class="switch-handle"></span></label>
|
||||
<label class="switch switch-3d switch-primary mr-3" style="margin-left: 3rem;"><input id="message_edit" name="message_edit" class="switch-input" type="checkbox"><span class="switch-label"></span><span class="switch-handle"></span></label>
|
||||
</div>
|
||||
<div class="col col-md-3"><label for="text-input" class=" form-control-label">Notifiation messages</label><small class="form-text text-muted"> L'utilisateur avec ce poste doit t-il recevoir des notifiation pour tous les changements en lien avec les messages.</small></div>
|
||||
<div class="col col-md-3" style="margin: auto;">
|
||||
<label for="disabled-input" class=" form-control-label"></label>
|
||||
<label class="switch switch-3d switch-primary mr-3" style="margin-left: 3rem;"><input id="is_event_mandatory" name="is_event_mandatory" class="switch-input" checked="true" type="checkbox"><span class="switch-label"></span><span class="switch-handle"></span></label>
|
||||
<label class="switch switch-3d switch-primary mr-3" style="margin-left: 3rem;"><input id="message_notify" name="message_notify" class="switch-input" type="checkbox"><span class="switch-label"></span><span class="switch-handle"></span></label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row form-group">
|
||||
<div class="col col-md-3"><label for="text-input" class=" form-control-label">Modification article</label><small class="form-text text-muted"> L'utilisateur avec ce poste peut t'il ajouter, modifier et supprimer des articles</small></div>
|
||||
<div class="col col-md-3" style="margin: auto;">
|
||||
<label for="disabled-input" class=" form-control-label"></label>
|
||||
<label class="switch switch-3d switch-primary mr-3" style="margin-left: 3rem;"><input id="is_event_mandatory" name="is_event_mandatory" class="switch-input" checked="true" type="checkbox"><span class="switch-label"></span><span class="switch-handle"></span></label>
|
||||
<label class="switch switch-3d switch-primary mr-3" style="margin-left: 3rem;"><input id="paper_edit" name="paper_edit" class="switch-input" type="checkbox"><span class="switch-label"></span><span class="switch-handle"></span></label>
|
||||
</div>
|
||||
<div class="col col-md-3"><label for="text-input" class=" form-control-label">Publication articles</label><small class="form-text text-muted"> L'utilisateur avec ce poste peux t-il autoriser la publication ou appouver des changements a un articles</small></div>
|
||||
<div class="col col-md-3" style="margin: auto;">
|
||||
<label for="disabled-input" class=" form-control-label"></label>
|
||||
<label class="switch switch-3d switch-primary mr-3" style="margin-left: 3rem;"><input id="is_event_mandatory" name="is_event_mandatory" class="switch-input" checked="true" type="checkbox"><span class="switch-label"></span><span class="switch-handle"></span></label>
|
||||
<label class="switch switch-3d switch-primary mr-3" style="margin-left: 3rem;"><input id="paper_publish" name="paper_publish" class="switch-input" type="checkbox"><span class="switch-label"></span><span class="switch-handle"></span></label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row form-group">
|
||||
<div class="col col-md-3"><label for="text-input" class=" form-control-label">Notifiation articles</label><small class="form-text text-muted"> L'utilisateur avec ce poste doit t-il recevoir des notifiation pour tous les changements en lien avec les articles.</small></div>
|
||||
<div class="col col-md-3" style="margin: auto;">
|
||||
<label for="disabled-input" class=" form-control-label"></label>
|
||||
<label class="switch switch-3d switch-primary mr-3" style="margin-left: 3rem;"><input id="is_event_mandatory" name="is_event_mandatory" class="switch-input" checked="true" type="checkbox"><span class="switch-label"></span><span class="switch-handle"></span></label>
|
||||
<label class="switch switch-3d switch-primary mr-3" style="margin-left: 3rem;"><input id="paper_notify" name="paper_notify" class="switch-input" type="checkbox"><span class="switch-label"></span><span class="switch-handle"></span></label>
|
||||
</div>
|
||||
<div class="col col-md-3"><label for="text-input" class=" form-control-label">Consultation inventaire</label><small class="form-text text-muted"> L'utilisateur avec ce poste peut t'il consulter l'inventaire</small></div>
|
||||
<div class="col col-md-3" style="margin: auto;">
|
||||
<label for="disabled-input" class=" form-control-label"></label>
|
||||
<label class="switch switch-3d switch-primary mr-3" style="margin-left: 3rem;"><input id="is_event_mandatory" name="is_event_mandatory" class="switch-input" checked="true" type="checkbox"><span class="switch-label"></span><span class="switch-handle"></span></label>
|
||||
<label class="switch switch-3d switch-primary mr-3" style="margin-left: 3rem;"><input id="inventory_see" name="inventory_see" class="switch-input" type="checkbox"><span class="switch-label"></span><span class="switch-handle"></span></label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row form-group">
|
||||
<div class="col col-md-3"><label for="text-input" class=" form-control-label">Modification inventaire</label><small class="form-text text-muted"> L'utilisateur avec ce poste peut t'il ajouter, modifier et supprimer l'inventaire</small></div>
|
||||
<div class="col col-md-3" style="margin: auto;">
|
||||
<label for="disabled-input" class=" form-control-label"></label>
|
||||
<label class="switch switch-3d switch-primary mr-3" style="margin-left: 3rem;"><input id="is_event_mandatory" name="is_event_mandatory" class="switch-input" checked="true" type="checkbox"><span class="switch-label"></span><span class="switch-handle"></span></label>
|
||||
<label class="switch switch-3d switch-primary mr-3" style="margin-left: 3rem;"><input id="inventory_edit" name="inventory_edit" class="switch-input" type="checkbox"><span class="switch-label"></span><span class="switch-handle"></span></label>
|
||||
</div>
|
||||
<div class="col col-md-3"><label for="text-input" class=" form-control-label">Notifiation inventaire</label><small class="form-text text-muted"> L'utilisateur avec ce poste doit t-il recevoir des notifiation pour tous les changements en lien avec les articles.</small></div>
|
||||
<div class="col col-md-3" style="margin: auto;">
|
||||
<label for="disabled-input" class=" form-control-label"></label>
|
||||
<label class="switch switch-3d switch-primary mr-3" style="margin-left: 3rem;"><input id="is_event_mandatory" name="is_event_mandatory" class="switch-input" checked="true" type="checkbox"><span class="switch-label"></span><span class="switch-handle"></span></label>
|
||||
<label class="switch switch-3d switch-primary mr-3" style="margin-left: 3rem;"><input id="inventory_notify" name="inventory_notify" class="switch-input" type="checkbox"><span class="switch-label"></span><span class="switch-handle"></span></label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row form-group">
|
||||
<div class="col col-md-3"><label for="text-input" class=" form-control-label">Modification utilisateur</label><small class="form-text text-muted"> L'utilisateur avec ce poste peut t'il ajouter, modifier et supprimer des utilisateurs</small></div>
|
||||
<div class="col col-md-3" style="margin: auto;">
|
||||
<label for="disabled-input" class=" form-control-label"></label>
|
||||
<label class="switch switch-3d switch-primary mr-3" style="margin-left: 3rem;"><input id="is_event_mandatory" name="is_event_mandatory" class="switch-input" checked="true" type="checkbox"><span class="switch-label"></span><span class="switch-handle"></span></label>
|
||||
<label class="switch switch-3d switch-primary mr-3" style="margin-left: 3rem;"><input id="user_edit" name="user_edit" class="switch-input" type="checkbox"><span class="switch-label"></span><span class="switch-handle"></span></label>
|
||||
</div>
|
||||
<div class="col col-md-3"><label for="text-input" class=" form-control-label">Notifiation utilisateur</label><small class="form-text text-muted"> L'utilisateur avec ce poste doit t-il recevoir des notifiation pour tous les changements en lien avec les utilisateurs.</small></div>
|
||||
<div class="col col-md-3" style="margin: auto;">
|
||||
<label for="disabled-input" class=" form-control-label"></label>
|
||||
<label class="switch switch-3d switch-primary mr-3" style="margin-left: 3rem;"><input id="is_event_mandatory" name="is_event_mandatory" class="switch-input" checked="true" type="checkbox"><span class="switch-label"></span><span class="switch-handle"></span></label>
|
||||
<label class="switch switch-3d switch-primary mr-3" style="margin-left: 3rem;"><input id="user_notify" name="user_notify" class="switch-input" type="checkbox"><span class="switch-label"></span><span class="switch-handle"></span></label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endforeach
|
||||
|
||||
<div class="card-footer">
|
||||
<button type="submit" class="btn btn-primary btn-sm">
|
||||
<i class="fa fa-dot-circle-o"></i> Submit
|
||||
@@ -168,60 +165,14 @@
|
||||
<script src="/assets/admin/assets/js/lib/data-table/buttons.colVis.min.js"></script>
|
||||
<script src="/assets/admin/assets/js/lib/data-table/datatables-init.js"></script>
|
||||
|
||||
<script type="text/javascript">
|
||||
(function($) {
|
||||
$(document).ready(function() {
|
||||
$('#log-data').DataTable({
|
||||
"ordering": false,
|
||||
"order": [],
|
||||
"lengthMenu": [[3, 4, -1], [9, 12, "All"]],
|
||||
});
|
||||
} );
|
||||
})(jQuery);
|
||||
|
||||
function deleteEvent(pid){
|
||||
swal({
|
||||
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) {
|
||||
|
||||
(function($) {
|
||||
$.post('/api/message/delete', { id: pid } , function(data) {
|
||||
console.log('Delete');
|
||||
});
|
||||
|
||||
|
||||
})(jQuery);
|
||||
|
||||
swal(
|
||||
'Supprimé!',
|
||||
"Le message a été supprimé",
|
||||
'success'
|
||||
).then((result) => {
|
||||
if (result.value) {
|
||||
location.reload();
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
</script>
|
||||
<script src="https://cloud.tinymce.com/stable/tinymce.min.js?apiKey=r82pabvd9arn3fjb1e2fsolf2xpixuv4hwfwart4cf1fb7mx"></script>
|
||||
@foreach ($jobs as $job)
|
||||
<script>
|
||||
tinymce.init({
|
||||
selector: '#desc_'+<?php echo $job->id?>,
|
||||
selector: '#desc',
|
||||
branding: false,
|
||||
menubar: 'edit view format'
|
||||
});
|
||||
</script>
|
||||
@endforeach
|
||||
|
||||
|
||||
@endsection
|
||||
|
||||
178
resources/views/admin/job/edit.blade.php
Normal file
178
resources/views/admin/job/edit.blade.php
Normal file
@@ -0,0 +1,178 @@
|
||||
@extends('layouts.admin.main')
|
||||
|
||||
@section('content')
|
||||
<div class="col-md-12">
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<strong class="card-title">Modification du poste : {{$job->name}}<a href="#"><i class="fa fa-question-circle" aria-hidden="true"></i>
|
||||
</a></strong>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<form>
|
||||
<div class="tab-content pl-3 p-1" id="myTabContent">
|
||||
<div id="{{$job->name}}" role="tabpanel" aria-labelledby="{{$job->name}}-tab">
|
||||
<div class="row form-group">
|
||||
<div class="col-12"><textarea name="{{$job->id}}_desc" name="{{$job->id}}_desc" rows="9" class="form-control"></textarea>
|
||||
<small class="form-text text-muted">Description du poste</small></div>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="row form-group">
|
||||
<div class="col col-md-3"><label for="text-input" class=" form-control-label">Niveau d'accès</label></div>
|
||||
<div class="col col-md-3">
|
||||
<select name="{{$job->id}}_event_type" name="{{$job->id}}_event_type" class="form-control">
|
||||
@switch($job->acces_level)
|
||||
@case(1)
|
||||
<option value="1">Staff</option>
|
||||
@break
|
||||
@case(2)
|
||||
<option value="2">Officer</option>
|
||||
@break
|
||||
@default
|
||||
<option value="0">Cadet</option>
|
||||
@endswitch
|
||||
<option value="0">Cadet</option>
|
||||
<option value="1">Staff</option>
|
||||
<option value="2">Officer</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row form-group">
|
||||
<div class="col col-md-3"><label for="text-input" class=" form-control-label">Horaire détaillé</label><small class="form-text text-muted">|| {{$job->schedule_see}} || L'utilisateur avec ce poste peut t'il consulter les détails de l'horaire</small></div>
|
||||
<div class="col col-md-3" style="margin: auto;">
|
||||
<label for="disabled-input" class=" form-control-label"></label>
|
||||
<label class="switch switch-3d switch-primary mr-3" style="margin-left: 3rem;"><input name="{{$job->id}}_schedule_see" name="{{$job->id}}_schedule_see" class="switch-input" @if($job->schedule_see == "1") checked="true" @endif type="checkbox"><span class="switch-label"></span><span class="switch-handle"></span></label>
|
||||
</div>
|
||||
<div class="col col-md-3"><label for="text-input" class=" form-control-label">Modification horaire</label><small class="form-text text-muted">|| {{$job->schedule_edit}} || L'utilisateur avec ce poste peut t'il ajouter, modifier et supprimer des événements a l'horaire</small></div>
|
||||
<div class="col col-md-3" style="margin: auto;">
|
||||
<label for="disabled-input" class=" form-control-label"></label>
|
||||
<label class="switch switch-3d switch-primary mr-3" style="margin-left: 3rem;"><input name="{{$job->id}}_schedule_edit" name="{{$job->id}}_schedule_edit" class="switch-input" @if($job->schedule_edit == "1") checked="true" @endif type="checkbox"><span class="switch-label"></span><span class="switch-handle"></span></label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row form-group">
|
||||
<div class="col col-md-3"><label for="text-input" class=" form-control-label">Notifiation horaire</label><small class="form-text text-muted">|| {{$job->schedule_notify}} || L'utilisateur avec ce poste doit t-il recevoir des notifiation pour tous les changements a l'horaire.</small></div>
|
||||
<div class="col col-md-3" style="margin: auto;">
|
||||
<label for="disabled-input" class=" form-control-label"></label>
|
||||
<label class="switch switch-3d switch-primary mr-3" style="margin-left: 3rem;"><input name="{{$job->id}}_schedule_notify" name="{{$job->id}}_schedule_notify" class="switch-input" @if($job->schedule_notify == "1") checked="true" @endif type="checkbox"><span class="switch-label"></span><span class="switch-handle"></span></label>
|
||||
</div>
|
||||
<div class="col col-md-3"><label for="text-input" class=" form-control-label">Consultation messages</label><small class="form-text text-muted">|| {{$job->message_see}} || L'utilisateur avec ce poste peut t'il consulter les messages</small></div>
|
||||
<div class="col col-md-3" style="margin: auto;">
|
||||
<label for="disabled-input" class=" form-control-label"></label>
|
||||
<label class="switch switch-3d switch-primary mr-3" style="margin-left: 3rem;"><input name="{{$job->id}}_message_see" name="{{$job->id}}_message_see" class="switch-input" @if($job->message_see == "1") checked="true" @endif type="checkbox"><span class="switch-label"></span><span class="switch-handle"></span></label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row form-group">
|
||||
<div class="col col-md-3"><label for="text-input" class=" form-control-label">Modification messages</label><small class="form-text text-muted"> L'utilisateur avec ce poste peut t'il ajouter, modifier et supprimer des messages</small></div>
|
||||
<div class="col col-md-3" style="margin: auto;">
|
||||
<label for="disabled-input" class=" form-control-label"></label>
|
||||
<label class="switch switch-3d switch-primary mr-3" style="margin-left: 3rem;"><input name="{{$job->id}}_message_edit" name="{{$job->id}}_message_edit" class="switch-input" @if($job->message_edit == "1") checked="true" @endif type="checkbox"><span class="switch-label"></span><span class="switch-handle"></span></label>
|
||||
</div>
|
||||
<div class="col col-md-3"><label for="text-input" class=" form-control-label">Notifiation messages</label><small class="form-text text-muted"> L'utilisateur avec ce poste doit t-il recevoir des notifiation pour tous les changements en lien avec les messages.</small></div>
|
||||
<div class="col col-md-3" style="margin: auto;">
|
||||
<label for="disabled-input" class=" form-control-label"></label>
|
||||
<label class="switch switch-3d switch-primary mr-3" style="margin-left: 3rem;"><input name="{{$job->id}}_message_notify" name="{{$job->id}}_message_notify" class="switch-input" @if($job->message_notify == "1") checked="true" @endif type="checkbox"><span class="switch-label"></span><span class="switch-handle"></span></label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row form-group">
|
||||
<div class="col col-md-3"><label for="text-input" class=" form-control-label">Modification article</label><small class="form-text text-muted"> L'utilisateur avec ce poste peut t'il ajouter, modifier et supprimer des articles</small></div>
|
||||
<div class="col col-md-3" style="margin: auto;">
|
||||
<label for="disabled-input" class=" form-control-label"></label>
|
||||
<label class="switch switch-3d switch-primary mr-3" style="margin-left: 3rem;"><input name="{{$job->id}}_paper_edit" name="{{$job->id}}_paper_edit" class="switch-input" @if($job->paper_edit == "1") checked="true" @endif type="checkbox"><span class="switch-label"></span><span class="switch-handle"></span></label>
|
||||
</div>
|
||||
<div class="col col-md-3"><label for="text-input" class=" form-control-label">Publication articles</label><small class="form-text text-muted"> L'utilisateur avec ce poste peux t-il autoriser la publication ou appouver des changements a un articles</small></div>
|
||||
<div class="col col-md-3" style="margin: auto;">
|
||||
<label for="disabled-input" class=" form-control-label"></label>
|
||||
<label class="switch switch-3d switch-primary mr-3" style="margin-left: 3rem;"><input name="{{$job->id}}_paper_publish" name="{{$job->id}}_paper_publish" class="switch-input" @if($job->paper_publish == "1") checked="true" @endif type="checkbox"><span class="switch-label"></span><span class="switch-handle"></span></label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row form-group">
|
||||
<div class="col col-md-3"><label for="text-input" class=" form-control-label">Notifiation articles</label><small class="form-text text-muted"> L'utilisateur avec ce poste doit t-il recevoir des notifiation pour tous les changements en lien avec les articles.</small></div>
|
||||
<div class="col col-md-3" style="margin: auto;">
|
||||
<label for="disabled-input" class=" form-control-label"></label>
|
||||
<label class="switch switch-3d switch-primary mr-3" style="margin-left: 3rem;"><input name="{{$job->id}}_paper_notify" name="{{$job->id}}_paper_notify" class="switch-input" @if($job->paper_notify == "1") checked="true" @endif type="checkbox"><span class="switch-label"></span><span class="switch-handle"></span></label>
|
||||
</div>
|
||||
<div class="col col-md-3"><label for="text-input" class=" form-control-label">Consultation inventaire</label><small class="form-text text-muted"> L'utilisateur avec ce poste peut t'il consulter l'inventaire</small></div>
|
||||
<div class="col col-md-3" style="margin: auto;">
|
||||
<label for="disabled-input" class=" form-control-label"></label>
|
||||
<label class="switch switch-3d switch-primary mr-3" style="margin-left: 3rem;"><input name="{{$job->id}}_inventory_see" name="{{$job->id}}_inventory_see" class="switch-input" @if($job->inventory_see == "1") checked="true" @endif type="checkbox"><span class="switch-label"></span><span class="switch-handle"></span></label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row form-group">
|
||||
<div class="col col-md-3"><label for="text-input" class=" form-control-label">Modification inventaire</label><small class="form-text text-muted"> L'utilisateur avec ce poste peut t'il ajouter, modifier et supprimer l'inventaire</small></div>
|
||||
<div class="col col-md-3" style="margin: auto;">
|
||||
<label for="disabled-input" class=" form-control-label"></label>
|
||||
<label class="switch switch-3d switch-primary mr-3" style="margin-left: 3rem;"><input name="{{$job->id}}_inventory_edit" name="{{$job->id}}_inventory_edit" class="switch-input" @if($job->inventory_edit == "1") checked="true" @endif type="checkbox"><span class="switch-label"></span><span class="switch-handle"></span></label>
|
||||
</div>
|
||||
<div class="col col-md-3"><label for="text-input" class=" form-control-label">Notifiation inventaire</label><small class="form-text text-muted"> L'utilisateur avec ce poste doit t-il recevoir des notifiation pour tous les changements en lien avec les articles.</small></div>
|
||||
<div class="col col-md-3" style="margin: auto;">
|
||||
<label for="disabled-input" class=" form-control-label"></label>
|
||||
<label class="switch switch-3d switch-primary mr-3" style="margin-left: 3rem;"><input name="{{$job->id}}_inventory_notify" name="{{$job->id}}_inventory_notify" class="switch-input" @if($job->inventory_notify == "1") checked="true" @endif type="checkbox"><span class="switch-label"></span><span class="switch-handle"></span></label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row form-group">
|
||||
<div class="col col-md-3"><label for="text-input" class=" form-control-label">Modification utilisateur</label><small class="form-text text-muted"> L'utilisateur avec ce poste peut t'il ajouter, modifier et supprimer des utilisateurs</small></div>
|
||||
<div class="col col-md-3" style="margin: auto;">
|
||||
<label for="disabled-input" class=" form-control-label"></label>
|
||||
<label class="switch switch-3d switch-primary mr-3" style="margin-left: 3rem;"><input name="{{$job->id}}_user_edit" name="{{$job->id}}_user_edit" class="switch-input" @if($job->user_edit == "1") checked="true" @endif type="checkbox"><span class="switch-label"></span><span class="switch-handle"></span></label>
|
||||
</div>
|
||||
<div class="col col-md-3"><label for="text-input" class=" form-control-label">Notifiation utilisateur</label><small class="form-text text-muted"> L'utilisateur avec ce poste doit t-il recevoir des notifiation pour tous les changements en lien avec les utilisateurs.</small></div>
|
||||
<div class="col col-md-3" style="margin: auto;">
|
||||
<label for="disabled-input" class=" form-control-label"></label>
|
||||
<label class="switch switch-3d switch-primary mr-3" style="margin-left: 3rem;"><input name="{{$job->id}}_user_notify" name="{{$job->id}}_user_notify" class="switch-input" @if($job->user_notify == "1") checked="true" @endif type="checkbox"><span class="switch-label"></span><span class="switch-handle"></span></label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-footer">
|
||||
<button type="submit" class="btn btn-primary btn-sm">
|
||||
<i class="fa fa-dot-circle-o"></i> Submit
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@section('breadcrumb')
|
||||
<div class="breadcrumbs">
|
||||
<div class="col-sm-4">
|
||||
<div class="page-header float-left">
|
||||
<div class="page-title">
|
||||
<h1>{{ trans('admin/dashboard.page_title')}}</h1>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-8">
|
||||
<div class="page-header float-right">
|
||||
<div class="page-title">
|
||||
<ol class="breadcrumb text-right">
|
||||
<li class="active">{{ trans('admin/dashboard.breadcrumb')}}</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@section('custom_scripts')
|
||||
<script src="/assets/admin/assets/js/lib/data-table/datatables.min.js"></script>
|
||||
<script src="/assets/admin/assets/js/lib/data-table/dataTables.bootstrap.min.js"></script>
|
||||
<script src="/assets/admin/assets/js/lib/data-table/dataTables.buttons.min.js"></script>
|
||||
<script src="/assets/admin/assets/js/lib/data-table/buttons.bootstrap.min.js"></script>
|
||||
<script src="/assets/admin/assets/js/lib/data-table/jszip.min.js"></script>
|
||||
<script src="/assets/admin/assets/js/lib/data-table/pdfmake.min.js"></script>
|
||||
<script src="/assets/admin/assets/js/lib/data-table/vfs_fonts.js"></script>
|
||||
<script src="/assets/admin/assets/js/lib/data-table/buttons.html5.min.js"></script>
|
||||
<script src="/assets/admin/assets/js/lib/data-table/buttons.print.min.js"></script>
|
||||
<script src="/assets/admin/assets/js/lib/data-table/buttons.colVis.min.js"></script>
|
||||
<script src="/assets/admin/assets/js/lib/data-table/datatables-init.js"></script>
|
||||
<script src="https://cloud.tinymce.com/stable/tinymce.min.js?apiKey=r82pabvd9arn3fjb1e2fsolf2xpixuv4hwfwart4cf1fb7mx"></script>
|
||||
<script>
|
||||
tinymce.init({
|
||||
selector: '#<?php echo $job->id?>_desc',
|
||||
branding: false,
|
||||
menubar: 'edit view format'
|
||||
});
|
||||
</script>
|
||||
|
||||
@endsection
|
||||
@@ -10,18 +10,16 @@
|
||||
<div class="card-body">
|
||||
<ul class="nav nav-tabs" id="myTab" role="tablist">
|
||||
@foreach ($jobs as $job)
|
||||
<li class="nav-item">
|
||||
<li class="nav-item nav-stacked">
|
||||
<a class="nav-link" id="{{$job->name}}-tab" data-toggle="tab" href="#{{$job->name}}" role="tab" aria-controls="{{$job->name}}" aria-selected="false">{{$job->name}}</a>
|
||||
</li>
|
||||
@endforeach
|
||||
</ul>
|
||||
<form>
|
||||
<div class="tab-content pl-3 p-1" id="myTabContent">
|
||||
@foreach ($jobs as $job)
|
||||
<div class="tab-pane fade" id="{{$job->name}}" role="tabpanel" aria-labelledby="{{$job->name}}-tab">
|
||||
<h3>{{ $job->desc }}</h3>
|
||||
<div class="row form-group">
|
||||
<div class="col-12"><textarea name="{{$job->id}}_desc" name="{{$job->id}}_desc" rows="9" class="form-control"></textarea>
|
||||
<div class="col-12">{{ $job->desc }}
|
||||
<small class="form-text text-muted">Description du poste</small></div>
|
||||
</div>
|
||||
<hr>
|
||||
@@ -133,12 +131,9 @@
|
||||
@endforeach
|
||||
|
||||
<div class="card-footer">
|
||||
<button type="submit" class="btn btn-primary btn-sm">
|
||||
<i class="fa fa-dot-circle-o"></i> Submit
|
||||
</button>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
0
resources/views/admin/job/show.blade.php
Normal file
0
resources/views/admin/job/show.blade.php
Normal file
115
resources/views/admin/local/index.blade.php
Normal file
115
resources/views/admin/local/index.blade.php
Normal file
@@ -0,0 +1,115 @@
|
||||
@extends('layouts.admin.main')
|
||||
|
||||
@section('content')
|
||||
<div class="col-md-12">
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<strong class="card-title">Inventaire <a href="#"><i class="fa fa-question-circle" aria-hidden="true"></i>
|
||||
</a></strong>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<table id="log-data" class="table table-striped table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>ID </th>
|
||||
<th>Nom</th>
|
||||
<th>Description</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach ($locals as $local)
|
||||
<tr>
|
||||
<td style="width:5%;">{{$local->id}}</td>
|
||||
<td>{{$local->name}}</td>
|
||||
<td>{{$local->desc}}</td>
|
||||
<td style="width: 12%;"><a href="/admin/inventory/edit/{{$local->id}}" type="button" class="btn btn-secondary"><i class="fa fa-cog"></i> Modifier</a><a type="button" class="btn btn-danger" onclick="deleteEvent({{$local->id}});"><i class="fa fa-times-circle" style="color:white;"></i></a></td>
|
||||
</tr>
|
||||
@endforeach
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@section('breadcrumb')
|
||||
<div class="breadcrumbs">
|
||||
<div class="col-sm-4">
|
||||
<div class="page-header float-left">
|
||||
<div class="page-title">
|
||||
<h1>Inventaire</h1>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-8">
|
||||
<div class="page-header float-right">
|
||||
<div class="page-title">
|
||||
<ol class="breadcrumb text-right">
|
||||
<li class="active">Inventaire</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@section('custom_scripts')
|
||||
<script src="/assets/admin/assets/js/lib/data-table/datatables.min.js"></script>
|
||||
<script src="/assets/admin/assets/js/lib/data-table/dataTables.bootstrap.min.js"></script>
|
||||
<script src="/assets/admin/assets/js/lib/data-table/dataTables.buttons.min.js"></script>
|
||||
<script src="/assets/admin/assets/js/lib/data-table/buttons.bootstrap.min.js"></script>
|
||||
<script src="/assets/admin/assets/js/lib/data-table/jszip.min.js"></script>
|
||||
<script src="/assets/admin/assets/js/lib/data-table/pdfmake.min.js"></script>
|
||||
<script src="/assets/admin/assets/js/lib/data-table/vfs_fonts.js"></script>
|
||||
<script src="/assets/admin/assets/js/lib/data-table/buttons.html5.min.js"></script>
|
||||
<script src="/assets/admin/assets/js/lib/data-table/buttons.print.min.js"></script>
|
||||
<script src="/assets/admin/assets/js/lib/data-table/buttons.colVis.min.js"></script>
|
||||
<script src="/assets/admin/assets/js/lib/data-table/datatables-init.js"></script>
|
||||
|
||||
<script type="text/javascript">
|
||||
(function($) {
|
||||
$(document).ready(function() {
|
||||
$('#log-data').DataTable({
|
||||
"order": [[ 0, "desc" ]],
|
||||
"lengthMenu": [[25, 50, -1], [25, 50, "All"]],
|
||||
});
|
||||
} );
|
||||
})(jQuery);
|
||||
|
||||
function deleteEvent(pid){
|
||||
swal({
|
||||
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) {
|
||||
|
||||
(function($) {
|
||||
$.post('/api/local/delete?api_token='+api_token, { id: pid } , function(data) {
|
||||
console.log('Delete');
|
||||
});
|
||||
|
||||
|
||||
})(jQuery);
|
||||
|
||||
swal(
|
||||
'Supprimé!',
|
||||
"Le local a été supprimé",
|
||||
'success'
|
||||
).then((result) => {
|
||||
if (result.value) {
|
||||
location.reload();
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
</script>
|
||||
@endsection
|
||||
169
resources/views/admin/user/edit.blade.php
Normal file
169
resources/views/admin/user/edit.blade.php
Normal file
@@ -0,0 +1,169 @@
|
||||
@extends('layouts.admin.main')
|
||||
|
||||
@section('content')
|
||||
<div class="col-md-12">
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<strong class="card-title">Modifier un utilisateur <a href="#"><i class="fa fa-question-circle" aria-hidden="true"></i>
|
||||
</a></strong>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<form action="/admin/user/edit" method="post">
|
||||
@csrf
|
||||
<div class="row">
|
||||
<div class="col-6">
|
||||
<div class="form-group">
|
||||
<label for="firstname">Prénom</label>
|
||||
<input type="text" class="form-control" name="firstname" id="firstname" aria-describedby="helpId" placeholder="John" required value={{$user->firstname}}>
|
||||
<small id="helpId" class="form-text text-muted"><span class="badge badge-warning">Requis</span></small>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-6">
|
||||
<div class="form-group">
|
||||
<label for="lastname">Nom de famille</label>
|
||||
<input type="text" class="form-control" name="lastname" id="lastname" aria-describedby="helpId" placeholder="Doe" required value={{$user->lastname}}>
|
||||
<small id="helpId" class="form-text text-muted"><span class="badge badge-warning">Requis</span></small>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="alert alert-warning" id="email_alert" role="alert" style="display:none;">
|
||||
Les adresses email doivent être identique
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-6">
|
||||
<div class="form-group">
|
||||
<label for="email">Email</label>
|
||||
<input type="email" class="form-control" name="email" id="email" aria-describedby="emailHelp" placeholder="exemple@c-cms.cf" onkeyup="checkEmail()" required value={{$user->email}}>
|
||||
<small id="emailHelp" class="form-text text-muted"><span class="badge badge-warning">Requis</span></small>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-6">
|
||||
<div class="form-group">
|
||||
<label for="email">Confirmer l'addresse email</label>
|
||||
<input type="email" class="form-control" name="emailc" id="emailc" aria-describedby="emailHelp" placeholder="exemple@c-cms.cf" onkeyup="checkEmail()" required value={{$user->email}}>
|
||||
<small id="emailHelp" class="form-text text-muted"><span class="badge badge-warning">Requis</span></small>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-6">
|
||||
<div class="form-group">
|
||||
<label for="adresse">Adresse</label>
|
||||
<input type="text" class="form-control" name="adresse" id="adresse" aria-describedby="helpId" placeholder="14 ave Des Rue, Rimouski" value={{$user->adress}}>
|
||||
<small id="helpId" class="form-text text-muted"></small>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-6">
|
||||
<div class="form-group">
|
||||
<label for="telephone">Telephone</label>
|
||||
<input type="tel"
|
||||
class="form-control" name="telephone" id="telephone" aria-describedby="helpId" placeholder="(XXX) XXX-XXXX" value={{$user->telephone}}>
|
||||
<small id="helpId" class="form-text text-muted"><span class="badge badge-info">Si vous souhaiter recevoir des notifications par SMS</span></small>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-3">
|
||||
<div class="form-group">
|
||||
<label for="sexe">Sexe</label>
|
||||
<select class="form-control" name="sexe" id="sexe" required>
|
||||
@switch($user->sexe)
|
||||
@case("m")
|
||||
<option value="m">Homme</option>
|
||||
@break
|
||||
@case("f")
|
||||
<option value="f">Femme</option>
|
||||
@break
|
||||
@default
|
||||
<option value="a">Autre</option>
|
||||
@endswitch
|
||||
<option value="m">Homme</option>
|
||||
<option value="f">Femme</option>
|
||||
<option value="a">Autre</option>
|
||||
</select>
|
||||
<small id="helpId" class="form-text text-muted"><span class="badge badge-warning">Requis</span></small>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-3">
|
||||
<div class="form-group">
|
||||
<label for="age">Age</label>
|
||||
<input type="number" class="form-control" name="age" id="age" aria-describedby="helpId" placeholder="Age" min="0" max="100" value={{$user->age}}>
|
||||
<small id="helpId" class="form-text text-muted"></small>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-3">
|
||||
<div class="form-group">
|
||||
<label for="rank">Grade</label>
|
||||
<select class="form-control" name="rank" id="rank" required>
|
||||
<option value={{$user->rank}}>{{\App\Rank::find($user->rank)->name}}</option>
|
||||
@foreach ($RankList as $rank)
|
||||
<option value="{{$rank->id}}">{{$rank->name}}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
<small id="helpId" class="form-text text-muted"><span class="badge badge-warning">Requis</span></small>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-3">
|
||||
<div class="form-group">
|
||||
<label for="job">Poste</label>
|
||||
<select class="form-control" name="job" id="job" required>
|
||||
<option value={{$user->job}}>{{\App\Job::find($user->job)->name}}</option>
|
||||
@foreach ($JobsList as $job)
|
||||
<option value="{{$job->id}}">{{$job->name}}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
<small id="helpId" class="form-text text-muted"><span class="badge badge-warning">Requis</span></small>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="alert alert-warning" id="psw_alert" role="alert" style="display:none;">
|
||||
Les mot de passe doivent être identique
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-6">
|
||||
<div class="form-group">
|
||||
<label for="psw">Mot de passe</label>
|
||||
<input type="password" class="form-control" name="psw" id="psw" placeholder="Supermotdepasse" onkeyup="checkPassword()">
|
||||
<small id="helpId" class="form-text text-muted"><span class="badge badge-warning">Requis</span></small>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-6">
|
||||
<div class="form-group">
|
||||
<label for="pswc">Confirmer le mot de passe</label>
|
||||
<input type="password" class="form-control" name="pswc" id="pswc" placeholder="Supermotdepasse" onkeyup="checkPassword()">
|
||||
<small id="helpId" class="form-text text-muted"><span class="badge badge-warning">Requis</span></small>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<button type="submit" id="submit" class="btn btn-primary">Submit</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@section('breadcrumb')
|
||||
<div class="breadcrumbs">
|
||||
<div class="col-sm-4">
|
||||
<div class="page-header float-left">
|
||||
<div class="page-title">
|
||||
<h1>Ajouter un utilisateur</h1>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-8">
|
||||
<div class="page-header float-right">
|
||||
<div class="page-title">
|
||||
<ol class="breadcrumb text-right">
|
||||
<li class="active">utilisateur/Ajouter</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@section('custom_scripts')
|
||||
<script src="/assets/admin/assets/js/user.js"></script>
|
||||
@endsection
|
||||
@@ -23,46 +23,56 @@
|
||||
<li><i class="menu-icon fa fa-times"></i><a href="/admin/message">Supprimer un message</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="menu-item-has-children dropdown">
|
||||
<!--<li class="menu-item-has-children dropdown">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> <i class="menu-icon fa fa-map"></i>{{ trans('admin/sidebar.blueprint')}}</a>
|
||||
<ul class="sub-menu children dropdown-menu">
|
||||
<li><i class="menu-icon fa fa-list"></i><a href="#">{{ trans('admin/sidebar.public_page_see')}}</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</li>-->
|
||||
|
||||
<h3 class="menu-title">{{ trans('admin/sidebar.admin_title')}}</h3><!-- /.menu-title -->
|
||||
|
||||
<li class="menu-item-has-children dropdown">
|
||||
<!--<li class="menu-item-has-children dropdown">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> <i class="menu-icon fa fa-newspaper-o"></i>{{ trans('admin/sidebar.public_page_title')}}</a>
|
||||
<ul class="sub-menu children dropdown-menu">
|
||||
<li><i class="menu-icon fa fa-list"></i><a href="#">{{ trans('admin/sidebar.public_page_see')}}</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</li>-->
|
||||
<li>
|
||||
<a href="/admin/calendar"> <i class="menu-icon fa fa-calendar"></i>Horaire</a>
|
||||
</li>
|
||||
<li class="menu-item-has-children dropdown">
|
||||
<!--<li class="menu-item-has-children dropdown">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> <i class="menu-icon fa fa-cogs"></i>{{ trans('admin/sidebar.services_title')}}</a>
|
||||
<ul class="sub-menu children dropdown-menu">
|
||||
<li><i class="menu-icon fa fa-line-chart"></i><a href="charts-chartjs.html">Chart JS</a></li>
|
||||
<li><i class="menu-icon fa fa-area-chart"></i><a href="charts-flot.html">Flot Chart</a></li>
|
||||
<li><i class="menu-icon fa fa-pie-chart"></i><a href="charts-peity.html">Peity Chart</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</li>-->
|
||||
<li class="menu-item-has-children dropdown">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> <i class="menu-icon fa fa-archive"></i>Inventaire</a>
|
||||
<ul class="sub-menu children dropdown-menu">
|
||||
<li><i class="menu-icon fa fa-archive"></i><a href="/admin/inventory/">Inventaire</a></li>
|
||||
<li><i class="menu-icon fa fa-plus"></i><a href="/admin/item/add">Ajouter un item</a></li>
|
||||
<li><i class="menu-icon fa fa-bookmark"></i><a href="/admin/inventory/booking">Réservation</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="menu-item-has-children dropdown">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> <i class="menu-icon fa fa-area-chart"></i>{{ trans('admin/sidebar.stats_title')}}</a>
|
||||
<ul class="sub-menu children dropdown-menu">
|
||||
<li><i class="menu-icon fa fa-user-secret"></i><a href="/admin/stats/">Vue d'ensemble</a></li>
|
||||
<!--<li><i class="menu-icon fa fa-user-secret"></i><a href="/admin/stats/">Vue d'ensemble</a></li>-->
|
||||
<li><i class="menu-icon fa fa-user-secret"></i><a href="/admin/stats/log">Liste des activitées</a></li>
|
||||
<li><i class="menu-icon fa fa-user-secret"></i><a href="/admin/stats/message">Message de la semaine</a></li>
|
||||
<li><i class="menu-icon fa fa-user-secret"></i><a href="/admin/stats/plan">Remise des plans de cours</a></li>
|
||||
<!--<li><i class="menu-icon fa fa-user-secret"></i><a href="/admin/stats/message">Message de la semaine</a></li>
|
||||
<li><i class="menu-icon fa fa-user-secret"></i><a href="/admin/stats/plan">Remise des plans de cours</a></li>-->
|
||||
</ul>
|
||||
</li>
|
||||
<li class="menu-item-has-children dropdown">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> <i class="menu-icon fa fa-users"></i>{{ trans('admin/sidebar.users_title')}}</a>
|
||||
<ul class="sub-menu children dropdown-menu">
|
||||
<li><i class="menu-icon fa fa-user-secret"></i><a href="/admin/log">Activitées des utilisateurs</a></li>
|
||||
<li><i class="menu-icon fa fa-plus"></i><a href="/admin/user/add">Ajouter un utilisateur</a></li>
|
||||
<li><i class="menu-icon fa fa-list"></i><a href="/admin/user">Liste des utilisateurs</a></li>
|
||||
<li><i class="menu-icon fa fa-user-secret"></i><a href="/admin/log">Activitées des utilisateurs</a></li>
|
||||
|
||||
</ul>
|
||||
</li>
|
||||
<li class="menu-item-has-children dropdown">
|
||||
@@ -71,7 +81,7 @@
|
||||
<li><i class="menu-icon fa fa-cog"></i><a href="/admin/config">Général</a></li>
|
||||
<li><i class="menu-icon fa fa-building"></i><a href="/admin/config/local">Locaux</a></li>
|
||||
<li><i class="menu-icon fa fa-briefcase"></i><a href="/admin/config/job">Poste</a></li>
|
||||
<li><i class="menu-icon fa fa-address-card"></i><a href="/admin/config/rank">Grade</a></li>
|
||||
<!--<li><i class="menu-icon fa fa-address-card"></i><a href="/admin/config/rank">Grade</a></li>-->
|
||||
</ul>
|
||||
</li>
|
||||
<h3 class="menu-title">{{ trans('admin/sidebar.tools_title') }}</h3>
|
||||
|
||||
0
resources/views/layouts/ecc/main.blade.php
Normal file
0
resources/views/layouts/ecc/main.blade.php
Normal file
@@ -77,13 +77,13 @@
|
||||
<section class="spotlight">
|
||||
<div class="image"><img src="/assets/public/images/survie_3.png" alt="" /></div><div class="content">
|
||||
<h2>SURVIES D'AUTOMNE ET D'HIVER</h2>
|
||||
<p>Exercices aventuriers de 3 jours en forêt pendant lesquels nos cadets développent leurs compétences en survie. Plaisir et dépassement de soi sont au rendez-vous !</p>
|
||||
<p>Exercices aventuriers de 3 jours en forêt pendant lesquels nos cadets développent leurs compétences de survie. Plaisir et dépassement de soi sont au rendez-vous !</p>
|
||||
</div>
|
||||
</section>
|
||||
<section class="spotlight">
|
||||
<div class="image"><img src="/assets/public/images/planeur_romeo_vachon.png" alt="" /></div><div class="content">
|
||||
<h2>LE PILOTAGE</h2>
|
||||
<p>Il s'agit de ce qui nous diférencie des autres éléments, les cours de pilotage. Les cadets ont la possibilité d'obtenir leurs licence de pilotage gratuitement! Les cours donnés une fois par semaine entretiennent le culte des Pilots!</p>
|
||||
<p>Il s'agit de ce qui nous diférencie des autres éléments, les cours de pilotage. Les cadets ont la possibilité d'obtenir leur licence de pilotage gratuitement! Les cours donnés une fois par semaine entretiennent le culte des Pilots!</p>
|
||||
</div>
|
||||
</section>
|
||||
</section>
|
||||
@@ -124,6 +124,10 @@
|
||||
<h3><img src="/assets/public/images/CL-415.png" alt="Avion anti-incendie" width="100%"></h3>
|
||||
<p>Lors d'une autre activité spéciale, les cadets ont eu la chance de visiter l'intérieur d'un CL-415 et de discuter avec les pilotes.</p>
|
||||
</li>
|
||||
<li>
|
||||
<h3><img src="/assets/public/images/RissanenAiles.png" alt="Cadet-cadre qui obtient ses licences de planeur" width="100%"></h3>
|
||||
<p>À la fin de cet été, un de nos cadets-cadres sortants, a obtenu ses ailes de planeur, à la suite d'un camp de 6 semaines. Félicitation!</p>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
Reference in New Issue
Block a user