mirror of
https://github.com/snipe/snipe-it.git
synced 2024-12-25 05:34:06 -08:00
removes empty seats when sorting by department
This commit is contained in:
parent
1455331a90
commit
249ff868e5
|
@ -126,6 +126,7 @@ class LicenseSeat extends SnipeModel implements ICompanyableChild
|
||||||
{
|
{
|
||||||
return $query->leftJoin('users as license_seat_users', 'license_seats.assigned_to', '=', 'license_seat_users.id')
|
return $query->leftJoin('users as license_seat_users', 'license_seats.assigned_to', '=', 'license_seat_users.id')
|
||||||
->leftJoin('departments as license_user_dept', 'license_user_dept.id', '=', 'license_seat_users.department_id')
|
->leftJoin('departments as license_user_dept', 'license_user_dept.id', '=', 'license_seat_users.department_id')
|
||||||
|
->whereNotNull('license_seats.assigned_to')
|
||||||
->orderBy('license_user_dept.name', $order);
|
->orderBy('license_user_dept.name', $order);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue