- Entferne alle überflüssigen Installations- und Konfigurationsskripte - Erstelle zwei vereinfachte Docker-Installationsskripte: - install-frontend.sh für Frontend-Installation - install-backend.sh für Backend-Installation - Verbessere Frontend Dockerfile mit besserer Unterstützung für native Dependencies - Aktualisiere Backend Dockerfile für automatische DB-Initialisierung - Korrigiere TypeScript-Fehler in personalized-cards.tsx - Erstelle env.ts für Umgebungsvariablen-Verwaltung - Füge ausführliche Installationsanleitung in INSTALL.md hinzu - Konfiguriere Docker-Compose für Host-Netzwerkmodus - Erweitere Dockerfiles mit Healthchecks für bessere Zuverlässigkeit 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
26 lines
729 B
TypeScript
26 lines
729 B
TypeScript
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>
|
|
);
|
|
}
|