chore: update reservation platform to newest codebase
This commit is contained in:
@ -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>
|
||||
);
|
||||
}
|
Reference in New Issue
Block a user