@extends('layouts.user') @section('title', 'Map Import Columns') @section('content')

Map Columns

Match your CSV columns to database fields

@csrf

File Preview

@foreach($csvHeaders as $header) @endforeach @foreach($previewData as $index => $row) @if($index > 0) {{-- Handle row length mismatch --}} @foreach($csvHeaders as $key => $header) @endforeach @endif @endforeach
{{ $header }}
{{ isset($row[$key]) ? Str::limit($row[$key], 30) : '' }}
@php $groupedColumns = collect($employeeColumns)->groupBy('category'); @endphp @foreach($groupedColumns as $category => $columns)

{{ $category }}

{{ count($columns) }} Fields
@foreach($columns as $column)
@if(isset($column['note']))

{{ $column['note'] }}

@endif
@endforeach
@endforeach

Import Summary

Total Rows {{ count($previewData) > 0 ? count($previewData) - 1 : 0 }}
Columns Found {{ count($csvHeaders) }}

Only mapped columns will be imported. Rows with validation errors will be skipped and reported.

@endsection