show invoice in popup for new payment flow

This commit is contained in:
Benjamin Beganović 2024-09-23 17:12:29 +02:00
parent c49aa757b0
commit ba4fd36514

View File

@ -1,10 +1,30 @@
@extends('portal.ninja2020.layout.app')
@section('meta_title', ctrans('texts.view_invoice'))
@push('head')
@endpush
@section('body')
@if(Route::is('client.invoice.show'))
<dialog class="w-full bg-white rounded-lg px-4 pt-5 pb-4 shadow-xl transform transition-all sm:p-6" id="dialogPdf">
@livewire('pdf-slot', ['entity' => $invoice, 'invitation' => $invitation, 'db' => $invoice->company->db, 'with_close_button' => 'dialog#dialogPdf'])
</dialog>
<div class="px-2">
<div class="bg-white shadow sm:rounded-lg mb-4" translate>
<div class="px-4 py-5 sm:p-6">
<div class="sm:flex sm:items-start sm:justify-between">
<div>
<h3 class="text-lg leading-6 font-medium text-gray-900">
{{ ctrans('texts.invoice_number_placeholder', ['invoice' => $invoice->number])}}
</h3>
</div>
<div class="sm:mt-0 sm:ml-6 flex justify-end">
<button @click="document.getElementById('dialogPdf').showModal()" type="button"
class="button button-primary bg-primary">{{ ctrans('texts.view_pdf') }}</button>
</div>
</div>
</div>
</div>
</div>
@endif
@if($invoice->isPayable() && $client->getSetting('custom_message_unpaid_invoice'))
@component('portal.ninja2020.components.message')
@ -19,11 +39,4 @@
@if($invoice->isPayable())
@livewire('flow2.invoice-pay', ['invoices' => $invoices, 'invitation_id' => $invitation->id, 'db' => $db, 'variables' => $variables])
@endif
@endsection
@section('footer')
@endsection
@push('head')
@endpush