@extends('layouts.app', ['class' => 'g-sidenav-show bg-gray-100']) @section('content') @include('layouts.navbars.auth.topnav', ['title' => ''])
{{ $title_menu }}

@foreach ($table_header as $header) @if ($header->list == '1' && $header->type != 'hidden') @endif @endforeach @foreach ($list as $item) @php $vcount = $loop->iteration; $primary = isset($table_primary) && count($table_primary) > 0 ? $table_primary[0]->field : 'id_transaksi'; // Determine row background color based on status $rowStyle = ''; $rowClass = ''; if (isset($item->sts)) { if ($item->sts === 'approve') { $rowStyle = 'background-color: rgba(25, 135, 84, 0.1);'; // Light green $rowClass = 'table-success-light'; } elseif ($item->sts === 'pending') { $rowStyle = 'background-color: rgba(255, 193, 7, 0.1);'; // Light yellow $rowClass = 'table-warning-light'; } elseif ($item->sts === 'rejected') { $rowStyle = 'background-color: rgba(220, 53, 69, 0.1);'; // Light red $rowClass = 'table-danger-light'; } } elseif (isset($item->isactive) && $item->isactive == '0') { $rowStyle = 'background-color:#ffe9ed;'; $rowClass = 'not'; } @endphp @foreach ($table_header as $field) @if ($field->list == '1' && $field->type != 'hidden') @php $string = $field->field; @endphp @if ($field->type == 'currency') @elseif ($field->type == 'date' || $field->type == 'datetime') @elseif ($field->type == 'enum') @elseif ($field->type == 'image' || $field->type == 'file') @elseif ($field->type == 'join') @elseif ($field->type == 'number') @elseif ($field->field == 'isactive') @else @endif @endif @endforeach @endforeach
Action No{{ $header->alias }}
{{ method_exists($list, 'firstItem') ? $list->firstItem() + $loop->index : $vcount }} {{ $format->CurrencyFormat($item->$string ?? 0, $field->decimals ?? 0, $field->sub ?: 'Rp.') }} {{ $format->DateFormat($item->$string ?? '') }} @if ($field->query != '') @php $data_query = DB::select($field->query); @endphp @foreach ($data_query as $q)
Warning: Undefined variable $q in /opt/lampp/htdocs/msjkoperasi/resources/views/KOP004/pelunasan/list.blade.php on line 100
{{ ($item->$string ?? '') == $sAsArray[0] ? $sAsArray[1] : '' }} @endforeach @else {{ $item->$string ?? '-' }} @endif
@if ($item->$string) @php $fileExtension = strtolower( pathinfo( $item->$string, PATHINFO_EXTENSION, ), ); $isImage = in_array($fileExtension, [ 'jpg', 'jpeg', 'png', 'gif', 'bmp', 'webp', ]); @endphp @if ($isImage) Bukti Pelunasan @else @endif @else - @endif @if ($field->query != '' && ($item->$string ?? '')) @php try { $joinResult = DB::select($field->query . "'" . $item->$string . "'"); $joinDisplayValue = $joinResult[0]->nama_lengkap ?? $item->$string; } catch (\Exception $e) { $joinDisplayValue = $item->$string; } @endphp {{ $joinDisplayValue }} @else {{ $item->$string ?? '-' }} @endif {{ $item->$string ?? '-' }} {{ ($item->$string ?? '1') == '1' ? 'Aktif' : 'Tidak Aktif' }} {{ $item->$string ?? '-' }}
@if (method_exists($list, 'firstItem'))
Data {{ $list->firstItem() }} - {{ $list->lastItem() }} dari {{ $list->total() }} data.
{{ $list->appends(request()->query())->links('pagination::bootstrap-4') }}
@else
Total {{ $list->count() }} data.
@endif
@if ($jsmenu == '1') @if (view()->exists("js.{$dmenu}")) @push('addjs') @include('js.' . $dmenu); @endpush @else @push('addjs') @endpush @endif @endif @push('addcss') @endpush @endsection