@if ($estimateRequest->status == 'pending' || $estimateRequest->status == 'in process')
@if (
$editEstimateRequestPermission == 'all'
|| (($editEstimateRequestPermission == 'added') && $estimateRequest->added_by == user()->id)
|| (($editEstimateRequestPermission == 'owned') && $estimateRequest->client_id == user()->id)
|| (($editEstimateRequestPermission == 'both') && ($estimateRequest->client_id == user()->id || $estimateRequest->added_by == user()->id))
)
@lang('app.edit')
@endif
@if ($rejectEstimateRequestPermission == 'all')
@lang('app.reject')
@endif
@endif
@if ($estimateRequest->status != 'accepted')
@if ($addEstimatePermission == 'all' || $addEstimatePermission == 'added')
@lang('app.create') @lang('app.estimate')
@endif
@endif
@if (
$deleteEstimateRequestPermission == 'all'
|| (($deleteEstimateRequestPermission == 'added') && $estimateRequest->added_by == user()->id)
|| (($deleteEstimateRequestPermission == 'owned') && $estimateRequest->client_id == user()->id)
|| (($deleteEstimateRequestPermission == 'both') && ($estimateRequest->client_id == user()->id || $estimateRequest->added_by == user()->id))
)
@if (!(in_array('client', user_roles()) && $estimateRequest->status == 'accepted'))
@lang('app.delete')
@endif
@endif