Skip to content

Commit 2b80da0

Browse files
Merge pull request #99 from ArduinoDayPhilippines/feat/93-qr-generation
feat/93-qr-generation
2 parents 31fe39c + ea29c62 commit 2b80da0

10 files changed

Lines changed: 660 additions & 210 deletions

File tree

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
import { Users } from "lucide-react";
2+
3+
interface GuestListEmptyProps {
4+
hasGuests: boolean;
5+
}
6+
7+
export function GuestListEmpty({ hasGuests }: GuestListEmptyProps) {
8+
return (
9+
<div className="flex flex-col items-center justify-center py-8 md:py-12 text-center">
10+
<div className="w-12 h-12 md:w-16 md:h-16 bg-white/5 rounded-full flex items-center justify-center mb-4">
11+
<Users size={24} className="text-white/40 md:w-8 md:h-8" />
12+
</div>
13+
<h3 className="font-urbanist text-sm md:text-base font-medium text-white mb-2">
14+
{!hasGuests ? "No Guests Yet" : "No Matching Guests"}
15+
</h3>
16+
<p className="font-urbanist text-white/60 text-xs md:text-sm max-w-md mb-4 px-4">
17+
{!hasGuests
18+
? "Share the event or invite people to get started!"
19+
: "Try adjusting your search or filters"}
20+
</p>
21+
</div>
22+
);
23+
}
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
import { Download } from "lucide-react";
2+
3+
interface GuestListHeaderProps {
4+
guestCount: number;
5+
onExport: () => void;
6+
}
7+
8+
export function GuestListHeader({ guestCount, onExport }: GuestListHeaderProps) {
9+
return (
10+
<div className="flex flex-col md:flex-row md:items-center md:justify-between gap-4 mb-4">
11+
<h2 className="font-urbanist text-lg md:text-xl font-bold text-white">
12+
Guest List
13+
</h2>
14+
<div className="flex gap-2">
15+
<button
16+
onClick={onExport}
17+
disabled={guestCount === 0}
18+
className="font-urbanist px-4 py-2 bg-cyan-600 hover:bg-cyan-700 disabled:bg-cyan-600/50 disabled:cursor-not-allowed rounded-lg text-white text-sm font-medium transition-colors flex items-center gap-2 whitespace-nowrap"
19+
>
20+
<Download size={16} />
21+
Export
22+
</button>
23+
</div>
24+
</div>
25+
);
26+
}
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
import { Download } from "lucide-react";
2+
3+
interface GuestListSearchFilterProps {
4+
searchQuery: string;
5+
onSearchChange: (query: string) => void;
6+
statusFilter: string;
7+
onStatusFilterChange: (status: string) => void;
8+
onExport: () => void;
9+
isPending: boolean;
10+
guestCount: number;
11+
}
12+
13+
export function GuestListSearchFilter({
14+
searchQuery,
15+
onSearchChange,
16+
statusFilter,
17+
onStatusFilterChange,
18+
onExport,
19+
isPending,
20+
guestCount,
21+
}: GuestListSearchFilterProps) {
22+
return (
23+
<div className="flex flex-col md:flex-row gap-3">
24+
<div className="flex-1">
25+
<input
26+
type="text"
27+
placeholder="Search guests by name or email..."
28+
value={searchQuery}
29+
onChange={(e) => onSearchChange(e.target.value)}
30+
className="font-urbanist w-full px-4 py-2.5 bg-white/5 border border-white/10 rounded-lg text-white text-sm placeholder-white/40 focus:outline-none focus:border-cyan-500 transition-colors"
31+
/>
32+
</div>
33+
<div className="flex gap-2">
34+
<select
35+
value={statusFilter}
36+
onChange={(e) => onStatusFilterChange(e.target.value)}
37+
className="font-urbanist px-4 py-2.5 bg-white/5 border border-white/10 rounded-lg text-white text-sm focus:outline-none focus:border-cyan-500 transition-colors"
38+
>
39+
<option value="all" style={{ backgroundColor: '#0a1520', color: '#ffffff' }}>All Status</option>
40+
<option value="registered" style={{ backgroundColor: '#0a1520', color: '#ffffff' }}>Registered</option>
41+
<option value="pending" style={{ backgroundColor: '#0a1520', color: '#ffffff' }}>Pending</option>
42+
</select>
43+
<button
44+
onClick={onExport}
45+
disabled={isPending || guestCount === 0}
46+
className="p-2.5 bg-white/5 hover:bg-white/10 rounded-lg border border-white/10 transition-colors disabled:opacity-50 disabled:cursor-not-allowed"
47+
>
48+
<Download size={18} className="text-white/60" />
49+
</button>
50+
</div>
51+
</div>
52+
);
53+
}

0 commit comments

Comments
 (0)