From e759684fd0658b4a3ba241744424ceda11bd500b Mon Sep 17 00:00:00 2001
From: Sebastian <sebasjm@gmail.com>
Date: Wed, 31 Aug 2022 11:46:39 -0300
Subject: invoice and transfer details

---
 .../src/cta/InvoiceCreate/views.tsx                 | 21 +++++++++++++++++++--
 1 file changed, 19 insertions(+), 2 deletions(-)

(limited to 'packages/taler-wallet-webextension/src/cta/InvoiceCreate/views.tsx')

diff --git a/packages/taler-wallet-webextension/src/cta/InvoiceCreate/views.tsx b/packages/taler-wallet-webextension/src/cta/InvoiceCreate/views.tsx
index ebb15e75c..3de36b6e9 100644
--- a/packages/taler-wallet-webextension/src/cta/InvoiceCreate/views.tsx
+++ b/packages/taler-wallet-webextension/src/cta/InvoiceCreate/views.tsx
@@ -15,6 +15,7 @@
  */
 
 import { h, VNode } from "preact";
+import { ErrorTalerOperation } from "../../components/ErrorTalerOperation.js";
 import { LoadingError } from "../../components/LoadingError.js";
 import { LogoHeader } from "../../components/LogoHeader.js";
 import { Part } from "../../components/Part.js";
@@ -44,7 +45,7 @@ export function LoadingUriView({ error }: State.LoadingUriError): VNode {
   );
 }
 
-export function ShowQrView({ talerUri, close }: State.ShowQr): VNode {
+export function ShowQrView({ talerUri, cancel }: State.ShowQr): VNode {
   const { i18n } = useTranslationContext();
   return (
     <WalletAction>
@@ -57,7 +58,7 @@ export function ShowQrView({ talerUri, close }: State.ShowQr): VNode {
         <QR text={talerUri} />
       </section>
       <section>
-        <Link upperCased onClick={close}>
+        <Link upperCased onClick={cancel.onClick}>
           <i18n.Translate>Close</i18n.Translate>
         </Link>
       </section>
@@ -70,6 +71,7 @@ export function ReadyView({
   exchangeUrl,
   subject,
   showQr,
+  cancel,
   operationError,
   copyToClipboard,
   toBeReceived,
@@ -83,6 +85,16 @@ export function ReadyView({
       <SubTitle>
         <i18n.Translate>Digital invoice</i18n.Translate>
       </SubTitle>
+      {operationError && (
+        <ErrorTalerOperation
+          title={
+            <i18n.Translate>
+              Could not finish the invoice creation
+            </i18n.Translate>
+          }
+          error={operationError}
+        />
+      )}
       <section style={{ textAlign: "left" }}>
         <TextField
           label="Subject"
@@ -145,6 +157,11 @@ export function ReadyView({
           </Grid>
         </Grid>
       </section>
+      <section>
+        <Link upperCased onClick={cancel.onClick}>
+          <i18n.Translate>Cancel</i18n.Translate>
+        </Link>
+      </section>
     </WalletAction>
   );
 }
-- 
cgit v1.2.3

