@extends('layouts.app') @section('title', 'Archive - Restore Deleted Items') @push('styles') @endpush @section('content') @php $activeTab = request()->get('tab', 'accounts'); $searchQuery = request()->get('search', ''); $fromDate = request()->get('from_date', ''); $toDate = request()->get('to_date', ''); $minAmount = request()->get('min_amount', ''); $maxAmount = request()->get('max_amount', ''); $categorySearch = request()->get('category_search', ''); @endphp {{-- TOASTS --}} @if(session('success'))
{{ session('success') }}
@endif @if(session('error'))
{{ session('error') }}
@endif {{-- Stats Cards --}}
{{ number_format($archivedAccounts->total()) }}
Archived Accounts
{{ number_format($archivedCategories->total()) }}
Archived Categories
{{ number_format($archivedTransactions->total()) }}
Archived Transactions
{{-- Filter Bar --}}
@if($searchQuery || $fromDate || $toDate || $minAmount || $maxAmount || $categorySearch) @endif
Accounts ({{ number_format($totalArchivedAccounts) }}) Categories ({{ number_format($totalArchivedCategories) }}) Transactions ({{ number_format($totalArchivedTransactions) }})
{{-- Archived Transactions Tab --}}

Archived Transactions

@if($archivedTransactions->isNotEmpty())
@foreach($archivedTransactions as $item) @php $categoryName = ''; if ($item->transaction_type == 'income' || $item->transaction_type == 'expense') { $category = \App\Models\Category::withTrashed()->find($item->category_id); $categoryName = $category ? $category->name : '-'; } @endphp @endforeach
ID Description Category Amount Type Date Deleted At Actions
#{{ str_pad($item->id, 6, '0', STR_PAD_LEFT) }} {{ Str::limit($item->description ?? '-', 40) }} @if($item->merchant) {{ $item->merchant }} @endif @if($item->transaction_type == 'income' || $item->transaction_type == 'expense') {{ $categoryName }} @elseif($item->transaction_type == 'transfer') Transfer @else @endif {{ number_format($item->amount, 2) }} {{ ucfirst($item->transaction_type) }} {{ \Carbon\Carbon::parse($item->transaction_date)->format('d M Y') }} {{ $item->deleted_at ? $item->deleted_at->format('d M Y H:i') : '-' }}
@csrf
@else

No archived transactions found.

@endif
@endsection