@if(in_array('edit', $actions))
|
@php
$typSpeColumn = null;
foreach ($config['columns'] as $field => $meta) {
if (str_contains(strtolower($field), 'typ_iden')) {
$typSpeColumn = $field;
break;
}
}
@endphp
@if (strtolower($row->$typSpeColumn) != 'spe')
@else
@endif
|
@endif
@if(in_array('activate', $actions))
|
@endif
@if(in_array('delete', $actions))
|
@endif
@foreach($config['columns'] as $field => $meta)
@if($meta['visible'] ?? true)
@php
$type = $meta['type'];
$tooltipCol = $meta['tooltip'] ?? null;
$tooltipVal = null;
// Only apply logic if 'tooltipCol' is not empty or null
if ($tooltipCol) {
$rawVal = $row->$tooltipCol ?? '';
$tooltipVal = e(trim($rawVal) !== '' ? $rawVal : '--');
}
@endphp
@if (strtolower($field) == 'affecte')
@if ($row->$field == 't')
oui
@else
non
@endif
@elseif (str_contains(strtolower($field), 'typ_iden'))
@if (strtolower($row->$field) == 'spe')
oui
@else
non
@endif
@elseif (strtolower($field) == 'rto' || strtolower($field) == 'rpo' || strtolower($field) == 'mto' )
{{ displayRto($row->$field) }}
@elseif($type === 'color')
@elseif($type === 'datetime' && !empty($row->$field) )
{{ formatDate($row->$field) }}
@elseif($type === 'date' && !empty($row->$field))
{{ formatDate($row->$field) }}
@elseif($type === 'time' && !empty($row->$field))
{{ formatDate($row->$field, $timeOnly = true) }}
@elseif ($field =='exposure')
{{ $row->exposure}}
@elseif ($field == 'modified_by')
{{ $row->modified_by_user }}
{{ $row->modified_by_date }}
@elseif ($field =='owner')
{!! $row->owner_label !!}
@elseif ($field =='idPays')
{{ $row->pays}}
@elseif ($field =='id_ind')
{{ $row->indicateur}}
@elseif($field == 'id_orga')
{{ last(parseOrganisationHierarchy($row->$field)) }}
@else
{{ strip_tags(html_entity_decode($row->$field)) }}
@endif
|
@endif
@endforeach
@endforeach