gnunet-svn
[Top][All Lists]
Advanced

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

[taler-wallet-core] branch master updated: adding user_Type validation w


From: gnunet
Subject: [taler-wallet-core] branch master updated: adding user_Type validation when updating instances
Date: Tue, 25 Apr 2023 17:50:04 +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 f94d7bc15 adding user_Type validation when updating instances
f94d7bc15 is described below

commit f94d7bc15115753ce3c492deb72ff9fdb4a66cba
Author: Sebastian <sebasjm@gmail.com>
AuthorDate: Tue Apr 25 12:49:58 2023 -0300

    adding user_Type validation when updating instances
---
 packages/merchant-backoffice-ui/src/declaration.d.ts                 | 5 +++++
 .../merchant-backoffice-ui/src/paths/instance/update/UpdatePage.tsx  | 5 +++++
 2 files changed, 10 insertions(+)

diff --git a/packages/merchant-backoffice-ui/src/declaration.d.ts 
b/packages/merchant-backoffice-ui/src/declaration.d.ts
index 4f76b9701..b21af32d1 100644
--- a/packages/merchant-backoffice-ui/src/declaration.d.ts
+++ b/packages/merchant-backoffice-ui/src/declaration.d.ts
@@ -334,6 +334,11 @@ export namespace MerchantBackend {
       // Merchant name corresponding to this instance.
       name: string;
 
+      // Type of the user (business or individual).
+      // Defaults to 'business'. Should become mandatory field
+      // in the future, left as optional for API compatibility for now.
+      user_type?: string;
+
       // The merchant's physical address (to be put into contracts).
       address: Location;
 
diff --git 
a/packages/merchant-backoffice-ui/src/paths/instance/update/UpdatePage.tsx 
b/packages/merchant-backoffice-ui/src/paths/instance/update/UpdatePage.tsx
index 1365a59da..2b57ab429 100644
--- a/packages/merchant-backoffice-ui/src/paths/instance/update/UpdatePage.tsx
+++ b/packages/merchant-backoffice-ui/src/paths/instance/update/UpdatePage.tsx
@@ -98,6 +98,11 @@ export function UpdatePage({
 
   const errors: FormErrors<Entity> = {
     name: !value.name ? i18n.str`required` : undefined,
+    user_type: !value.user_type
+      ? i18n.str`required`
+      : value.user_type !== "business" && value.user_type !== "individual"
+      ? i18n.str`should be business or individual`
+      : undefined,
     payto_uris:
       !value.payto_uris || !value.payto_uris.length
         ? i18n.str`required`

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