From a02f013f38daf1e0acce6191f2527f05df758d4b Mon Sep 17 00:00:00 2001 From: Rene Date: Wed, 1 Jul 2026 15:39:00 +0200 Subject: [PATCH] Replace native selects with shadcn Select across all pages - lead-scoring-settings.tsx: Feature type dropdown - bug-report-modal.tsx: Severity dropdown - client-portal/support/page.tsx: Severity dropdown - time-tracking/page.tsx: Timer project + manual entry project dropdowns - proposals/new/page.tsx: Lead + customer dropdowns --- src/app/(dashboard)/proposals/new/page.tsx | 32 ++++++++------ src/app/(dashboard)/time-tracking/page.tsx | 43 +++++++++++++------ src/app/client-portal/support/page.tsx | 28 +++++++----- .../settings/lead-scoring-settings.tsx | 22 +++++++--- src/components/shared/bug-report-modal.tsx | 28 +++++++----- 5 files changed, 103 insertions(+), 50 deletions(-) diff --git a/src/app/(dashboard)/proposals/new/page.tsx b/src/app/(dashboard)/proposals/new/page.tsx index 1155abe..8292e37 100644 --- a/src/app/(dashboard)/proposals/new/page.tsx +++ b/src/app/(dashboard)/proposals/new/page.tsx @@ -137,21 +137,29 @@ export default function NewProposalPage() {
- +
- +
diff --git a/src/app/(dashboard)/time-tracking/page.tsx b/src/app/(dashboard)/time-tracking/page.tsx index 1287057..f1e2190 100644 --- a/src/app/(dashboard)/time-tracking/page.tsx +++ b/src/app/(dashboard)/time-tracking/page.tsx @@ -6,6 +6,13 @@ import { Button } from "@/components/ui/button" import { Input } from "@/components/ui/input" import { Card } from "@/components/ui/card" import { Badge } from "@/components/ui/badge" +import { + Select, + SelectContent, + SelectItem, + SelectTrigger, + SelectValue, +} from "@/components/ui/select" import { Play, Square, Plus, Trash2, Clock, Briefcase, User, TrendingUp, DollarSign } from "lucide-react" import { toast } from "sonner" @@ -29,7 +36,7 @@ export default function TimeTrackingPage() { const [showManual, setShowManual] = useState(false) // Manual entry form - const [manualProject, setManualProject] = useState("") + const [manualProject, setManualProject] = useState("none") const [manualDesc, setManualDesc] = useState("") const [manualDate, setManualDate] = useState(new Date().toISOString().split("T")[0]) const [manualHours, setManualHours] = useState("") @@ -41,7 +48,7 @@ export default function TimeTrackingPage() { // Timer const [timerRunning, setTimerRunning] = useState(false) const [timerSeconds, setTimerSeconds] = useState(0) - const [timerProject, setTimerProject] = useState("") + const [timerProject, setTimerProject] = useState("none") const [timerDesc, setTimerDesc] = useState("") const timerRef = useRef | null>(null) const startTimeRef = useRef(null) @@ -92,7 +99,7 @@ export default function TimeTrackingPage() { method: "POST", headers: { "Content-Type": "application/json" }, body: JSON.stringify({ - projectId: timerProject || null, + projectId: timerProject === "none" ? null : timerProject, description: timerDesc, date: new Date().toISOString().split("T")[0], startTime: startTimeRef.current?.toISOString(), @@ -103,7 +110,7 @@ export default function TimeTrackingPage() { }), }) setTimerDesc("") - setTimerProject("") + setTimerProject("none") setTimerSeconds(0) fetchData() } catch (e) { @@ -124,7 +131,7 @@ export default function TimeTrackingPage() { method: "POST", headers: { "Content-Type": "application/json" }, body: JSON.stringify({ - projectId: manualProject || null, + projectId: manualProject === "none" ? null : manualProject, description: manualDesc, date: manualDate, durationMinutes: totalMins, @@ -212,10 +219,15 @@ export default function TimeTrackingPage() {
setTimerDesc(e.target.value)} className="h-9" disabled={timerRunning} /> - +
{formatTimer(timerSeconds)}
{!timerRunning ? ( @@ -238,10 +250,15 @@ export default function TimeTrackingPage() {
setManualDesc(e.target.value)} className="h-8 text-sm" /> - +
setManualDate(e.target.value)} className="h-8 w-40 text-sm" /> diff --git a/src/app/client-portal/support/page.tsx b/src/app/client-portal/support/page.tsx index 232acaa..c20877c 100644 --- a/src/app/client-portal/support/page.tsx +++ b/src/app/client-portal/support/page.tsx @@ -1,6 +1,13 @@ "use client" import { useEffect, useState } from "react" +import { + Select, + SelectContent, + SelectItem, + SelectTrigger, + SelectValue, +} from "@/components/ui/select" import { LifeBuoy, Send } from "lucide-react" interface Ticket { @@ -107,16 +114,17 @@ export default function ClientSupport() {
- +
{submitError && ( diff --git a/src/components/settings/lead-scoring-settings.tsx b/src/components/settings/lead-scoring-settings.tsx index 4a4fa20..742672a 100644 --- a/src/components/settings/lead-scoring-settings.tsx +++ b/src/components/settings/lead-scoring-settings.tsx @@ -5,6 +5,13 @@ import { Button } from "@/components/ui/button" import { Input } from "@/components/ui/input" import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card" import { Badge } from "@/components/ui/badge" +import { + Select, + SelectContent, + SelectItem, + SelectTrigger, + SelectValue, +} from "@/components/ui/select" import { Plus, Trash2, RefreshCw, Gauge } from "lucide-react" import { toast } from "sonner" @@ -142,11 +149,16 @@ export function LeadScoringSettings() {
- +
diff --git a/src/components/shared/bug-report-modal.tsx b/src/components/shared/bug-report-modal.tsx index 1c66741..1490c82 100644 --- a/src/components/shared/bug-report-modal.tsx +++ b/src/components/shared/bug-report-modal.tsx @@ -2,6 +2,13 @@ import { useState } from "react" import { motion, AnimatePresence } from "framer-motion" +import { + Select, + SelectContent, + SelectItem, + SelectTrigger, + SelectValue, +} from "@/components/ui/select" import { X, Bug, Loader2, CheckCircle } from "lucide-react" interface BugReportModalProps { @@ -151,16 +158,17 @@ export function BugReportModal({ open, onClose }: BugReportModalProps) { - +