@if (!is_null($project->rating))
@if (
$viewRatingPermission == 'all'
|| ($viewRatingPermission == 'added' && $project->rating->added_by == user()->id)
|| ($viewRatingPermission == 'owned' && (in_array(user()->id, $memberIds) || $project->client_id == user()->id))
|| ($viewRatingPermission == 'both' && (in_array(user()->id, $memberIds) || $project->client_id == user()->id || $project->rating->added_by == user()->id))
)
{{ nl2br($project->rating->comment) }}
@if (
is_null($project->deleted_at) &&
$editRatingPermission == 'all'
|| ($editRatingPermission == 'added' && $project->rating->added_by == user()->id)
|| ($editRatingPermission == 'owned' && (in_array(user()->id, $memberIds) || $project->client_id == user()->id))
|| ($editRatingPermission == 'both' && (in_array(user()->id, $memberIds) || $project->client_id == user()->id || $project->rating->added_by == user()->id))
|| in_array('client', user_roles())
)
@lang('app.edit')
@endif
@if (
is_null($project->deleted_at) &&
$deleteRatingPermission == 'all'
|| ($deleteRatingPermission == 'added' && $project->rating->added_by == user()->id)
|| ($deleteRatingPermission == 'owned' && (in_array(user()->id, $memberIds) || $project->client_id == user()->id))
|| ($deleteRatingPermission == 'both' && (in_array(user()->id, $memberIds) || $project->client_id == user()->id || $project->rating->added_by == user()->id))
|| in_array('client', user_roles())
)
@lang('app.delete')
@endif