@extends('layouts.app') @section('title', 'Bulk upload | healthcareers.app') @section('robots', 'noindex, nofollow') @if (in_array($batch->status, ['publishing', 'finishing'], true)) @push('head')@endpush @endif @php $ok = collect($batch->rows ?? [])->filter(fn ($r) => empty($r['errors'])); $bad = collect($batch->rows ?? [])->filter(fn ($r) => ! empty($r['errors'])); $s = $batch->summary ?? []; $money = fn (int $c) => '$'.number_format($c / 100, 2); $rowLabel = fn ($r) => ($r['input']['title'] ?? '') !== '' ? $r['input']['title'] : 'Row '.$r['line']; @endphp @section('content')

{{ $batch->filename ?: 'Bulk upload' }}

For {{ $org?->display_name }} · uploaded {{ $batch->created_at->format('M j, Y g:ia') }}

Bulk upload My posts
@include('partials.errors') @if ($batch->status === 'checked')

{{ $ok->count() }} of {{ $batch->row_count }} {{ $batch->row_count === 1 ? 'row is' : 'rows are' }} ready to post.@if ($bad->count()) {{ $bad->count() }} {{ $bad->count() === 1 ? 'has' : 'have' }} problems (below): fix {{ $bad->count() === 1 ? 'it' : 'them' }} and upload again, or post the ready rows now and the others later. Download the rows to fix@endif

@if (! empty($s['unknown_columns']))

Columns we don't use were ignored: {{ implode(', ', $s['unknown_columns']) }}.

@endif @if ($org && ! $org->isVerified())

{{ $org->display_name }} isn't verified yet, so these posts wait for our review before going live.

@endif
@if ($ok->count() && $plans)
@csrf
How to pay
@foreach (['free_first' => ['Free posts first', 'Uses your free posts first (Basic, '.config('pricing.listings.basic.days').' days), then job pack posts, then card.'], 'standard' => ['All Standard', 'Every job runs '.config('pricing.listings.standard.days').' days: job pack posts first, then card.']] as $key => [$label, $hint]) @php $p = $plans[$key]; @endphp @endforeach
@if (config('services.stripe.automatic_tax'))

Sales tax or VAT, if any, is added in the payment form. Account credit is taken off automatically.

@endif
@endif @if ($bad->count())

Rows with problems

@foreach ($bad as $r) @endforeach
RowJobProblems
{{ $r['line'] }}{{ \Illuminate\Support\Str::limit($rowLabel($r), 60) }} @foreach ($r['errors'] as $field => $msg)
{{ $field }}: {{ $msg }}
@endforeach
@endif @if ($ok->count())

Ready to post

@foreach ($ok as $r) @endforeach
RowJobWhereUpgrades
{{ $r['line'] }}{{ $r['data']['title'] }}
{{ $r['data']['org_name'] }}
{{ $r['data']['is_remote'] === '1' ? 'Remote' : trim(($r['data']['city'] ?? '').', '.($r['data']['region'] ?? ''), ', ') }} · {{ $r['data']['country'] }} {{ $r['upgrades'] ? implode(', ', array_map(fn ($u) => str_replace('_', ' ', $u), $r['upgrades'])) : '' }}
@endif
@csrf
@elseif ($batch->status === 'paying')

Waiting for the card payment{{ $batch->order_id ? ' (order #'.$batch->order_id.')' : '' }}. The jobs are posted as soon as it goes through.

@if ($batch->order_id && session('checkout_order') === $batch->order_id)

Go to payment Cancel payment

@endif
@else
@if ($batch->status === 'done')

Done. {{ $s['live'] ?? 0 }} live{{ ($s['review'] ?? 0) ? ', '.$s['review'].' being checked by our team' : '' }}{{ count($s['blocked'] ?? []) ? ', '.count($s['blocked']).' not posted' : '' }}.

@else

Posting… {{ $done }} of {{ count($batch->posting_ids ?? []) }} done. This page refreshes by itself; we also email you when it's finished.

@endif @if (! empty($s['blocked'])) @endif
@if ($posts->isNotEmpty())
@foreach ($posts as $p) @endforeach
JobPaid withStatus
@if ($p->isLive()){{ $p->title }}@else{{ $p->title }}@endif {{ \App\Services\Analytics\Dashboards::PAID_WITH[$p->paid_with] ?? $p->paid_with }} @if ($p->isLive())Live@elseif ($p->status === 'review')Being checked@elseif ($p->status === 'draft')Waiting@else{{ ucfirst($p->status) }}@endif
@endif @endif @endsection