1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-12 14:12:44 +01:00

Payment float

This commit is contained in:
David Bomba 2024-06-24 15:44:42 +10:00 committed by Benjamin Beganović
parent 0f27b8474c
commit c7d6b50778
7 changed files with 86 additions and 34 deletions

View File

@ -0,0 +1,34 @@
<?php
/**
* Invoice Ninja (https://invoiceninja.com).
*
* @link https://github.com/invoiceninja/invoiceninja source repository
*
* @copyright Copyright (c) 2024. Invoice Ninja LLC (https://invoiceninja.com)
*
* @license https://www.elastic.co/licensing/elastic-license
*/
namespace App\Livewire;
use Livewire\Component;
class InvoiceSummary extends Component
{
public $context;
public $invoice;
public function mount()
{
$this->invoice = $this->context['invoice'];
}
public function render()
{
return render('components.livewire.invoice-summary',[
'invoice' => $this->invoice
]);
}
}

File diff suppressed because one or more lines are too long

View File

@ -240,11 +240,15 @@
"src": "resources/js/setup/setup.js"
},
"resources/sass/app.scss": {
<<<<<<< HEAD
<<<<<<< HEAD
"file": "assets/app-fee1da41.css",
=======
"file": "assets/app-8e387ada.css",
>>>>>>> 3e760e6cc6 (New payment flow)
=======
"file": "assets/app-26306e87.css",
>>>>>>> c315911da4 (Payment float)
"isEntry": true,
"src": "resources/sass/app.scss"
}

View File

@ -1,3 +1,10 @@
<div>
@livewire($this->component,['context' => $context], key($this->componentUniqueId()))
<div class="grid grid-cols-1 md:grid-cols-2">
<div>
@livewire('invoice-summary',['context' => $context])
</div>
<div>
@livewire($this->component,['context' => $context], key($this->componentUniqueId()))
</div>
</div>

View File

@ -0,0 +1,14 @@
<div style="w-full">
<table width="100%">
<thead>
</thead>
<tbody>
<tr><td>{{ ctrans('texts.invoice')}} #</td><td>{{ $invoice->number }}</td></tr>
<tr><td>{{ ctrans('texts.due_date')}} #</td><td>{{ $invoice->due_date }}</td></tr>
<tr><td>{{ ctrans('texts.amount')}} #</td><td>{{ $invoice->amount }}</td></tr>
<tr><td>{{ ctrans('texts.balance')}} #</td><td>{{ $invoice->balance }}</td></tr>
</tbody>
</table>
</div>

View File

@ -1,15 +1,13 @@
<div style="w-full">
<div class="flex flex-col items-center justify-center min-h-screen bg-gray-100 p-6">
<div class="bg-white p-6 rounded-lg shadow-lg w-full max-w-md">
<h2 class="text-xl text-center mx-auto py-4 px-4">{{ ctrans('texts.sign_here_ux_tip') }}</h2>
<canvas id="signature-pad" class="border border-gray-300 w-full h-64"></canvas>
<div class="flex justify-between px-4 py-4">
<button id="clear-signature" class="px-4 bg-red-500 text-white rounded">{{ ctrans('texts.clear') }}</button>
<button id="save-button" class="button button-primary bg-primary hover:bg-primary-darken inline-flex items-center">{{ ctrans('texts.next') }}</button>
</div>
<div class="">
<div class="bg-white p-6 rounded-lg shadow-lg">
<h2 class="text-xl text-center py-0 px-4">{{ ctrans('texts.sign_here_ux_tip') }}</h2>
<canvas id="signature-pad" class="border border-gray-300 w-full h-64"></canvas>
<div class="flex justify-between items-center px-4 py-4">
<button id="clear-signature" class="px-4 py-2 mr-6 bg-red-500 text-white rounded">{{ ctrans('texts.clear') }}</button>
<button id="save-button" class="button button-primary bg-primary hover:bg-primary-darken">{{ ctrans('texts.next') }}</button>
</div>
</div>
@assets
<script src="{{ asset('vendor/signature_pad@5/signature_pad.umd.min.js') }}"></script>
@endassets

View File

@ -1,28 +1,23 @@
<div>
<div class="bg-color: white">
<div class="mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left">
<h3 class="text-xl leading-6 font-medium text-gray-900">
{{ ctrans('texts.terms') }}
</h3>
<div class="mt-4 h-64 overflow-y-auto">
<div class="mb-4">
<p class="text-sm leading-6 font-medium text-gray-500">{{ ctrans('texts.invoice') }} {{ $invoice->number }}:</p>
@if($variables && $invoice->terms)
<h5 data-ref="entity-terms">{!! $invoice->parseHtmlVariables('terms', $variables) !!}</h5>
@elseif($invoice->terms)
<h5 data-ref="entity-terms" class="text-sm leading-5 text-gray-900">{!! $invoice->terms !!}</h5>
@else
<i class="text-sm leading-5 text-gray-500">{{ ctrans('texts.not_specified') }}</i>
@endif
</div>
<div class="pb-8">
<div class="bg-white p-6 rounded-lg shadow-lg">
<h2 class="text-xl text-center py-0 px-4">{{ ctrans('texts.terms') }}</h2>
<div class="mt-0 h-64 overflow-y-auto">
<div class="py-0">
<p class="text-sm leading-6 font-medium text-gray-500">{{ ctrans('texts.invoice') }} {{ $invoice->number }}:</p>
@if($variables && $invoice->terms)
<h5 data-ref="entity-terms">{!! $invoice->parseHtmlVariables('terms', $variables) !!}</h5>
@elseif($invoice->terms)
<h5 data-ref="entity-terms" class="text-sm leading-5 text-gray-900">{!! $invoice->terms !!}</h5>
@else
<i class="text-sm leading-5 text-gray-500">{{ ctrans('texts.not_specified') }}</i>
@endif
</div>
</div>
</div>
<div class="mt-5 sm:mt-4 sm:flex sm:flex-row-reverse">
<div class="flex w-full rounded-md shadow-sm sm:ml-3 sm:w-auto" x-data>
<button id="accept-terms-button" class="button button-primary bg-primary hover:bg-primary-darken inline-flex items-center">{{ ctrans('texts.next') }}</button>
<div class="flex justify-end items-center px-4 py-4">
<button id="accept-terms-button" class="button button-primary bg-primary hover:bg-primary-darken float-end">{{ ctrans('texts.next') }}</button>
</div>
</div>
@script
<script>