@extends('layouts.app')
@php
use App\Models\TenancyImportRow;
$tabs = [
'' => ['label' => 'All rows', 'count' => $batch->rows_read],
TenancyImportRow::OUTCOME_NEW => ['label' => 'New outlets', 'count' => $batch->rows_new],
TenancyImportRow::OUTCOME_UPDATE => ['label' => 'Will update', 'count' => $batch->rows_updated],
TenancyImportRow::OUTCOME_DUPLICATE => ['label' => 'Duplicates', 'count' => $batch->rows_duplicate],
TenancyImportRow::OUTCOME_INVALID => ['label' => 'Cannot import', 'count' => $batch->rows_invalid],
];
@endphp
@section('title', 'Import preview')
@section('heading', 'Import preview — '.$batch->reference)
@section('subheading', $batch->original_filename.' · sheet "'.$batch->sheet_name.'"')
@section('content')
@if ($batch->isCommitted())
This import was committed on {{ $batch->committed_at->format('d M Y H:i') }} —
{{ $batch->rows_imported }} added and {{ $batch->rows_updated }} updated.
View the tenancy records.
@elseif ($batch->status === \App\Models\TenancyImportBatch::STATUS_CANCELLED)
This import was discarded. Nothing was saved.
Start again.
@else
Nothing has been saved yet. Review the rows below, untick anything you do not
want, then choose Import ticked rows.
@endif
{{-- ------------------------------------------------------------ --}}
{{-- Summary --}}
{{-- ------------------------------------------------------------ --}}
Rows read
{{ $batch->rows_read }}
New outlets
{{ $batch->rows_new }}
Will update
{{ $batch->rows_updated }}
Duplicates
{{ $batch->rows_duplicate }}
Cannot import
{{ $batch->rows_invalid }}
@unless ($batch->isCommitted() || $batch->status === \App\Models\TenancyImportBatch::STATUS_CANCELLED)
@endunless
{{-- ------------------------------------------------------------ --}}
{{-- Rows --}}
{{-- ------------------------------------------------------------ --}}
@endsection