Add sortable table columns, pre-populate date filter, inline command palette
All checks were successful
CI / build (push) Successful in 1m1s
CI / docker (push) Successful in 46s
CI / deploy (push) Successful in 32s

- Table headers are now clickable to sort by column (client-side)
- From date picker defaults to today 00:00 instead of empty
- Command palette expands inline from search bar instead of modal dialog

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
hsiegeln
2026-03-13 18:03:37 +01:00
parent d78b283567
commit c3cfb39f81
6 changed files with 261 additions and 135 deletions

View File

@@ -1,6 +1,14 @@
import { create } from 'zustand';
import type { SearchRequest } from '../../api/schema';
function todayMidnight(): string {
const d = new Date();
d.setHours(0, 0, 0, 0);
// Format as datetime-local value: YYYY-MM-DDTHH:mm
const pad = (n: number) => n.toString().padStart(2, '0');
return `${d.getFullYear()}-${pad(d.getMonth() + 1)}-${pad(d.getDate())}T00:00`;
}
interface ExecutionSearchState {
status: string[];
timeFrom: string;
@@ -31,7 +39,7 @@ interface ExecutionSearchState {
export const useExecutionSearch = create<ExecutionSearchState>((set, get) => ({
status: ['COMPLETED', 'FAILED'],
timeFrom: '',
timeFrom: todayMidnight(),
timeTo: '',
durationMin: null,
durationMax: null,
@@ -62,7 +70,7 @@ export const useExecutionSearch = create<ExecutionSearchState>((set, get) => ({
clearAll: () =>
set({
status: ['COMPLETED', 'FAILED', 'RUNNING'],
timeFrom: '',
timeFrom: todayMidnight(),
timeTo: '',
durationMin: null,
durationMax: null,