diff --git a/app/(dashboard)/activity-timeline-demo/page.tsx b/app/(dashboard)/activity-timeline-demo/page.tsx index d4956a98..94a7d822 100644 --- a/app/(dashboard)/activity-timeline-demo/page.tsx +++ b/app/(dashboard)/activity-timeline-demo/page.tsx @@ -363,7 +363,7 @@ export default function MyPage() { onLoadMore - {"() => void"} + {'() => void'} undefined Callback when user clicks load more diff --git a/app/(dashboard)/disputes/page.tsx b/app/(dashboard)/disputes/page.tsx index 69c67562..76d31091 100644 --- a/app/(dashboard)/disputes/page.tsx +++ b/app/(dashboard)/disputes/page.tsx @@ -3,6 +3,7 @@ import { useState } from "react" import { AlertTriangle, CheckCircle, Filter, Search } from "lucide-react" import { DisputePanel } from "@/components/disputes/DisputePanel" +import { DisputeEvidencePreview } from "@/components/disputes/DisputeEvidencePreview" import { mockDisputesByState } from "@/components/disputes/mock-data" import type { DisputeData, DisputeState } from "@/types/disputes" import { Button } from "@/components/ui/button" @@ -25,21 +26,21 @@ import { Tabs, TabsContent, TabsList, TabsTrigger } from "@/components/ui/tabs" import { Label } from "@/components/ui/label" import { Textarea } from "@/components/ui/textarea" import { RadioGroup, RadioGroupItem } from "@/components/ui/radio-group" -import { ExternalLink } from "@/components/ExternalLink" -// Type for local disputes mock data -interface LocalDispute { - id: string - eventId: string - eventTitle: string - category: string - submittedBy: string - submittedDate: string - reason: string - status: string - priority: string - evidence: string -} +type DisputePriority = "high" | "medium" | "low"; + +type PendingDispute = { + id: string; + eventId: string; + eventTitle: string; + category: string; + submittedBy: string; + submittedDate: string; + reason: string; + status: string; + priority: DisputePriority; + evidence: string; +}; // Mock data for disputes const disputes = [ @@ -123,7 +124,7 @@ export default function DisputesPage() { const [searchQuery, setSearchQuery] = useState("") const [statusFilter, setStatusFilter] = useState("all") const [priorityFilter, setPriorityFilter] = useState("all") - const [selectedDispute, setSelectedDispute] = useState(null) + const [selectedDispute, setSelectedDispute] = useState(null) const [resolution, setResolution] = useState("") const [resolutionNotes, setResolutionNotes] = useState("") const [selectedDisputeData, setSelectedDisputeData] = useState(mockDisputesByState.none) @@ -141,7 +142,7 @@ export default function DisputesPage() { return matchesSearch && matchesStatus && matchesPriority }) - const getPriorityBadge = (priority: string) => { + const getPriorityBadge = (priority: DisputePriority | string) => { switch (priority) { case "high": return High @@ -155,9 +156,11 @@ export default function DisputesPage() { } const handleResolve = () => { + if (!selectedDispute) return; + // In a real app, you would send this data to your API console.log({ - disputeId: selectedDispute?.id, + disputeId: selectedDispute.id, resolution, notes: resolutionNotes, }) @@ -275,13 +278,7 @@ export default function DisputesPage() {
-
- -
+
diff --git a/app/(dashboard)/events/new/page.tsx b/app/(dashboard)/events/new/page.tsx index 2d469f45..c20027b2 100644 --- a/app/(dashboard)/events/new/page.tsx +++ b/app/(dashboard)/events/new/page.tsx @@ -1,6 +1,6 @@ "use client" -import React, { useState } from "react" +import { useState } from "react" import { useRouter } from "next/navigation" import { CalendarIcon, Plus, Trash2 } from "lucide-react" import { Button } from "@/components/ui/button" @@ -20,7 +20,7 @@ export default function NewEventPage() { const [title, setTitle] = useState("") const [description, setDescription] = useState("") const [category, setCategory] = useState("") - const [deadline, setDeadline] = useState(undefined) + const [deadline, setDeadline] = useState(null) const [options, setOptions] = useState([{ text: "", probability: "" }]) const [newOption, setNewOption] = useState("") const [isPublic, setIsPublic] = useState(true) @@ -39,7 +39,7 @@ export default function NewEventPage() { setOptions(updatedOptions) } - const handleSubmit = (e: React.FormEvent) => { + const handleSubmit = (e: React.FormEvent) => { e.preventDefault() // In a real app, you would send this data to your API console.log({ @@ -64,20 +64,86 @@ export default function NewEventPage() {
- {/* Row 1 Left: Title */} -
- - setTitle(e.target.value)} - required - /> +
+
+ + setTitle(e.target.value)} + required + /> +
+ +
+ +