feat(07.1-05): user-tz on dashboard, quotes, veeam-analysis
- dashboard/page.tsx: thread tz into PageHeader description's toLocaleDateString call. - quotes/page.tsx: thread tz into formatDate arrow helper inside the default export. - veeam-analysis/page.tsx: thread tz into the summary footer's generated-at toLocaleString call. Migrates 3 of 81 audit leak callsites.
This commit is contained in:
parent
96edfb4444
commit
91b876310e
3 changed files with 9 additions and 1 deletions
|
|
@ -33,6 +33,7 @@ import {
|
|||
TrendingUp,
|
||||
Timer,
|
||||
} from 'lucide-react';
|
||||
import { useUserTimezone } from '@/lib/hooks/use-user-timezone';
|
||||
|
||||
interface Overview {
|
||||
today: {
|
||||
|
|
@ -105,6 +106,7 @@ function relTime(iso: string | null): string {
|
|||
}
|
||||
|
||||
export default function DashboardPage() {
|
||||
const tz = useUserTimezone();
|
||||
const [data, setData] = useState<Overview | null>(null);
|
||||
const [trends, setTrends] = useState<Trends | null>(null);
|
||||
const [error, setError] = useState<string | null>(null);
|
||||
|
|
@ -154,6 +156,7 @@ export default function DashboardPage() {
|
|||
year: 'numeric',
|
||||
month: 'long',
|
||||
day: 'numeric',
|
||||
timeZone: tz,
|
||||
})}
|
||||
accent
|
||||
watermark
|
||||
|
|
|
|||
|
|
@ -23,6 +23,7 @@ import {
|
|||
TableHeader,
|
||||
TableRow,
|
||||
} from '@/components/ui/table';
|
||||
import { useUserTimezone } from '@/lib/hooks/use-user-timezone';
|
||||
import { TicketDetailModal } from '@/components/quotes/ticket-detail-modal';
|
||||
|
||||
interface Quote {
|
||||
|
|
@ -49,6 +50,7 @@ interface Quote {
|
|||
}
|
||||
|
||||
export default function QuotesPage() {
|
||||
const tz = useUserTimezone();
|
||||
const [quotes, setQuotes] = useState<Quote[]>([]);
|
||||
const [loading, setLoading] = useState(true);
|
||||
const [error, setError] = useState<string | null>(null);
|
||||
|
|
@ -108,6 +110,7 @@ export default function QuotesPage() {
|
|||
year: 'numeric',
|
||||
month: 'short',
|
||||
day: 'numeric',
|
||||
timeZone: tz,
|
||||
});
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -14,6 +14,7 @@ import {
|
|||
Brain, Play, RefreshCw, CheckCircle2, AlertTriangle, Clock,
|
||||
WifiOff, ChevronDown, ChevronRight, Wrench, RotateCcw, Sparkles, Zap, BookOpen, GraduationCap,
|
||||
} from 'lucide-react';
|
||||
import { useUserTimezone } from '@/lib/hooks/use-user-timezone';
|
||||
|
||||
// ── Types ─────────────────────────────────────────────────────────────────────
|
||||
|
||||
|
|
@ -260,6 +261,7 @@ function renderTicketSubRow(t: TicketRow) {
|
|||
// ── Page ──────────────────────────────────────────────────────────────────────
|
||||
|
||||
export default function VeeamAnalysisPage() {
|
||||
const tz = useUserTimezone();
|
||||
const [data, setData] = useState<AnalysisData | null>(null);
|
||||
const [status, setStatus] = useState<RunStatus | null>(null);
|
||||
const [loading, setLoading] = useState(true);
|
||||
|
|
@ -668,7 +670,7 @@ export default function VeeamAnalysisPage() {
|
|||
</div>
|
||||
|
||||
<p className="text-[10px] text-muted-foreground">
|
||||
Generated by {summary.model} · {new Date(summary.generated_at).toLocaleString()}
|
||||
Generated by {summary.model} · {new Date(summary.generated_at).toLocaleString(undefined, { timeZone: tz })}
|
||||
</p>
|
||||
</CardContent>
|
||||
)}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue