@php $headerOption = \App\Http\Controllers\Controller::getHeaderOptions( $title ?? 'Residuals', $subTitle ?? 'Import Residuals', isset($filters) ? $filters : [], isset($advancedFilters) ? $advancedFilters : [] ); @endphp @extends('admin.layouts.layout', $headerOption) @section('content')
{{-- Tab Navigation --}} {{-- Tab Content --}}
{{-- ================================================================ Tab 1: Add a New Report ================================================================ --}} @if(($activeTab ?? 'add-report') == 'add-report')
{{-- Options --}}
{{-- Drag & Drop Upload Zone --}}

Drag and drop residual report here to upload, or

{{-- Progress bar (hidden by default) --}}
0%

{{-- Post-Upload Configuration Card (hidden by default) --}}
{{-- File info row --}}
100

{{-- Processor --}}
CSV, XLS, XLSX, MM101, TMSBO
{{-- Month / Year --}}
{{-- Deposit Month --}}
{{-- Buttons --}}
{{-- Mapping Not Found Section (hidden by default) --}}
Residuals Mapping Not Found

The columns in do not match the saved mapping for .

If a different Processor should be selected, press Go Back.

To see the existing mappings, press View Mappings.

If this is a new residuals report, or there are updated columns in your file, press Create New Mapping.

{{-- Upload result area --}}
{{-- Processing Files Section --}} @if(isset($processingFiles) && count($processingFiles) > 0)
Processing Files
@foreach($processingFiles as $pf) @endforeach
ID Filename Date Processor Size Uploaded By Status Action
{{ $pf->id }} {{ $pf->file_name }} @if($pf->import_status == \App\Models\Residuals\ResidualReport::IMPORT_PROCESSING)
@endif
{{ $pf->year_month ? \Carbon\Carbon::createFromFormat('Y-m', $pf->year_month)->format('M Y') : '-' }} {{ $pf->processor ?: '-' }} {{ $pf->file_size ? number_format($pf->file_size / 1024, 2) . ' KB' : '-' }} {{ $pf->created_at ? $pf->created_at->format('m/d/Y g:ia') : '-' }} {{ $pf->user ? ($pf->user->first_name . ' ' . $pf->user->last_name) : '-' }} @php $is = \App\Models\Residuals\ResidualReport::$importStatuses[$pf->import_status] ?? null; @endphp @if($is) {{ $is['name'] }} @else Unknown @endif View
@if(method_exists($processingFiles, 'links'))
{{ $processingFiles->links() }}
@endif
@endif
@endif {{-- ================================================================ Tab 2: Imported Residual Reports ================================================================ --}} @if(($activeTab ?? '') == 'reports')
{{-- Controls --}}
entries
{{-- Reports DataTable --}}
@forelse($reports as $report) @empty @endforelse
ID # Rows Added Rej DA Date Processor SysPrt Created Status Actions
{{ $report->id }} {{ number_format($report->total_rows ?? 0) }} {{ number_format($report->imported_count ?? 0) }} {{ number_format($report->rejected_count ?? 0) }} {{ $report->da_count ?? '-' }} {{ $report->year_month ?? '-' }} {{ $report->processor ?? '-' }} {{ $report->sys_prt ?? '-' }} @if($report->user) {{ $report->user->first_name ?? '' }} {{ $report->user->last_name ?? '' }}
@endif {{ $report->created_at ? $report->created_at->format('m/d/Y h:i A') : '-' }}
@if($report->status == 2) Published @else Unpublished @endif
No imported reports found
{{-- Pagination --}} @if(isset($reports) && method_exists($reports, 'links')) {{ $reports->links() }} @endif {{-- Mass Actions --}}
Mass Actions
Records affected: 0
@endif {{-- ================================================================ Tab 3: Manage Mappings ================================================================ --}} @if(($activeTab ?? '') == 'mappings')
@forelse($mappings as $mapping) @empty @endforelse
Mapping Name Processor Modified Action
{{ $mapping->name }} {{ $mapping->processor }} {{ $mapping->updated_at ? $mapping->updated_at->format('m/d/Y h:i A') : '-' }} @if($mapping->createdBy)
{{ $mapping->createdBy->first_name ?? '' }} {{ $mapping->createdBy->last_name ?? '' }} @endif
No mappings found
{{-- Pagination --}} @if(isset($mappings) && method_exists($mappings, 'links')) {{ $mappings->links() }} @endif
@endif {{-- ================================================================ Tab 4: Custom Fees ================================================================ --}} @if(($activeTab ?? '') == 'custom-fees')
@forelse($customFees as $fee) @empty @endforelse
Fee Name Fee Type Fee Value Applies To Processor Actions
{{ $fee->fee_name }} {{ ucfirst(str_replace('_', ' ', $fee->fee_type)) }} @if($fee->fee_type === 'percentage') {{ number_format($fee->fee_value, 2) }}% @else ${{ number_format($fee->fee_value, 2) }} @endif {{ ucfirst($fee->applies_to ?? 'All') }} {{ $fee->processor ?? 'All' }}
No custom fees found
{{-- Pagination --}} @if(isset($customFees) && method_exists($customFees, 'links')) {{ $customFees->links() }} @endif
@endif
@endsection @push('modals') {{-- Add Custom Fee Modal --}} {{-- Rename Mapping Modal --}} {{-- Add New Processor Modal --}} @endpush @push('page_script') @endpush