@extends('layouts.dashboard') @section('content') @php /** @var array $groups key => [label,icon,help,...] */ /** @var array $counts key => int row count */ /** @var array $backups newest-first backups already on disk [file,size,at] */ $backups = $backups ?? []; $total = 0; foreach ($counts as $n) { $total += (int) $n; } // Same accent palette as .qm-head-chip / the Get Started page's group cards // (Dashboard Platform-snapshot colours), cycled per data-type so each row is a // distinct, full-row colour accent rather than a flat grey list. $accentFor = [ 'orders' => 'var(--qm-primary)', 'reservations' => 'var(--acc-violet)', 'reviews' => 'var(--acc-amber)', 'menu' => 'var(--acc-teal)', 'taxonomy' => 'var(--acc-teal)', 'restaurants' => 'var(--acc-blue)', 'inventory' => 'var(--acc-orange)', 'cashdrawer' => 'var(--acc-green)', 'coupons' => 'var(--acc-pink)', 'loyalty' => 'var(--acc-violet)', 'campaigns' => 'var(--acc-pink)', 'subscriptions' => 'var(--acc-green)', 'payouts' => 'var(--acc-teal)', 'blog' => 'var(--acc-teal)', 'messages' => 'var(--acc-blue)', 'email' => 'var(--acc-amber)', 'subscribers' => 'var(--acc-slate)', 'notifications' => 'var(--acc-amber)', 'customers' => 'var(--acc-blue)', 'team' => 'var(--acc-violet)', 'audit' => 'var(--acc-slate)', ]; @endphp
@csrf

{{ t_raw('admin.advanced.clear_content_heading') }}

{!! t_raw('admin.advanced.clear_help_1') !!}

{{ t_raw('admin.advanced.clear_choose_heading') }}

@foreach ($groups as $key => $g) @php $n = (int) ($counts[$key] ?? 0); @endphp @endforeach

{{ t_raw('admin.advanced.clear_confirm_heading') }}

@php // Backup step. The wipe cannot be undone from inside the product, so a copy of the // whole database is written before the first row is deleted — and the wipe is // abandoned if that copy could not be written. @endphp

{{ t_raw('admin.advanced.backup_heading') }}

{{ t_raw('admin.advanced.backup_help') }}

@if ($backups)
@foreach ($backups as $b) @endforeach
{{ t_raw('admin.advanced.backup_heading') }}
{{ t_raw('admin.advanced.backup_col_file') }} {{ t_raw('admin.advanced.backup_col_size') }} {{ t_raw('admin.advanced.backup_col_taken') }}
{{ $b['file'] }} {{ $b['size'] }} {!! fmt_datetime($b['at']) !!}
@else

{{ t_raw('admin.advanced.backup_none_yet') }}

@endif
@php // Taking a copy of the whole database is itself privileged, so it asks for the // same password confirmation the wipe does. @endphp
@endsection