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,
|
||||
Clock,
|
||||
Archive,
|
||||
CreditCard,
|
||||
Search,
|
||||
} from "lucide-react";
|
||||
import { Button } from "@/shared/components/ui/button";
|
||||
import { Input } from "@/shared/components/ui/input";
|
||||
import { Badge } from "@/shared/components/ui/badge";
|
||||
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 type { EpaySessionStatus } from "./epay-connect";
|
||||
|
||||
@@ -603,33 +610,54 @@ export function EpayTab() {
|
||||
{order.status === "completed" &&
|
||||
order.minioPath &&
|
||||
!expired && (
|
||||
<Button
|
||||
variant="ghost"
|
||||
size="sm"
|
||||
className="h-7 px-2 text-xs"
|
||||
asChild
|
||||
>
|
||||
<a
|
||||
href={`/api/ancpi/download?id=${order.id}`}
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
>
|
||||
<Download className="h-3 w-3 mr-1" />
|
||||
Descarca
|
||||
</a>
|
||||
</Button>
|
||||
<TooltipProvider>
|
||||
<Tooltip>
|
||||
<TooltipTrigger asChild>
|
||||
<Button
|
||||
variant="ghost"
|
||||
size="sm"
|
||||
className="h-7 px-2 text-xs"
|
||||
asChild
|
||||
>
|
||||
<a
|
||||
href={`/api/ancpi/download?id=${order.id}`}
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
>
|
||||
<Download className="h-3 w-3 mr-1" />
|
||||
Descarca
|
||||
</a>
|
||||
</Button>
|
||||
</TooltipTrigger>
|
||||
<TooltipContent>
|
||||
Descarca extras CF ({order.nrCadastral})
|
||||
</TooltipContent>
|
||||
</Tooltip>
|
||||
</TooltipProvider>
|
||||
)}
|
||||
{expired && (
|
||||
<Button
|
||||
variant="outline"
|
||||
size="sm"
|
||||
className="h-7 px-2 text-xs"
|
||||
disabled={!epayStatus.connected}
|
||||
onClick={() => void handleReorder(order)}
|
||||
>
|
||||
<RefreshCw className="h-3 w-3 mr-1" />
|
||||
Actualizeaza
|
||||
</Button>
|
||||
<TooltipProvider>
|
||||
<Tooltip>
|
||||
<TooltipTrigger asChild>
|
||||
<Button
|
||||
variant="default"
|
||||
size="sm"
|
||||
className="h-7 px-3 text-xs bg-orange-600 hover:bg-orange-700 text-white"
|
||||
disabled={!epayStatus.connected}
|
||||
onClick={() => void handleReorder(order)}
|
||||
>
|
||||
<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.minioPath &&
|
||||
|
||||
Reference in New Issue
Block a user