@error('availableFrom')
@if ($publishing === null)
{{-- A refused row action has no form of its own to report
into: with the publish form closed, the message would
otherwise land in an error bag nothing renders, and the
button would look like it had simply done nothing. --}}
@endif
@enderror
@forelse ($versions as $version)
@php
// The window being open is not the same as the plan being
// sold: the family's kill switch overrides every window.
$windowOpen = $version->isAvailableAt($now);
$live = $windowOpen && $family->sales_enabled;
$scheduled = $version->isPublished() && $version->available_from->greaterThan($now);
@endphp
{{ __('plans.version', ['n' => $version->version]) }}
@if ($live)
{{ __('plans.badge_live') }}
@elseif ($windowOpen)
{{ __('plans.badge_withdrawn') }}
@elseif ($scheduled)
{{ __('plans.badge_scheduled') }}
@elseif ($version->isPublished())
{{ __('plans.badge_closed') }}
@else
{{ __('plans.badge_draft') }}
@endif
@if ($version->isPublished())
{{ __('plans.window', [
'from' => $version->available_from->local()->isoFormat('L LT'),
'until' => $version->available_until?->local()->isoFormat('L LT') ?? __('plans.open_ended'),
]) }}
@else
{{ __('plans.draft_hint') }}
@endif
@if (! $version->isPublished())
{{ __('plans.publish') }}
{{ __('plans.discard') }}
@else
@if ($windowOpen)
{{ __('plans.close_now') }}
@endif
{{-- Every published version with an end date can
go back on open-ended sale, whether that end
is already past or still ahead. Closing used
to be one-way. --}}
@if ($version->available_until !== null)
{{ __('plans.reopen') }}
@endif
@endif
{{-- Publish form, inline under the draft it applies to --}}
@if ($publishing === $version->uuid)
{{ __('plans.publish_warning') }}
@if ($handover !== null)
{{-- Publishing here ends another version's sale,
so say which one and when, before the button
is pressed rather than in the list after. --}}
{{ __('plans.handover_note', ['version' => $handover['version'], 'at' => $handover['at']]) }}
@endif
{{ __('plans.cancel') }}
{{ __('plans.publish_confirm') }}
@endif
@foreach ([
['plans.f_storage', $version->quota_gb.' GB'],
['plans.f_traffic', $version->traffic_gb.' GB'],
['plans.f_seats', $version->seats],
['plans.f_performance', __('billing.perf.'.($version->performance ?? 'standard'))],
['plans.f_ram', $version->ram_mb.' MB'],
['plans.f_cores', $version->cores],
['plans.f_disk', $version->disk_gb.' GB'],
['plans.f_template', $version->template_vmid ?? '—'],
] as [$label, $value])
- {{ __($label) }}
- {{ $value }}
@endforeach
@foreach ($version->prices->sortBy('term') as $price)
{{ __('plans.term_'.$price->term) }}
{{ $eur($price->amount_cents) }}
{{ __('plans.net') }}
@endforeach
@if ($version->features)
@foreach ($version->features as $feature)
{{ __('billing.feature.'.$feature) }}
@endforeach
@endif