Ajout type BR

This commit is contained in:
Jérémy Munsch 2021-10-25 13:27:37 +02:00
parent 730c4b1439
commit 52f1d986ac
No known key found for this signature in database
GPG key ID: 55196BEE445F6049
2 changed files with 5 additions and 2 deletions

View file

@ -7,6 +7,7 @@ use Kwaadpepper\Enum\BaseEnumRoutable;
/**
* @method static self bug()
* @method static self evolution()
* @method static self br()
*/
class TicketType extends BaseEnumRoutable
{
@ -15,6 +16,7 @@ class TicketType extends BaseEnumRoutable
return [
'bug' => 0,
'evolution' => 1,
'br' => 2,
];
}
@ -23,6 +25,7 @@ class TicketType extends BaseEnumRoutable
return [
'bug' => trans('Bug'),
'evolution' => trans('Évolution'),
'br' => trans('Demande relative aux BR'),
];
}
}

View file

@ -97,7 +97,7 @@ $userPr = Auth::user()->sites ?? collect([]);
</td>
<td>{{ $ticket->site->name }}</td>
<td>
<span class="badge @if($ticket->type->equals(TicketType::bug())) bg-danger @else bg-success @endif">{{ $ticket->type->label }}</span>
<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>
</td>
<td>
@if ($ticket->file !== null)
@ -134,7 +134,7 @@ $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 @else bg-success @endif">{{ $ticket->type->label }}</span>
<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>
</h5>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="{{ __('Fermer') }}"></button>
</div>