@php $addProjectMilestonePermission = ($project->project_admin == user()->id) ? 'all' : user()->permission('add_project_milestones'); $viewProjectMilestonePermission = ($project->project_admin == user()->id) ? 'all' : user()->permission('view_project_milestones'); $editProjectMilestonePermission = ($project->project_admin == user()->id) ? 'all' : user()->permission('edit_project_milestones'); $deleteProjectMilestonePermission = ($project->project_admin == user()->id) ? 'all' : user()->permission('delete_project_milestones'); @endphp @include('sections.datatable_css') @if ($viewProjectMilestonePermission == 'all' || $viewProjectMilestonePermission == 'added' || ($viewProjectMilestonePermission == 'owned' && user()->id == $project->client_id))
# @lang('modules.projects.milestoneTitle') @lang('app.status') @lang('app.startDate') @lang('app.endDate') @forelse($project->milestones as $key=>$item) @php $lateMilestone = !is_null($item->end_date) && $item->end_date->isPast() ? 'danger' : ''; @endphp {{ $key + 1 }} {{ $item->milestone_title }} @if ($item->status == 'complete') {{ trans('app.' . $item->status) }} @else {{ trans('app.' . $item->status) }} @endif @if (!is_null($item->start_date)) {{ $item->start_date->format(company()->date_format) }} @endif @if (!is_null($item->end_date)) {{ $item->end_date->format(company()->date_format) }} @endif @empty @endforelse
@else @endif