mirror of
https://github.com/soconnor0919/beenvoice.git
synced 2026-02-05 00:06:36 -05:00
Add confirmation dialog before sending invoice email
The commit adds a confirmation dialog when sending invoices, improves error handling with retries, and refines email-related UI text.
This commit is contained in:
@@ -49,8 +49,8 @@ export function EnhancedSendInvoiceButton({
|
||||
!hasClientEmail
|
||||
? "Client has no email address"
|
||||
: showResend
|
||||
? "Resend Invoice"
|
||||
: "Send Invoice"
|
||||
? "Resend Email"
|
||||
: "Compose Email"
|
||||
}
|
||||
>
|
||||
{invoiceLoading ? (
|
||||
@@ -90,7 +90,7 @@ export function EnhancedSendInvoiceButton({
|
||||
) : (
|
||||
<Send className="mr-2 h-4 w-4" />
|
||||
)}
|
||||
<span>{showResend ? "Resend Invoice" : "Send Invoice"}</span>
|
||||
<span>{showResend ? "Resend Email" : "Compose Email"}</span>
|
||||
</>
|
||||
)}
|
||||
</Button>
|
||||
|
||||
@@ -61,8 +61,8 @@ export function FloatingActionBar({
|
||||
{/* Content container - full width when floating, content width when docked */}
|
||||
<div
|
||||
className={cn(
|
||||
"w-full transition-all duration-300",
|
||||
isDocked ? "mx-auto px-4 mb-0" : "px-4 mb-4",
|
||||
"w-full transition-transform duration-300",
|
||||
isDocked ? "mx-auto mb-0 px-4" : "mb-4 px-4",
|
||||
)}
|
||||
>
|
||||
<Card className="card-primary">
|
||||
|
||||
@@ -5,7 +5,7 @@ import { cva, type VariantProps } from "class-variance-authority";
|
||||
import { cn } from "~/lib/utils";
|
||||
|
||||
const buttonVariants = cva(
|
||||
"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",
|
||||
"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors duration-150 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",
|
||||
{
|
||||
variants: {
|
||||
variant: {
|
||||
@@ -16,7 +16,7 @@ const buttonVariants = cva(
|
||||
destructive:
|
||||
"bg-destructive text-white shadow-xs hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",
|
||||
outline:
|
||||
"border border-border/40 bg-background/60 shadow-sm backdrop-blur-sm hover:bg-accent/50 hover:text-accent-foreground hover:border-border/60 transition-all duration-200",
|
||||
"border border-border/40 bg-background/60 shadow-sm backdrop-blur-sm hover:bg-accent/50 hover:text-accent-foreground hover:border-border/60 transition-colors duration-150",
|
||||
secondary:
|
||||
"bg-secondary text-secondary-foreground shadow-xs hover:bg-secondary/80",
|
||||
ghost:
|
||||
|
||||
Reference in New Issue
Block a user