@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
@if (($addProjectMilestonePermission == 'all' || $project->project_admin == user()->id) && !$project->trashed()) @lang('modules.projects.createMilestone') @endif @if ($viewProjectMilestonePermission == 'all' || $viewProjectMilestonePermission == 'added' || ($viewProjectMilestonePermission == 'owned' && user()->id == $project->client_id)) # @lang('modules.projects.milestoneTitle') @lang('modules.projects.milestoneCost') @lang('app.status') @lang('app.action') @forelse($project->milestones as $key=>$item) {{ $key + 1 }} {{ $item->milestone_title }} @if (!is_null($item->currency_id)) {{ currency_format($item->cost, $item->currency->id) }} @else {{ currency_format($item->cost, $item->currency_id) }} @endif @if ($item->status == 'complete') {{ trans('app.' . $item->status) }} @else {{ trans('app.' . $item->status) }} @endif
@lang('app.view')
@empty @endforelse
@else @endif