@voyantjs/finance-ui 0.33.0 → 0.35.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -24,9 +24,10 @@ export interface InvoiceDetailPageProps {
24
24
  onPaymentCreate?: (invoice: InvoiceRecord) => void;
25
25
  onCreditNoteCreate?: (invoice: InvoiceRecord) => void;
26
26
  getAttachmentDownloadHref?: (attachment: InvoiceAttachmentRecord) => string | undefined;
27
+ renderInvoiceNoteDialog?: (props: InvoiceNoteDialogProps) => ReactNode;
27
28
  slots?: InvoiceDetailPageSlots;
28
29
  }
29
- export declare function InvoiceDetailPage({ id, className, onBack, onDeleted, onBookingOpen, onPersonOpen, onOrganizationOpen, onLineItemCreate, onLineItemEdit, onPaymentCreate, onCreditNoteCreate, getAttachmentDownloadHref, slots, }: InvoiceDetailPageProps): import("react/jsx-runtime").JSX.Element;
30
+ export declare function InvoiceDetailPage({ id, className, onBack, onDeleted, onBookingOpen, onPersonOpen, onOrganizationOpen, onLineItemCreate, onLineItemEdit, onPaymentCreate, onCreditNoteCreate, getAttachmentDownloadHref, renderInvoiceNoteDialog, slots, }: InvoiceDetailPageProps): import("react/jsx-runtime").JSX.Element;
30
31
  export interface InvoiceDetailHeaderProps {
31
32
  invoice: InvoiceRecord;
32
33
  onBack?: () => void;
@@ -80,18 +81,34 @@ export interface InvoiceAttachmentsCardProps extends InvoiceDetailCardProps {
80
81
  export declare function InvoiceAttachmentsCard({ attachments, pending, deletePending, getDownloadHref, onCreate, onEdit, onDelete, className, }: InvoiceAttachmentsCardProps): import("react/jsx-runtime").JSX.Element;
81
82
  export interface InvoiceNotesCardProps {
82
83
  notes: FinanceNoteRecord[];
83
- noteContent: string;
84
+ noteContent?: string;
84
85
  pending?: boolean;
85
86
  addPending?: boolean;
86
87
  className?: string;
87
- onNoteChange: (value: string) => void;
88
- onAddNote: () => Promise<void>;
88
+ onNoteChange?: (value: string) => void;
89
+ onAddNote?: () => Promise<void>;
90
+ onCreate?: () => void;
89
91
  }
90
- export declare function InvoiceNotesCard({ notes, noteContent, pending, addPending, className, onNoteChange, onAddNote, }: InvoiceNotesCardProps): import("react/jsx-runtime").JSX.Element;
92
+ export declare function InvoiceNotesCard({ notes, noteContent, pending, addPending, className, onNoteChange, onAddNote, onCreate, }: InvoiceNotesCardProps): import("react/jsx-runtime").JSX.Element;
93
+ export interface InvoiceNoteDialogProps {
94
+ open: boolean;
95
+ onOpenChange: (open: boolean) => void;
96
+ pending?: boolean;
97
+ onSubmit: (content: string) => Promise<void>;
98
+ }
99
+ export declare function InvoiceNoteDialog({ open, onOpenChange, pending, onSubmit, }: InvoiceNoteDialogProps): import("react/jsx-runtime").JSX.Element;
91
100
  export interface MoneyProps {
92
101
  cents: number;
93
102
  currency: string;
94
103
  }
104
+ export interface InvoiceSectionProps {
105
+ dataSlot: string;
106
+ title: string;
107
+ action?: ReactNode;
108
+ children: ReactNode;
109
+ className?: string;
110
+ }
111
+ export declare function InvoiceSection({ dataSlot, title, action, children, className, }: InvoiceSectionProps): import("react/jsx-runtime").JSX.Element;
95
112
  export declare function Money({ cents, currency }: MoneyProps): import("react/jsx-runtime").JSX.Element;
96
113
  export interface DetailRowProps {
97
114
  label: string;
@@ -1 +1 @@
1
- {"version":3,"file":"invoice-detail-page.d.ts","sourceRoot":"","sources":["../../src/components/invoice-detail-page.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,gBAAgB,EAChB,iBAAiB,EACjB,uBAAuB,EACvB,aAAa,EACb,cAAc,EACd,aAAa,EACd,MAAM,yBAAyB,CAAA;AAkChC,OAAO,EAAE,KAAK,SAAS,EAAuB,MAAM,OAAO,CAAA;AAI3D,OAAO,EAA6B,6BAA6B,EAAE,MAAM,kBAAkB,CAAA;AAG3F,MAAM,WAAW,sBAAsB;IACrC,WAAW,CAAC,EAAE,SAAS,CAAA;IACvB,YAAY,CAAC,EAAE,SAAS,CAAA;IACxB,cAAc,CAAC,EAAE,SAAS,CAAA;I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A;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB;AAED,wBAAgB,UAAU,CAAC,EAAE,KAAK,EAAE,WAAW,EAAE,OAAO,EAAE,QAAQ,EAAE,EAAE,eAAe,oDASpF;AAED,MAAM,WAAW,aAAa;IAC5B,QAAQ,EAAE,SAAS,CAAA;CACpB;AAED,wBAAgB,QAAQ,CAAC,EAAE,QAAQ,EAAE,EAAE,aAAa,2CAEnD;AAED,wBAAgB,UAAU,4CAMzB;AAED,wBAAgB,oBAAoB,CAAC,EAAE,SAAS,EAAE,EAAE;IAAE,SAAS,CAAC,EAAE,MAAM,CAAA;CAAE,2CAWzE;AAED,wBAAgB,kBAAkB,CAAC,EACjC,SAAS,EACT,OAAO,EACP,MAAM,GACP,EAAE;IACD,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,OAAO,EAAE,MAAM,CAAA;IACf,MAAM,CAAC,EAAE,MAAM,IAAI,CAAA;CACpB,2CAaA;AAED,wBAAgB,mBAAmB,CACjC,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,UAAU,CAAC,OAAO,6BAA6B,CAAC,UAe3D;AAED,eAAO,MAAM,oBAAoB,EAAE,MAAM,CACvC,MAAM,EACN,SAAS,GAAG,WAAW,GAAG,SAAS,GAAG,aAAa,CAQpD,CAAA;AAED,eAAO,MAAM,oBAAoB,EAAE,MAAM,CACvC,MAAM,EACN,SAAS,GAAG,WAAW,GAAG,SAAS,GAAG,aAAa,CAMpD,CAAA;AAED,eAAO,MAAM,uBAAuB,EAAE,MAAM,CAC1C,MAAM,EACN,SAAS,GAAG,WAAW,GAAG,SAAS,GAAG,aAAa,CAKpD,CAAA"}
1
+ {"version":3,"file":"invoice-detail-page.d.ts","sourceRoot":"","sources":["../../src/components/invoice-detail-page.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,gBAAgB,EAChB,iBAAiB,EACjB,uBAAuB,EACvB,aAAa,EACb,cAAc,EACd,aAAa,EACd,MAAM,yBAAyB,CA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C5B,QAAQ,EAAE,SAAS,CAAA;CACpB;AAED,wBAAgB,QAAQ,CAAC,EAAE,QAAQ,EAAE,EAAE,aAAa,2CAEnD;AAED,wBAAgB,UAAU,4CAMzB;AAED,wBAAgB,oBAAoB,CAAC,EAAE,SAAS,EAAE,EAAE;IAAE,SAAS,CAAC,EAAE,MAAM,CAAA;CAAE,2CAWzE;AAED,wBAAgB,kBAAkB,CAAC,EACjC,SAAS,EACT,OAAO,EACP,MAAM,GACP,EAAE;IACD,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,OAAO,EAAE,MAAM,CAAA;IACf,MAAM,CAAC,EAAE,MAAM,IAAI,CAAA;CACpB,2CAaA;AAED,wBAAgB,mBAAmB,CACjC,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,UAAU,CAAC,OAAO,6BAA6B,CAAC,UAe3D;AAED,eAAO,MAAM,oBAAoB,EAAE,MAAM,CACvC,MAAM,EACN,SAAS,GAAG,WAAW,GAAG,SAAS,GAAG,aAAa,CAQpD,CAAA;AAED,eAAO,MAAM,oBAAoB,EAAE,MAAM,CACvC,MAAM,EACN,SAAS,GAAG,WAAW,GAAG,SAAS,GAAG,aAAa,CAMpD,CAAA;AAED,eAAO,MAAM,uBAAuB,EAAE,MAAM,CAC1C,MAAM,EACN,SAAS,GAAG,WAAW,GAAG,SAAS,GAAG,aAAa,CAKpD,CAAA"}
@@ -10,12 +10,12 @@ import { useForm } from "react-hook-form";
10
10
  import { z } from "zod/v4";
11
11
  import { useFinanceUiI18nOrDefault, useFinanceUiMessagesOrDefault } from "../i18n/index.js";
12
12
  import { InvoiceDialog } from "./invoice-dialog.js";
13
- export function InvoiceDetailPage({ id, className, onBack, onDeleted, onBookingOpen, onPersonOpen, onOrganizationOpen, onLineItemCreate, onLineItemEdit, onPaymentCreate, onCreditNoteCreate, getAttachmentDownloadHref, slots, }) {
13
+ export function InvoiceDetailPage({ id, className, onBack, onDeleted, onBookingOpen, onPersonOpen, onOrganizationOpen, onLineItemCreate, onLineItemEdit, onPaymentCreate, onCreditNoteCreate, getAttachmentDownloadHref, renderInvoiceNoteDialog, slots, }) {
14
14
  const messages = useFinanceUiMessagesOrDefault();
15
15
  const [editOpen, setEditOpen] = useState(false);
16
16
  const [attachmentOpen, setAttachmentOpen] = useState(false);
17
17
  const [editingAttachment, setEditingAttachment] = useState();
18
- const [noteContent, setNoteContent] = useState("");
18
+ const [noteOpen, setNoteOpen] = useState(false);
19
19
  const invoiceQuery = useInvoice(id);
20
20
  const invoice = invoiceQuery.data?.data;
21
21
  const lineItemsQuery = useInvoiceLineItems(id, { enabled: Boolean(invoice) });
@@ -42,6 +42,14 @@ export function InvoiceDetailPage({ id, className, onBack, onDeleted, onBookingO
42
42
  const creditNotes = creditNotesQuery.data?.data ?? [];
43
43
  const attachments = attachmentsQuery.data?.data ?? [];
44
44
  const notes = notesQuery.data?.data ?? [];
45
+ const handleCreateNote = async (nextContent) => {
46
+ const content = nextContent.trim();
47
+ if (!content)
48
+ return;
49
+ await addNote.mutateAsync({ content });
50
+ setNoteOpen(false);
51
+ void notesQuery.refetch();
52
+ };
45
53
  return (_jsxs("div", { "data-slot": "invoice-detail-page", className: cn("flex flex-col gap-6 p-6", className), children: [_jsx(InvoiceDetailHeader, { invoice: invoice, onBack: onBack, onEdit: () => setEditOpen(true), deletePending: removeInvoice.isPending, onDelete: async () => {
46
54
  await removeInvoice.mutateAsync(id);
47
55
  onDeleted?.();
@@ -57,23 +65,23 @@ export function InvoiceDetailPage({ id, className, onBack, onDeleted, onBookingO
57
65
  setAttachmentOpen(true);
58
66
  }, onDelete: async (attachmentId) => {
59
67
  await removeAttachment.mutateAsync(attachmentId);
60
- } }), slots?.afterAttachments, _jsx(InvoiceNotesCard, { notes: notes, noteContent: noteContent, pending: notesQuery.isPending, addPending: addNote.isPending, onNoteChange: setNoteContent, onAddNote: async () => {
61
- const content = noteContent.trim();
62
- if (!content)
63
- return;
64
- await addNote.mutateAsync({ content });
65
- setNoteContent("");
66
- } }), slots?.afterNotes, _jsx(InvoiceDialog, { open: editOpen, onOpenChange: setEditOpen, invoice: invoice }), _jsx(InvoiceAttachmentDialog, { open: attachmentOpen, onOpenChange: setAttachmentOpen, invoiceId: id, attachment: editingAttachment, onSuccess: () => {
68
+ } }), slots?.afterAttachments, _jsx(InvoiceNotesCard, { notes: notes, pending: notesQuery.isPending, addPending: addNote.isPending, onCreate: () => setNoteOpen(true) }), slots?.afterNotes, _jsx(InvoiceDialog, { open: editOpen, onOpenChange: setEditOpen, invoice: invoice }), _jsx(InvoiceAttachmentDialog, { open: attachmentOpen, onOpenChange: setAttachmentOpen, invoiceId: id, attachment: editingAttachment, onSuccess: () => {
67
69
  setAttachmentOpen(false);
68
70
  setEditingAttachment(undefined);
69
71
  void attachmentsQuery.refetch();
70
- } }), slots?.dialogs] }));
72
+ } }), renderInvoiceNoteDialog ? (renderInvoiceNoteDialog({
73
+ open: noteOpen,
74
+ onOpenChange: setNoteOpen,
75
+ pending: addNote.isPending,
76
+ onSubmit: handleCreateNote,
77
+ })) : (_jsx(InvoiceNoteDialog, { open: noteOpen, onOpenChange: setNoteOpen, pending: addNote.isPending, onSubmit: handleCreateNote })), slots?.dialogs] }));
71
78
  }
72
79
  export function InvoiceDetailHeader({ invoice, onBack, onEdit, onDelete, deletePending, className, }) {
73
80
  const messages = useFinanceUiMessagesOrDefault();
74
81
  const detail = messages.invoiceDetailPage;
75
82
  const canDelete = invoice.status === "draft";
76
- return (_jsxs("div", { "data-slot": "invoice-detail-header", className: cn("flex flex-col gap-4 md:flex-row md:items-start", className), children: [onBack ? (_jsxs(Button, { type: "button", variant: "ghost", size: "icon", onClick: onBack, children: [_jsx(ArrowLeft, { className: "size-4", "aria-hidden": "true" }), _jsx("span", { className: "sr-only", children: detail.actions.back })] })) : null, _jsxs("div", { className: "min-w-0 flex-1", children: [_jsxs("div", { className: "flex flex-wrap items-center gap-2", children: [_jsx("h1", { className: "truncate text-2xl font-bold tracking-tight", children: invoice.invoiceNumber }), _jsx(Badge, { variant: "outline", children: invoice.invoiceType ?? "invoice" })] }), _jsx("p", { className: "mt-1 text-sm text-muted-foreground", children: invoice.bookingId })] }), _jsxs("div", { className: "flex flex-wrap items-center gap-2 md:justify-end", children: [_jsx(Badge, { variant: invoiceStatusVariant[invoice.status] ?? "secondary", children: messages.common.invoiceStatusLabels[invoice.status] }), _jsxs(Button, { type: "button", variant: "outline", onClick: onEdit, children: [_jsx(Pencil, { className: "size-4", "aria-hidden": "true" }), detail.actions.edit] }), _jsx(ConfirmActionButton, { buttonLabel: detail.actions.delete, confirmLabel: detail.actions.delete, cancelLabel: messages.common.cancel, title: detail.actions.deleteTitle, description: canDelete ? detail.actions.deleteDescription : detail.actions.deleteOnlyDraft, variant: "destructive", confirmVariant: "destructive", disabled: !canDelete || deletePending, onConfirm: onDelete })] })] }));
83
+ const invoiceType = invoice.invoiceType ?? "invoice";
84
+ return (_jsxs("div", { "data-slot": "invoice-detail-header", className: cn("flex flex-col gap-4 md:flex-row md:items-start", className), children: [onBack ? (_jsxs(Button, { type: "button", variant: "ghost", size: "icon", onClick: onBack, children: [_jsx(ArrowLeft, { className: "size-4", "aria-hidden": "true" }), _jsx("span", { className: "sr-only", children: detail.actions.back })] })) : null, _jsxs("div", { className: "min-w-0 flex-1", children: [_jsxs("div", { className: "flex flex-wrap items-center gap-2", children: [_jsx("h1", { className: "text-2xl font-bold tracking-tight", children: detail.title }), _jsx(Badge, { variant: invoiceStatusVariant[invoice.status] ?? "secondary", children: messages.common.invoiceStatusLabels[invoice.status] }), _jsx(Badge, { variant: "outline", children: detail.invoiceTypeLabels[invoiceType] })] }), _jsx("p", { className: "mt-1 truncate font-mono text-muted-foreground text-sm", children: invoice.invoiceNumber }), _jsxs("p", { className: "mt-1 text-muted-foreground text-xs", children: [detail.fields.booking, ": ", invoice.bookingId] })] }), _jsxs("div", { className: "flex flex-wrap items-center gap-2 md:justify-end", children: [_jsxs(Button, { type: "button", variant: "outline", onClick: onEdit, children: [_jsx(Pencil, { className: "size-4", "aria-hidden": "true" }), detail.actions.edit] }), _jsx(ConfirmActionButton, { buttonLabel: detail.actions.delete, confirmLabel: detail.actions.delete, cancelLabel: messages.common.cancel, title: detail.actions.deleteTitle, description: canDelete ? detail.actions.deleteDescription : detail.actions.deleteOnlyDraft, variant: "destructive", confirmVariant: "destructive", disabled: !canDelete || deletePending, onConfirm: onDelete })] })] }));
77
85
  }
78
86
  export function InvoiceSummaryCard({ invoice, className }) {
79
87
  const { formatCurrency } = useFinanceUiI18nOrDefault();
@@ -90,32 +98,59 @@ export function InvoiceLinksCard({ invoice, className, onBookingOpen, onPersonOp
90
98
  export function InvoiceLineItemsCard({ invoice, lineItems, pending, deletePending, onCreate, onEdit, onDelete, className, }) {
91
99
  const messages = useFinanceUiMessagesOrDefault();
92
100
  const detail = messages.invoiceDetailPage;
93
- return (_jsxs(Card, { "data-slot": "invoice-line-items-card", className: className, children: [_jsxs(CardHeader, { className: "flex flex-row items-center justify-between", children: [_jsx(CardTitle, { children: detail.titles.lineItems }), onCreate ? (_jsxs(Button, { size: "sm", onClick: () => onCreate(invoice), children: [_jsx(Plus, { className: "size-4", "aria-hidden": "true" }), detail.actions.addLineItem] })) : null] }), _jsx(CardContent, { children: pending ? (_jsx(LoadingRow, {})) : lineItems.length === 0 ? (_jsx(EmptyRow, { children: detail.states.noLineItems })) : (_jsx("div", { className: "overflow-hidden rounded border bg-background", children: _jsxs("table", { className: "w-full text-sm", children: [_jsx("thead", { children: _jsxs("tr", { className: "border-b text-muted-foreground", children: [_jsx("th", { className: "p-2 text-left font-medium", children: detail.columns.description }), _jsx("th", { className: "p-2 text-right font-medium", children: detail.columns.quantity }), _jsx("th", { className: "p-2 text-right font-medium", children: detail.columns.unitPrice }), _jsx("th", { className: "p-2 text-right font-medium", children: detail.columns.total }), _jsx("th", { className: "p-2 text-right font-medium", children: detail.columns.taxRate }), _jsx("th", { className: "w-20 p-2" })] }) }), _jsx("tbody", { children: lineItems.map((lineItem) => (_jsxs("tr", { className: "border-b last:border-b-0", children: [_jsx("td", { className: "p-2", children: lineItem.description }), _jsx("td", { className: "p-2 text-right", children: lineItem.quantity }), _jsx("td", { className: "p-2 text-right", children: _jsx(Money, { cents: lineItem.unitPriceCents, currency: invoice.currency }) }), _jsx("td", { className: "p-2 text-right", children: _jsx(Money, { cents: lineItem.totalCents, currency: invoice.currency }) }), _jsx("td", { className: "p-2 text-right", children: lineItem.taxRate === null ? detail.states.noValue : `${lineItem.taxRate}%` }), _jsx("td", { className: "p-2", children: _jsxs("div", { className: "flex justify-end gap-1", children: [onEdit ? (_jsxs(Button, { type: "button", variant: "ghost", size: "icon-sm", onClick: () => onEdit(lineItem, invoice), children: [_jsx(Pencil, { className: "size-4", "aria-hidden": "true" }), _jsx("span", { className: "sr-only", children: detail.actions.editLineItem })] })) : null, onDelete ? (_jsx(ConfirmActionButton, { buttonLabel: detail.actions.deleteLineItemShort, confirmLabel: detail.actions.delete, cancelLabel: messages.common.cancel, title: detail.actions.deleteLineItemTitle, description: detail.actions.deleteLineItemDescription, disabled: deletePending, variant: "ghost", confirmVariant: "destructive", onConfirm: () => onDelete(lineItem.id) })) : null] }) })] }, lineItem.id))) })] }) })) })] }));
101
+ return (_jsx(InvoiceSection, { dataSlot: "invoice-line-items-card", title: detail.titles.lineItems, className: className, action: onCreate ? (_jsxs(Button, { size: "sm", onClick: () => onCreate(invoice), children: [_jsx(Plus, { className: "size-4", "aria-hidden": "true" }), detail.actions.addLineItem] })) : null, children: pending ? (_jsx(LoadingRow, {})) : lineItems.length === 0 ? (_jsx(EmptyRow, { children: detail.states.noLineItems })) : (_jsx("div", { className: "overflow-hidden rounded border bg-background", children: _jsxs("table", { className: "w-full text-sm", children: [_jsx("thead", { children: _jsxs("tr", { className: "border-b text-muted-foreground", children: [_jsx("th", { className: "p-2 text-left font-medium", children: detail.columns.description }), _jsx("th", { className: "p-2 text-right font-medium", children: detail.columns.quantity }), _jsx("th", { className: "p-2 text-right font-medium", children: detail.columns.unitPrice }), _jsx("th", { className: "p-2 text-right font-medium", children: detail.columns.total }), _jsx("th", { className: "p-2 text-right font-medium", children: detail.columns.taxRate }), _jsx("th", { className: "w-20 p-2" })] }) }), _jsx("tbody", { children: lineItems.map((lineItem) => (_jsxs("tr", { className: "border-b last:border-b-0", children: [_jsx("td", { className: "p-2", children: lineItem.description }), _jsx("td", { className: "p-2 text-right", children: lineItem.quantity }), _jsx("td", { className: "p-2 text-right", children: _jsx(Money, { cents: lineItem.unitPriceCents, currency: invoice.currency }) }), _jsx("td", { className: "p-2 text-right", children: _jsx(Money, { cents: lineItem.totalCents, currency: invoice.currency }) }), _jsx("td", { className: "p-2 text-right", children: lineItem.taxRate === null ? detail.states.noValue : `${lineItem.taxRate}%` }), _jsx("td", { className: "p-2", children: _jsxs("div", { className: "flex justify-end gap-1", children: [onEdit ? (_jsxs(Button, { type: "button", variant: "ghost", size: "icon-sm", onClick: () => onEdit(lineItem, invoice), children: [_jsx(Pencil, { className: "size-4", "aria-hidden": "true" }), _jsx("span", { className: "sr-only", children: detail.actions.editLineItem })] })) : null, onDelete ? (_jsx(ConfirmActionButton, { buttonLabel: detail.actions.deleteLineItemShort, confirmLabel: detail.actions.delete, cancelLabel: messages.common.cancel, title: detail.actions.deleteLineItemTitle, description: detail.actions.deleteLineItemDescription, disabled: deletePending, variant: "ghost", confirmVariant: "destructive", onConfirm: () => onDelete(lineItem.id) })) : null] }) })] }, lineItem.id))) })] }) })) }));
94
102
  }
95
103
  export function InvoicePaymentsCard({ invoice, payments, pending, onCreate, className, }) {
96
104
  const messages = useFinanceUiMessagesOrDefault();
97
105
  const detail = messages.invoiceDetailPage;
98
- return (_jsxs(Card, { "data-slot": "invoice-payments-card", className: className, children: [_jsxs(CardHeader, { className: "flex flex-row items-center justify-between", children: [_jsx(CardTitle, { children: detail.titles.payments }), onCreate ? (_jsxs(Button, { size: "sm", onClick: () => onCreate(invoice), children: [_jsx(Plus, { className: "size-4", "aria-hidden": "true" }), detail.actions.recordPayment] })) : null] }), _jsx(CardContent, { children: pending ? (_jsx(LoadingRow, {})) : payments.length === 0 ? (_jsx(EmptyRow, { children: detail.states.noPayments })) : (_jsx("ul", { className: "divide-y", children: payments.map((payment) => (_jsxs("li", { className: "flex items-center justify-between gap-3 py-3", children: [_jsxs("div", { className: "min-w-0", children: [_jsx("p", { className: "truncate text-sm font-medium", children: formatPaymentMethod(payment.paymentMethod, messages) }), _jsx("p", { className: "text-xs text-muted-foreground", children: payment.paymentDate })] }), _jsxs("div", { className: "flex items-center gap-3", children: [_jsx(Money, { cents: payment.amountCents, currency: payment.currency }), _jsx(Badge, { variant: paymentStatusVariant[payment.status] ?? "secondary", children: messages.common.supplierPaymentStatusLabels[payment.status] })] })] }, payment.id))) })) })] }));
106
+ return (_jsx(InvoiceSection, { dataSlot: "invoice-payments-card", title: detail.titles.payments, className: className, action: onCreate ? (_jsxs(Button, { size: "sm", onClick: () => onCreate(invoice), children: [_jsx(Plus, { className: "size-4", "aria-hidden": "true" }), detail.actions.recordPayment] })) : null, children: pending ? (_jsx(LoadingRow, {})) : payments.length === 0 ? (_jsx(EmptyRow, { children: detail.states.noPayments })) : (_jsx("ul", { className: "divide-y", children: payments.map((payment) => (_jsxs("li", { className: "flex items-center justify-between gap-3 py-3", children: [_jsxs("div", { className: "min-w-0", children: [_jsx("p", { className: "truncate text-sm font-medium", children: formatPaymentMethod(payment.paymentMethod, messages) }), _jsx("p", { className: "text-xs text-muted-foreground", children: payment.paymentDate })] }), _jsxs("div", { className: "flex items-center gap-3", children: [_jsx(Money, { cents: payment.amountCents, currency: payment.currency }), _jsx(Badge, { variant: paymentStatusVariant[payment.status] ?? "secondary", children: messages.common.supplierPaymentStatusLabels[payment.status] })] })] }, payment.id))) })) }));
99
107
  }
100
108
  export function InvoiceCreditNotesCard({ invoice, creditNotes, pending, onCreate, className, }) {
101
109
  const messages = useFinanceUiMessagesOrDefault();
102
110
  const detail = messages.invoiceDetailPage;
103
- return (_jsxs(Card, { "data-slot": "invoice-credit-notes-card", className: className, children: [_jsxs(CardHeader, { className: "flex flex-row items-center justify-between", children: [_jsx(CardTitle, { children: detail.titles.creditNotes }), onCreate ? (_jsxs(Button, { size: "sm", onClick: () => onCreate(invoice), children: [_jsx(Plus, { className: "size-4", "aria-hidden": "true" }), detail.actions.addCreditNote] })) : null] }), _jsx(CardContent, { children: pending ? (_jsx(LoadingRow, {})) : creditNotes.length === 0 ? (_jsx(EmptyRow, { children: detail.states.noCreditNotes })) : (_jsx("ul", { className: "divide-y", children: creditNotes.map((creditNote) => (_jsxs("li", { className: "flex items-center justify-between gap-3 py-3", children: [_jsxs("div", { className: "min-w-0", children: [_jsx("p", { className: "truncate text-sm font-medium", children: creditNote.creditNoteNumber }), _jsx("p", { className: "line-clamp-2 text-xs text-muted-foreground", children: creditNote.reason })] }), _jsxs("div", { className: "flex items-center gap-3", children: [_jsx(Money, { cents: creditNote.amountCents, currency: creditNote.currency }), _jsx(Badge, { variant: creditNoteStatusVariant[creditNote.status] ?? "secondary", children: detail.creditNoteStatusLabels[creditNote.status] })] })] }, creditNote.id))) })) })] }));
111
+ return (_jsx(InvoiceSection, { dataSlot: "invoice-credit-notes-card", title: detail.titles.creditNotes, className: className, action: onCreate ? (_jsxs(Button, { size: "sm", onClick: () => onCreate(invoice), children: [_jsx(Plus, { className: "size-4", "aria-hidden": "true" }), detail.actions.addCreditNote] })) : null, children: pending ? (_jsx(LoadingRow, {})) : creditNotes.length === 0 ? (_jsx(EmptyRow, { children: detail.states.noCreditNotes })) : (_jsx("ul", { className: "divide-y", children: creditNotes.map((creditNote) => (_jsxs("li", { className: "flex items-center justify-between gap-3 py-3", children: [_jsxs("div", { className: "min-w-0", children: [_jsx("p", { className: "truncate text-sm font-medium", children: creditNote.creditNoteNumber }), _jsx("p", { className: "line-clamp-2 text-xs text-muted-foreground", children: creditNote.reason })] }), _jsxs("div", { className: "flex items-center gap-3", children: [_jsx(Money, { cents: creditNote.amountCents, currency: creditNote.currency }), _jsx(Badge, { variant: creditNoteStatusVariant[creditNote.status] ?? "secondary", children: detail.creditNoteStatusLabels[creditNote.status] })] })] }, creditNote.id))) })) }));
104
112
  }
105
113
  export function InvoiceAttachmentsCard({ attachments, pending, deletePending, getDownloadHref, onCreate, onEdit, onDelete, className, }) {
106
114
  const messages = useFinanceUiMessagesOrDefault();
107
115
  const detail = messages.invoiceDetailPage;
108
- return (_jsxs(Card, { "data-slot": "invoice-attachments-card", className: className, children: [_jsxs(CardHeader, { className: "flex flex-row items-center justify-between", children: [_jsx(CardTitle, { children: detail.titles.attachments }), _jsxs(Button, { size: "sm", onClick: onCreate, children: [_jsx(Plus, { className: "size-4", "aria-hidden": "true" }), detail.actions.addAttachment] })] }), _jsx(CardContent, { children: pending ? (_jsx(LoadingRow, {})) : attachments.length === 0 ? (_jsx(EmptyRow, { children: detail.states.noAttachments })) : (_jsx("div", { className: "overflow-hidden rounded border bg-background", children: _jsxs("table", { className: "w-full text-sm", children: [_jsx("thead", { children: _jsxs("tr", { className: "border-b text-muted-foreground", children: [_jsx("th", { className: "p-2 text-left font-medium", children: detail.columns.name }), _jsx("th", { className: "p-2 text-left font-medium", children: detail.columns.kind }), _jsx("th", { className: "p-2 text-left font-medium", children: detail.columns.mimeType }), _jsx("th", { className: "p-2 text-right font-medium", children: detail.columns.size }), _jsx("th", { className: "w-20 p-2" })] }) }), _jsx("tbody", { children: attachments.map((attachment) => {
109
- const downloadHref = getDownloadHref?.(attachment);
110
- return (_jsxs("tr", { className: "border-b last:border-b-0", children: [_jsx("td", { className: "min-w-0 p-2", children: downloadHref ? (_jsxs("a", { href: downloadHref, target: "_blank", rel: "noopener noreferrer", className: "inline-flex max-w-full items-center gap-1.5 hover:underline", children: [_jsx(FileText, { className: "size-3.5 shrink-0 opacity-60", "aria-hidden": "true" }), _jsx("span", { className: "truncate", children: attachment.name }), _jsx(ExternalLink, { className: "size-3 shrink-0 opacity-60", "aria-hidden": "true" })] })) : (_jsx("span", { className: "truncate", children: attachment.name })) }), _jsx("td", { className: "p-2", children: attachment.kind }), _jsx("td", { className: "p-2", children: attachment.mimeType ?? detail.states.noValue }), _jsx("td", { className: "p-2 text-right", children: attachment.fileSize == null
111
- ? detail.states.noValue
112
- : formatBytes(attachment.fileSize) }), _jsx("td", { className: "p-2", children: _jsxs("div", { className: "flex justify-end gap-1", children: [_jsxs(Button, { type: "button", variant: "ghost", size: "icon-sm", onClick: () => onEdit(attachment), children: [_jsx(Pencil, { className: "size-4", "aria-hidden": "true" }), _jsx("span", { className: "sr-only", children: detail.actions.editAttachment })] }), _jsx(ConfirmActionButton, { buttonLabel: detail.actions.deleteAttachmentShort, confirmLabel: detail.actions.delete, cancelLabel: messages.common.cancel, title: detail.actions.deleteAttachmentTitle, description: detail.actions.deleteAttachmentDescription, disabled: deletePending, variant: "ghost", confirmVariant: "destructive", onConfirm: () => onDelete(attachment.id) })] }) })] }, attachment.id));
113
- }) })] }) })) })] }));
114
- }
115
- export function InvoiceNotesCard({ notes, noteContent, pending, addPending, className, onNoteChange, onAddNote, }) {
116
+ return (_jsx(InvoiceSection, { dataSlot: "invoice-attachments-card", title: detail.titles.attachments, className: className, action: _jsxs(Button, { size: "sm", onClick: onCreate, children: [_jsx(Plus, { className: "size-4", "aria-hidden": "true" }), detail.actions.addAttachment] }), children: pending ? (_jsx(LoadingRow, {})) : attachments.length === 0 ? (_jsx(EmptyRow, { children: detail.states.noAttachments })) : (_jsx("div", { className: "overflow-hidden rounded border bg-background", children: _jsxs("table", { className: "w-full text-sm", children: [_jsx("thead", { children: _jsxs("tr", { className: "border-b text-muted-foreground", children: [_jsx("th", { className: "p-2 text-left font-medium", children: detail.columns.name }), _jsx("th", { className: "p-2 text-left font-medium", children: detail.columns.kind }), _jsx("th", { className: "p-2 text-left font-medium", children: detail.columns.mimeType }), _jsx("th", { className: "p-2 text-right font-medium", children: detail.columns.size }), _jsx("th", { className: "w-20 p-2" })] }) }), _jsx("tbody", { children: attachments.map((attachment) => {
117
+ const downloadHref = getDownloadHref?.(attachment);
118
+ return (_jsxs("tr", { className: "border-b last:border-b-0", children: [_jsx("td", { className: "min-w-0 p-2", children: downloadHref ? (_jsxs("a", { href: downloadHref, target: "_blank", rel: "noopener noreferrer", className: "inline-flex max-w-full items-center gap-1.5 hover:underline", children: [_jsx(FileText, { className: "size-3.5 shrink-0 opacity-60", "aria-hidden": "true" }), _jsx("span", { className: "truncate", children: attachment.name }), _jsx(ExternalLink, { className: "size-3 shrink-0 opacity-60", "aria-hidden": "true" })] })) : (_jsx("span", { className: "truncate", children: attachment.name })) }), _jsx("td", { className: "p-2", children: attachment.kind }), _jsx("td", { className: "p-2", children: attachment.mimeType ?? detail.states.noValue }), _jsx("td", { className: "p-2 text-right", children: attachment.fileSize == null
119
+ ? detail.states.noValue
120
+ : formatBytes(attachment.fileSize) }), _jsx("td", { className: "p-2", children: _jsxs("div", { className: "flex justify-end gap-1", children: [_jsxs(Button, { type: "button", variant: "ghost", size: "icon-sm", onClick: () => onEdit(attachment), children: [_jsx(Pencil, { className: "size-4", "aria-hidden": "true" }), _jsx("span", { className: "sr-only", children: detail.actions.editAttachment })] }), _jsx(ConfirmActionButton, { buttonLabel: detail.actions.deleteAttachmentShort, confirmLabel: detail.actions.delete, cancelLabel: messages.common.cancel, title: detail.actions.deleteAttachmentTitle, description: detail.actions.deleteAttachmentDescription, disabled: deletePending, variant: "ghost", confirmVariant: "destructive", onConfirm: () => onDelete(attachment.id) })] }) })] }, attachment.id));
121
+ }) })] }) })) }));
122
+ }
123
+ export function InvoiceNotesCard({ notes, noteContent, pending, addPending, className, onNoteChange, onAddNote, onCreate, }) {
124
+ const messages = useFinanceUiMessagesOrDefault();
125
+ const detail = messages.invoiceDetailPage;
126
+ const controlledNoteContent = noteContent ?? "";
127
+ return (_jsxs(InvoiceSection, { dataSlot: "invoice-notes-card", title: detail.titles.notes, className: className, action: onCreate ? (_jsxs(Button, { size: "sm", onClick: onCreate, disabled: addPending, children: [addPending ? _jsx(Loader2, { className: "size-4 animate-spin", "aria-hidden": "true" }) : null, _jsx(Plus, { className: "size-4", "aria-hidden": "true" }), detail.actions.addNote] })) : null, children: [pending ? (_jsx(LoadingRow, {})) : notes.length === 0 ? (_jsx(EmptyRow, { children: detail.states.noNotes })) : (_jsx("ul", { className: "divide-y", children: notes.map((note) => (_jsxs("li", { className: "py-3", children: [_jsx("p", { className: "whitespace-pre-wrap text-sm", children: note.content }), _jsx("p", { className: "mt-1 text-xs text-muted-foreground", children: note.createdAt })] }, note.id))) })), !onCreate && onNoteChange && onAddNote ? (_jsxs("div", { className: "mt-4 flex flex-col gap-2", children: [_jsx(Textarea, { value: controlledNoteContent, onChange: (event) => onNoteChange(event.target.value), placeholder: detail.placeholders.note, rows: 3 }), _jsxs(Button, { type: "button", className: "self-end", disabled: addPending || controlledNoteContent.trim().length === 0, onClick: () => void onAddNote(), children: [addPending ? _jsx(Loader2, { className: "size-4 animate-spin", "aria-hidden": "true" }) : null, detail.actions.addNote] })] })) : null] }));
128
+ }
129
+ function createInvoiceNoteFormSchema(messages) {
130
+ return z.object({
131
+ content: z.string().trim().min(1, messages.invoiceDetailPage.noteDialog.contentRequired),
132
+ });
133
+ }
134
+ export function InvoiceNoteDialog({ open, onOpenChange, pending, onSubmit, }) {
116
135
  const messages = useFinanceUiMessagesOrDefault();
117
136
  const detail = messages.invoiceDetailPage;
118
- return (_jsxs(Card, { "data-slot": "invoice-notes-card", className: className, children: [_jsx(CardHeader, { children: _jsx(CardTitle, { children: detail.titles.notes }) }), _jsxs(CardContent, { className: "flex flex-col gap-4", children: [pending ? (_jsx(LoadingRow, {})) : notes.length === 0 ? (_jsx(EmptyRow, { children: detail.states.noNotes })) : (_jsx("ul", { className: "divide-y", children: notes.map((note) => (_jsxs("li", { className: "py-3", children: [_jsx("p", { className: "whitespace-pre-wrap text-sm", children: note.content }), _jsx("p", { className: "mt-1 text-xs text-muted-foreground", children: note.createdAt })] }, note.id))) })), _jsxs("div", { className: "flex flex-col gap-2", children: [_jsx(Textarea, { value: noteContent, onChange: (event) => onNoteChange(event.target.value), placeholder: detail.placeholders.note, rows: 3 }), _jsxs(Button, { type: "button", className: "self-end", disabled: addPending || noteContent.trim().length === 0, onClick: () => void onAddNote(), children: [addPending ? _jsx(Loader2, { className: "size-4 animate-spin", "aria-hidden": "true" }) : null, detail.actions.addNote] })] })] })] }));
137
+ const noteFormSchema = createInvoiceNoteFormSchema(messages);
138
+ const form = useForm({
139
+ resolver: zodResolver(noteFormSchema),
140
+ defaultValues: {
141
+ content: "",
142
+ },
143
+ });
144
+ useEffect(() => {
145
+ if (open) {
146
+ form.reset({ content: "" });
147
+ }
148
+ }, [form, open]);
149
+ const handleSubmit = async (values) => {
150
+ await onSubmit(values.content);
151
+ form.reset({ content: "" });
152
+ };
153
+ return (_jsx(Dialog, { open: open, onOpenChange: onOpenChange, children: _jsxs(DialogContent, { children: [_jsx(DialogHeader, { children: _jsx(DialogTitle, { children: detail.noteDialog.title }) }), _jsxs("form", { onSubmit: form.handleSubmit(handleSubmit), children: [_jsx(DialogBody, { className: "grid gap-4", children: _jsxs("div", { className: "flex flex-col gap-2", children: [_jsx(Label, { children: detail.fields.notes }), _jsx(Textarea, { ...form.register("content"), placeholder: detail.placeholders.note, rows: 4 }), form.formState.errors.content ? (_jsx("p", { className: "text-xs text-destructive", children: form.formState.errors.content.message })) : null] }) }), _jsxs(DialogFooter, { children: [_jsx(Button, { type: "button", variant: "ghost", onClick: () => onOpenChange(false), children: messages.common.cancel }), _jsxs(Button, { type: "submit", disabled: pending || form.formState.isSubmitting, children: [pending || form.formState.isSubmitting ? (_jsx(Loader2, { className: "size-4 animate-spin", "aria-hidden": "true" })) : null, detail.noteDialog.createAction] })] })] })] }) }));
119
154
  }
120
155
  function createInvoiceAttachmentFormSchema(messages) {
121
156
  return z.object({
@@ -185,6 +220,9 @@ function formatBytes(bytes) {
185
220
  return `${Math.round(bytes / 1024)} KB`;
186
221
  return `${(bytes / (1024 * 1024)).toFixed(1)} MB`;
187
222
  }
223
+ export function InvoiceSection({ dataSlot, title, action, children, className, }) {
224
+ return (_jsxs("section", { "data-slot": dataSlot, className: cn("rounded-md border bg-background", className), children: [_jsxs("div", { className: "flex flex-wrap items-center justify-between gap-3 border-b px-4 py-3", children: [_jsx("h2", { className: "font-semibold text-sm", children: title }), action] }), _jsx("div", { className: "p-4", children: children })] }));
225
+ }
188
226
  export function Money({ cents, currency }) {
189
227
  const { formatCurrency } = useFinanceUiI18nOrDefault();
190
228
  return _jsx("span", { className: "font-mono", children: formatCurrency(cents / 100, currency) });
@@ -1 +1 @@
1
- {"version":3,"file":"invoice-dialog.d.ts","sourceRoot":"","sources":["../../src/components/invoice-dialog.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,aAAa,EAAsB,MAAM,yBAAyB,CAAA;AAkDhF,MAAM,WAAW,kBAAkB;IACjC,IAAI,EAAE,OAAO,CAAA;IACb,YAAY,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAA;IACrC,OAAO,CAAC,EAAE,aAAa,CAAA;IACvB,SAAS,CAAC,EAAE,CAAC,OAAO,EAAE,aAAa,KAAK,IAAI,CAAA;CAC7C;AASD,wBAAgB,aAAa,CAAC,EAAE,IAAI,EAAE,YAAY,EAAE,OAAO,EAAE,SAAS,EAAE,EAAE,kBAAkB,2CAwP3F"}
1
+ {"version":3,"file":"invoice-dialog.d.ts","sourceRoot":"","sources":["../../src/components/invoice-dialog.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,aAAa,EAAsB,MAAM,yBAAyB,CAAA;AAmDhF,MAAM,WAAW,kBAAkB;IACjC,IAAI,EAAE,OAAO,CAAA;IACb,YAAY,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAA;IACrC,OAAO,CAAC,EAAE,aAAa,CAAA;IACvB,SAAS,CAAC,EAAE,CAAC,OAAO,EAAE,aAAa,KAAK,IAAI,CAAA;CAC7C;AASD,wBAAgB,aAAa,CAAC,EAAE,IAAI,EAAE,YAAY,EAAE,OAAO,EAAE,SAAS,EAAE,EAAE,kBAAkB,2CAmR3F"}
@@ -2,6 +2,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { useInvoiceMutation } from "@voyantjs/finance-react";
3
3
  import { Button, Dialog, DialogBody, DialogContent, DialogFooter, DialogHeader, DialogTitle, Input, Label, Select, SelectContent, SelectItem, SelectTrigger, SelectValue, Textarea, } from "@voyantjs/ui/components";
4
4
  import { CurrencyCombobox } from "@voyantjs/ui/components/currency-combobox";
5
+ import { CurrencyInput } from "@voyantjs/ui/components/currency-input";
5
6
  import { DatePicker } from "@voyantjs/ui/components/date-picker";
6
7
  import { zodResolver } from "@voyantjs/ui/lib/zod-resolver";
7
8
  import { Loader2 } from "lucide-react";
@@ -121,7 +122,16 @@ export function InvoiceDialog({ open, onOpenChange, invoice, onSuccess }) {
121
122
  })), value: form.watch("status"), onValueChange: (value) => form.setValue("status", value), children: [_jsx(SelectTrigger, { className: "w-full", children: _jsx(SelectValue, {}) }), _jsx(SelectContent, { children: invoiceStatuses.map((status) => (_jsx(SelectItem, { value: status, children: messages.common.invoiceStatusLabels[status] }, status))) })] })] })] }), _jsxs("div", { className: "grid grid-cols-2 gap-4", children: [_jsxs("div", { className: "flex flex-col gap-2", children: [_jsx(Label, { children: messages.invoiceDialog.fields.bookingId }), _jsx(Input, { ...form.register("bookingId"), placeholder: messages.invoiceDialog.placeholders.bookingId }), form.formState.errors.bookingId ? (_jsx("p", { className: "text-xs text-destructive", children: form.formState.errors.bookingId.message })) : null] }), _jsxs("div", { className: "flex flex-col gap-2", children: [_jsx(Label, { children: messages.invoiceDialog.fields.currency }), _jsx(CurrencyCombobox, { value: form.watch("currency") || null, onChange: (next) => form.setValue("currency", next ?? "EUR" /* i18n-literal-ok domain default currency */, {
122
123
  shouldValidate: true,
123
124
  shouldDirty: true,
124
- }) })] })] }), _jsxs("div", { className: "grid grid-cols-3 gap-4", children: [_jsxs("div", { className: "flex flex-col gap-2", children: [_jsx(Label, { children: messages.invoiceDialog.fields.subtotalCents }), _jsx(Input, { ...form.register("subtotalCents"), type: "number", min: "0" })] }), _jsxs("div", { className: "flex flex-col gap-2", children: [_jsx(Label, { children: messages.invoiceDialog.fields.taxCents }), _jsx(Input, { ...form.register("taxCents"), type: "number", min: "0" })] }), _jsxs("div", { className: "flex flex-col gap-2", children: [_jsx(Label, { children: messages.invoiceDialog.fields.totalCents }), _jsx(Input, { ...form.register("totalCents"), type: "number", min: "0" })] })] }), _jsxs("div", { className: "grid grid-cols-2 gap-4", children: [_jsxs("div", { className: "flex flex-col gap-2", children: [_jsx(Label, { children: messages.invoiceDialog.fields.issueDate }), _jsx(DatePicker, { value: form.watch("issueDate") || null, onChange: (nextValue) => form.setValue("issueDate", nextValue ?? "", {
125
+ }) })] })] }), _jsxs("div", { className: "grid grid-cols-3 gap-4", children: [_jsxs("div", { className: "flex flex-col gap-2", children: [_jsx(Label, { children: messages.invoiceDialog.fields.subtotalCents }), _jsx(CurrencyInput, { value: form.watch("subtotalCents"), onChange: (next) => form.setValue("subtotalCents", next ?? 0, {
126
+ shouldDirty: true,
127
+ shouldValidate: true,
128
+ }), currency: form.watch("currency") })] }), _jsxs("div", { className: "flex flex-col gap-2", children: [_jsx(Label, { children: messages.invoiceDialog.fields.taxCents }), _jsx(CurrencyInput, { value: form.watch("taxCents"), onChange: (next) => form.setValue("taxCents", next ?? 0, {
129
+ shouldDirty: true,
130
+ shouldValidate: true,
131
+ }), currency: form.watch("currency") })] }), _jsxs("div", { className: "flex flex-col gap-2", children: [_jsx(Label, { children: messages.invoiceDialog.fields.totalCents }), _jsx(CurrencyInput, { value: form.watch("totalCents"), onChange: (next) => form.setValue("totalCents", next ?? 0, {
132
+ shouldDirty: true,
133
+ shouldValidate: true,
134
+ }), currency: form.watch("currency") })] })] }), _jsxs("div", { className: "grid grid-cols-2 gap-4", children: [_jsxs("div", { className: "flex flex-col gap-2", children: [_jsx(Label, { children: messages.invoiceDialog.fields.issueDate }), _jsx(DatePicker, { value: form.watch("issueDate") || null, onChange: (nextValue) => form.setValue("issueDate", nextValue ?? "", {
125
135
  shouldDirty: true,
126
136
  shouldValidate: true,
127
137
  }), placeholder: messages.invoiceDialog.placeholders.issueDate, className: "w-full" }), form.formState.errors.issueDate ? (_jsx("p", { className: "text-xs text-destructive", children: form.formState.errors.issueDate.message })) : null] }), _jsxs("div", { className: "flex flex-col gap-2", children: [_jsx(Label, { children: messages.invoiceDialog.fields.dueDate }), _jsx(DatePicker, { value: form.watch("dueDate") || null, onChange: (nextValue) => form.setValue("dueDate", nextValue ?? "", {
@@ -1 +1 @@
1
- {"version":3,"file":"payment-policy-form.d.ts","sourceRoot":"","sources":["../../src/components/payment-policy-form.tsx"],"names":[],"mappings":"AAEA,OAAO,EAIL,KAAK,aAAa,EACnB,MAAM,mBAAmB,CAAA;AAG1B,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAE9B;;;;;;;;;;;;;GAaG;AACH,MAAM,WAAW,sBAAsB;IACrC,yDAAyD;IACzD,KAAK,EAAE,aAAa,GAAG,IAAI,CAAA;IAC3B,QAAQ,EAAE,CAAC,IAAI,EAAE,aAAa,GAAG,IAAI,KAAK,IAAI,CAAA;IAC9C;;;OAGG;IACH,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,sEAAsE;IACtE,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,mEAAmE;IACnE,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AASD,wBAAgB,iBAAiB,CAAC,EAChC,KAAK,EACL,QAAQ,EACR,WAAkB,EAClB,QAAgB,EAChB,QAAQ,EACR,SAAS,GACV,EAAE,sBAAsB,GAAG,KAAK,CAAC,YAAY,CAgL7C;AA8BD;;;;;GAKG;AACH,MAAM,WAAW,yBAAyB;IACxC,MAAM,EAAE,aAAa,GAAG,IAAI,CAAA;IAC5B,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,wEAAwE;IACxE,gBAAgB,CAAC,EAAE,MAAM,CAAA;IACzB,gEAAgE;IAChE,yBAAyB,CAAC,EAAE,MAAM,CAAA;IAClC,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED,wBAAgB,oBAAoB,CAAC,EACnC,MAAM,EACN,QAAgB,EAChB,gBAA0B,EAC1B,yBAA8B,EAC9B,SAAS,GACV,EAAE,yBAAyB,GAAG,KAAK,CAAC,YAAY,CAgDhD"}
1
+ {"version":3,"file":"payment-policy-form.d.ts","sourceRoot":"","sources":["../../src/components/payment-policy-form.tsx"],"names":[],"mappings":"AAEA,OAAO,EAIL,KAAK,aAAa,EACnB,MAAM,mBAAmB,CAAA;AAsB1B,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAI9B;;;;;;;;;;;;;GAaG;AACH,MAAM,WAAW,sBAAsB;IACrC,yDAAyD;IACzD,KAAK,EAAE,aAAa,GAAG,IAAI,CAAA;IAC3B,QAAQ,EAAE,CAAC,IAAI,EAAE,aAAa,GAAG,IAAI,KAAK,IAAI,CAAA;IAC9C;;;OAGG;IACH,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,sEAAsE;IACtE,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,mEAAmE;IACnE,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAYD,wBAAgB,iBAAiB,CAAC,EAChC,KAAK,EACL,QAAQ,EACR,WAAkB,EAClB,QAAgB,EAChB,QAAQ,EACR,SAAS,GACV,EAAE,sBAAsB,GAAG,KAAK,CAAC,YAAY,CAiK7C;AAwDD;;;;;GAKG;AACH,MAAM,WAAW,yBAAyB;IACxC,MAAM,EAAE,aAAa,GAAG,IAAI,CAAA;IAC5B,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,wEAAwE;IACxE,gBAAgB,CAAC,EAAE,MAAM,CAAA;IACzB,gEAAgE;IAChE,yBAAyB,CAAC,EAAE,MAAM,CAAA;IAClC,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED,wBAAgB,oBAAoB,CAAC,EACnC,MAAM,EACN,QAAgB,EAChB,gBAA0B,EAC1B,yBAA8B,EAC9B,SAAS,GACV,EAAE,yBAAyB,GAAG,KAAK,CAAC,YAAY,CA0DhD"}
@@ -1,56 +1,61 @@
1
1
  "use client";
2
2
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
3
  import { computePaymentSchedule, noDepositPolicy, } from "@voyantjs/finance";
4
- import { Input, Label, RadioGroup, RadioGroupItem, Switch } from "@voyantjs/ui/components";
4
+ import { formatMessage } from "@voyantjs/i18n";
5
+ import { Button, InputGroup, InputGroupAddon, InputGroupInput, InputGroupText, Label, Select, SelectContent, SelectItem, SelectTrigger, SelectValue, Switch, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, } from "@voyantjs/ui/components";
5
6
  import { cn } from "@voyantjs/ui/lib/utils";
7
+ import { HelpCircle } from "lucide-react";
6
8
  import * as React from "react";
9
+ import { useFinanceUiI18nOrDefault } from "../i18n/index.js";
7
10
  const DEFAULT_POLICY = {
8
11
  deposit: { kind: "percent", percent: 50 },
9
12
  minDaysBeforeDepartureForDeposit: 30,
10
13
  balanceDueDaysBeforeDeparture: 30,
11
14
  balanceDueMinDaysFromNow: 7,
12
15
  };
16
+ const depositKinds = ["none", "percent", "fixed_cents"];
13
17
  export function PaymentPolicyForm({ value, onChange, inheritable = true, currency = "EUR", disabled, className, }) {
18
+ const messages = useFinanceUiI18nOrDefault().messages.paymentPolicy.form;
14
19
  const isInheriting = value === null;
15
20
  const policy = value ?? noDepositPolicy;
16
21
  const setPolicyField = (key, next) => {
17
22
  onChange({ ...(value ?? DEFAULT_POLICY), [key]: next });
18
23
  };
19
- return (_jsxs("div", { className: cn("space-y-5", className), children: [inheritable ? (_jsxs("div", { className: "flex items-start gap-3 rounded-md border bg-muted/20 p-3", children: [_jsx(Switch, { id: "payment-policy-inherit", checked: isInheriting, onCheckedChange: (checked) => {
20
- if (checked) {
21
- onChange(null);
22
- }
23
- else {
24
- onChange(value ?? DEFAULT_POLICY);
25
- }
26
- }, disabled: disabled }), _jsxs("div", { className: "space-y-1", children: [_jsx(Label, { htmlFor: "payment-policy-inherit", className: "text-sm font-medium", children: "Inherit from parent" }), _jsx("p", { className: "text-muted-foreground text-xs", children: "When on, this layer falls back to the next-broader policy (operator default, category, supplier, \u2026). Switch off to set an explicit policy here." })] })] })) : null, _jsxs("fieldset", { disabled: disabled || isInheriting, className: "space-y-5 disabled:opacity-60", children: [_jsxs("div", { className: "space-y-2", children: [_jsx(Label, { className: "text-sm font-medium", children: "Deposit" }), _jsxs(RadioGroup, { value: policy.deposit.kind, onValueChange: (kind) => {
27
- if (kind === "none") {
28
- setPolicyField("deposit", { kind: "none" });
29
- }
30
- else if (kind === "percent") {
31
- setPolicyField("deposit", {
32
- kind: "percent",
33
- percent: policy.deposit.percent ?? 50,
34
- });
35
- }
36
- else if (kind === "fixed_cents") {
37
- setPolicyField("deposit", {
38
- kind: "fixed_cents",
39
- amountCents: policy.deposit.amountCents ?? 10_000,
40
- });
41
- }
42
- }, className: "grid grid-cols-1 gap-2 md:grid-cols-3", children: [_jsx(DepositKindOption, { value: "none", label: "None", hint: "Customer pays the full amount up-front.", checked: policy.deposit.kind === "none" }), _jsx(DepositKindOption, { value: "percent", label: "Percent of total", hint: "e.g. 50% deposit at booking.", checked: policy.deposit.kind === "percent" }), _jsx(DepositKindOption, { value: "fixed_cents", label: "Fixed amount", hint: "A flat per-booking amount.", checked: policy.deposit.kind === "fixed_cents" })] }), policy.deposit.kind === "percent" ? (_jsx("div", { className: "grid grid-cols-1 gap-3 pt-2 md:grid-cols-2", children: _jsxs("div", { className: "space-y-1", children: [_jsx(Label, { htmlFor: "payment-policy-percent", children: "Deposit percent" }), _jsx(Input, { id: "payment-policy-percent", type: "number", min: 0, max: 100, step: 1, value: policy.deposit.percent ?? 50, onChange: (e) => setPolicyField("deposit", {
43
- kind: "percent",
44
- percent: Number(e.target.value),
45
- }) }), _jsx("p", { className: "text-muted-foreground text-xs", children: "0\u2013100. Whole numbers recommended." })] }) })) : null, policy.deposit.kind === "fixed_cents" ? (_jsx("div", { className: "grid grid-cols-1 gap-3 pt-2 md:grid-cols-2", children: _jsxs("div", { className: "space-y-1", children: [_jsxs(Label, { htmlFor: "payment-policy-fixed", children: ["Deposit amount (", currency, ")"] }), _jsx(Input, { id: "payment-policy-fixed", type: "number", min: 0, step: 0.01, value: (policy.deposit.amountCents ?? 0) / 100, onChange: (e) => setPolicyField("deposit", {
46
- kind: "fixed_cents",
47
- amountCents: Math.round(Number(e.target.value) * 100),
48
- }) }), _jsx("p", { className: "text-muted-foreground text-xs", children: "Capped at the booking total when the booking is smaller than this amount." })] }) })) : null] }), _jsxs("div", { className: "grid grid-cols-1 gap-4 md:grid-cols-3", children: [_jsxs("div", { className: "space-y-1", children: [_jsx(Label, { htmlFor: "payment-policy-min-days", children: "Minimum days before departure" }), _jsx(Input, { id: "payment-policy-min-days", type: "number", min: 0, step: 1, value: policy.minDaysBeforeDepartureForDeposit, onChange: (e) => setPolicyField("minDaysBeforeDepartureForDeposit", Number(e.target.value)) }), _jsx("p", { className: "text-muted-foreground text-xs", children: "If departure is closer than this, the booking requires the full amount up-front." })] }), _jsxs("div", { className: "space-y-1", children: [_jsx(Label, { htmlFor: "payment-policy-balance-days", children: "Balance due days before departure" }), _jsx(Input, { id: "payment-policy-balance-days", type: "number", min: 0, step: 1, value: policy.balanceDueDaysBeforeDeparture, onChange: (e) => setPolicyField("balanceDueDaysBeforeDeparture", Number(e.target.value)) }), _jsx("p", { className: "text-muted-foreground text-xs", children: "When the balance is due." })] }), _jsxs("div", { className: "space-y-1", children: [_jsx(Label, { htmlFor: "payment-policy-grace", children: "Balance grace days from now" }), _jsx(Input, { id: "payment-policy-grace", type: "number", min: 0, step: 1, value: policy.balanceDueMinDaysFromNow, onChange: (e) => setPolicyField("balanceDueMinDaysFromNow", Number(e.target.value)) }), _jsx("p", { className: "text-muted-foreground text-xs", children: "Floor on the balance due date so the customer always gets at least this long to pay it." })] })] })] })] }));
24
+ const setDepositKind = (kind) => {
25
+ if (kind === "none") {
26
+ setPolicyField("deposit", { kind: "none" });
27
+ return;
28
+ }
29
+ if (kind === "percent") {
30
+ setPolicyField("deposit", {
31
+ kind: "percent",
32
+ percent: policy.deposit.kind === "percent" ? (policy.deposit.percent ?? 50) : 50,
33
+ });
34
+ return;
35
+ }
36
+ setPolicyField("deposit", {
37
+ kind: "fixed_cents",
38
+ amountCents: policy.deposit.kind === "fixed_cents" ? (policy.deposit.amountCents ?? 10_000) : 10_000,
39
+ });
40
+ };
41
+ const depositHint = messages.depositHints[policy.deposit.kind];
42
+ return (_jsx(TooltipProvider, { children: _jsxs("div", { className: cn("space-y-4", className), children: [inheritable ? (_jsxs("div", { className: "flex items-center justify-between gap-3 rounded-md border bg-muted/20 px-3 py-2", children: [_jsxs("div", { className: "flex min-w-0 items-center gap-2", children: [_jsx(Label, { htmlFor: "payment-policy-inherit", className: "text-sm font-medium", children: messages.inherit.label }), _jsx(InfoTooltip, { label: messages.inherit.tooltipLabel, children: messages.inherit.help })] }), _jsx(Switch, { id: "payment-policy-inherit", checked: isInheriting, onCheckedChange: (checked) => onChange(checked ? null : (value ?? DEFAULT_POLICY)), disabled: disabled })] })) : null, _jsxs("fieldset", { disabled: disabled || isInheriting, className: "space-y-4 disabled:opacity-60", children: [_jsxs("div", { className: "grid grid-cols-1 gap-3 lg:grid-cols-[minmax(13rem,16rem)_minmax(13rem,1fr)]", children: [_jsxs("div", { className: "space-y-1.5", children: [_jsx(Label, { htmlFor: "payment-policy-deposit-kind", children: messages.depositKind.label }), _jsxs(Select, { value: policy.deposit.kind, onValueChange: (kind) => setDepositKind(kind), children: [_jsx(SelectTrigger, { id: "payment-policy-deposit-kind", className: "w-full", children: _jsx(SelectValue, {}) }), _jsx(SelectContent, { children: depositKinds.map((kind) => (_jsx(SelectItem, { value: kind, children: messages.depositKind.options[kind] }, kind))) })] })] }), policy.deposit.kind === "percent" ? (_jsxs("div", { className: "space-y-1.5", children: [_jsx(Label, { htmlFor: "payment-policy-percent", children: messages.depositValue.percentLabel }), _jsxs(InputGroup, { children: [_jsx(InputGroupInput, { id: "payment-policy-percent", type: "number", min: 0, max: 100, step: 1, value: policy.deposit.percent ?? 50, onChange: (e) => setPolicyField("deposit", {
43
+ kind: "percent",
44
+ percent: Number(e.target.value),
45
+ }) }), _jsx(InputGroupAddon, { align: "inline-end", children: _jsx(InputGroupText, { children: "%" }) })] }), _jsx("p", { className: "text-muted-foreground text-xs", children: depositHint })] })) : null, policy.deposit.kind === "fixed_cents" ? (_jsxs("div", { className: "space-y-1.5", children: [_jsx(Label, { htmlFor: "payment-policy-fixed", children: messages.depositValue.fixedLabel }), _jsxs(InputGroup, { children: [_jsx(InputGroupInput, { id: "payment-policy-fixed", type: "number", min: 0, step: 0.01, value: (policy.deposit.amountCents ?? 0) / 100, onChange: (e) => setPolicyField("deposit", {
46
+ kind: "fixed_cents",
47
+ amountCents: Math.round(Number(e.target.value) * 100),
48
+ }) }), _jsx(InputGroupAddon, { align: "inline-end", children: _jsx(InputGroupText, { children: currency }) })] }), _jsx("p", { className: "text-muted-foreground text-xs", children: depositHint })] })) : null, policy.deposit.kind === "none" ? (_jsx("div", { className: "flex items-end pb-2", children: _jsx("p", { className: "text-muted-foreground text-xs", children: depositHint }) })) : null] }), _jsxs("div", { className: "grid grid-cols-1 gap-4 md:grid-cols-3", children: [_jsx(DaysInput, { id: "payment-policy-min-days", label: messages.days.minDaysLabel, help: messages.days.minDaysHelp, tooltipLabel: messages.days.tooltipLabel, value: policy.minDaysBeforeDepartureForDeposit, suffix: messages.days.suffix, onChange: (next) => setPolicyField("minDaysBeforeDepartureForDeposit", next) }), _jsx(DaysInput, { id: "payment-policy-balance-days", label: messages.days.balanceDaysLabel, help: messages.days.balanceDaysHelp, tooltipLabel: messages.days.tooltipLabel, value: policy.balanceDueDaysBeforeDeparture, suffix: messages.days.suffix, onChange: (next) => setPolicyField("balanceDueDaysBeforeDeparture", next) }), _jsx(DaysInput, { id: "payment-policy-grace", label: messages.days.graceDaysLabel, help: messages.days.graceDaysHelp, tooltipLabel: messages.days.tooltipLabel, value: policy.balanceDueMinDaysFromNow, suffix: messages.days.suffix, onChange: (next) => setPolicyField("balanceDueMinDaysFromNow", next) })] })] })] }) }));
49
+ }
50
+ function DaysInput({ id, label, help, tooltipLabel, value, suffix, onChange, }) {
51
+ return (_jsxs("div", { className: "space-y-1.5", children: [_jsxs("div", { className: "flex items-center gap-1.5", children: [_jsx(Label, { htmlFor: id, children: label }), _jsx(InfoTooltip, { label: tooltipLabel, children: help })] }), _jsxs(InputGroup, { children: [_jsx(InputGroupInput, { id: id, type: "number", min: 0, step: 1, value: value, onChange: (e) => onChange(Number(e.target.value)) }), _jsx(InputGroupAddon, { align: "inline-end", children: _jsx(InputGroupText, { children: suffix }) })] })] }));
49
52
  }
50
- function DepositKindOption({ value, label, hint, checked, }) {
51
- return (_jsxs(Label, { htmlFor: `payment-policy-deposit-${value}`, className: cn("flex cursor-pointer items-start gap-3 rounded-md border p-3", checked ? "border-primary bg-primary/5" : "bg-background"), children: [_jsx(RadioGroupItem, { id: `payment-policy-deposit-${value}`, value: value, className: "mt-1" }), _jsxs("div", { className: "space-y-1", children: [_jsx("div", { className: "text-sm font-medium", children: label }), _jsx("p", { className: "text-muted-foreground text-xs", children: hint })] })] }));
53
+ function InfoTooltip({ label, children }) {
54
+ return (_jsxs(Tooltip, { children: [_jsxs(TooltipTrigger, { render: _jsx(Button, { type: "button", variant: "ghost", size: "icon", className: "size-5" }), children: [_jsx(HelpCircle, { className: "size-3.5 text-muted-foreground", "aria-hidden": "true" }), _jsx("span", { className: "sr-only", children: label })] }), _jsx(TooltipContent, { children: children })] }));
52
55
  }
53
56
  export function PaymentPolicyPreview({ policy, currency = "EUR", sampleTotalCents = 100_000, sampleDaysBeforeDeparture = 60, className, }) {
57
+ const i18n = useFinanceUiI18nOrDefault();
58
+ const messages = i18n.messages.paymentPolicy.preview;
54
59
  const today = React.useMemo(() => new Date(), []);
55
60
  const departureDate = React.useMemo(() => {
56
61
  const d = new Date(today.getTime() + sampleDaysBeforeDeparture * 24 * 60 * 60 * 1000);
@@ -60,23 +65,18 @@ export function PaymentPolicyPreview({ policy, currency = "EUR", sampleTotalCent
60
65
  ? computePaymentSchedule({ totalCents: sampleTotalCents, currency, departureDate, today }, policy)
61
66
  : [], [sampleTotalCents, currency, departureDate, policy, today]);
62
67
  if (!policy) {
63
- return (_jsx("div", { className: cn("rounded-md border border-dashed bg-muted/20 p-3 text-muted-foreground text-xs", className), children: "Inheriting from parent \u2014 no preview at this layer." }));
68
+ return (_jsx("div", { className: cn("self-start rounded-md border border-dashed bg-muted/20 p-3 text-muted-foreground text-xs", className), children: messages.inheriting }));
64
69
  }
65
- return (_jsxs("div", { className: cn("space-y-2 rounded-md border bg-muted/20 p-3 text-sm", className), children: [_jsxs("div", { className: "text-muted-foreground text-xs", children: ["Sample: ", formatMoney(sampleTotalCents, currency), " booking, departure in", " ", sampleDaysBeforeDeparture, " days"] }), _jsx("ul", { className: "space-y-1", children: schedule.map((entry) => (_jsx(ScheduleRow, { entry: entry, currency: currency }, `${entry.scheduleType}-${entry.dueDate}`))) })] }));
70
+ return (_jsxs("div", { className: cn("self-start space-y-2 rounded-md border bg-muted/20 p-3 text-sm", className), children: [_jsx("div", { className: "text-muted-foreground text-xs", children: formatMessage(messages.sample, {
71
+ amount: i18n.formatCurrency(sampleTotalCents / 100, currency),
72
+ days: i18n.formatNumber(sampleDaysBeforeDeparture),
73
+ }) }), _jsx("ul", { className: "space-y-1", children: schedule.map((entry) => (_jsx(ScheduleRow, { entry: entry, currency: currency, labels: messages.scheduleTypes, dueLabel: messages.due, formatCurrency: i18n.formatCurrency, formatDate: i18n.formatDate }, `${entry.scheduleType}-${entry.dueDate}`))) })] }));
66
74
  }
67
- function ScheduleRow({ entry, currency }) {
75
+ function ScheduleRow({ entry, currency, labels, dueLabel, formatCurrency, formatDate, }) {
68
76
  const label = entry.scheduleType === "deposit"
69
- ? "Deposit"
77
+ ? labels.deposit
70
78
  : entry.scheduleType === "balance"
71
- ? "Balance"
72
- : "Full payment";
73
- return (_jsxs("li", { className: "flex items-center justify-between gap-2", children: [_jsx("span", { className: "font-medium", children: label }), _jsx("span", { className: "font-mono text-xs", children: formatMoney(entry.amountCents, currency) }), _jsxs("span", { className: "text-muted-foreground text-xs", children: ["due ", entry.dueDate] })] }));
74
- }
75
- function formatMoney(cents, currency) {
76
- try {
77
- return new Intl.NumberFormat("en-US", { style: "currency", currency }).format(cents / 100);
78
- }
79
- catch {
80
- return `${(cents / 100).toFixed(2)} ${currency}`;
81
- }
79
+ ? labels.balance
80
+ : labels.full;
81
+ return (_jsxs("li", { className: "flex items-center justify-between gap-2", children: [_jsx("span", { className: "font-medium", children: label }), _jsx("span", { className: "font-mono text-xs", children: formatCurrency(entry.amountCents / 100, currency) }), _jsx("span", { className: "text-muted-foreground text-xs", children: formatMessage(dueLabel, { date: formatDate(entry.dueDate) }) })] }));
82
82
  }
@@ -1 +1 @@
1
- {"version":3,"file":"supplier-payment-dialog.d.ts","sourceRoot":"","sources":["../../src/components/supplier-payment-dialog.tsx"],"names":[],"mappings":"AAoDA,MAAM,WAAW,0BAA0B;IACzC,IAAI,EAAE,OAAO,CAAA;IACb,YAAY,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAA;IACrC,SAAS,CAAC,EAAE,MAAM,IAAI,CAAA;CACvB;AAED,wBAAgB,qBAAqB,CAAC,EACpC,IAAI,EACJ,YAAY,EACZ,SAAS,GACV,EAAE,0BAA0B,2CAqN5B"}
1
+ {"version":3,"file":"supplier-payment-dialog.d.ts","sourceRoot":"","sources":["../../src/components/supplier-payment-dialog.tsx"],"names":[],"mappings":"AAqDA,MAAM,WAAW,0BAA0B;IACzC,IAAI,EAAE,OAAO,CAAA;IACb,YAAY,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAA;IACrC,SAAS,CAAC,EAAE,MAAM,IAAI,CAAA;CACvB;AAED,wBAAgB,qBAAqB,CAAC,EACpC,IAAI,EACJ,YAAY,EACZ,SAAS,GACV,EAAE,0BAA0B,2CA8N5B"}
@@ -2,6 +2,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { useSupplierPaymentMutation } from "@voyantjs/finance-react";
3
3
  import { Button, Dialog, DialogBody, DialogContent, DialogFooter, DialogHeader, DialogTitle, Input, Label, Select, SelectContent, SelectItem, SelectTrigger, SelectValue, Textarea, } from "@voyantjs/ui/components";
4
4
  import { CurrencyCombobox } from "@voyantjs/ui/components/currency-combobox";
5
+ import { CurrencyInput } from "@voyantjs/ui/components/currency-input";
5
6
  import { DatePicker } from "@voyantjs/ui/components/date-picker";
6
7
  import { zodResolver } from "@voyantjs/ui/lib/zod-resolver";
7
8
  import { Loader2 } from "lucide-react";
@@ -75,7 +76,10 @@ export function SupplierPaymentDialog({ open, onOpenChange, onSuccess, }) {
75
76
  onOpenChange(false);
76
77
  onSuccess?.();
77
78
  };
78
- return (_jsx(Dialog, { open: open, onOpenChange: onOpenChange, children: _jsxs(DialogContent, { size: "lg", children: [_jsx(DialogHeader, { children: _jsx(DialogTitle, { children: messages.supplierPaymentDialog.title }) }), _jsxs("form", { onSubmit: form.handleSubmit(onSubmit), children: [_jsxs(DialogBody, { className: "grid gap-4", children: [_jsxs("div", { className: "grid grid-cols-2 gap-4", children: [_jsxs("div", { className: "flex flex-col gap-2", children: [_jsx(Label, { children: messages.supplierPaymentDialog.fields.bookingId }), _jsx(Input, { ...form.register("bookingId"), placeholder: messages.supplierPaymentDialog.placeholders.bookingId }), form.formState.errors.bookingId ? (_jsx("p", { className: "text-xs text-destructive", children: form.formState.errors.bookingId.message })) : null] }), _jsxs("div", { className: "flex flex-col gap-2", children: [_jsx(Label, { children: messages.supplierPaymentDialog.fields.supplierId }), _jsx(Input, { ...form.register("supplierId"), placeholder: messages.supplierPaymentDialog.placeholders.supplierId })] })] }), _jsxs("div", { className: "grid grid-cols-3 gap-4", children: [_jsxs("div", { className: "flex flex-col gap-2", children: [_jsx(Label, { children: messages.supplierPaymentDialog.fields.amountCents }), _jsx(Input, { ...form.register("amountCents"), type: "number", min: "1" }), form.formState.errors.amountCents ? (_jsx("p", { className: "text-xs text-destructive", children: form.formState.errors.amountCents.message })) : null] }), _jsxs("div", { className: "flex flex-col gap-2", children: [_jsx(Label, { children: messages.supplierPaymentDialog.fields.currency }), _jsx(CurrencyCombobox, { value: form.watch("currency") || null, onChange: (next) => form.setValue("currency", next ?? "EUR" /* i18n-literal-ok domain default currency */, {
79
+ return (_jsx(Dialog, { open: open, onOpenChange: onOpenChange, children: _jsxs(DialogContent, { size: "lg", children: [_jsx(DialogHeader, { children: _jsx(DialogTitle, { children: messages.supplierPaymentDialog.title }) }), _jsxs("form", { onSubmit: form.handleSubmit(onSubmit), children: [_jsxs(DialogBody, { className: "grid gap-4", children: [_jsxs("div", { className: "grid grid-cols-2 gap-4", children: [_jsxs("div", { className: "flex flex-col gap-2", children: [_jsx(Label, { children: messages.supplierPaymentDialog.fields.bookingId }), _jsx(Input, { ...form.register("bookingId"), placeholder: messages.supplierPaymentDialog.placeholders.bookingId }), form.formState.errors.bookingId ? (_jsx("p", { className: "text-xs text-destructive", children: form.formState.errors.bookingId.message })) : null] }), _jsxs("div", { className: "flex flex-col gap-2", children: [_jsx(Label, { children: messages.supplierPaymentDialog.fields.supplierId }), _jsx(Input, { ...form.register("supplierId"), placeholder: messages.supplierPaymentDialog.placeholders.supplierId })] })] }), _jsxs("div", { className: "grid grid-cols-3 gap-4", children: [_jsxs("div", { className: "flex flex-col gap-2", children: [_jsx(Label, { children: messages.supplierPaymentDialog.fields.amountCents }), _jsx(CurrencyInput, { value: form.watch("amountCents"), onChange: (next) => form.setValue("amountCents", next ?? 0, {
80
+ shouldDirty: true,
81
+ shouldValidate: true,
82
+ }), currency: form.watch("currency") }), form.formState.errors.amountCents ? (_jsx("p", { className: "text-xs text-destructive", children: form.formState.errors.amountCents.message })) : null] }), _jsxs("div", { className: "flex flex-col gap-2", children: [_jsx(Label, { children: messages.supplierPaymentDialog.fields.currency }), _jsx(CurrencyCombobox, { value: form.watch("currency") || null, onChange: (next) => form.setValue("currency", next ?? "EUR" /* i18n-literal-ok domain default currency */, {
79
83
  shouldValidate: true,
80
84
  shouldDirty: true,
81
85
  }) })] }), _jsxs("div", { className: "flex flex-col gap-2", children: [_jsx(Label, { children: messages.supplierPaymentDialog.fields.paymentDate }), _jsx(DatePicker, { value: form.watch("paymentDate") || null, onChange: (next) => form.setValue("paymentDate", next ?? "", {
package/dist/i18n/en.d.ts CHANGED
@@ -190,6 +190,12 @@ export declare const financeUiEn: {
190
190
  };
191
191
  };
192
192
  invoiceDetailPage: {
193
+ title: string;
194
+ invoiceTypeLabels: {
195
+ invoice: string;
196
+ proforma: string;
197
+ credit_note: string;
198
+ };
193
199
  actions: {
194
200
  back: string;
195
201
  edit: string;
@@ -283,12 +289,63 @@ export declare const financeUiEn: {
283
289
  createAction: string;
284
290
  nameRequired: string;
285
291
  };
292
+ noteDialog: {
293
+ title: string;
294
+ createAction: string;
295
+ contentRequired: string;
296
+ };
286
297
  creditNoteStatusLabels: {
287
298
  draft: string;
288
299
  issued: string;
289
300
  applied: string;
290
301
  };
291
302
  };
303
+ paymentPolicy: {
304
+ form: {
305
+ inherit: {
306
+ label: string;
307
+ help: string;
308
+ tooltipLabel: string;
309
+ };
310
+ depositKind: {
311
+ label: string;
312
+ options: {
313
+ none: string;
314
+ percent: string;
315
+ fixed_cents: string;
316
+ };
317
+ };
318
+ depositValue: {
319
+ percentLabel: string;
320
+ fixedLabel: string;
321
+ };
322
+ depositHints: {
323
+ none: string;
324
+ percent: string;
325
+ fixed_cents: string;
326
+ };
327
+ days: {
328
+ minDaysLabel: string;
329
+ minDaysHelp: string;
330
+ balanceDaysLabel: string;
331
+ balanceDaysHelp: string;
332
+ graceDaysLabel: string;
333
+ graceDaysHelp: string;
334
+ tooltipLabel: string;
335
+ suffix: string;
336
+ };
337
+ };
338
+ preview: {
339
+ inheriting: string;
340
+ sample: string;
341
+ scheduleTypes: {
342
+ deposit: string;
343
+ balance: string;
344
+ full: string;
345
+ };
346
+ due: string;
347
+ };
348
+ };
292
349
  taxesPage: {
293
350
  title: string;
294
351
  description: string;
@@ -1 +1 @@
1
- {"version":3,"file":"en.d.ts","sourceRoot":"","sources":["../../src/i18n/en.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAobK,CAAA"}
1
+ {"version":3,"file":"en.d.ts","sourceRoot":"","sources":["../../src/i18n/en.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+eK,CAAA"}
package/dist/i18n/en.js CHANGED
@@ -45,9 +45,9 @@ export const financeUiEn = {
45
45
  status: "Status",
46
46
  bookingId: "Booking ID",
47
47
  currency: "Currency",
48
- subtotalCents: "Subtotal (cents)",
49
- taxCents: "Tax (cents)",
50
- totalCents: "Total (cents)",
48
+ subtotalCents: "Subtotal",
49
+ taxCents: "Tax",
50
+ totalCents: "Total",
51
51
  issueDate: "Issue Date",
52
52
  dueDate: "Due Date",
53
53
  notes: "Notes",
@@ -190,6 +190,12 @@ export const financeUiEn = {
190
190
  },
191
191
  },
192
192
  invoiceDetailPage: {
193
+ title: "Invoice",
194
+ invoiceTypeLabels: {
195
+ invoice: "Invoice",
196
+ proforma: "Proforma",
197
+ credit_note: "Credit note",
198
+ },
193
199
  actions: {
194
200
  back: "Back to finance",
195
201
  edit: "Edit",
@@ -283,12 +289,63 @@ export const financeUiEn = {
283
289
  createAction: "Add attachment",
284
290
  nameRequired: "Attachment name is required",
285
291
  },
292
+ noteDialog: {
293
+ title: "Add note",
294
+ createAction: "Add note",
295
+ contentRequired: "Note content is required",
296
+ },
286
297
  creditNoteStatusLabels: {
287
298
  draft: "Draft",
288
299
  issued: "Issued",
289
300
  applied: "Applied",
290
301
  },
291
302
  },
303
+ paymentPolicy: {
304
+ form: {
305
+ inherit: {
306
+ label: "Inherit from parent",
307
+ help: "Falls back to the next broader policy. Switch off to set an explicit policy here.",
308
+ tooltipLabel: "Explain inheritance",
309
+ },
310
+ depositKind: {
311
+ label: "Deposit kind",
312
+ options: {
313
+ none: "None",
314
+ percent: "Percent of total",
315
+ fixed_cents: "Fixed amount",
316
+ },
317
+ },
318
+ depositValue: {
319
+ percentLabel: "Deposit percent",
320
+ fixedLabel: "Deposit amount",
321
+ },
322
+ depositHints: {
323
+ none: "Customer pays the full amount up front.",
324
+ percent: "Use a whole-number percentage between 0 and 100.",
325
+ fixed_cents: "Capped at the booking total when the booking is smaller than this amount.",
326
+ },
327
+ days: {
328
+ minDaysLabel: "Deposit window",
329
+ minDaysHelp: "If departure is closer than this, the booking requires the full amount up front.",
330
+ balanceDaysLabel: "Balance due",
331
+ balanceDaysHelp: "How many days before departure the remaining balance is due.",
332
+ graceDaysLabel: "Grace floor",
333
+ graceDaysHelp: "Minimum number of days from now before the balance can be due, even for close departures.",
334
+ tooltipLabel: "Show field help",
335
+ suffix: "days",
336
+ },
337
+ },
338
+ preview: {
339
+ inheriting: "Inheriting from parent - no preview at this layer.",
340
+ sample: "Sample: {amount} booking, departure in {days} days",
341
+ scheduleTypes: {
342
+ deposit: "Deposit",
343
+ balance: "Balance",
344
+ full: "Full payment",
345
+ },
346
+ due: "due {date}",
347
+ },
348
+ },
292
349
  taxesPage: {
293
350
  title: "Tax Regimes and Classes",
294
351
  description: "Manage tax classes and the default tax regime each class uses for VAT calculation.",
@@ -401,7 +458,7 @@ export const financeUiEn = {
401
458
  fields: {
402
459
  bookingId: "Booking ID",
403
460
  supplierId: "Supplier ID (optional)",
404
- amountCents: "Amount (cents)",
461
+ amountCents: "Amount",
405
462
  currency: "Currency",
406
463
  paymentDate: "Payment Date",
407
464
  paymentMethod: "Payment Method",
@@ -4,6 +4,7 @@ export declare const supplierPaymentMethods: readonly ["bank_transfer", "credit_
4
4
  export declare const paymentMethods: readonly ["bank_transfer", "credit_card", "debit_card", "cash", "cheque", "wallet", "direct_bill", "voucher", "other"];
5
5
  export declare const supplierPaymentStatuses: readonly ["pending", "completed", "failed", "refunded"];
6
6
  export type InvoiceStatus = InvoiceRecord["status"];
7
+ export type InvoiceType = NonNullable<InvoiceRecord["invoiceType"]>;
7
8
  export type PaymentMethod = (typeof paymentMethods)[number];
8
9
  export type SupplierPaymentMethod = (typeof supplierPaymentMethods)[number];
9
10
  export type SupplierPaymentStatus = SupplierPaymentRecord["status"];
@@ -173,6 +174,8 @@ export type FinanceUiMessages = {
173
174
  };
174
175
  };
175
176
  invoiceDetailPage: {
177
+ title: string;
178
+ invoiceTypeLabels: Record<InvoiceType, string>;
176
179
  actions: {
177
180
  back: string;
178
181
  edit: string;
@@ -266,8 +269,47 @@ export type FinanceUiMessages = {
266
269
  createAction: string;
267
270
  nameRequired: string;
268
271
  };
272
+ noteDialog: {
273
+ title: string;
274
+ createAction: string;
275
+ contentRequired: string;
276
+ };
269
277
  creditNoteStatusLabels: Record<CreditNoteStatus, string>;
270
278
  };
279
+ paymentPolicy: {
280
+ form: {
281
+ inherit: {
282
+ label: string;
283
+ help: string;
284
+ tooltipLabel: string;
285
+ };
286
+ depositKind: {
287
+ label: string;
288
+ options: Record<"none" | "percent" | "fixed_cents", string>;
289
+ };
290
+ depositValue: {
291
+ percentLabel: string;
292
+ fixedLabel: string;
293
+ };
294
+ depositHints: Record<"none" | "percent" | "fixed_cents", string>;
295
+ days: {
296
+ minDaysLabel: string;
297
+ minDaysHelp: string;
298
+ balanceDaysLabel: string;
299
+ balanceDaysHelp: string;
300
+ graceDaysLabel: string;
301
+ graceDaysHelp: string;
302
+ tooltipLabel: string;
303
+ suffix: string;
304
+ };
305
+ };
306
+ preview: {
307
+ inheriting: string;
308
+ sample: string;
309
+ scheduleTypes: Record<"deposit" | "balance" | "full", string>;
310
+ due: string;
311
+ };
312
+ };
271
313
  taxesPage: Record<TaxesPageMessageKey, string>;
272
314
  supplierPaymentDialog: {
273
315
  title: string;
@@ -1 +1 @@
1
- {"version":3,"file":"messages.d.ts","sourceRoot":"","sources":["../../src/i18n/messages.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,gBAA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AAA;YACzB,aAAa,EAAE,MAAM,CAAA;YACrB,mBAAmB,EAAE,MAAM,CAAA;SAC5B,CAAA;KACF,CAAA;CACF,CAAA"}
@@ -194,6 +194,12 @@ export declare const financeUiMessageDefinitions: {
194
194
  };
195
195
  };
196
196
  invoiceDetailPage: {
197
+ title: string;
198
+ invoiceTypeLabels: {
199
+ invoice: string;
200
+ proforma: string;
201
+ credit_note: string;
202
+ };
197
203
  actions: {
198
204
  back: string;
199
205
  edit: string;
@@ -287,12 +293,63 @@ export declare const financeUiMessageDefinitions: {
287
293
  createAction: string;
288
294
  nameRequired: string;
289
295
  };
296
+ noteDialog: {
297
+ title: string;
298
+ createAction: string;
299
+ contentRequired: string;
300
+ };
290
301
  creditNoteStatusLabels: {
291
302
  draft: string;
292
303
  issued: string;
293
304
  applied: string;
294
305
  };
295
306
  };
307
+ paymentPolicy: {
308
+ form: {
309
+ inherit: {
310
+ label: string;
311
+ help: string;
312
+ tooltipLabel: string;
313
+ };
314
+ depositKind: {
315
+ label: string;
316
+ options: {
317
+ none: string;
318
+ percent: string;
319
+ fixed_cents: string;
320
+ };
321
+ };
322
+ depositValue: {
323
+ percentLabel: string;
324
+ fixedLabel: string;
325
+ };
326
+ depositHints: {
327
+ none: string;
328
+ percent: string;
329
+ fixed_cents: string;
330
+ };
331
+ days: {
332
+ minDaysLabel: string;
333
+ minDaysHelp: string;
334
+ balanceDaysLabel: string;
335
+ balanceDaysHelp: string;
336
+ graceDaysLabel: string;
337
+ graceDaysHelp: string;
338
+ tooltipLabel: string;
339
+ suffix: string;
340
+ };
341
+ };
342
+ preview: {
343
+ inheriting: string;
344
+ sample: string;
345
+ scheduleTypes: {
346
+ deposit: string;
347
+ balance: string;
348
+ full: string;
349
+ };
350
+ due: string;
351
+ };
352
+ };
296
353
  taxesPage: {
297
354
  title: string;
298
355
  description: string;
@@ -622,6 +679,12 @@ export declare const financeUiMessageDefinitions: {
622
679
  };
623
680
  };
624
681
  invoiceDetailPage: {
682
+ title: string;
683
+ invoiceTypeLabels: {
684
+ invoice: string;
685
+ proforma: string;
686
+ credit_note: string;
687
+ };
625
688
  actions: {
626
689
  back: string;
627
690
  edit: string;
@@ -715,12 +778,63 @@ export declare const financeUiMessageDefinitions: {
715
778
  createAction: string;
716
779
  nameRequired: string;
717
780
  };
781
+ noteDialog: {
782
+ title: string;
783
+ createAction: string;
784
+ contentRequired: string;
785
+ };
718
786
  creditNoteStatusLabels: {
719
787
  draft: string;
720
788
  issued: string;
721
789
  applied: string;
722
790
  };
723
791
  };
792
+ paymentPolicy: {
793
+ form: {
794
+ inherit: {
795
+ label: string;
796
+ help: string;
797
+ tooltipLabel: string;
798
+ };
799
+ depositKind: {
800
+ label: string;
801
+ options: {
802
+ none: string;
803
+ percent: string;
804
+ fixed_cents: string;
805
+ };
806
+ };
807
+ depositValue: {
808
+ percentLabel: string;
809
+ fixedLabel: string;
810
+ };
811
+ depositHints: {
812
+ none: string;
813
+ percent: string;
814
+ fixed_cents: string;
815
+ };
816
+ days: {
817
+ minDaysLabel: string;
818
+ minDaysHelp: string;
819
+ balanceDaysLabel: string;
820
+ balanceDaysHelp: string;
821
+ graceDaysLabel: string;
822
+ graceDaysHelp: string;
823
+ tooltipLabel: string;
824
+ suffix: string;
825
+ };
826
+ };
827
+ preview: {
828
+ inheriting: string;
829
+ sample: string;
830
+ scheduleTypes: {
831
+ deposit: string;
832
+ balance: string;
833
+ full: string;
834
+ };
835
+ due: string;
836
+ };
837
+ };
724
838
  taxesPage: {
725
839
  title: string;
726
840
  description: string;
@@ -1 +1 @@
1
- {"version":3,"file":"provider.d.ts","sourceRoot":"","sources":["../../src/i18n/provider.tsx"],"names":[],"mappings":"AAEA,OAAO,EAIL,KAAK,sBAAsB,EAC3B,KAAK,gBAAgB,EAEtB,MAAM,gBAAgB,CAAA;AACvB,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAGtC,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAA;A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MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAA;IAClC,SAAS,CAAC,EAAE,yBAAyB,GAAG,IAAI,CAAA;CAC7C,GAAG,gBAAgB,CAAC,iBAAiB,CAAC,CAStC;AAED,wBAAgB,yBAAyB,CAAC,EACxC,QAAQ,EACR,MAAM,EACN,SAAS,GACV,EAAE;IACD,QAAQ,EAAE,SAAS,CAAA;IACnB,MAAM,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAA;IACjC,SAAS,CAAC,EAAE,yBAAyB,GAAG,IAAI,CAAA;CAC7C,2CAWA;AAED,eAAO,MAAM,gBAAgB,2CAA2B,CAAA;AACxD,eAAO,MAAM,oBAAoB,yBAA+B,CAAA;AAEhE,wBAAgB,yBAAyB,wCAExC;AAED,wBAAgB,6BAA6B,sBAE5C"}
package/dist/i18n/ro.d.ts CHANGED
@@ -190,6 +190,12 @@ export declare const financeUiRo: {
190
190
  };
191
191
  };
192
192
  invoiceDetailPage: {
193
+ title: string;
194
+ invoiceTypeLabels: {
195
+ invoice: string;
196
+ proforma: string;
197
+ credit_note: string;
198
+ };
193
199
  actions: {
194
200
  back: string;
195
201
  edit: string;
@@ -283,12 +289,63 @@ export declare const financeUiRo: {
283
289
  createAction: string;
284
290
  nameRequired: string;
285
291
  };
292
+ noteDialog: {
293
+ title: string;
294
+ createAction: string;
295
+ contentRequired: string;
296
+ };
286
297
  creditNoteStatusLabels: {
287
298
  draft: string;
288
299
  issued: string;
289
300
  applied: string;
290
301
  };
291
302
  };
303
+ paymentPolicy: {
304
+ form: {
305
+ inherit: {
306
+ label: string;
307
+ help: string;
308
+ tooltipLabel: string;
309
+ };
310
+ depositKind: {
311
+ label: string;
312
+ options: {
313
+ none: string;
314
+ percent: string;
315
+ fixed_cents: string;
316
+ };
317
+ };
318
+ depositValue: {
319
+ percentLabel: string;
320
+ fixedLabel: string;
321
+ };
322
+ depositHints: {
323
+ none: string;
324
+ percent: string;
325
+ fixed_cents: string;
326
+ };
327
+ days: {
328
+ minDaysLabel: string;
329
+ minDaysHelp: string;
330
+ balanceDaysLabel: string;
331
+ balanceDaysHelp: string;
332
+ graceDaysLabel: string;
333
+ graceDaysHelp: string;
334
+ tooltipLabel: string;
335
+ suffix: string;
336
+ };
337
+ };
338
+ preview: {
339
+ inheriting: string;
340
+ sample: string;
341
+ scheduleTypes: {
342
+ deposit: string;
343
+ balance: string;
344
+ full: string;
345
+ };
346
+ due: string;
347
+ };
348
+ };
292
349
  taxesPage: {
293
350
  title: string;
294
351
  description: string;
@@ -1 +1 @@
1
- {"version":3,"file":"ro.d.ts","sourceRoot":"","sources":["../../src/i18n/ro.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAsbK,CAAA"}
1
+ {"version":3,"file":"ro.d.ts","sourceRoot":"","sources":["../../src/i18n/ro.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkfK,CAAA"}
package/dist/i18n/ro.js CHANGED
@@ -45,9 +45,9 @@ export const financeUiRo = {
45
45
  status: "Status",
46
46
  bookingId: "ID Rezervare",
47
47
  currency: "Moneda",
48
- subtotalCents: "Subtotal (centi)",
49
- taxCents: "Taxa (centi)",
50
- totalCents: "Total (centi)",
48
+ subtotalCents: "Subtotal",
49
+ taxCents: "Taxa",
50
+ totalCents: "Total",
51
51
  issueDate: "Data Emiterii",
52
52
  dueDate: "Data Scadentei",
53
53
  notes: "Note",
@@ -190,6 +190,12 @@ export const financeUiRo = {
190
190
  },
191
191
  },
192
192
  invoiceDetailPage: {
193
+ title: "Factura",
194
+ invoiceTypeLabels: {
195
+ invoice: "Factura",
196
+ proforma: "Proforma",
197
+ credit_note: "Nota de credit",
198
+ },
193
199
  actions: {
194
200
  back: "Inapoi la finante",
195
201
  edit: "Editeaza",
@@ -283,12 +289,63 @@ export const financeUiRo = {
283
289
  createAction: "Adauga atasament",
284
290
  nameRequired: "Numele atasamentului este obligatoriu",
285
291
  },
292
+ noteDialog: {
293
+ title: "Adauga nota",
294
+ createAction: "Adauga nota",
295
+ contentRequired: "Continutul notei este obligatoriu",
296
+ },
286
297
  creditNoteStatusLabels: {
287
298
  draft: "Ciorna",
288
299
  issued: "Emisa",
289
300
  applied: "Aplicata",
290
301
  },
291
302
  },
303
+ paymentPolicy: {
304
+ form: {
305
+ inherit: {
306
+ label: "Mosteneste de la parinte",
307
+ help: "Foloseste politica mai generala. Dezactiveaza pentru a seta o politica explicita aici.",
308
+ tooltipLabel: "Explica mostenirea",
309
+ },
310
+ depositKind: {
311
+ label: "Tip avans",
312
+ options: {
313
+ none: "Fara",
314
+ percent: "Procent din total",
315
+ fixed_cents: "Suma fixa",
316
+ },
317
+ },
318
+ depositValue: {
319
+ percentLabel: "Procent avans",
320
+ fixedLabel: "Suma avans",
321
+ },
322
+ depositHints: {
323
+ none: "Clientul plateste suma completa in avans.",
324
+ percent: "Foloseste un procent intreg intre 0 si 100.",
325
+ fixed_cents: "Limitat la totalul rezervarii cand rezervarea este mai mica decat aceasta suma.",
326
+ },
327
+ days: {
328
+ minDaysLabel: "Fereastra avans",
329
+ minDaysHelp: "Daca plecarea este mai aproape decat acest prag, rezervarea cere plata completa in avans.",
330
+ balanceDaysLabel: "Scadenta sold",
331
+ balanceDaysHelp: "Cu cate zile inainte de plecare este scadent soldul ramas.",
332
+ graceDaysLabel: "Perioada minima",
333
+ graceDaysHelp: "Numarul minim de zile de acum pana cand soldul poate fi scadent, chiar pentru plecari apropiate.",
334
+ tooltipLabel: "Arata ajutorul campului",
335
+ suffix: "zile",
336
+ },
337
+ },
338
+ preview: {
339
+ inheriting: "Se mosteneste de la parinte - fara previzualizare pe acest nivel.",
340
+ sample: "Exemplu: rezervare de {amount}, plecare in {days} zile",
341
+ scheduleTypes: {
342
+ deposit: "Avans",
343
+ balance: "Sold",
344
+ full: "Plata completa",
345
+ },
346
+ due: "scadent {date}",
347
+ },
348
+ },
292
349
  taxesPage: {
293
350
  title: "Regimuri si clase de taxe",
294
351
  description: "Administreaza clasele de taxe si regimul fiscal implicit folosit pentru calcul TVA.",
@@ -401,7 +458,7 @@ export const financeUiRo = {
401
458
  fields: {
402
459
  bookingId: "ID Rezervare",
403
460
  supplierId: "ID Furnizor (optional)",
404
- amountCents: "Suma (centi)",
461
+ amountCents: "Suma",
405
462
  currency: "Moneda",
406
463
  paymentDate: "Data Platii",
407
464
  paymentMethod: "Metoda de Plata",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@voyantjs/finance-ui",
3
- "version": "0.33.0",
3
+ "version": "0.35.0",
4
4
  "license": "Apache-2.0",
5
5
  "repository": {
6
6
  "type": "git",
@@ -45,12 +45,12 @@
45
45
  "react-dom": "^19.0.0",
46
46
  "react-hook-form": "^7.60.0",
47
47
  "zod": "^4.3.6",
48
- "@voyantjs/finance": "0.33.0",
49
- "@voyantjs/finance-react": "0.33.0",
50
- "@voyantjs/ui": "0.33.0"
48
+ "@voyantjs/finance": "0.35.0",
49
+ "@voyantjs/finance-react": "0.35.0",
50
+ "@voyantjs/ui": "0.35.0"
51
51
  },
52
52
  "dependencies": {
53
- "@voyantjs/i18n": "0.33.0"
53
+ "@voyantjs/i18n": "0.35.0"
54
54
  },
55
55
  "devDependencies": {
56
56
  "@tanstack/react-query": "^5.96.2",
@@ -63,11 +63,11 @@
63
63
  "typescript": "^6.0.2",
64
64
  "vitest": "^4.1.2",
65
65
  "zod": "^4.3.6",
66
- "@voyantjs/finance": "0.33.0",
67
- "@voyantjs/finance-react": "0.33.0",
68
- "@voyantjs/i18n": "0.33.0",
66
+ "@voyantjs/finance": "0.35.0",
67
+ "@voyantjs/finance-react": "0.35.0",
68
+ "@voyantjs/i18n": "0.35.0",
69
69
  "@voyantjs/voyant-typescript-config": "0.1.0",
70
- "@voyantjs/ui": "0.33.0"
70
+ "@voyantjs/ui": "0.35.0"
71
71
  },
72
72
  "files": [
73
73
  "dist",