Merge branch 'develop' into trunk

This commit is contained in:
Jérémy Munsch 2021-04-21 15:48:58 +02:00
commit 6239c49684
2 changed files with 9 additions and 3 deletions

View file

@ -40,6 +40,11 @@ class TicketController extends Controller
$tickets = $tickets->where('status', '<>', TicketStatus::archived());
}
if ($request->rst) {
Session::remove('tickets.pr');
Session::remove('tickets.sort_col');
Session::remove('tickets.sort_way');
}
if ($request->prs) {
Session::remove('tickets.pr');
}

View file

@ -12,11 +12,12 @@
@else
<a href="{{ route('ticket.index', ['status' => TicketStatus::archived()]) }}" class="float-right btn btn-sm btn-secondary mr-2">Tickets Archivés</a>
@endif
<a href="{{ route('ticket.index', ['rst' => 1]) }}" class="float-right btn btn-sm btn-dark mr-2">Réinitialiser le tri</a>
<div class="float-right mr-2">
<select class="custom-select">
<option value="-1" onclick="window.location='{{ route('ticket.index', ['prs' => '-1']) }}'">Tous</option>
<select class="custom-select" onchange="window.location='{{ route('ticket.index') }}?'+(this.value == -1 ? 'prs=-1' : 'pr='+this.value);">
<option value="-1">Tous</option>
@foreach($projects as $project)
<option value="{{$project->id}}" @if(intval(session('tickets.pr')) == $project->id)selected="selected" @endif onclick="window.location='{{ route('ticket.index', ['pr' => $project]) }}'">{{$project->name}}</option>
<option value="{{$project->id}}" @if(intval(session('tickets.pr')) == $project->id)selected="selected" @endif>{{$project->name}}</option>
@endforeach
</select>
</div>