@php $stageIcons = [1=>'document', 2=>'journey', 3=>'plane', 4=>'person', 5=>'home', 6=>'book']; $stageLabels = [1=>'Prepare and apply', 2=>'Track application', 3=>'Prepare to move', 4=>'Register in Sweden', 5=>'Everyday essentials', 6=>'Learn Swedish & settle in']; $stageDescriptions = [ 1=>'Find your route and prepare with guidance from the relevant authority.', 2=>'Record your own updates and check messages directly with the authority.', 3=>'Make room for travel, housing and the practical details of your move.', 4=>'Check population-registration requirements for your circumstances.', 5=>'Find your way through ID cards, healthcare, social insurance and banking.', 6=>'Connect with your kommun for SFI guidance and your next steps in Swedish.', ]; $applicableTasks = $tasks->where('status', '!=', 'Not applicable'); $toDoCount = $applicableTasks->whereIn('status', ['Not started', 'Interested'])->count(); $inProgressCount = $applicableTasks->whereNotIn('status', ['Completed', 'Not started', 'Interested'])->count(); $waitingTasks = $tasks->where('status', 'Waiting'); $currentStage = (int) $user->stage; $stageSummaries = collect(config('swedenstart.stages'))->map(function ($label, $stage) use ($tasks) { $stageTasks = $tasks->where('stage', $stage); $applicable = $stageTasks->where('status', '!=', 'Not applicable'); return ['tasks'=>$stageTasks, 'total'=>$applicable->count(), 'completed'=>$applicable->where('status', 'Completed')->count(), 'done'=>$applicable->isNotEmpty() && $applicable->every(fn ($task) => $task->status === 'Completed'), 'skipped'=>$stageTasks->isNotEmpty() && $applicable->isEmpty()]; }); $undoTask = session('dashboard_undo') ? $tasks->firstWhere('id', session('dashboard_undo.id')) : null; @endphp
Find your next step.
Make a little progress, at your pace.
From your first application to everyday life in Sweden.
{{ $stageDescriptions[$stage] }}
No tasks in this stage yet.
@endforelseNo applicable tasks
@endifProgress you record yourself. Not government processing progress.
Open document checklistNo tasks marked Waiting. You can update a task whenever you’re waiting for a response.
@endforelseCheck updates directly with the relevant authority. No verified time estimate is available.