@php $managePermission = user()->permission('view_appreciation'); $addAppreciationPermission = user()->permission('add_appreciation'); $editAppreciationPermission = user()->permission('edit_appreciation'); $deleteAppreciationPermission = user()->permission('delete_appreciation'); $showAppreciationPermission = user()->permission('view_appreciation'); @endphp
@if ($addAppreciationPermission == 'all')
@lang('modules.appreciations.addAppreciation')
@endif
@lang('modules.appreciations.appreciationType') @lang('modules.appreciations.awardDate') @lang('app.action') @forelse ($appreciations as $count => $appreciation) {{ $appreciation->award->title }} {{ $appreciation->award_date->translatedFormat($company->date_format) }} @if(($showAppreciationPermission == 'all' || ($showAppreciationPermission == 'added' && user()->id == $appreciation->added_by) || ($showAppreciationPermission == 'owned' && user()->id == $appreciation->award_to) || ($showAppreciationPermission == 'both' && ($appreciation->added_by == user()->id || user()->id == $appreciation->award_to))) || ($editAppreciationPermission == 'all' || ($editAppreciationPermission == 'added' && user()->id == $appreciation->added_by) || ($editAppreciationPermission == 'owned' && user()->id == $appreciation->award_to) || ($editAppreciationPermission == 'both' && ($appreciation->added_by == user()->id || user()->id == $appreciation->award_to))) || ($deleteAppreciationPermission == 'all' || ($deleteAppreciationPermission == 'added' && user()->id == $appreciation->added_by) || ($deleteAppreciationPermission == 'owned' && user()->id == $appreciation->award_to) || ($deleteAppreciationPermission == 'both' && ($appreciation->added_by == user()->id || user()->id == $appreciation->award_to))))
@else - @endif @empty @endforelse