mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-10-23 23:46:35 +00:00
feat(packing): sort the packing list A to Z
A switch at the end of the list's tab row shows every list's items in name order, so checking whether something is already on the list no longer means reading all of it. The order follows the reader's language (accents beside their letter, "Shirt 2" before "Shirt 10") and the empty list stand-in stays at the bottom. Sorting only changes what is shown: the manual order stays stored and comes back with a second click. While sorted the drag grips step aside, the box keeps its column, and the choice is remembered per browser.
This commit is contained in:
@@ -161,6 +161,8 @@ export function ArtikelZeile({ item, tripId, categories, onCategoryChange: _onCa
|
||||
<GripVertical size={13} />
|
||||
</div>
|
||||
)}
|
||||
{/* Sorted A-Z there is nothing to drag, but the box keeps its column. */}
|
||||
{!canDrag && canEdit && !isPlaceholder && <span aria-hidden style={{ width: 13, flexShrink: 0 }} />}
|
||||
{/* The phone's box: filled with the accent once packed, an outline until then. */}
|
||||
<button type="button" onClick={handleToggle} className="packing-check" aria-pressed={!!item.checked} style={{
|
||||
flexShrink: 0, cursor: 'pointer', padding: 0, width: 20, height: 20, borderRadius: 6,
|
||||
|
||||
Reference in New Issue
Block a user