{{ $headingTitle }}

@lang("messages.matchColumnMessage")

@lang("messages.unmatchedColumns", ["unmatchCount" => (!empty($heading) ? collect($columns)->where('required','Yes')->whereNotIn('id', $heading)->count() : 0)]) @lang("app.skipAll")
@php // Determine columns to iterate over - use fileHeading if available, otherwise use first row of importSample $columnsToIterate = []; if (!empty($fileHeading) && is_array($fileHeading)) { $columnsToIterate = array_keys($fileHeading); } elseif (!empty($importSample) && isset($importSample[0]) && is_array($importSample[0])) { $columnsToIterate = array_keys($importSample[0]); } @endphp @forelse ($columnsToIterate as $key)
@if (!empty($heading))

{{$fileHeading[$key]}}

@endif

@if (!empty($heading)) @if(collect($columns)->whereIn('id', $heading[$key])->first()) {{ collect($columns)->whereIn('id', $heading[$key])->first()['name'] }} @else (@lang('app.unmatchedColumn')) @endif @else (@lang('app.unmatchedColumn')) @endif

@if (!empty($importSample)) @foreach ($importSample as $dataKey => $value)

{{ isset($value[$key]) ? $value[$key] : '' }}

@endforeach @endif
@empty @endforelse
@lang('app.submit') @lang('app.cancel')
{{ $backButtonText }}