@extends('layouts.app') @section('title') {{ __('Manage Files') }} @endsection @section('files') active @endsection @section('section.header')

{{ __('manage_downloaded_files') }}

@endsection @section('section.content')
@if (Session::has('success'))
{{ Session::get('success') }}
@endif @if (Session::has('error'))
{{ Session::get('error') }}
@endif

{{ __('list_file') }}

@if (auth()->user()->hasRole('admin'))
@endif
{{-- Nút: canh đáy, desktop nằm cùng hàng; mobile nằm full width --}}
{{ __('Hôm nay') }}
@forelse ($files as $file) @empty @endforelse
{{ __('ID') }} {{ __('creator') }} {{ __('file_name') }} {{ __('file_size') }} {{ __('status') }} {{ __('created_date') }} {{ __('operation') }}
{{ $file->id }} {{ $file->user->username ?? '' }} {{ $file->file_name }} {{ formatBytes($file->file_size) }} @if ($file->state == 'processing') {{ __('Đang xử lí') }} @elseif($file->state == 'processed') {{ __('success') }} @else {{ __('error') }} @endif {{ formatTime($file->created_at) }}
@if ($file->state == 'processed') @else {{-- Chưa xong hoặc lỗi thì không có gì để tải --}} @endif
@csrf @method('DELETE')
{{ __('Không có file nào trong khoảng thời gian này') }}
@endsection @section('scripts') @endsection @section('styles') @endsection