@extends('admin.layouts.app') @section('title', 'Import Codes') @section('content')

Import Codes

@can('import_code.log') Import Log @endcan
{{-- Left Column: File Upload --}}
@csrf
@error('file')
{{ $message }}
@enderror
{{-- Enhanced Error Display --}} @if ($errors->has('import_errors'))
❌ Import Errors:
    @foreach ($errors->get('import_errors') as $msg)
  • {{ $msg }}
  • @endforeach
@endif
{{-- Right Column: Instructions --}}
📄 Import Instructions
  • Upload an Excel file (.xlsx or .xls) with a single column: code.
  • Each code must be 8 characters, alphanumeric only.
  • No duplicate codes allowed (within file or existing database).
  • All rows will be validated before any data is imported.
  • If any error occurs, the import will stop and errors will be shown here.
  • Maximum file size: 2MB.
  • Example of valid codes:
    • AB12CD34
    • ZXCVBN12
@endsection