Merge pull request #4016 from beganovich/v2-fix-blank-page-on-downloading-invoices

Fix blank page when downloading invoices
This commit is contained in:
David Bomba 2020-08-27 07:26:03 +10:00 committed by GitHub
commit bb71bfe82a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 20 additions and 3 deletions

View File

@ -131,7 +131,7 @@ class InvoiceController extends Controller
//generate pdf's of invoices locally
if (!$invoices || $invoices->count() == 0) {
return;
return back()->with(['message' => ctrans('texts.no_items_selected')]);
}
//if only 1 pdf, output to buffer for download

2
public/js/app.js vendored

File diff suppressed because one or more lines are too long

View File

@ -1,5 +1,5 @@
{
"/js/app.js": "/js/app.js?id=7cb049967de2251aeffc",
"/js/app.js": "/js/app.js?id=a33a5a58bfc6e2174841",
"/css/app.css": "/css/app.css?id=6275f3bfb92a11a19a8f",
"/js/clients/invoices/action-selectors.js": "/js/clients/invoices/action-selectors.js?id=b0f29d5fdfa492962c22",
"/js/clients/invoices/payment.js": "/js/clients/invoices/payment.js?id=d7e708d66a9c769b4c6e",

9
resources/js/app.js vendored
View File

@ -28,3 +28,12 @@ window.processingOverlay = (show) => {
.getElementById('processing-overlay')
.classList.add('hidden');
};
/**
* Remove flashing message div after 3 seconds.
*/
document.querySelectorAll('.disposable-alert').forEach((element) => {
setTimeout(() => {
element.remove();
}, 3000);
});

View File

@ -3267,4 +3267,6 @@ return [
'to_pay_invoices' => 'To pay invoices, you have to',
'add_payment_method_first' => 'add payment method',
'no_items_selected' => 'No items selected.',
];

View File

@ -69,6 +69,12 @@
</head>
<body class="antialiased">
@if(session()->has('message'))
<div class="bg-blue-800 text-sm py-1 text-white text-center disposable-alert">
{{ session('message') }}
</div>
@endif
@include('portal.ninja2020.components.processing')
@component('portal.ninja2020.components.general.sidebar.main')
@yield('body')