From 01c348a4eb2a63c0a705a4b9413b86422bbee160 Mon Sep 17 00:00:00 2001 From: Lorenzo Corallo Date: Mon, 12 Oct 2026 16:20:36 +0200 Subject: [PATCH] feat(users): show individual status columns - Replace the combined status badge with per-trait columns - Add accessible held/not-held indicators and simplify Telegram details --- src/routes/users/index.tsx | 52 +++++++++++++++++++++++++++----------- 1 file changed, 37 insertions(+), 15 deletions(-) diff --git a/src/routes/users/index.tsx b/src/routes/users/index.tsx index 4062094..c90bfbd 100644 --- a/src/routes/users/index.tsx +++ b/src/routes/users/index.tsx @@ -7,13 +7,13 @@ import { } from "@tanstack/react-router"; import { useEffect, useState } from "react"; import { + Check, ChevronLeft, ChevronRight, Info, Minus, Plus, Search, - Send, Slash, Users, X, @@ -31,7 +31,7 @@ import { userSearchSchema, } from "@/auth/users"; import { accessOf, useAccess } from "@/components/access"; -import { SignInIcons, StatusBadges, TRAIT_ICONS } from "@/components/users/traits"; +import { SignInIcons, STATUS_TRAITS, TRAIT_ICONS } from "@/components/users/traits"; import { Badge } from "@/components/ui/badge"; import { Button } from "@/components/ui/button"; import { Card } from "@/components/ui/card"; @@ -65,6 +65,25 @@ export const Route = createFileRoute("/users/")({ const ANY_ROLE = "any"; +/** A green check when the person holds the status, a gray cross when not. */ +function HeldMark({ label, held }: { label: string; held: boolean }) { + const Mark = held ? Check : X; + return ( + + + ); +} + function formatDate(value: string) { return new Date(value).toLocaleDateString(undefined, { dateStyle: "medium" }); } @@ -374,9 +393,11 @@ function UsersIndex() { Person - - Status - + {STATUS_TRAITS.map((trait) => ( + + {trait.label} + + ))} Telegram @@ -418,23 +439,24 @@ function UsersIndex() { - - - + {STATUS_TRAITS.map((trait) => ( + + + + ))} {user.traits.telegram ? ( - -