@extends('layouts.admin') @push('css-page') @endpush @section('page-title') {{ __('Project Detail') }} @endsection @section('links') @if (\Auth::guard('client')->check()) @else @endif @if (\Auth::guard('client')->check()) @else @endif @endsection @section('action-button') @endsection @php $client_keyword = Auth::user()->getGuard() == 'client' ? 'client.' : ''; @endphp @section('content')
{{ __('Overview') }}
{{ __('Project Name') }}: {{ $project->name }}
{{ __('Project Status') }}: @if ($project->status == 'Finished')
{{ __('Finished') }}
@elseif($project->status == 'Ongoing')
{{ __('Ongoing') }}
@else
{{ __('OnHold') }}
@endif
{{ __('Start Date') }}: {{ App\Models\Utility::dateFormat($project->start_date) }}
{{ __('Due Date') }}: {{ App\Models\Utility::dateFormat($project->end_date) }}
{{ __('Total Members') }}: {{ (int) $project->users->count() + (int) $project->clients->count() }}
@php $task_percentage = $project->project_progress()['percentage']; $data = trim($task_percentage, '%'); $status = $data > 0 && $data <= 25 ? 'red' : ($data > 25 && $data <= 50 ? 'orange' : ($data > 50 && $data <= 75 ? 'blue' : ($data > 75 && $data <= 100 ? 'green' : ''))); @endphp
{{ $data }}%
@php $mile_percentage = $project->project_milestone_progress()['percentage']; $mile_percentage = trim($mile_percentage, '%'); @endphp
{{ __('Milestone Progress') }}
{{ __('Task Priority') }}
{{ __('Task Status') }}
{{ __('Hours Estimation') }}
{{ __('Users') }}
@foreach ($project->users as $user) @php $hours_format_number = 0; $total_hours = 0; $hourdiff_late = 0; $esti_late_hour = 0; $esti_late_hour_chart = 0; // $total_user_task = App\Models\Task::where('project_id', $project->id) // ->whereRaw('FIND_IN_SET(?, assign_to) > 0', [$user->id]) // ->get() // ->count(); $total_user_task = DB::table('tasks') ->where('project_id', $project->id) ->whereRaw('FIND_IN_SET(?, assign_to) > 0', [$user->id]) ->count(); // $all_task = App\Models\Task::where('project_id', $project->id) // ->whereRaw('FIND_IN_SET(?, assign_to) > 0', [$user->id]) // ->get(); $total_complete_task = App\Models\Task::join( 'stages', 'stages.id', '=', 'tasks.status', ) ->where('project_id', '=', $project->id) ->where('assign_to', '=', $user->id) ->where('stages.complete', '=', '1') ->get() ->count(); $logged_hours = 0; $timesheets = App\Models\Timesheet::where( 'project_id', $project->id, ) ->where('created_by', $user->id) ->get(); @endphp @foreach ($timesheets as $timesheet) @php $date_time = $timesheet->time; $hours = date('H', strtotime($date_time)); $minutes = date('i', strtotime($date_time)); $total_hours = $hours + $minutes / 60; $logged_hours += $total_hours; $hours_format_number = number_format( $logged_hours, 2, '.', '', ); @endphp @endforeach @endforeach
{{ __('Name') }} {{ __('Assigned Tasks') }} {{ __('Done Tasks') }} {{ __('Logged Hours') }}
{{ $user->name }} {{ $total_user_task }} {{ $total_complete_task }} {{ $hours_format_number }}
{{ __('Milestones') }}
@foreach ($project->milestones as $key => $milestone) @endforeach
{{ __('Name') }} {{ __('Progress') }} {{ __('Cost') }} {{ __('Status') }} {{ __('Start Date') }} {{ __('End Date') }}
{{ $milestone->title }}
{{ $milestone->progress }}%
{{ $milestone->cost }} @if ($milestone->status == 'complete') @else @endif {{ $milestone->start_date }} {{ $milestone->end_date }}
@if ($currentWorkspace->permission == 'Owner' || Auth::user()->getGuard() == 'client')
@endif
@if ($currentWorkspace->permission == 'Owner' || Auth::user()->getGuard() == 'client') @endif
{{ __('Task Name') }} {{ __('Milestone') }} {{ __('Start Date') }} {{ __('Due Date') }}{{ __('Assigned to') }} {{ __('Total Logged Hours') }} {{ __('Priority') }} {{ __('Status') }}
@endsection @push('scripts') {{-- --}} @endpush