mirror of
https://github.com/HDInnovations/UNIT3D-Community-Edition.git
synced 2026-05-08 04:00:14 -05:00
revert: group histories and uploads by month
Reverted because the implementation only allows sorting by date. Sorting using another column was broken.
This commit is contained in:
@@ -91,7 +91,7 @@ class UserTorrents extends Component
|
||||
#[Computed]
|
||||
final public function history(): \Illuminate\Contracts\Pagination\LengthAwarePaginator
|
||||
{
|
||||
$histories = History::query()
|
||||
return History::query()
|
||||
->join(
|
||||
'torrents',
|
||||
fn ($join) => $join
|
||||
@@ -166,8 +166,6 @@ class UserTorrents extends Component
|
||||
->when(!empty($this->status), fn ($query) => $query->whereIntegerInRaw('status', $this->status))
|
||||
->orderBy($this->sortField, $this->sortDirection)
|
||||
->paginate($this->perPage);
|
||||
|
||||
return $histories->setCollection($histories->getCollection()->groupBy(fn ($history) => $history->created_at->format('Y-m')));
|
||||
}
|
||||
|
||||
final public function render(): \Illuminate\Contracts\View\Factory|\Illuminate\Contracts\View\View|\Illuminate\Contracts\Foundation\Application
|
||||
|
||||
Reference in New Issue
Block a user