Merge pull request #4677 from beganovich/v5-0113-fullscreen-invoices

(v5) Change default view for invoices as full-screen
This commit is contained in:
David Bomba 2021-01-14 07:54:12 +11:00 committed by GitHub
commit eebfa3e949
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 14 additions and 9 deletions

View File

@ -104,8 +104,8 @@
</button> </button>
</form> </form>
@endif @endif
<a href="{{ route('client.invoice.show', $invoice->hashed_id) }}" class="button-link text-primary"> <a href="{{ route('client.invoice.show', $invoice->hashed_id) }}?mode=fullscreen" class="button-link text-primary">
@lang('texts.view') {{ ctrans('texts.view') }}
</a> </a>
</td> </td>
</tr> </tr>
@ -132,4 +132,4 @@
@push('footer') @push('footer')
<script src="{{ asset('js/clients/invoices/action-selectors.js') }}"></script> <script src="{{ asset('js/clients/invoices/action-selectors.js') }}"></script>
@endpush @endpush

View File

@ -1,6 +1,6 @@
<style> <style>
:root { :root {
--primary-color: {{ $settings->primary_color }}; --primary-color: {{ isset($settings) ? optional($settings)->primary_color : '#1c64f2' }};
} }
.bg-primary { .bg-primary {
@ -8,11 +8,11 @@
} }
.bg-primary-darken { .bg-primary-darken {
background-color: vaR(--primary-color); background-color: var(--primary-color);
filter: brightness(90%); filter: brightness(90%);
} }
.text-primary { .text-primary {
color: var(--primary-color); color: var(--primary-color);
} }
</style> </style>

View File

@ -15,12 +15,15 @@
<div class="mt-2 max-w-xl text-sm leading-5 text-gray-500"> <div class="mt-2 max-w-xl text-sm leading-5 text-gray-500">
<p translate> <p translate>
{{ ctrans('texts.invoice_still_unpaid') }} {{ ctrans('texts.invoice_still_unpaid') }}
<!-- This invoice is still not paid. Click the button to complete the payment. -->
</p> </p>
</div> </div>
</div> </div>
<div class="mt-5 sm:mt-0 sm:ml-6 sm:flex-shrink-0 sm:flex sm:items-center"> <div class="mt-5 sm:mt-0 sm:ml-6 sm:flex-shrink-0 sm:flex sm:items-center">
<div class="inline-flex rounded-md shadow-sm"> <a href="{{ route('client.invoice.show', $invoice->hashed_id) }}" class="mr-4 text-primary">
&#8592; {{ ctrans('texts.client_portal') }}
</a>
<div class="inline-flex items-center rounded-md shadow-sm">
<input type="hidden" name="invoices[]" value="{{ $invoice->hashed_id }}"> <input type="hidden" name="invoices[]" value="{{ $invoice->hashed_id }}">
<input type="hidden" name="action" value="payment"> <input type="hidden" name="action" value="payment">
<button class="button button-primary bg-primary">{{ ctrans('texts.pay_now') }}</button> <button class="button button-primary bg-primary">{{ ctrans('texts.pay_now') }}</button>
@ -33,4 +36,4 @@
@endif @endif
<iframe src="{{ $invoice->pdf_file_path() }}" class="h-screen w-full border-0"></iframe> <iframe src="{{ $invoice->pdf_file_path() }}" class="h-screen w-full border-0"></iframe>
@endsection @endsection

View File

@ -66,6 +66,8 @@
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/cookieconsent@3/build/cookieconsent.min.css" /> <link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/cookieconsent@3/build/cookieconsent.min.css" />
</head> </head>
@include('portal.ninja2020.components.primary-color')
<body class="antialiased {{ $custom_body_class ?? '' }}"> <body class="antialiased {{ $custom_body_class ?? '' }}">
@yield('body') @yield('body')