@php $menuItems = [ [ 'show' => !$projectId || auth()->user()->can('invoice.order.update'), 'text' => __('lang.show'), 'url' => $projectId ? route('invoice.order.update', ['id' => $projectId, 'invoice_id' => $row->id]) : route('show-invoice', ['uuid' => $row->uuid]), 'icon' => 'mdi:show', 'target' => '_blank' ], [ 'show' => auth()->user()->can('invoice.order.send'), 'text' => __('lang.send_invoice'), 'icon' => 'mdi:send', 'attributes' => 'wire:click="openSendInvoiceModal(\'' . $row->uuid . '\')"' ], [ 'show' => auth()->user()->can('invoice.order.download') && $row->fileExists(), 'text' => __('lang.download'), 'icon' => 'mdi:download', 'attributes' => 'wire:click="download(\'' . $row->path_file . '\')"' ], [ 'show' => auth()->user()->can('invoice.order.download') && !$row->fileExists(), 'text' => __('lang.regenerate'), 'icon' => 'mdi:autorenew', 'attributes' => 'wire:click="regenerate(\'' . $row->uuid . '\')"' ], [ 'show' => auth()->user()->can('invoice.order.update'), 'text' => __('lang.register_payment'), 'icon' => 'mdi:cash', 'attributes' => 'wire:click="openPaymentModal(\'' . $row->uuid . '\')"' ], ]; @endphp