some changes in Transaction view

This commit is contained in:
Bob Molitor
2025-10-20 21:14:55 +02:00
parent 2f7432c64d
commit 2baeba2904
@@ -16,6 +16,7 @@ new #[Layout('components.layouts.app')] class extends Component {
public string $search = '';
public string $status = 'all';
public ?int $selectedTransactionId = null;
protected int $perPage = 12;
protected $queryString = [
'search' => ['except' => ''],
@@ -70,7 +71,13 @@ new #[Layout('components.layouts.app')] class extends Component {
protected function refreshSelection(): void
{
$first = $this->transactions->first();
$first = $this->filteredQuery()
->orderByDesc('requires_review')
->orderByDesc('risk_score')
->orderByDesc('executed_at')
->forPage($this->getPage(), $this->perPage)
->first();
$this->selectedTransactionId = $first?->id;
}
@@ -93,7 +100,7 @@ new #[Layout('components.layouts.app')] class extends Component {
->orderByDesc('requires_review')
->orderByDesc('risk_score')
->orderByDesc('executed_at')
->paginate(12);
->paginate($this->perPage);
}
#[Computed]