Prevent sending emails for already sent invoices.

This commit is contained in:
2025-01-09 15:33:41 +01:00
parent 82bacb7368
commit 39f4acc1fc

View File

@@ -2,10 +2,12 @@
<x-slot name="header"> <x-slot name="header">
<div class="flex flex-row w-full"> <div class="flex flex-row w-full">
<h2 class="grow font-semibold text-xl text-gray-800 dark:text-gray-200 leading-tight"> <h2 class="grow font-semibold text-xl text-gray-800 dark:text-gray-200 leading-tight">
{{ __('invoice.Invoice') }} {{ $invoice->number }} {{ __('invoice.Invoice') }} {{ $invoice->number }} ({{ $invoice->localized_state }})
</h2> </h2>
<p class="relative flex flex-row"> <p class="relative flex flex-row">
@if ($invoice->status === 'created')
<x-mail-icon class="cursor-pointer mr-4" onclick="window.location.href = '{{ route('invoice.mail', $invoice->id) }}'"/> <x-mail-icon class="cursor-pointer mr-4" onclick="window.location.href = '{{ route('invoice.mail', $invoice->id) }}'"/>
@endif
<x-pdf-icon class="text-gray-800 cursor-pointer" onclick="window.open('/invoice/{{ $invoice->id }}/pdf-download', '_blank', 'popup=true')"/> <x-pdf-icon class="text-gray-800 cursor-pointer" onclick="window.open('/invoice/{{ $invoice->id }}/pdf-download', '_blank', 'popup=true')"/>
<x-e-icon class="cursor-pointer" onclick="window.open('/invoice/{{ $invoice->id }}/xml-download', '_blank', 'popup=true')"/> <x-e-icon class="cursor-pointer" onclick="window.open('/invoice/{{ $invoice->id }}/xml-download', '_blank', 'popup=true')"/>
</p> </p>