@extends('layouts.app') @section('title', __('Workflow Steps') . ' — ' . $country->name) @section('content')

{{ __('Workflow Steps') }}: {{ $country->name }}

{{ __('Back to countries') }}
@if (session('success'))
{{ session('success') }}
@endif @if ($errors->any())
@endif
{{ __('Tick the steps that apply to this country. An unticked step is skipped: the candidate goes straight to the next ticked step, and that step\'s page will not accept candidates for the skipped step. Registration is always required.') }}
{{ __('Candidates already inside a step stay in it; the change applies to the next move.') }}
@csrf @method('PUT')
@foreach ($workflows as $workflow) @php($off = $disabled[$workflow['key']] ?? [])
{{ __('Resulting flow') }}
@foreach ($workflow['stages'] as $index => $stage) @php($isFirst = $stage === 'registration') @php($inVisaGroup = $workflow['key'] === 'overseas' && in_array($stage, \App\Services\WorkflowService::OVERSEAS_VISA_IMMIGRATION_GROUP, true)) @php($stageLabel = ($workflow['key'] === 'overseas' && $stage === 'visa_processing') ? 'Visa Submission' : \Illuminate\Support\Str::headline($stage)) @if ($inVisaGroup && $stage === 'mofa_processing') @endif @endforeach
{{ __('Order') }} {{ __('Stage') }} {{ __('Available statuses') }} {{ __('Use this step') }}
{{ __('Visa & Immigration') }}
{{ $index + 1 }} {{ __($stageLabel) }} {{ collect($stageStatuses[$stage] ?? [])->map(fn($st) => __(\Illuminate\Support\Str::headline($st)))->join(', ') }} @if ($isFirst) @else
@endif
@endforeach
{{ __('Save workflow') }} {{ __('Reset to default') }}
@endsection @push('scripts') @endpush