@extends('backend.layouts.app') @section('title', 'Preview Staff Import') @section('content') @php $pageTitle = 'Preview Staff Import'; $indexRoute = 'content-directory-staff.index'; $indexLabel = 'Staff'; @endphp @include('backend.layouts.partials._page_header')

Import Preview

File: {{ $filename }}

{{ number_format($totalRows) }} data row(s)

Valid rows

{{ number_format($validRows) }}

Invalid rows

{{ number_format($invalidRows) }}

Will insert

{{ number_format($insertCount) }}

Will update

{{ number_format($updateCount) }}

@if ($invalidRows > 0)

This file cannot be imported yet.

Fix the invalid rows below and upload the corrected file. No data has been written to the database.

@endif @if ($errors->any())
{{ $errors->first() }}
@endif @if (! empty($createMissingPositions))
Create missing positions is enabled — rows marked New will add the position to the Parameters module (cat DIRECTORY_STAFF_POSITION) when you confirm.
@endif
@csrf
Cancel @if ($invalidRows > 0) Download Error Report @endif

Row Validation

Showing {{ count($rows) }} of {{ number_format($totalRows) }} rows. @if ($truncated) The table is limited to the first 100 rows; validation covers the whole file. @endif

@foreach ($rows as $row) @if (! empty($row['errors'])) @endif @endforeach
Row Name Email Department Position Phone Sort Action Status
{{ $row['row'] }} {{ $row['name'] ?: '—' }} {{ $row['email'] ?: '—' }} {{ $row['department_name'] ?: ($row['department'] ?: '—') }}
{{ $row['position'] ?: '—' }}
@if (! empty($row['position_name_en']))
{{ $row['position_name_en'] }}
@endif @if (($row['position_status'] ?? '') === 'new') New: {{ $row['position_ref_code'] }} (will be created) @elseif (! empty($row['position_ref_code'])) {{ $row['position_ref_code'] }} @endif
{{ $row['phone'] ?: '—' }} {{ $row['sort'] }} @if ($row['action'] === 'update') Update @else Insert @endif @if (empty($row['errors'])) {{ $row['status'] ? 'Active' : 'Inactive' }} @else Invalid @endif

Row {{ $row['row'] }} needs attention

    @foreach ($row['errors'] as $error)
  • {{ $error }}
  • @endforeach
@endsection