@extends('layouts.app', ['class' => 'g-sidenav-show bg-gray-100']) @section('content') @include('layouts.navbars.auth.topnav', ['title' => ''])
List Histori Kurs - ({{ $kurs->kode }} → {{ $kurs->kode_lawan }})
@include('components.alert')

@foreach ($history as $h) @php $prevRecord = null; if (!$loop->last) { $prevRecord = $history[$loop->index + 1] ?? null; } $selisihPct = 0; $selisihDir = 'same'; if ($prevRecord && $prevRecord->nilai > 0) { $selisihPct = (($h->nilai - $prevRecord->nilai) / $prevRecord->nilai) * 100; $selisihDir = $selisihPct > 0 ? 'up' : ($selisihPct < 0 ? 'down' : 'same'); } @endphp @endforeach
No Action Timestamp Kurs API Kurs Manual Selisih User
{{ $loop->iteration }} @if (isset($authorize) && $authorize->edit == '1' && $h->isactive == 1) Edit @endif {{ \Carbon\Carbon::parse($h->created_at)->translatedFormat('d F Y') }} {{ number_format($h->kurs_api, 2, ',', '.') }} {{ number_format($h->nilai, 2, ',', '.') }} {{ number_format(abs($selisihPct), 2, ',', '.') }}% @if ($selisihDir == 'up') @elseif ($selisihDir == 'down') @endif {{ $h->user_update ?? $h->user_create }}
Data {{ count($history) > 0 ? 1 : 0 }} - {{ count($history) }} dari {{ count($history) }} data.
@if (request()->filled('swal_message')) @endif @endsection @push('js') @endpush