@extends('admin.layouts.app') @section('title', $project->title) @section('header', $project->title) @section('breadcrumb') {{ __('projects.title') }} / {{ $project->title }} @endsection @section('header-actions') @endsection @section('content') @php $statusMap = [ 'tervezes' => ['badge-warning', __('projects.status.planning')], 'aktiv' => ['badge-success', __('projects.status.active')], 'lezart' => ['badge-secondary', __('projects.status.completed')], 'felfuggesztve' => ['badge-danger', __('projects.status.on_hold')], ]; $priorityMap = [ 'magas' => ['badge-danger', __('projects.priority.high')], 'kozepes' => ['badge-info', __('projects.priority.medium')], 'alacsony' => ['badge-secondary', __('projects.priority.low')], ]; [$stClass, $stLabel] = $statusMap[$project->status] ?? ['badge-secondary', $project->status]; [$prClass, $prLabel] = $priorityMap[$project->priority] ?? ['badge-secondary', $project->priority]; $progress = $project->progressPercent(); @endphp
{{-- Bal: projekt részletek --}}
{{ $stLabel }} {{ $prLabel }} @if($project->isOverdue()) {{ __('projects.overdue') }} @endif
@if($project->description)

{{ $project->description }}

@endif
@if($project->responsible)
{{ __('projects.responsible') }}
{{ strtoupper(substr($project->responsible->name, 0, 1)) }}
{{ $project->responsible->name }}
@endif @if($project->start_date)
{{ __('projects.start_date') }} {{ $project->start_date->format('Y.m.d') }}
@endif @if($project->end_date)
{{ __('projects.deadline') }} {{ $project->end_date->format('Y.m.d') }}
@endif
{{ __('projects.created_by') }} {{ $project->creator->name ?? '—' }}
{{ __('common.created_at') }} {{ $project->created_at->format('Y.m.d') }}
{{-- Haladás --}}

{{ __('projects.progress') }}

{{ $progress }}%

{{ $taskCounts['nyitott'] }}

{{ __('tasks.status.nyitott') }}

{{ $taskCounts['folyamatban'] }}

{{ __('tasks.status.folyamatban') }}

{{ $taskCounts['kesz'] }}

{{ __('tasks.status.kesz') }}

{{-- Jobb: tabbed kártya --}}
{{-- Tab fejléc --}}
{{-- Feladatok tab --}}
@if($tasks->isEmpty())

{{ __('projects.no_tasks_project') }}

@else @foreach($tasks as $task) @php $priMap = [ 'surgos' => ['badge-danger', __('tasks.priority.surgos')], 'magas' => ['badge-warning', __('tasks.priority.magas')], 'kozepes' => ['badge-info', __('tasks.priority.kozepes')], 'alacsony' => ['badge-secondary', __('tasks.priority.alacsony')], ]; $stMap = [ 'nyitott' => ['badge-secondary', __('tasks.status.nyitott')], 'folyamatban' => ['badge-info', __('tasks.status.folyamatban')], 'kesz' => ['badge-success', __('tasks.status.kesz')], ]; [$pc,$pl] = $priMap[$task->priority] ?? ['badge-secondary', $task->priority]; [$sc,$sl] = $stMap[$task->status] ?? ['badge-secondary', $task->status]; @endphp @endforeach
{{ __('tasks.col_task') }} {{ __('tasks.col_priority') }} {{ __('common.status') }} {{ __('tasks.col_deadline') }} {{ __('tasks.col_assignee') }}

{{ $task->title }}

@if($task->description)

{{ $task->description }}

@endif
{{ $pl }}
@csrf @method('PATCH')
{{ $task->due_date?->format('Y.m.d') ?? '—' }} {{ $task->assignedUser?->name ?? '—' }}
@csrf @method('DELETE')
@endif
{{-- Csapattagok tab --}} {{-- Naptár tab --}} {{-- Kanban tab --}} {{-- Gantt tab --}}
{{-- Feladat hozzáadása modal --}}
{{ __('projects.add_task') }} — {{ $project->title }}
@csrf
{{-- Projekt szerkesztés modal --}}
{{ __('projects.edit_title') }}
@csrf @method('PUT') @include('admin.projects._form', ['project' => $project, 'edit' => true])
@php $ganttTasksData = $tasks->filter(fn($t) => $t->due_date)->map(fn($t) => [ 'title' => $t->title, 'start' => $t->created_at->format('Y-m-d'), 'end' => $t->due_date->format('Y-m-d'), 'status' => $t->status, ])->values(); $calTasksData = $tasks->filter(fn($t) => $t->due_date)->map(fn($t) => [ 'title' => $t->title, 'due' => $t->due_date->format('Y-m-d'), 'status' => $t->status, 'priority' => $t->priority, ])->values(); // Localized calendar strings $calMonths = [__('cal.jan'),__('cal.feb'),__('cal.mar'),__('cal.apr'),__('cal.may'),__('cal.jun'),__('cal.jul'),__('cal.aug'),__('cal.sep'),__('cal.oct'),__('cal.nov'),__('cal.dec')]; $calDays = [__('cal.mon'),__('cal.tue'),__('cal.wed'),__('cal.thu'),__('cal.fri'),__('cal.sat'),__('cal.sun')]; $calMonthsFull = [__('cal.january'),__('cal.february'),__('cal.march'),__('cal.april'),__('cal.may_full'),__('cal.june'),__('cal.july'),__('cal.august'),__('cal.september'),__('cal.october'),__('cal.november'),__('cal.december')]; $calMonthsGen = [__('cal.jan_gen'),__('cal.feb_gen'),__('cal.mar_gen'),__('cal.apr_gen'),__('cal.may_gen'),__('cal.jun_gen'),__('cal.jul_gen'),__('cal.aug_gen'),__('cal.sep_gen'),__('cal.oct_gen'),__('cal.nov_gen'),__('cal.dec_gen')]; @endphp @push('scripts') @endpush @endsection