fix(ancpi): make Actualizeaza button prominent + add tooltips in tab
- Actualizeaza button: orange bg, white text, clearly clickable - Tooltip: "Comandă extras CF nou (1 credit) / Extrasul actual a expirat" - Descarca button: tooltip "Descarcă extras CF (nrCadastral)" Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -8,12 +8,19 @@ import {
|
|||||||
Loader2,
|
Loader2,
|
||||||
Clock,
|
Clock,
|
||||||
Archive,
|
Archive,
|
||||||
|
CreditCard,
|
||||||
Search,
|
Search,
|
||||||
} from "lucide-react";
|
} from "lucide-react";
|
||||||
import { Button } from "@/shared/components/ui/button";
|
import { Button } from "@/shared/components/ui/button";
|
||||||
import { Input } from "@/shared/components/ui/input";
|
import { Input } from "@/shared/components/ui/input";
|
||||||
import { Badge } from "@/shared/components/ui/badge";
|
import { Badge } from "@/shared/components/ui/badge";
|
||||||
import { Card, CardContent } from "@/shared/components/ui/card";
|
import { Card, CardContent } from "@/shared/components/ui/card";
|
||||||
|
import {
|
||||||
|
Tooltip,
|
||||||
|
TooltipContent,
|
||||||
|
TooltipProvider,
|
||||||
|
TooltipTrigger,
|
||||||
|
} from "@/shared/components/ui/tooltip";
|
||||||
import { cn } from "@/shared/lib/utils";
|
import { cn } from "@/shared/lib/utils";
|
||||||
import type { EpaySessionStatus } from "./epay-connect";
|
import type { EpaySessionStatus } from "./epay-connect";
|
||||||
|
|
||||||
@@ -603,33 +610,54 @@ export function EpayTab() {
|
|||||||
{order.status === "completed" &&
|
{order.status === "completed" &&
|
||||||
order.minioPath &&
|
order.minioPath &&
|
||||||
!expired && (
|
!expired && (
|
||||||
<Button
|
<TooltipProvider>
|
||||||
variant="ghost"
|
<Tooltip>
|
||||||
size="sm"
|
<TooltipTrigger asChild>
|
||||||
className="h-7 px-2 text-xs"
|
<Button
|
||||||
asChild
|
variant="ghost"
|
||||||
>
|
size="sm"
|
||||||
<a
|
className="h-7 px-2 text-xs"
|
||||||
href={`/api/ancpi/download?id=${order.id}`}
|
asChild
|
||||||
target="_blank"
|
>
|
||||||
rel="noopener noreferrer"
|
<a
|
||||||
>
|
href={`/api/ancpi/download?id=${order.id}`}
|
||||||
<Download className="h-3 w-3 mr-1" />
|
target="_blank"
|
||||||
Descarca
|
rel="noopener noreferrer"
|
||||||
</a>
|
>
|
||||||
</Button>
|
<Download className="h-3 w-3 mr-1" />
|
||||||
|
Descarca
|
||||||
|
</a>
|
||||||
|
</Button>
|
||||||
|
</TooltipTrigger>
|
||||||
|
<TooltipContent>
|
||||||
|
Descarca extras CF ({order.nrCadastral})
|
||||||
|
</TooltipContent>
|
||||||
|
</Tooltip>
|
||||||
|
</TooltipProvider>
|
||||||
)}
|
)}
|
||||||
{expired && (
|
{expired && (
|
||||||
<Button
|
<TooltipProvider>
|
||||||
variant="outline"
|
<Tooltip>
|
||||||
size="sm"
|
<TooltipTrigger asChild>
|
||||||
className="h-7 px-2 text-xs"
|
<Button
|
||||||
disabled={!epayStatus.connected}
|
variant="default"
|
||||||
onClick={() => void handleReorder(order)}
|
size="sm"
|
||||||
>
|
className="h-7 px-3 text-xs bg-orange-600 hover:bg-orange-700 text-white"
|
||||||
<RefreshCw className="h-3 w-3 mr-1" />
|
disabled={!epayStatus.connected}
|
||||||
Actualizeaza
|
onClick={() => void handleReorder(order)}
|
||||||
</Button>
|
>
|
||||||
|
<RefreshCw className="h-3 w-3 mr-1" />
|
||||||
|
Actualizeaza
|
||||||
|
</Button>
|
||||||
|
</TooltipTrigger>
|
||||||
|
<TooltipContent>
|
||||||
|
<p>Comanda extras CF nou (1 credit)</p>
|
||||||
|
<p className="text-xs text-muted-foreground">
|
||||||
|
Extrasul actual a expirat
|
||||||
|
</p>
|
||||||
|
</TooltipContent>
|
||||||
|
</Tooltip>
|
||||||
|
</TooltipProvider>
|
||||||
)}
|
)}
|
||||||
{order.status === "completed" &&
|
{order.status === "completed" &&
|
||||||
order.minioPath &&
|
order.minioPath &&
|
||||||
|
|||||||
Reference in New Issue
Block a user