feat: ✨ add estimate column to tickets page
This commit is contained in:
parent
e71c0546c5
commit
721e2200f6
3 changed files with 16 additions and 3 deletions
|
|
@ -223,6 +223,7 @@ return [
|
|||
'default' => 'default',
|
||||
'date_mep' => 'Desired Launch',
|
||||
'published' => 'Publication',
|
||||
'all' => 'All'
|
||||
'all' => 'All',
|
||||
'estimate' => 'estimate',
|
||||
]
|
||||
];
|
||||
|
|
|
|||
|
|
@ -259,6 +259,7 @@ return [
|
|||
'default' => 'défaut',
|
||||
'date_mep' => 'MEP souhaitée',
|
||||
'published' => 'publication',
|
||||
'all' => 'Tout'
|
||||
'all' => 'Tout',
|
||||
'estimate' => 'estimation',
|
||||
]
|
||||
];
|
||||
|
|
|
|||
|
|
@ -228,6 +228,11 @@
|
|||
'status' => Str::ucfirst(__('validation.attributes.status')),
|
||||
'title' => Str::ucfirst(__('validation.attributes.name')),
|
||||
]);
|
||||
if (session()->has('tickets.ty') && intval(session('tickets.ty')) === \App\Enums\Tickets\TicketTypeEnum::evolution->value) {
|
||||
$cols = array_merge($cols, [
|
||||
'estimate' => Str::ucfirst(__('validation.custom.estimate')),
|
||||
]);
|
||||
}
|
||||
if (Auth::user()->isAdmin()) {
|
||||
$cols = array_merge($cols, [
|
||||
'tickets' => Str::ucfirst(__('validation.custom.tickets')),
|
||||
|
|
@ -241,7 +246,7 @@
|
|||
@endphp
|
||||
@include('bo.modules.table-col-sorter', [
|
||||
'cols' => $cols,
|
||||
'ignore' => session('tickets.or') ? array_keys($cols) : ['id', 'site', 'status', 'tickets'],
|
||||
'ignore' => session('tickets.or') ? array_keys($cols) : ['id', 'site', 'status', 'tickets', 'estimate'],
|
||||
])
|
||||
</thead>
|
||||
<tbody>
|
||||
|
|
@ -304,6 +309,12 @@
|
|||
<td>
|
||||
<span class="me-1">{{ $ticket->title }}</span>
|
||||
</td>
|
||||
{{-- estimate --}}
|
||||
@if (session()->has('tickets.ty') && intval(session('tickets.ty')) === \App\Enums\Tickets\TicketTypeEnum::evolution->value)
|
||||
<td>
|
||||
<span class="me-1">{{ $ticket->estimation?->amount ? sprintf('%sj', $ticket->estimation->amount) : 'En cours' }}</span>
|
||||
</td>
|
||||
@endif
|
||||
{{-- tag --}}
|
||||
@php
|
||||
$routeName = request()->route()->getName();
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue