@php $type = $props['type'] ?? null; $type = match($type) { 'mandate' => TransactionType::MANDATE, 'bonus_bank' => TransactionType::BONUS_BANK, 'bonus_insurance' => TransactionType::BONUS_INSURANCE, 'insuranceFees' => TransactionType::INSURANCE_FEES, default => null, }; // Do not display the badge if the type is not valid if(! $type) return; $hasIncome = $row->canCreateTransaction(TransactionDirection::INCOME, $type); $hasExpense = $row->canCreateTransaction(TransactionDirection::EXPENSE, $type); @endphp
id }}-{{ $type }}.window="updateTransaction($event.detail.transaction)" > {{-- {{ json_encode($row->transactions->where('type', $type)->where('created_by_user', false)->values()) }} --}} @if(! auth()->user()->is_any_partner_role && $hasIncome) @endif @if($hasExpense) @endif