From 154d9be4ea8dd7f5f2b64526b4d199f2bb3cb5a6 Mon Sep 17 00:00:00 2001 From: Yuri Yaryshev Date: Fri, 4 Dec 2026 15:12:25 +0300 Subject: [PATCH] =?UTF-8?q?acc=5Finvoices=20UI:=20=D0=BA=D0=BD=D0=BE=D0=BF?= =?UTF-8?q?=D0=BA=D0=B8=20Drive=20=D0=B8=20QuickBooks=20=D0=BD=D0=B0=D0=B4?= =?UTF-8?q?=20=D1=81=D1=82=D1=80=D0=BE=D0=BA=D0=B0=D0=BC=D0=B8=20=D0=B8?= =?UTF-8?q?=D0=BD=D0=B2=D0=BE=D0=B9=D1=81=D0=B0=20=D0=B8=20=D0=BA=D0=BE?= =?UTF-8?q?=D0=BD=D1=82=D1=80=D0=B0=D0=BA=D1=82=D0=B0=20(=D0=BD=D0=BE?= =?UTF-8?q?=D0=B2=D0=B0=D1=8F=20=D0=B2=D0=BA=D0=BB=D0=B0=D0=B4=D0=BA=D0=B0?= =?UTF-8?q?)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Sonnet 5.5 --- packages/acc_invoices/web/src/App.tsx | 17 +++++++++++++++-- packages/acc_invoices/web/src/styles.css | 1 + 2 files changed, 16 insertions(+), 2 deletions(-) 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; }