@extends('layouts.superadmin') @section('title', "Map Columns: {$import->filename}") @section('content')

Schema & Column Mapping

Map detected columns from {{ $import->filename }} to standard {{ $import->entity_type_label }} database fields.

Cancel Ingestion
Target Entity {{ $import->entity_type_label }}
Total Data Rows {{ number_format($totalRows) }} records
Detected Headers {{ count($headers) }} columns

File Sample Preview (First 5 Rows)

@foreach($headers as $header) @endforeach @forelse($previewRows as $rowIndex => $row) @foreach($headers as $colIndex => $h) @endforeach @empty @endforelse
# {{ $header }}
{{ $rowIndex + 1 }} {{ $row[$colIndex] ?? '' }}
No data rows found in uploaded file.

Column Mapping Assignment

The system automatically matched columns where possible. Review each assignment and map any unmapped columns.

@csrf
@foreach($headers as $colIdx => $headerName) @php $sampleVal = $previewRows[0][$colIdx] ?? '—'; $selectedMapping = $suggestedMapping[$colIdx] ?? ''; @endphp @endforeach
Source Column in File Sample Value Target System Field
{{ $headerName }} Index [{{ $colIdx }}] {{ $sampleVal }}
Schema Requirements Check
@foreach($availableFields as $fKey => $fMeta) @if($fMeta['required']) {{ $fMeta['label'] }} (Required) @endif @endforeach
Cancel
@endsection