diff --git a/client/src/components/CTISelect.tsx b/client/src/components/CTISelect.tsx
index b97c9d4..5fd76c7 100644
--- a/client/src/components/CTISelect.tsx
+++ b/client/src/components/CTISelect.tsx
@@ -4,9 +4,10 @@ interface CTISelectProps {
value: { categoryId: string; typeId: string; itemId: string };
onChange: (value: { categoryId: string; typeId: string; itemId: string }) => void;
disabled?: boolean;
+ compact?: boolean;
}
-export default function CTISelect({ value, onChange, disabled }: CTISelectProps) {
+export default function CTISelect({ value, onChange, disabled, compact }: CTISelectProps) {
const { data: categories = [] } = useCategories();
const { data: types = [] } = useTypes(value.categoryId || undefined);
const { data: items = [] } = useItems(value.typeId || undefined);
@@ -24,12 +25,58 @@ export default function CTISelect({ value, onChange, disabled }: CTISelectProps)
};
const selectClass =
- 'block w-full bg-gray-800 border border-gray-700 text-gray-100 rounded-lg px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:border-transparent disabled:opacity-50 disabled:cursor-not-allowed';
+ 'block w-full rounded-md border border-input bg-background px-3 py-1.5 text-sm text-foreground focus:outline-none focus:ring-2 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50';
+
+ if (compact) {
+ return (
+
-
+
-
+
-
+
- {/* Filter bar */}
-
+ {/* Row 1: Search + saved views + result count */}
+
onSearchChange(e.target.value)}
placeholder="Search title, overview, ID…"
- className="flex-1 min-w-48 max-w-xs px-3 py-1.5 rounded-md border border-input bg-background text-foreground text-sm focus:outline-none focus:ring-2 focus:ring-ring"
+ className="flex-1 min-w-48 max-w-sm px-3 py-1.5 rounded-md border border-input bg-background text-foreground text-sm focus:outline-none focus:ring-2 focus:ring-ring"
/>
-
-
-
-
-
- {
- onSetParams((prev) => {
- const next = new URLSearchParams(prev);
- next.delete('page');
- if (cti.categoryId) next.set('categoryId', cti.categoryId);
- else next.delete('categoryId');
- if (cti.typeId) next.set('typeId', cti.typeId);
- else next.delete('typeId');
- if (cti.itemId) next.set('itemId', cti.itemId);
- else next.delete('itemId');
- return next;
- });
- }}
- />
-
-
- {/* Saved views */}
-
Saved views
@@ -191,6 +148,58 @@ export default function TicketFilters({
{isFetching ? 'Loading…' : `${total} result${total === 1 ? '' : 's'}`}
+
+ {/* Row 2: Filter selectors */}
+
+
+
+
+
+ {
+ onSetParams((prev) => {
+ const next = new URLSearchParams(prev);
+ next.delete('page');
+ if (cti.categoryId) next.set('categoryId', cti.categoryId);
+ else next.delete('categoryId');
+ if (cti.typeId) next.set('typeId', cti.typeId);
+ else next.delete('typeId');
+ if (cti.itemId) next.set('itemId', cti.itemId);
+ else next.delete('itemId');
+ return next;
+ });
+ }}
+ />
+
>
);
}