Merge branch 'develop' into trunk

This commit is contained in:
Jérémy Munsch 2021-12-01 13:40:34 +01:00
commit 72fa30ca72
No known key found for this signature in database
GPG key ID: 55196BEE445F6049
2 changed files with 19 additions and 1 deletions

View file

@ -8,6 +8,7 @@ use Kwaadpepper\Enum\BaseEnumRoutable;
* @method static self bug()
* @method static self evolution()
* @method static self br()
* @method static self newsletter()
*/
class TicketType extends BaseEnumRoutable
{

View file

@ -134,7 +134,24 @@ $userPr = Auth::user()->sites ?? collect([]);
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="ticket{{ $ticket->id }}ModalLabel">
<b>{{ $ticket->site->name }}</b> - <u>{{__('Ticket n°') }} {{ $ticket->id }}</u> - <span class="badge @if($ticket->type->equals(TicketType::bug())) bg-danger @elseif($ticket->type->equals(TicketType::evolution())) bg-success @else bg-primary @endif">{{ $ticket->type->label }}</span>
<b>{{ $ticket->site->name }}</b> - <u>{{__('Ticket n°') }} {{ $ticket->id }}</u>&nbsp;-&nbsp;
@php
$ticketClass = 'bg-primary';
switch($ticket->type) {
case TicketType::bug():
$ticketClass = 'bg-danger';
break;
case TicketType::evolution():
$ticketClass = 'bg-success';
break;
case TicketType::newsletter():
$ticketClass = 'bg-warning';
break;
}
@endphp
<span class="badge {{ $ticketClass }}">{{
$ticket->type->label
}}</span>
</h5>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="{{ __('Fermer') }}"></button>
</div>