commit 6a3448f1233bdfb9da24369e8ae8e2e14ad3c5c0
parent 61a456c21ee1e15e88bd1215e5afe69d7027d3a7
Author: Sebastian <sebasjm@gmail.com>
Date: Tue, 6 May 2025 16:14:30 -0300
kyc message
Diffstat:
2 files changed, 45 insertions(+), 40 deletions(-)
diff --git a/packages/merchant-backoffice-ui/src/components/menu/SideBar.tsx b/packages/merchant-backoffice-ui/src/components/menu/SideBar.tsx
@@ -22,7 +22,7 @@
import {
getMerchantAccountKycStatusSimplified,
MerchantAccountKycStatusSimplified,
- TalerError
+ TalerError,
} from "@gnu-taler/taler-util";
import { useTranslationContext } from "@gnu-taler/web-util/browser";
import { Fragment, h, VNode } from "preact";
@@ -155,51 +155,53 @@ export function Sidebar({ mobile }: Props): VNode {
</a>
</li>
) : undefined}
- <li
- class={
- simplifiedKycStatus ===
- MerchantAccountKycStatusSimplified.WARNING
- ? "is-warning"
- : simplifiedKycStatus ===
- MerchantAccountKycStatusSimplified.ERROR
- ? "is-error"
- : simplifiedKycStatus ===
- MerchantAccountKycStatusSimplified.ACTION_REQUIRED
- ? "is-warning"
- : undefined
- }
- >
- <a
- href={"#/kyc"}
- class="has-icon"
- style={
+ {!allKycData.length ? undefined : (
+ <li
+ class={
simplifiedKycStatus ===
MerchantAccountKycStatusSimplified.WARNING
- ? {
- backgroundColor: "darkorange",
- color: "black",
- }
+ ? "is-warning"
: simplifiedKycStatus ===
MerchantAccountKycStatusSimplified.ERROR
+ ? "is-error"
+ : simplifiedKycStatus ===
+ MerchantAccountKycStatusSimplified.ACTION_REQUIRED
+ ? "is-warning"
+ : undefined
+ }
+ >
+ <a
+ href={"#/kyc"}
+ class="has-icon"
+ style={
+ simplifiedKycStatus ===
+ MerchantAccountKycStatusSimplified.WARNING
? {
- backgroundColor: "darkred",
+ backgroundColor: "darkorange",
color: "black",
}
: simplifiedKycStatus ===
- MerchantAccountKycStatusSimplified.ACTION_REQUIRED
+ MerchantAccountKycStatusSimplified.ERROR
? {
- backgroundColor: "darkorange",
+ backgroundColor: "darkred",
color: "black",
}
- : undefined
- }
- >
- <span class="icon">
- <i class="mdi mdi-account-check" />
- </span>
- <span class="menu-item-label">KYC Status</span>
- </a>
- </li>
+ : simplifiedKycStatus ===
+ MerchantAccountKycStatusSimplified.ACTION_REQUIRED
+ ? {
+ backgroundColor: "darkorange",
+ color: "black",
+ }
+ : undefined
+ }
+ >
+ <span class="icon">
+ <i class="mdi mdi-account-check" />
+ </span>
+ <span class="menu-item-label">KYC Status</span>
+ </a>
+ </li>
+ )}
</ul>
<p class="menu-label">
<i18n.Translate>Configuration</i18n.Translate>
diff --git a/packages/merchant-backoffice-ui/src/paths/instance/kyc/list/index.tsx b/packages/merchant-backoffice-ui/src/paths/instance/kyc/list/index.tsx
@@ -191,11 +191,14 @@ function ShowInstructionForKycRedirect({
</a>
)}
</p>
- <p style={{ paddingTop: 0 }}>
- <i18n.Translate>
- We are waiting for the access token to be present. Check again later.
- </i18n.Translate>
- </p>
+ {e.access_token !== undefined ? undefined : (
+ <p style={{ paddingTop: 0 }}>
+ <i18n.Translate>
+ We are waiting for the access token to be present. Check again
+ later.
+ </i18n.Translate>
+ </p>
+ )}
</ConfirmModal>
);
}