chore: update reservation platform to newest codebase

This commit is contained in:
TOHAACK
2024-05-27 11:49:02 +02:00
parent ea9283e167
commit 3fd586caaf
130 changed files with 9395 additions and 3636 deletions

View File

@ -0,0 +1,25 @@
import { Badge } from "@/components/ui/badge";
import { PrinterStatus, translatePrinterStatus } from "@/utils/printers";
import { cn } from "@/utils/styles";
interface PrinterAvailabilityBadgeProps {
status: PrinterStatus;
}
export function PrinterAvailabilityBadge(props: PrinterAvailabilityBadgeProps) {
const { status } = props;
return (
<Badge
className={cn("pointer-events-none select-none", {
"bg-green-500 hover:bg-green-500 animate-pulse":
status === PrinterStatus.IDLE,
"bg-red-500 hover:bg-red-500 opacity-50":
status === PrinterStatus.OUT_OF_ORDER,
"bg-orange-500 hover:bg-orange-500": status === PrinterStatus.RESERVED,
})}
>
{translatePrinterStatus(status)}
</Badge>
);
}