Flip sort order for payments in client portal

This commit is contained in:
David Bomba 2022-12-17 09:26:31 +11:00
parent 51b5357aed
commit 4761f8a1c9

View File

@ -43,7 +43,7 @@ class PaymentsTable extends Component
->where('company_id', $this->company->id) ->where('company_id', $this->company->id)
->where('client_id', auth()->guard('contact')->user()->client_id) ->where('client_id', auth()->guard('contact')->user()->client_id)
->whereIn('status_id', [Payment::STATUS_FAILED, Payment::STATUS_COMPLETED, Payment::STATUS_PENDING, Payment::STATUS_REFUNDED, Payment::STATUS_PARTIALLY_REFUNDED]) ->whereIn('status_id', [Payment::STATUS_FAILED, Payment::STATUS_COMPLETED, Payment::STATUS_PENDING, Payment::STATUS_REFUNDED, Payment::STATUS_PARTIALLY_REFUNDED])
->orderBy($this->sort_field, $this->sort_asc ? 'asc' : 'desc') ->orderBy($this->sort_field, $this->sort_asc ? 'desc' : 'asc')
->withTrashed() ->withTrashed()
->paginate($this->per_page); ->paginate($this->per_page);