Adds complete initial codebase for the RJ Bulk Supplies fuel delivery backoffice: - Authentication pages and protected route layouts - Customer, supplier, fuel purchase, and delivery note management - Custom reporting and customer statement sending tools - Full UI component library and Tailwind styling - Server actions, API routes, and PocketBase integration - Development scripts and project configuration updates - Updated README and package metadata
42 lines
1.1 KiB
TypeScript
42 lines
1.1 KiB
TypeScript
import { cn } from "@/lib/utils";
|
|
import { Button } from "@/components/ui/button";
|
|
import { LucideIcon, Plus } from "lucide-react";
|
|
import Link from "next/link";
|
|
|
|
interface EmptyStateProps {
|
|
icon?: LucideIcon;
|
|
title: string;
|
|
description?: string;
|
|
action?: {
|
|
label: string;
|
|
href: string;
|
|
};
|
|
className?: string;
|
|
}
|
|
|
|
export function EmptyState({ icon: Icon = Plus, title, description, action, className }: EmptyStateProps) {
|
|
return (
|
|
<div
|
|
className={cn(
|
|
"flex flex-col items-center justify-center py-12 px-6 text-center",
|
|
className
|
|
)}
|
|
>
|
|
<div className="flex h-12 w-12 items-center justify-center rounded-full bg-muted text-muted-foreground">
|
|
<Icon className="h-5 w-5" />
|
|
</div>
|
|
<h3 className="mt-3 text-sm font-semibold">{title}</h3>
|
|
{description && (
|
|
<p className="mt-1 text-sm text-muted-foreground max-w-sm">{description}</p>
|
|
)}
|
|
{action && (
|
|
<Button asChild className="mt-4" size="sm">
|
|
<Link href={action.href}>
|
|
<Plus className="h-4 w-4" />
|
|
{action.label}
|
|
</Link>
|
|
</Button>
|
|
)}
|
|
</div>
|
|
);
|
|
}
|