gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[taler-wallet-core] branch master updated: add fullfilment url and messa


From: gnunet
Subject: [taler-wallet-core] branch master updated: add fullfilment url and message if the are present
Date: Tue, 04 Apr 2023 15:04:34 +0200

This is an automated email from the git hooks/post-receive script.

sebasjm pushed a commit to branch master
in repository wallet-core.

The following commit(s) were added to refs/heads/master by this push:
     new 860cd81f3 add fullfilment url and message if the are present
860cd81f3 is described below

commit 860cd81f35eb87932916eba1f23fa6ae9cde1eae
Author: Sebastian <sebasjm@gmail.com>
AuthorDate: Tue Apr 4 10:04:28 2023 -0300

    add fullfilment url and message if the are present
---
 packages/merchant-backend-ui/src/declaration.d.ts  |  1 +
 .../src/pages/ShowOrderDetails.examples.ts         |  8 ++++++
 .../src/pages/ShowOrderDetails.tsx                 | 30 ++++++++++++++++------
 3 files changed, 31 insertions(+), 8 deletions(-)

diff --git a/packages/merchant-backend-ui/src/declaration.d.ts 
b/packages/merchant-backend-ui/src/declaration.d.ts
index 74b0a5011..0e7a18eb5 100644
--- a/packages/merchant-backend-ui/src/declaration.d.ts
+++ b/packages/merchant-backend-ui/src/declaration.d.ts
@@ -1284,6 +1284,7 @@ export namespace MerchantBackend {
         // will send back to the customer the same proposal.  Clearly, this URL
         // can be bookmarked and shared by users.
         fulfillment_url?: string;
+        fulfillment_message?: string;
 
         // Maximum total deposit fee accepted by the merchant for this contract
         max_fee: Amount;
diff --git 
a/packages/merchant-backend-ui/src/pages/ShowOrderDetails.examples.ts 
b/packages/merchant-backend-ui/src/pages/ShowOrderDetails.examples.ts
index ba68397ee..22cfd1e17 100644
--- a/packages/merchant-backend-ui/src/pages/ShowOrderDetails.examples.ts
+++ b/packages/merchant-backend-ui/src/pages/ShowOrderDetails.examples.ts
@@ -216,4 +216,12 @@ export const exampleData: { [name: string]: Props } = {
       }
     },
   },
+  WithFulfillmentURL: {
+    order_summary: 'this is the order with fulfillmentURL',
+    contract_terms: {
+      ...defaultContractTerms,
+      fulfillment_url: "https://demo.taler.net";,
+      fulfillment_message: "Congratulations! You just purchased an valuable 
item!"
+    },
+  },
 }
diff --git a/packages/merchant-backend-ui/src/pages/ShowOrderDetails.tsx 
b/packages/merchant-backend-ui/src/pages/ShowOrderDetails.tsx
index aa62c2932..ca93c3f7d 100644
--- a/packages/merchant-backend-ui/src/pages/ShowOrderDetails.tsx
+++ b/packages/merchant-backend-ui/src/pages/ShowOrderDetails.tsx
@@ -171,10 +171,24 @@ export function ShowOrderDetails({
         )}
         {btr && `{{/refund_amount}}`}
 
+        {btr && `{{#contract_terms.fulfillment_message}}`}
+        {(btr || contract_terms?.fulfillment_message) && (
+          <section>
+            <InfoBox>
+              <b>{contract_terms?.fulfillment_message || `{{ 
contract_terms.fulfillment_message }}`}</b>.
+            </InfoBox>
+          </section>
+        )}
+        {btr && `{{/contract_terms.fulfillment_message}}`}
+
         <section>
           <TableExpanded>
             <dt>Order summary:</dt>
             <dd>{contract_terms?.summary || `{{ contract_terms.summary 
}}`}</dd>
+            {btr && `{{#contract_terms.fulfillment_url}}`}
+            <dt>Fulfillment URL:</dt>
+            <dd><a href={contract_terms?.fulfillment_url || `{{ 
contract_terms.fulfillment_url }}`}>{contract_terms?.fulfillment_url || `{{ 
contract_terms.fulfillment_url }}`}</a></dd>
+            {btr && `{{/contract_terms.fulfillment_url}}`}
             <dt>Amount paid:</dt>
             <dd>{contract_terms?.amount || `{{ contract_terms.amount }}`}</dd>
             <dt>Order date:</dt>
@@ -183,7 +197,7 @@ export function ShowOrderDetails({
                 ? contract_terms?.timestamp.t_s != "never"
                   ? format(
                       contract_terms?.timestamp.t_s,
-                      "dd MMM yyyy HH:mm:ss"
+                      "dd MMM yyyy HH:mm:ss",
                     )
                   : "never"
                 : `{{ contract_terms.timestamp_str }}`}{" "}
@@ -243,7 +257,7 @@ export function ShowOrderDetails({
                               ? p.delivery_date.t_s != "never"
                                 ? format(
                                     p.delivery_date.t_s,
-                                    "dd MMM yyyy HH:mm:ss"
+                                    "dd MMM yyyy HH:mm:ss",
                                   )
                                 : "never"
                               : `{{ delivery_date_str }}`}{" "}
@@ -293,7 +307,7 @@ export function ShowOrderDetails({
                       ? contract_terms?.delivery_date.t_s != "never"
                         ? format(
                             contract_terms?.delivery_date.t_s,
-                            "dd MMM yyyy HH:mm:ss"
+                            "dd MMM yyyy HH:mm:ss",
                           )
                         : "never"
                       : `{{ contract_terms.delivery_date_str }}`}{" "}
@@ -335,7 +349,7 @@ export function ShowOrderDetails({
                 ? contract_terms?.pay_deadline.t_s != "never"
                   ? format(
                       contract_terms?.pay_deadline.t_s,
-                      "dd MMM yyyy HH:mm:ss"
+                      "dd MMM yyyy HH:mm:ss",
                     )
                   : "never"
                 : `{{ contract_terms.pay_deadline_str }}`}{" "}
@@ -346,7 +360,7 @@ export function ShowOrderDetails({
                 ? contract_terms?.wire_transfer_deadline.t_s != "never"
                   ? format(
                       contract_terms?.wire_transfer_deadline.t_s,
-                      "dd MMM yyyy HH:mm:ss"
+                      "dd MMM yyyy HH:mm:ss",
                     )
                   : "never"
                 : `{{ contract_terms.wire_transfer_deadline_str }}`}{" "}
@@ -376,7 +390,7 @@ export function ShowOrderDetails({
                 ? contract_terms?.refund_deadline.t_s != "never"
                   ? format(
                       contract_terms?.refund_deadline.t_s,
-                      "dd MMM yyyy HH:mm:ss"
+                      "dd MMM yyyy HH:mm:ss",
                     )
                   : "never"
                 : `{{ contract_terms.refund_deadline_str }}`}{" "}
@@ -393,7 +407,7 @@ export function ShowOrderDetails({
                           intervalToDuration({
                             start: 0,
                             end: contract_terms?.auto_refund.d_us,
-                          })
+                          }),
                         )
                       : "forever"
                     : `{{ contract_terms.auto_refund_str }}`}{" "}
@@ -533,7 +547,7 @@ export function mount(): void {
         order_summary={os}
         refund_amount={ra}
       />,
-      document.body
+      document.body,
     );
   } catch (e) {
     console.error("got error", e);

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]