@extends('layouts.app') @section('content') @if (session('error')) {{ session('error') }} @endif @php $isProjectsChat = true; @endphp
@can('staff.chats') @endcan
Overall Progress
{{ $project->progress }}%
@php $phasesCount = 0; $phasesProgress = 0; @endphp @foreach ($project->phases as $phase) @php $phasesCount++; $phasesProgress += $phase->progress; @endphp @if ($phase->status == 1)
{{ $phase->name }}
Completed
@elseif ($phase->progress == 0)
{{ $phase->name }}
Waiting
@else
{{ $phase->name }}
In Progress
@endif @endforeach
@php $progressWidth = $phasesCount > 0 ? round($phasesProgress / $phasesCount) : 0; @endphp
Project Delivery Date

@php // use Carbon\Carbon; $daysPassed = \Carbon\Carbon::parse($project->deadline) ->endOfDay() ->diffInDays(now()->startOfDay()); @endphp {{ $daysPassed }}

{{ $daysPassed > 1 || $daysPassed == 0 ? 'days' : 'day' }} left

{{ \Carbon\Carbon::parse($project->deadline)->format('d M Y') }}

@foreach ($project->phases as $phase)

@foreach ($phase->tasks as $index => $task)
{{ $index + 1 }}.

{{ $task->task }}

@endforeach
@endforeach
@foreach ($project->phases as $phase)

{{ $phase->name }}

@csrf @method('DELETE')
@foreach ($phase->tasks as $index => $task)
{{ $index + 1 }}.

{{ $task->task }}

@endforeach
@endforeach
@if (count($project->phases) < 10)
@endif
{{-- --}}
@can('staff.chats')
@include('vendor.Chatify.layouts.main')
@endcan
@include('Chatify::layouts.modals') @section('script') {{-- Add new task --}} {{-- Update phases and tasks --}} @endsection @endsection