Introduces an exportOrdersToCSV function in lib/api-client.ts to allow exporting orders by status as a CSV file. Updates various UI components to use the '•' (bullet) symbol instead of '·' (middle dot) and replaces some emoji/unicode characters for improved consistency and compatibility. Also normalizes the 'use client' directive to include a BOM in many files.
63 lines
2.2 KiB
TypeScript
63 lines
2.2 KiB
TypeScript
import {
|
|
Table,
|
|
TableBody,
|
|
TableCell,
|
|
TableHead,
|
|
TableHeader,
|
|
TableRow,
|
|
} from '@/components/ui/table';
|
|
import { Card, CardContent } from '@/components/ui/card';
|
|
import { Skeleton } from '@/components/ui/skeleton';
|
|
|
|
export default function PromotionsPageSkeleton() {
|
|
return (
|
|
<div className="space-y-6">
|
|
<div className="flex justify-between items-center mb-4">
|
|
<h2 className="text-xl font-semibold">Your Promotions</h2>
|
|
<div className="flex gap-2">
|
|
<Skeleton className="h-9 w-24" />
|
|
<Skeleton className="h-9 w-32" />
|
|
</div>
|
|
</div>
|
|
|
|
<Card>
|
|
<CardContent className="p-0">
|
|
<Table>
|
|
<TableHeader>
|
|
<TableRow>
|
|
<TableHead>Code</TableHead>
|
|
<TableHead>Type</TableHead>
|
|
<TableHead>Value</TableHead>
|
|
<TableHead>Min. Order</TableHead>
|
|
<TableHead>Usage</TableHead>
|
|
<TableHead>Valid Until</TableHead>
|
|
<TableHead>Status</TableHead>
|
|
<TableHead className="text-right">Actions</TableHead>
|
|
</TableRow>
|
|
</TableHeader>
|
|
<TableBody>
|
|
{Array.from({ length: 5 }).map((_, index) => (
|
|
<TableRow key={index}>
|
|
<TableCell><Skeleton className="h-4 w-16" /></TableCell>
|
|
<TableCell><Skeleton className="h-4 w-20" /></TableCell>
|
|
<TableCell><Skeleton className="h-4 w-12" /></TableCell>
|
|
<TableCell><Skeleton className="h-4 w-16" /></TableCell>
|
|
<TableCell><Skeleton className="h-4 w-12" /></TableCell>
|
|
<TableCell><Skeleton className="h-4 w-24" /></TableCell>
|
|
<TableCell><Skeleton className="h-6 w-16 rounded-full" /></TableCell>
|
|
<TableCell className="text-right">
|
|
<div className="flex justify-end gap-2">
|
|
<Skeleton className="h-8 w-8 rounded-full" />
|
|
<Skeleton className="h-8 w-8 rounded-full" />
|
|
</div>
|
|
</TableCell>
|
|
</TableRow>
|
|
))}
|
|
</TableBody>
|
|
</Table>
|
|
</CardContent>
|
|
</Card>
|
|
</div>
|
|
);
|
|
}
|