From c9c04a14be4bf9a70cd1730d2e8b5aa8bd38f032 Mon Sep 17 00:00:00 2001 From: Sebastian Date: Thu, 10 Jun 2021 23:51:14 -0300 Subject: lots of fixes in same commit added tooltips in buttons and fix tooltips styles in corner cases added a start for required fields token -> access token fixed query product list refactor instance update/create form some more comments from christian email --- .../paths/instance/reserves/details/DetailPage.tsx | 107 ++++++++++----------- 1 file changed, 51 insertions(+), 56 deletions(-) (limited to 'packages/frontend/src/paths/instance/reserves/details/DetailPage.tsx') diff --git a/packages/frontend/src/paths/instance/reserves/details/DetailPage.tsx b/packages/frontend/src/paths/instance/reserves/details/DetailPage.tsx index 08942f6..06fbf20 100644 --- a/packages/frontend/src/paths/instance/reserves/details/DetailPage.tsx +++ b/packages/frontend/src/paths/instance/reserves/details/DetailPage.tsx @@ -20,22 +20,16 @@ */ import { Amounts } from "@gnu-taler/taler-util"; -import { format, isAfter } from "date-fns"; +import { format } from "date-fns"; import { Fragment, h, VNode } from "preact"; -import { useState } from "preact/hooks"; import { FormProvider } from "../../../../components/form/FormProvider"; import { Input } from "../../../../components/form/Input"; import { InputCurrency } from "../../../../components/form/InputCurrency"; import { InputDate } from "../../../../components/form/InputDate"; -import { InputDuration } from "../../../../components/form/InputDuration"; -import { InputGroup } from "../../../../components/form/InputGroup"; -import { InputLocation } from "../../../../components/form/InputLocation"; -import { NotificationCard } from "../../../../components/menu"; -import { ProductList } from "../../../../components/product/ProductList"; +import { TextField } from "../../../../components/form/TextField"; import { MerchantBackend } from "../../../../declaration"; import { useTipDetails } from "../../../../hooks/tips"; import { Translate, useTranslator } from "../../../../i18n"; -import { mergeRefunds } from "../../../../utils/amount"; type Entity = MerchantBackend.Tips.ReserveDetail; type CT = MerchantBackend.ContractTerms @@ -49,59 +43,60 @@ interface Props { export function DetailPage({ id, selected, onBack }: Props): VNode { const i18n = useTranslator() const didExchangeAckTransfer = Amounts.isNonZero(Amounts.parseOrThrow(selected.exchange_initial_amount)) - return
- - name="creation_time" label={i18n`Created at`} readonly /> - name="expiration_time" label={i18n`Valid until`} readonly /> - name="merchant_initial_amount" label={i18n`Created balance`} readonly /> - name="exchange_url" label={i18n`Exchange URL`} readonly /> - - {didExchangeAckTransfer && - name="exchange_initial_amount" label={i18n`Exchange balance`} readonly /> - name="pickup_amount" label={i18n`Picked up`} readonly /> - name="committed_amount" label={i18n`Committed`} readonly /> - - } - name="payto_uri" label={i18n`Account address`} readonly /> - - - - {didExchangeAckTransfer ? -
-
-

- - Tips -

- -
-
-
-
- {selected.tips && selected.tips.length > 0 ? : } - - - - : -

Now you should transfer to the exchange into the account address indicated above and the transaction must carry the subject message.

- -

For example :

-
-        {selected.payto_uri}?message={id}&amount={selected.merchant_initial_amount}
-      
-
- } - -
-
-
+ return
+
+
+
+ + name="creation_time" label={i18n`Created at`} readonly /> + name="expiration_time" label={i18n`Valid until`} readonly /> + name="merchant_initial_amount" label={i18n`Created balance`} readonly /> + name="exchange_url" label={i18n`Exchange URL`} readonly > + {selected.exchange_url} + + + {didExchangeAckTransfer && + name="exchange_initial_amount" label={i18n`Exchange balance`} readonly /> + name="pickup_amount" label={i18n`Picked up`} readonly /> + name="committed_amount" label={i18n`Committed`} readonly /> + + } + name="payto_uri" label={i18n`Account address`} readonly /> + + + + {didExchangeAckTransfer ? +
+
+

+ + Tips +

+ +
+
+
+
+ {selected.tips && selected.tips.length > 0 ?
: } + + + + : +

Now you should transfer to the exchange into the account address indicated above and the transaction must carry the subject message.

+

For example :

+
+            {selected.payto_uri}?message={id}&amount={selected.merchant_initial_amount}
+          
+
+ } +
+ -
- +
} -- cgit v1.2.3