@extends('layouts.app', ['class' => 'g-sidenav-show bg-gray-100']) {{-- section content --}} @section('content') @include('layouts.navbars.auth.topnav', ['title' => ''])
| Action | No | {{-- retrieve table header --}} @foreach ($table_header as $header){{ $header->alias }} | @endforeach|||
|---|---|---|---|---|---|
|
@if ($detail->approval_hrd == 'pending' && ($authorize->edit == '1' || $authorize->delete == '1'))
@endif
|
{{ $loop->iteration }} | @foreach ($table_header as $field) @php $string = $field->field; @endphp {{-- field type enum --}} @if ($field->type == 'enum')field == 'approval_hrd') data-search="queue-{{ $detail->status_group }} {{ $detail->status_label }}" @endif> @if ($field->field == 'approval_hrd') @if ($detail->status_group == 'completed') {{ $detail->status_label }} @elseif ($detail->status_group == 'rejected') {{ $detail->status_label }} @elseif ($detail->status_group == 'processing') {{ $detail->status_label }} @else {{ $detail->status_label }} @endif @elseif ($field->query != '') @php $data_query = DB::select($field->query); @endphp @foreach ($data_query as $q) @php $sAsArray = array_values((array) $q); @endphp {{ $detail->$string == $sAsArray[0] ? $sAsArray[1] : '' }} @endforeach @else {{ $detail->$string }} @endif | {{-- field type date --}} @elseif ($field->type == 'date'){{ $detail->$string ? \Carbon\Carbon::parse($detail->$string)->format('d F Y') : '-' }} | {{-- field type text (description) --}} @elseif ($field->type == 'text'){{ Str::limit($detail->$string, 50) ?: '-' }} | @else{{ $detail->$string }} | @endif @endforeach