Merge branch 'develop' into trunk

This commit is contained in:
Jérémy Munsch 2021-09-30 09:37:19 +02:00
commit c15aa5b5ee
No known key found for this signature in database
GPG key ID: 55196BEE445F6049
5 changed files with 35 additions and 14 deletions

View file

@ -1,3 +1,10 @@
### 30.09 -> 1.0.4
- Correction lors de l'apperçu des messages
- Correction lors de message sur affichage (auteur message)
- Modification de la couleur BG sur label statut du ticket
- Modification de l'url précédent sur ticket.show (garde en mémoire le filtre multi projet)
- Modification Tri par défaut sur ticket id DESC
### 29.09 -> 1.0.3
- Correction des avertissements avant cloture des tickets
- Ajout d'un bouton pour les utilisateurs afin de réouvrir un ticket clos

View file

@ -93,6 +93,8 @@ class TicketController extends Controller
Session::get('tickets.sort_col'),
Session::get('tickets.sort_way')
);
} else {
$tickets = $tickets->orderBy('id', 'DESC');
}
return $tickets;
}

View file

@ -1,6 +1,6 @@
{
"name": "ldcweb/supportweb",
"version": "1.0.3",
"version": "1.0.4",
"type": "project",
"description": "The Laravel Framework.",
"keywords": [

View file

@ -89,11 +89,7 @@ $userPr = Auth::user()->sites ?? collect([]);
</td>
<td>{{ $ticket->site->name }}</td>
<td>
@if ($ticket->type->equals(TicketType::bug()))
<span class="badge bg-danger">{{ $ticket->type->label }}</span>
@else
<span class="badge bg-success">{{ $ticket->type->label }}</span>
@endif
<span class="badge @if($ticket->type->equals(TicketType::bug())) bg-danger @else bg-success @endif">{{ $ticket->type->label }}</span>
</td>
<td>
@if ($ticket->file !== null)
@ -130,12 +126,12 @@ $userPr = Auth::user()->sites ?? collect([]);
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="ticket{{ $ticket->id }}ModalLabel">
{{ $ticket->site->name }} - {{__('Ticket N°') }}{{ $ticket->id }} - {{ $ticket->type === 0 ? "Bug" : "Évolution" }}
<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>
</h5>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="{{ __('Fermer') }}"></button>
</div>
<div class="modal-body">
<p>{!! nl2br(e($ticket->text)) !!}</p>
<p>{!! clean(nl2br($ticket->text)) !!}</p>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-sm btn-primary" data-bs-dismiss="modal">{{ __('Fermer') }}</button>

View file

@ -3,13 +3,29 @@
@section('content')
<div class="form-row row">
<h2 class="col">
<a href="{{ route('home') }}" class="text-decoration-none">←</a>
@php
$back = route('ticket.index');
$url = parse_url(url()->previous());
if (
($url['host'] ?? '') === parse_url(config('app.url'), PHP_URL_HOST) and
($url['path'] ?? '') === '/ticket'
) {
$queries = explode('&', $url['query'] ?? '');
foreach($queries as $q) {
$q = explode('=', $q);
if(($q[0] ?? '') === 'pr' and ctype_digit(($q[1] ?? ''))) {
$back = route('ticket.index', ['pr' => $q[1]]);
}
}
}
@endphp
<a href="{{ $back }}" class="text-decoration-none">←</a>
{{ __('Ticket n° :ticketId : :ticketSiteName - :ticketTypeLabel', [
'ticketId' => $ticket->id,
'ticketSiteName' => $ticket->site->name,
'ticketTypeLabel' => $ticket->type->label
]) }}
<span class="badge bg-secondary">{{ $ticket->status->label }}</span>
<span class="badge bg-info">{{ $ticket->status->label }}</span>
</h2>
<div class="col d-flex flex-row text-end">
@can('suscribeToTicket', $ticket)
@ -106,8 +122,8 @@
<br><a data-fslightbox="gallery" href="{{ asset($message->file) }}" target="_blank">Ouvrir la pièce jointe</a><br>
@endif<br><br>
<small class="text-muted fw-bold">{!! __('Créé le :date par <b>:userName</b>', [
'date' => \Carbon\Carbon::parse($ticket->created_at)->format('d/m/Y à H:i'),
'userName' => $ticket->user ? $ticket->user->name : __('Utilisateur supprimé')
'date' => \Carbon\Carbon::parse($message->created_at)->format('d/m/Y à H:i'),
'userName' => $message->user ? $message->user->name : __('Utilisateur supprimé')
]) !!}</small>
</div>
@endif
@ -116,7 +132,7 @@
<hr>
<div>
<h4>{{__('Description') }}</h4>
<p>{!! Utils::plainToHtml($ticket->text) !!}</p>
<p>{!! clean(Utils::plainToHtml($ticket->text)) !!}</p>
<small class="text-muted">{!! __('Créé le :date par <b>:userName</b>', [
'date' => \Carbon\Carbon::parse($ticket->created_at)->format('d/m/Y à H:i'),
'userName' => $ticket->user ? $ticket->user->name : __('Utilisateur supprimé')