diff --git a/packages/acc_invoices/web/src/App.tsx b/packages/acc_invoices/web/src/App.tsx index 5758b18..5617ce8 100644 --- a/packages/acc_invoices/web/src/App.tsx +++ b/packages/acc_invoices/web/src/App.tsx @@ -12,6 +12,12 @@ const qbUrl = (txn: string): string => txn.startsWith("bill:") ? `https://app.qb const QB_ICON = ( ); +/** Ссылка, всегда в новой вкладке; без адреса - неактивная кнопка с подсказкой. */ +function LinkBtn({ href, label, off }: { href?: string | null; label: string; off?: string }) { + return href + ? {label} ↗ + : ; +} const hashFilter = (): string => new URLSearchParams(location.hash.slice(1)).get("f") ?? "to_pay"; export function App() { @@ -193,8 +199,6 @@ function Main({ me, onLogout }: { me: Me; onLogout: () => void }) {
{inv.vendor_name} {inv.invoice_number} {inv.status_label} - {inv.invoice_url && Инвойс ↗} - {inv.payment_url && Платёж ↗} {inv.editable.length > 0 && } {inv.is_draft && !inv.cancelled && } @@ -223,6 +227,11 @@ function Main({ me, onLogout }: { me: Me; onLogout: () => void }) {
+
+ + {inv?.payment_url && } + {showQb && } +

Строки инвойса

{inv ? ( @@ -247,6 +256,10 @@ function Main({ me, onLogout }: { me: Me; onLogout: () => void }) {
+
+ + {showQb && } +
Инвойсы контракта Строки контракта diff --git a/packages/acc_invoices/web/src/styles.css b/packages/acc_invoices/web/src/styles.css index 3778b50..8bf82ee 100644 --- a/packages/acc_invoices/web/src/styles.css +++ b/packages/acc_invoices/web/src/styles.css @@ -105,3 +105,4 @@ body { margin: 0; background: var(--bg); color: var(--text); font: 14px/1.4 syst .toast { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); background: var(--ok); color: #fff; padding: 8px 16px; border-radius: 8px; z-index: 20; max-width: 90vw; } .toast.bad { background: var(--bad); } @media (max-width: 800px) { .details { grid-template-columns: 1fr; } .app { grid-template-rows: auto minmax(160px, 1fr) auto auto auto; overflow: auto; } } +.panel-links { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }