@include('festool-product-data::partials.tabs', ['active' => 'data']) {{-- Stats --}} @php $browseBase = \Webkul\FestoolProductData\Filament\Pages\BrowseFestoolProducts::getUrl(); @endphp
{{ number_format($this->stats['products']) }}
Products
{{ number_format($this->stats['spare_parts']) }}
Spare Parts
{{ number_format($this->stats['scraped']) }}
Web Scraped
{{ number_format($this->stats['pending']) }}
Pending Scrape
{{ number_format($this->stats['not_found']) }}
Not on Website
{{ number_format($this->stats['errors']) }}
Scrape Errors
{{-- SAP status breakdown --}} @if (!empty($this->stats['sap_statuses'])) @php $sapColors = [ 'Current' => ['bg' => '#f0fdf4', 'text' => '#15803d'], 'Discontinued' => ['bg' => '#fef2f2', 'text' => '#b91c1c'], 'Discontinued with successor' => ['bg' => '#fff7ed', 'text' => '#c2410c'], 'Discontinued without successor' => ['bg' => '#fef2f2', 'text' => '#9f1239'], 'New data creation in SAP' => ['bg' => '#eff6ff', 'text' => '#1d4ed8'], ]; @endphp
By SAP Status
@foreach ($this->stats['sap_statuses'] as $sapStatus => $count) @php $col = $sapColors[$sapStatus] ?? ['bg' => '#f3f4f6', 'text' => '#374151']; $displayStatus = $sapStatus === '(none)' ? 'Price List Only' : $sapStatus; $urlStatus = $sapStatus === '(none)' ? '__null__' : $sapStatus; $url = $browseBase . '?filterStatus=' . urlencode($urlStatus); @endphp {{ number_format($count) }} {{ $displayStatus }} @endforeach
@endif {{-- Last import summary cards --}}
@foreach ([ ['master_data', 'Master Data', '#6d28d9', '#ede9fe'], ['price_list', 'Price List', '#92400e', '#fef3c7'], ['spare_parts', 'Spare Parts', '#374151', '#f3f4f6'], ] as [$type, $label, $textColor, $bgColor]) @php $batch = $this->lastBatch[$type] ?? null; @endphp
{{ $label }}
@if ($batch)
{{ number_format($batch->imported_count) }}
last imported {{ \Carbon\Carbon::parse($batch->created_at)->diffForHumans() }}
@else
—
never imported
@endif
@endforeach
{{-- Import history --}}
Import History
@if (empty($this->recentBatches))
No imports yet. Use the buttons above to upload Festool Excel files.
@else @foreach ($this->recentBatches as $batch) @endforeach
# Type Status Imported Errors File By Date
{{ $batch->id }} @php $typeStyle = match ($batch->file_type) { 'master_data' => 'fpd-type-master', 'price_list' => 'fpd-type-price', default => 'fpd-type-spare', }; $typeLabel = match ($batch->file_type) { 'master_data' => 'Master', 'price_list' => 'Price List', 'spare_parts' => 'Spare Parts', default => $batch->file_type, }; @endphp {{ $typeLabel }} {{ $batch->status }} {{ number_format($batch->imported_count) }} {{ number_format($batch->error_count) }} {{ basename($batch->filename) }} {{ $batch->imported_by ?? '—' }} {{ \Carbon\Carbon::parse($batch->created_at)->format('d M Y H:i') }}
@endif