From d504085b4f4e63ced4e0ca70f5f03123d3682486 Mon Sep 17 00:00:00 2001 From: NC-jsAhonen <83913239+NC-jsAhonen@users.noreply.github.com> Date: Wed, 3 Jul 2024 12:46:49 +0300 Subject: [PATCH] error message and no save button for generated invoices edit view (#500) --- .../leaseSections/invoice/InvoicePanel.tsx | 43 ++++++++++++++++--- .../leaseSections/invoice/_invoice-panel.scss | 4 ++ 2 files changed, 40 insertions(+), 7 deletions(-) diff --git a/src/leases/components/leaseSections/invoice/InvoicePanel.tsx b/src/leases/components/leaseSections/invoice/InvoicePanel.tsx index 7f2d94d7a..f10e9d445 100644 --- a/src/leases/components/leaseSections/invoice/InvoicePanel.tsx +++ b/src/leases/components/leaseSections/invoice/InvoicePanel.tsx @@ -15,6 +15,7 @@ import { getInvoicesByLease, getIsEditClicked, getMethods as getInvoiceMethods } import { getCurrentLease } from "leases/selectors"; import type { Methods as MethodsType } from "types"; import type { Invoice, InvoiceList } from "invoices/types"; + type Props = { formValues: Record; invoice: Invoice | null | undefined; @@ -27,6 +28,7 @@ type Props = { receiveIsEditClicked: (...args: Array) => any; valid: boolean; }; + type State = { creditedInvoice: Record | null | undefined; interestInvoiceFor: Record | null | undefined; @@ -85,13 +87,40 @@ class InvoicePanel extends PureComponent { creditedInvoice, interestInvoiceFor } = this.state; - return -