Fix #5 category in search results, rename rooms chip (#6)

- #5: SearchSelect now shows the area/category as a muted right-aligned
  label on every dropdown item — visible at a glance whether a result is
  a Room, Kitchen, Garden etc. Typing the category name already filtered
  correctly; the label makes it clear without needing to read the group header.
  Applies to both the new-task location picker and the asset location picker.
- #6: Rename 'Rooms view' chip to 'Rooms Accessible View' to better convey
  that it shows which rooms staff can actually access right now.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
jtricerolph 2026-07-08 12:34:22 +00:00
parent 2a2b14029a
commit 3fc23eaecc
2 changed files with 9 additions and 3 deletions

View file

@ -98,11 +98,17 @@ export default function SearchSelect({ options, value, onChange, placeholder = '
padding: '7px 12px', cursor: 'pointer', fontSize: 13.5, padding: '7px 12px', cursor: 'pointer', fontSize: 13.5,
background: opt.value === value ? 'var(--warn-bg)' : undefined, background: opt.value === value ? 'var(--warn-bg)' : undefined,
color: 'var(--text-dark)', color: 'var(--text-dark)',
display: 'flex', justifyContent: 'space-between', alignItems: 'center', gap: 8,
}} }}
onMouseEnter={e => (e.currentTarget.style.background = '#f1f5f9')} onMouseEnter={e => (e.currentTarget.style.background = '#f1f5f9')}
onMouseLeave={e => (e.currentTarget.style.background = opt.value === value ? 'var(--warn-bg)' : '')} onMouseLeave={e => (e.currentTarget.style.background = opt.value === value ? 'var(--warn-bg)' : '')}
> >
{opt.label} <span>{opt.label}</span>
{opt.group && (
<span style={{ fontSize: 11, color: 'var(--text-mid)', whiteSpace: 'nowrap', flexShrink: 0 }}>
{opt.group}
</span>
)}
</div> </div>
))} ))}
</div> </div>

View file

@ -122,13 +122,13 @@ export default function Summary() {
{roomsCategoryExists && ( {roomsCategoryExists && (
<button <button
className={`chip ${roomsView ? 'active' : ''}`} className={`chip ${roomsView ? 'active' : ''}`}
title="Show all rooms tasks — grey indicates an in-house guest right now" title="Show all rooms tasks — greyed tasks have an in-house guest so access may be limited"
onClick={toggleRoomsView} onClick={toggleRoomsView}
> >
<BedDouble size={13} strokeWidth={1.75} /> <BedDouble size={13} strokeWidth={1.75} />
{roomsView {roomsView
? `Rooms (${tasks.length}${freeRoomsCount !== null ? `${freeRoomsCount} free` : ''})` ? `Rooms (${tasks.length}${freeRoomsCount !== null ? `${freeRoomsCount} free` : ''})`
: 'Rooms view'} : 'Rooms Accessible View'}
</button> </button>
)} )}
</div> </div>