@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'); $statuses = ['complete', 'incomplete']; // Define all your possible statuses here @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('modules.projects.taskCount') @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 {{ $item->tasks_count }}
@lang('app.view')
@empty @endforelse
@else @endif