From f800c97a408088157d1837ff425544ccb1238621 Mon Sep 17 00:00:00 2001 From: Daeng Deni Mardaeni Date: Mon, 9 Jun 2025 01:46:18 +0700 Subject: [PATCH] feat(webstatement): tambahkan halaman detail laporan transaksi ATM - Menambahkan view `atm-reports/show.blade.php` untuk menampilkan detail laporan transaksi ATM: - Menampilkan informasi laporan seperti periode, tanggal laporan, status, dan status otorisasi. - Menyediakan informasi file laporan jika status selesai, seperti path, ukuran file, dan jumlah data. - Menampilkan pesan error jika status laporan gagal, termasuk pesan kesalahan detail. - Menampilkan status unduhan laporan beserta waktu unduhan jika sudah diunduh. - Menambahkan informasi pengguna terkait: - Pihak yang membuat, memodifikasi, dan memberikan otorisasi laporan. - Metadata tambahan seperti IP address dan user agent. - Menambahkan form otorisasi untuk laporan dengan status `pending authorization`: - Menyediakan opsi untuk `approve` atau `reject` laporan. - Menyertakan field remarks sebagai catatan keputusan otorisasi. - Memasukkan elemen navigasi: - Tombol kembali ke daftar laporan. - Tombol unduh file laporan (jika tersedia). - Menyertakan scripting tambahan untuk inisialisasi dinamika halaman menggunakan JavaScript. Signed-off-by: Daeng Deni Mardaeni --- resources/views/atm-reports/show.blade.php | 249 +++++++++++++++++++++ 1 file changed, 249 insertions(+) create mode 100644 resources/views/atm-reports/show.blade.php diff --git a/resources/views/atm-reports/show.blade.php b/resources/views/atm-reports/show.blade.php new file mode 100644 index 0000000..94d3c58 --- /dev/null +++ b/resources/views/atm-reports/show.blade.php @@ -0,0 +1,249 @@ +@extends('layouts.main') + +@section('content') +
+
+

ATM Transaction Report Details

+
+ + Back to List + + + @if ($atmReport->status === 'completed' && $atmReport->file_path) + + Download Report + + @endif +
+
+ +
+ @if (session('success')) +
+ {{ session('success') }} +
+ @endif + + @if (session('error')) +
+ {{ session('error') }} +
+ @endif + +
+ +
+
+
+

Report Information

+
+
+
+
+
+
Period
+
+ @php + // Convert format YYYYMMDD to readable date + $date = \Carbon\Carbon::createFromFormat('Ymd', $atmReport->period); + $periodText = $date->format('d F Y'); + @endphp + {{ $periodText }} +
+
+ +
+
Report Date
+
{{ $atmReport->report_date }}
+
+ +
+
Status
+
+ @if ($atmReport->status === 'pending') + Pending + @elseif($atmReport->status === 'processing') + Processing + @elseif($atmReport->status === 'completed') + Completed + @elseif($atmReport->status === 'failed') + Failed + @endif +
+
+ +
+
Authorization Status
+
+ @if ($atmReport->authorization_status === 'pending') + Pending Authorization + @elseif($atmReport->authorization_status === 'approved') + Approved + @elseif($atmReport->authorization_status === 'rejected') + Rejected + @endif +
+
+ + @if ($atmReport->status === 'completed') +
+
File Information
+
+ @if ($atmReport->file_path) +
Path: {{ $atmReport->file_path }}
+ @endif + @if ($atmReport->file_size) +
Size: {{ number_format($atmReport->file_size / 1024, 2) }} KB
+ @endif + @if ($atmReport->record_count) +
Records: {{ number_format($atmReport->record_count) }}
+ @endif +
+
+ @endif + + @if ($atmReport->status === 'failed' && $atmReport->error_message) +
+
Error Message
+
{{ $atmReport->error_message }}
+
+ @endif + +
+
Downloaded
+
+ @if ($atmReport->is_downloaded) + Yes +
+ Downloaded at: + {{ $atmReport->downloaded_at ? $atmReport->downloaded_at->format('d M Y H:i:s') : 'N/A' }} +
+ @else + No + @endif +
+
+
+
+
+ + +
+
+
+

Request Information

+
+
+
+
+
+
Requested By
+
{{ $atmReport->user->name ?? 'N/A' }}
+
+ +
+
Requested At
+
{{ dateFormat($atmReport->created_at, 1, 1) }}
+
+ +
+
IP Address
+
{{ $atmReport->ip_address }}
+
+ +
+
User Agent
+
{{ $atmReport->user_agent }}
+
+ + @if ($atmReport->authorization_status !== 'pending') +
+
Authorized By
+
{{ $atmReport->authorizer->name ?? 'N/A' }}
+
+ +
+
Authorized At
+
+ {{ $atmReport->authorized_at ? $atmReport->authorized_at->format('d M Y H:i:s') : 'N/A' }} +
+
+ @endif + + @if ($atmReport->created_by && $atmReport->created_by !== $atmReport->user_id) +
+
Created By
+
{{ $atmReport->creator->name ?? 'N/A' }}
+
+ @endif + + @if ($atmReport->updated_by) +
+
Last Updated By
+
{{ $atmReport->updater->name ?? 'N/A' }}
+
+ +
+
Last Updated At
+
{{ dateFormat($atmReport->updated_at, 1, 1) }}
+
+ @endif +
+
+
+
+ + @if ($atmReport->authorization_status === 'pending' && auth()->user()->can('authorize_atm_reports')) +
+
+

Authorization

+
+
+
+ @csrf + +
+ +
+
+ + +
+
+ + +
+
+
+ +
+ + +
+ +
+ +
+
+
+
+ @endif +
+
+@endsection + +@push('scripts') + +@endpush