@php $editProjectPermission = user()->permission('edit_projects'); $addPaymentPermission = user()->permission('add_payments'); $projectBudgetPermission = user()->permission('view_project_budget'); $memberIds = $project->members->pluck('user_id')->toArray(); @endphp
@if (!$project->trashed())
@if ($editProjectPermission == 'all' || ($editProjectPermission == 'added' && $project->added_by == user()->id) || ($project->project_admin == user()->id)) @else @foreach ($projectStatus as $status) @if ($project->status == $status->status_name)
{{ $status->status_name }}
@endif @endforeach @endif
@if ($projectPin)
@lang('app.pinned')
@endif @elseif($editProjectPermission == 'all' || ($project->project_admin == user()->id) || ($editProjectPermission == 'added' && user()->id == $project->added_by) || ($editProjectPermission == 'owned' && user()->id == $project->client_id && in_array('client', user_roles())) || ($editProjectPermission == 'owned' && in_array(user()->id, $memberIds) && in_array('employee', user_roles())) || ($editProjectPermission == 'both' && (user()->id == $project->client_id || user()->id == $project->added_by)) || ($editProjectPermission == 'both' && in_array(user()->id, $memberIds) && in_array('employee', user_roles())))
@lang('app.unarchive')
@endif
@lang('app.startDate')

{{ $project->start_date->translatedFormat(company()->date_format) }}

@lang('modules.projects.deadline')

{{ !is_null($project->deadline) ? $project->deadline->translatedFormat(company()->date_format) : '--' }}

@if (!is_null($project->client))
{{ $project->client->name }}

@if (!in_array('client', user_roles())) {{ $project->client->name }} @else {{ $project->client->name }} @endif

{{ $project->client->clientDetails->company_name }}

@if ($project->client->country_id) {{ $project->client->country->nicename }} @endif
@if( (in_array('admin', user_roles()) && $messageSetting->allow_client_admin == 'yes') || (in_array('employee', user_roles()) && $messageSetting->allow_client_employee == 'yes') )
@endif
@else @endif

@lang('app.statistics')

@if ($projectBudgetPermission == 'all')
@endif @if ($viewPaymentPermission == 'all')
@endif
@if ($viewProjectTimelogPermission == 'all')
@endif @if ($viewExpensePermission == 'all')
@endif
@if ($viewProjectTimelogPermission == 'all')

@lang('modules.projects.hoursLogged')

@endif @if ($projectBudgetPermission == 'all')

@lang('modules.projects.projectBudget')

@endif
@if (is_null($project->project_summary)) @else
{!! $project->project_summary !!}
@endif
{{-- Custom fields data --}} @if (isset($fields) && count($fields) > 0)
@endif