gnunet-svn
[Top][All Lists]
Advanced

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

[taler-wallet-core] branch master updated: fix product suggestion place


From: gnunet
Subject: [taler-wallet-core] branch master updated: fix product suggestion place
Date: Wed, 07 Aug 2024 17:36:02 +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 e040eb737 fix product suggestion place
e040eb737 is described below

commit e040eb7378d25f0ae9cb72a6c7dd6750a9bb0cbd
Author: Sebastian <sebasjm@gmail.com>
AuthorDate: Wed Aug 7 12:35:55 2024 -0300

    fix product suggestion place
---
 .../src/components/form/InputArray.tsx             | 33 +++++++++++-----------
 .../instance/categories/update/UpdatePage.tsx      |  3 +-
 packages/taler-util/src/types-taler-merchant.ts    |  5 ----
 .../src/wallet/DestinationSelection/state.ts       |  3 +-
 4 files changed, 19 insertions(+), 25 deletions(-)

diff --git a/packages/merchant-backoffice-ui/src/components/form/InputArray.tsx 
b/packages/merchant-backoffice-ui/src/components/form/InputArray.tsx
index 6dbcdc523..9abec8630 100644
--- a/packages/merchant-backoffice-ui/src/components/form/InputArray.tsx
+++ b/packages/merchant-backoffice-ui/src/components/form/InputArray.tsx
@@ -124,6 +124,23 @@ export function InputArray<T>({
           </div>
           {help}
           {error && <p class="help is-danger"> {error} </p>}
+          
+          {suggestions.length > 0 ? (
+            <div>
+              <DropdownList
+                name={currentValue}
+                list={suggestions}
+                onSelect={(p): void => {
+                  if (!unique || array.indexOf(p as any) === -1) {
+                    onChange([p, ...array] as T[keyof T]);
+                  }
+                  setCurrentValue("");
+                  setSuggestions([]);
+                }}
+                withImage={false}
+              />
+            </div>
+          ) : undefined}
           {array.map((v, i) => (
             <div key={i} class="tags has-addons mt-3 mb-0">
               <span
@@ -141,22 +158,6 @@ export function InputArray<T>({
               />
             </div>
           ))}
-          {suggestions.length > 0 ? (
-            <div>
-              <DropdownList
-                name={currentValue}
-                list={suggestions}
-                onSelect={(p): void => {
-                  if (!unique || array.indexOf(p as any) === -1) {
-                    onChange([p, ...array] as T[keyof T]);
-                  }
-                  setCurrentValue("");
-                  setSuggestions([]);
-                }}
-                withImage={false}
-              />
-            </div>
-          ) : undefined}
         </div>
       </div>
     </div>
diff --git 
a/packages/merchant-backoffice-ui/src/paths/instance/categories/update/UpdatePage.tsx
 
b/packages/merchant-backoffice-ui/src/paths/instance/categories/update/UpdatePage.tsx
index 069892766..a08189192 100644
--- 
a/packages/merchant-backoffice-ui/src/paths/instance/categories/update/UpdatePage.tsx
+++ 
b/packages/merchant-backoffice-ui/src/paths/instance/categories/update/UpdatePage.tsx
@@ -72,12 +72,11 @@ export function UpdatePage({ category, onUpdate, onBack }: 
Props): VNode {
         .then((res) => {
           return res.type === "fail"
             ? undefined
-            : { id: String(prod), description: res.body.description };
+            : { id: String(prod.product_id), description: res.body.description 
};
         });
     });
     Promise.all(ps).then((all) => {
       const product_map = all.filter(notEmpty);
-      console.log(product_map);
       setState({ ...state, product_map });
     });
   }, []);
diff --git a/packages/taler-util/src/types-taler-merchant.ts 
b/packages/taler-util/src/types-taler-merchant.ts
index b3aa43454..58cac5e58 100644
--- a/packages/taler-util/src/types-taler-merchant.ts
+++ b/packages/taler-util/src/types-taler-merchant.ts
@@ -1492,11 +1492,6 @@ export interface ProductSummary {
   // Product ID to use.
   product_id: string;
 
-  // Human-readable product description.
-  // description: string;
-
-  // Map from IETF BCP 47 language tags to localized descriptions.
-  // description_i18n?: { [lang_tag: string]: string };
 }
 
 export interface CategoryCreateRequest {
diff --git 
a/packages/taler-wallet-webextension/src/wallet/DestinationSelection/state.ts 
b/packages/taler-wallet-webextension/src/wallet/DestinationSelection/state.ts
index 981c95508..81e8923aa 100644
--- 
a/packages/taler-wallet-webextension/src/wallet/DestinationSelection/state.ts
+++ 
b/packages/taler-wallet-webextension/src/wallet/DestinationSelection/state.ts
@@ -17,11 +17,10 @@
 import {
   AmountJson,
   Amounts,
-  ExchangeEntryStatus,
   ExchangeUpdateStatus,
   ScopeType,
   parseScopeInfoShort,
-  stringifyScopeInfoShort,
+  stringifyScopeInfoShort
 } from "@gnu-taler/taler-util";
 import { WalletApiOperation } from "@gnu-taler/taler-wallet-core";
 import { useTranslationContext } from "@gnu-taler/web-util/browser";

-- 
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]