mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Remove Statement component
This commit is contained in:
parent
48b3cfb773
commit
2621c6af0c
@ -1,49 +0,0 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Invoice Ninja (https://invoiceninja.com).
|
||||
*
|
||||
* @link https://github.com/invoiceninja/invoiceninja source repository
|
||||
*
|
||||
* @copyright Copyright (c) 2021. Invoice Ninja LLC (https://invoiceninja.com)
|
||||
*
|
||||
* @license https://www.elastic.co/licensing/elastic-license
|
||||
*/
|
||||
|
||||
namespace App\Http\Livewire;
|
||||
|
||||
use Illuminate\View\View;
|
||||
use Livewire\Component;
|
||||
|
||||
class Statement extends Component
|
||||
{
|
||||
public string $url;
|
||||
|
||||
public array $options = [
|
||||
'show_payments_table' => 0,
|
||||
'show_aging_table' => 0,
|
||||
];
|
||||
|
||||
public function mount(): void
|
||||
{
|
||||
$this->options['start_date'] = now()->startOfYear()->format('Y-m-d');
|
||||
$this->options['end_date'] = now()->format('Y-m-d');
|
||||
}
|
||||
|
||||
protected function getCurrentUrl(): string
|
||||
{
|
||||
return route('client.statement.raw', $this->options);
|
||||
}
|
||||
|
||||
public function download()
|
||||
{
|
||||
return redirect()->route('client.statement.raw', \array_merge($this->options, ['download' => 1]));
|
||||
}
|
||||
|
||||
public function render(): View
|
||||
{
|
||||
$this->url = route('client.statement.raw', $this->options);
|
||||
|
||||
return render('components.statement');
|
||||
}
|
||||
}
|
@ -1,39 +0,0 @@
|
||||
<div>
|
||||
<div class="flex flex-col md:flex-row md:justify-between">
|
||||
<div class="flex flex-col md:flex-row md:items-center">
|
||||
{{-- <label for="status" class="flex items-center mr-4">
|
||||
<span class="mr-2">{{ ctrans('texts.status') }}</span>
|
||||
<select class="input">
|
||||
<option value="all">{{ ctrans('texts.all') }}</option>
|
||||
<option value="unpaid">{{ ctrans('texts.unpaid') }}</option>
|
||||
<option value="paid">{{ ctrans('texts.paid') }}</option>
|
||||
</select>
|
||||
</label> <!-- End status dropdown --> --}}
|
||||
|
||||
<div class="flex">
|
||||
<label for="from" class="block w-full flex items-center mr-4">
|
||||
<span class="mr-2">{{ ctrans('texts.from') }}:</span>
|
||||
<input wire:model="options.start_date" type="date" class="input w-full">
|
||||
</label>
|
||||
|
||||
<label for="to" class="block w-full flex items-center mr-4">
|
||||
<span class="mr-2">{{ ctrans('texts.to') }}:</span>
|
||||
<input wire:model="options.end_date" type="date" class="input w-full">
|
||||
</label>
|
||||
</div> <!-- End date range -->
|
||||
|
||||
<label for="show_payments" class="block flex items-center mr-4 mt-4 md:mt-0">
|
||||
<input wire:model="options.show_payments_table" type="checkbox" class="form-checkbox" autocomplete="off">
|
||||
<span class="ml-2">{{ ctrans('texts.show_payments') }}</span>
|
||||
</label> <!-- End show payments checkbox -->
|
||||
|
||||
<label for="show_aging" class="block flex items-center">
|
||||
<input wire:model="options.show_aging_table" type="checkbox" class="form-checkbox" autocomplete="off">
|
||||
<span class="ml-2">{{ ctrans('texts.show_aging') }}</span>
|
||||
</label> <!-- End show aging checkbox -->
|
||||
</div>
|
||||
<button wire:click="download" class="button button-primary bg-primary mt-4 md:mt-0">{{ ctrans('texts.download') }}</button>
|
||||
</div>
|
||||
|
||||
@include('portal.ninja2020.components.pdf-viewer', ['url' => $url])
|
||||
</div>
|
Loading…
x
Reference in New Issue
Block a user