2026-06-16 14:37:42 +02:00
|
|
|
<?php
|
|
|
|
|
|
2026-06-19 05:50:27 +02:00
|
|
|
declare(strict_types=1);
|
|
|
|
|
|
2026-06-16 14:37:42 +02:00
|
|
|
namespace FireflyIII\View\Components\Elements;
|
|
|
|
|
|
|
|
|
|
use Closure;
|
2026-06-19 05:11:37 +02:00
|
|
|
use FireflyIII\Models\Account;
|
2026-06-16 14:37:42 +02:00
|
|
|
use Illuminate\Contracts\View\View;
|
|
|
|
|
use Illuminate\View\Component;
|
|
|
|
|
|
|
|
|
|
class TransactionRunningBalance extends Component
|
|
|
|
|
{
|
|
|
|
|
public bool $balanceDirty;
|
|
|
|
|
public array $currency;
|
|
|
|
|
public array $foreign;
|
|
|
|
|
public array $source;
|
|
|
|
|
public array $destination;
|
|
|
|
|
public string $type;
|
2026-06-19 05:50:27 +02:00
|
|
|
public ?Account $account;
|
|
|
|
|
|
2026-06-16 14:37:42 +02:00
|
|
|
/**
|
|
|
|
|
* Create a new component instance.
|
|
|
|
|
*/
|
|
|
|
|
public function __construct(
|
2026-06-19 05:50:27 +02:00
|
|
|
?bool $balanceDirty,
|
2026-06-16 14:37:42 +02:00
|
|
|
array $source,
|
|
|
|
|
array $destination,
|
|
|
|
|
array $currency,
|
2026-06-19 05:50:27 +02:00
|
|
|
array $foreign,
|
|
|
|
|
string $type,
|
|
|
|
|
?Account $account
|
|
|
|
|
) {
|
2026-06-16 14:37:42 +02:00
|
|
|
$this->balanceDirty = $balanceDirty ?? false;
|
2026-06-19 05:50:27 +02:00
|
|
|
$this->currency = $currency;
|
|
|
|
|
$this->foreign = $foreign;
|
|
|
|
|
$this->type = $type;
|
|
|
|
|
$this->source = $source;
|
|
|
|
|
$this->destination = $destination;
|
|
|
|
|
$this->account = $account;
|
2026-06-16 14:37:42 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Get the view / contents that represent the component.
|
|
|
|
|
*/
|
2026-06-19 05:50:27 +02:00
|
|
|
public function render(): Closure|string|View
|
2026-06-16 14:37:42 +02:00
|
|
|
{
|
|
|
|
|
return view('components.elements.transaction-running-balance');
|
|
|
|
|
}
|
|
|
|
|
}
|