Showing statement on the statement page

This commit is contained in:
Benjamin Beganović 2021-09-15 17:21:16 +02:00
parent 0cbc9820e5
commit 00cf8b7023
2 changed files with 12 additions and 10 deletions

View File

@ -3,7 +3,7 @@
@endphp @endphp
@push('head') @push('head')
<meta name="pdf-url" content="{{ $entity->pdf_file_path(null, 'url', true) }}"> <meta name="pdf-url" content="{{ $url ?? $entity->pdf_file_path(null, 'url', true) }}">
<script src="{{ asset('js/vendor/pdf.js/pdf.min.js') }}"></script> <script src="{{ asset('js/vendor/pdf.js/pdf.min.js') }}"></script>
@endpush @endpush
@ -72,7 +72,7 @@
class="origin-top-right absolute right-0 mt-2 w-56 rounded-md shadow-lg"> class="origin-top-right absolute right-0 mt-2 w-56 rounded-md shadow-lg">
<div class="rounded-md bg-white shadow-xs"> <div class="rounded-md bg-white shadow-xs">
<div class="py-1"> <div class="py-1">
<a target="_blank" href="?mode=fullscreen" <a target="_blank" href="{{ $fullscreen_url ?? '?mode=fullscreen' }}"
class="block px-4 py-2 text-sm leading-5 text-gray-700 hover:bg-gray-100 hover:text-gray-900 focus:outline-none focus:bg-gray-100 focus:text-gray-900">{{ ctrans('texts.open_in_new_tab') }}</a> class="block px-4 py-2 text-sm leading-5 text-gray-700 hover:bg-gray-100 hover:text-gray-900 focus:outline-none focus:bg-gray-100 focus:text-gray-900">{{ ctrans('texts.open_in_new_tab') }}</a>
</div> </div>
</div> </div>
@ -86,7 +86,7 @@
<canvas id="pdf-placeholder" class="shadow rounded-lg bg-white mt-4 p-4"></canvas> <canvas id="pdf-placeholder" class="shadow rounded-lg bg-white mt-4 p-4"></canvas>
</div> </div>
@else @else
<iframe src="{{ $entity->pdf_file_path(null, 'url', true) }}" class="h-screen w-full border-0 mt-4"></iframe> <iframe src="{{ $url ?? $entity->pdf_file_path(null, 'url', true) }}" class="h-screen w-full border-0 mt-4"></iframe>
@endif @endif

View File

@ -1,37 +1,39 @@
<div> <div>
<div class="flex flex-col md:flex-row md:justify-between"> <div class="flex flex-col md:flex-row md:justify-between">
<div class="flex flex-col md:flex-row md:items-center"> <div class="flex flex-col md:flex-row md:items-center">
<label for="status" class="flex items-center mr-4"> {{-- <label for="status" class="flex items-center mr-4">
<span class="mr-2">{{ ctrans('texts.status') }}</span> <span class="mr-2">{{ ctrans('texts.status') }}</span>
<select class="input"> <select class="input">
<option value="all">{{ ctrans('texts.all') }}</option> <option value="all">{{ ctrans('texts.all') }}</option>
<option value="unpaid">{{ ctrans('texts.unpaid') }}</option> <option value="unpaid">{{ ctrans('texts.unpaid') }}</option>
<option value="paid">{{ ctrans('texts.paid') }}</option> <option value="paid">{{ ctrans('texts.paid') }}</option>
</select> </select>
</label> <!-- End status dropdown --> </label> <!-- End status dropdown --> --}}
<div class="flex"> <div class="flex">
<label for="from" class="block w-full flex items-center mr-4"> <label for="from" class="block w-full flex items-center mr-4">
<span class="mr-2">{{ ctrans('texts.from') }}:</span> <span class="mr-2">{{ ctrans('texts.from') }}:</span>
<input type="date" class="input w-full"> <input wire:model="options.start_date" type="date" class="input w-full">
</label> </label>
<label for="to" class="block w-full flex items-center mr-4"> <label for="to" class="block w-full flex items-center mr-4">
<span class="mr-2">{{ ctrans('texts.to') }}:</span> <span class="mr-2">{{ ctrans('texts.to') }}:</span>
<input type="date" class="input w-full"> <input wire:model="options.end_date" type="date" class="input w-full">
</label> </label>
</div> <!-- End date range --> </div> <!-- End date range -->
<label for="show_payments" class="block flex items-center mr-4 mt-4 md:mt-0"> <label for="show_payments" class="block flex items-center mr-4 mt-4 md:mt-0">
<input type="checkbox" class="form-checkbox"> <input wire:model="options.show_payments_table" type="checkbox" class="form-checkbox" autocomplete="off">
<span class="ml-2">{{ ctrans('texts.show_payments') }}</span> <span class="ml-2">{{ ctrans('texts.show_payments') }}</span>
</label> <!-- End show payments checkbox --> </label> <!-- End show payments checkbox -->
<label for="show_aging" class="block flex items-center"> <label for="show_aging" class="block flex items-center">
<input type="checkbox" class="form-checkbox"> <input wire:model="options.show_aging_table" type="checkbox" class="form-checkbox" autocomplete="off">
<span class="ml-2">{{ ctrans('texts.show_aging') }}</span> <span class="ml-2">{{ ctrans('texts.show_aging') }}</span>
</label> <!-- End show aging checkbox --> </label> <!-- End show aging checkbox -->
</div> </div>
<button class="button button-primary bg-primary">{{ ctrans('texts.download') }}</button> <button wire:click="download" class="button button-primary bg-primary mt-4 md:mt-0">{{ ctrans('texts.download') }}</button>
</div> </div>
@include('portal.ninja2020.components.pdf-viewer', ['url' => $url])
</div> </div>