some changes in Transaction view
This commit is contained in:
@@ -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]
|
||||
|
||||
Reference in New Issue
Block a user