Machines
{located.length} located · {awaiting.length} awaiting
setQuery(e.target.value)}
placeholder="Filter code, name, type…"
className="w-full min-h-[44px] pl-9 pr-3 rounded-lg text-sm bg-gray-50 dark:bg-white/5 border border-transparent focus:bg-white dark:focus:bg-white/10 focus:border-[#30638E] focus:outline-none"
/>
setShowInactive((v) => !v)}
aria-pressed={showInactive}
className={cn(
"flex-1 inline-flex items-center justify-center gap-1.5 min-h-[44px] px-3 rounded-lg text-xs font-medium transition",
showInactive
? "bg-[#003D5B] text-white"
: "text-gray-600 dark:text-gray-400 hover:bg-gray-100 dark:hover:bg-white/5",
)}
>
{showInactive ? "All machines" : "Active only"}
{
setPlacingId((cur) => (cur ? null : (awaiting[0]?.id ?? located[0]?.id ?? null)));
setNotice(null);
}}
className={cn(
"inline-flex items-center justify-center gap-1.5 min-h-[44px] px-3 rounded-lg text-xs font-semibold transition",
placingId
? "bg-[#EDAE49] text-[#003D5B] hover:bg-[#E5A340]"
: "bg-[#30638E] text-white hover:bg-[#003D5B]",
)}
>
{saving ? : }
{placingId ? "Placing…" : "Set location"}
{placingId && (
Tap the map to place{" "}
{placing?.code || placing?.name} , or pick another
machine below.
)}