@php $lastKey = ''; if (!empty($title)) { $keys = array_keys($title); $lastKey = end($keys); } @endphp @extends('layouts.app') @section('page-metaSEO') {{$lastKey}} @endsection @section('page-css') @endsection @section('content')
@php $actions = explode(',', $config['actions'] ?? ''); @endphp @if( isset($config['can_add']) && $config['can_add'] == false ) @else + @endif @if(isset($config['related'])) @endif @if(in_array('edit', $actions)) @endif @if(in_array('activate', $actions)) @endif @if(in_array('delete', $actions)) @endif @foreach($config['columns'] as $field => $meta) @if($meta['visible'] ?? true) @endif @endforeach @foreach($rows as $row) @if(in_array('edit', $actions)) @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 @endif @endforeach @endforeach
{{ $meta['label'] ?? ucfirst(str_replace('_', ' ', $field)) }}
@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 @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
@endsection @section('scripts') @include('js.js-table') @endsection