-
Notifications
You must be signed in to change notification settings - Fork 0
Closed
Labels
Description
Feature Request
Currently, the owner dropdown in forms (e.g., when adding/editing machines) doesn't have an optimized sort order. We should implement a smarter sorting algorithm to make it easier for users to find owners.
Proposed Sort Order
Sort owners in the dropdown using the following priority:
- Confirmed vs Unconfirmed: Confirmed users (from
user_profiles) should appear before unconfirmed users (fromunconfirmed_users) - Number of Owned Machines: Within each group, sort by number of owned machines (descending)
- Alphabetically by Last Name: Finally, sort alphabetically by last name
Example Output
Confirmed Users:
- Chris Engberg (8 machines)
- Summer Ellington (4 machines)
- Jordan Burgar (2 machines)
- Tim Froehlich (1 machine)
Unconfirmed Users:
- Chris Welch (3 machines)
- Ted Gaunt (4 machines)
- Neil Wilson (3 machines)
Implementation Notes
- This affects owner selection dropdowns across the application
- May want to add visual separators between confirmed/unconfirmed groups
- Consider showing machine count in parentheses next to owner name in dropdown
Related Files
- Owner selection components/forms
- Owner query/sorting logic in services or server actions
Labels: enhancement, ux
Priority: Low (nice-to-have improvement)
Reactions are currently unavailable