{{-- Import button --}}
@if(!$job) @else @endif
{{-- Only show reset when the import is stuck (loaded from a previous session) or explicitly failed --}}
@if($job)
{{ $job->created_at->diffForHumans() }}
@endif
{{-- Dependencies selection --}} @if(count($availableDependencies) > 0)

Dependencies to Import

|
@foreach($availableDependencies as $depKey => $dep) @endforeach

Uncheck dependencies you want to skip during this import.

@endif
@if(!$groupimport)

{{ \Illuminate\Support\Str::title(\Illuminate\Support\Str::plural($recType->title)) }}

@if(isset($pendingOrProcessingRecords[$recType->recordType])) {{ $pendingOrProcessingRecords[$recType->recordType]->status }} @if($pendingOrProcessingRecords[$recType->recordType]->status === 'Failed') @php $errorMessage = ''; $messageData = json_decode($pendingOrProcessingRecords[$recType->recordType]->message, true); if (json_last_error() === JSON_ERROR_NONE && is_array($messageData)) { if (isset($messageData['title'])) { $errorMessage = $messageData['title']; } if (isset($messageData['o:errorDetails']) && is_array($messageData['o:errorDetails'])) { foreach ($messageData['o:errorDetails'] as $detail) { if (isset($detail['detail'])) { $errorMessage .= ($errorMessage ? ': ' : '') . $detail['detail']; break; // Just show the first detail } } } } else { $errorMessage = $pendingOrProcessingRecords[$recType->recordType]->message; } @endphp

Import Failed

{{ $errorMessage ?: 'An unknown error occurred during import.' }}
@elseif(!in_array($pendingOrProcessingRecords[$recType->recordType]->status, ['Failed', 'Pending']))
{{ $pendingOrProcessingRecords[$recType->recordType]->progress }}%
@else
@endif @endif
@if ($mapping->date_range)
Import filter set to import all {{ \Illuminate\Support\Str::title(\Illuminate\Support\Str::plural($recType->title)) }} since {{ \Carbon\Carbon::parse($mapping->date_start)->format('F jS, Y') }}.
@else
Importing filter set to import all {{ \Illuminate\Support\Str::title(\Illuminate\Support\Str::plural($recType->title)) }} since the start of time.
@endif
@else @if($groupedRecordTypes) @foreach($groupedRecordTypes as $key => $recordtype)

{{ \Illuminate\Support\Str::title(\Illuminate\Support\Str::plural($recordtype->title)) }}

@if(isset($pendingOrProcessingRecords[$recordtype->recordType])) {{ $pendingOrProcessingRecords[$recordtype->recordType]->status }} @else Pending @endif @if(isset($pendingOrProcessingRecords[$recordtype->recordType])) @if(!in_array($pendingOrProcessingRecords[$recordtype->recordType]->status, ['Failed', 'Pending']))
{{ $pendingOrProcessingRecords[$recordtype->recordType]->progress }}%
@else
@endif @else
@endif
@if(isset($mappings[$recordtype['id']])) @if ($mappings[$recordtype['id']]->date_range)
Import all {{ \Illuminate\Support\Str::title(\Illuminate\Support\Str::plural($recordtype->title)) }} since {{ \Carbon\Carbon::parse($mappings[$recordtype['id']]->date_start)->format('F jS, Y') }}.
@else
Import all {{ \Illuminate\Support\Str::title(\Illuminate\Support\Str::plural($recordtype->title)) }} since the start of time.
@endif @else
Import all {{ \Illuminate\Support\Str::title(\Illuminate\Support\Str::plural($recordtype->title)) }} since the start of time.
@csrf
@endif
@endforeach @endif @endif
@php $hasActiveImport = $job && \Domain\SyncStatuses\Models\SyncStatus::where('integration_id', $integration->id) ->where('groupid', $group) ->whereIn('status', ['pending', 'processing', 'Pending', 'Processing', 'Importing Dependencies']) ->exists(); @endphp