From 37f46f4d6b821d163c3e4db5c374b1120212ac74 Mon Sep 17 00:00:00 2001 From: Sebastian Date: Mon, 11 Mar 2024 14:56:25 -0300 Subject: obs and cancel request, plus lint --- .../bank-ui/src/pages/account/UpdateAccountPassword.tsx | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) (limited to 'packages/bank-ui/src/pages/account/UpdateAccountPassword.tsx') diff --git a/packages/bank-ui/src/pages/account/UpdateAccountPassword.tsx b/packages/bank-ui/src/pages/account/UpdateAccountPassword.tsx index c33aeb09e..8c0581312 100644 --- a/packages/bank-ui/src/pages/account/UpdateAccountPassword.tsx +++ b/packages/bank-ui/src/pages/account/UpdateAccountPassword.tsx @@ -17,6 +17,7 @@ import { AbsoluteTime, HttpStatusCode, TalerErrorCode, + TranslatedString, assertUnreachable, } from "@gnu-taler/taler-util"; import { @@ -112,21 +113,33 @@ export function UpdateAccountPassword({ return notify({ type: "error", title: i18n.str`Not authorized to change the password, maybe the session is invalid.`, + description: resp.detail.hint as TranslatedString, + debug: resp.detail, + when: AbsoluteTime.now(), }); case HttpStatusCode.NotFound: return notify({ type: "error", title: i18n.str`Account not found`, + description: resp.detail.hint as TranslatedString, + debug: resp.detail, + when: AbsoluteTime.now(), }); case TalerErrorCode.BANK_NON_ADMIN_PATCH_MISSING_OLD_PASSWORD: return notify({ type: "error", title: i18n.str`You need to provide the old password. If you don't have it contact your account administrator.`, + description: resp.detail.hint as TranslatedString, + debug: resp.detail, + when: AbsoluteTime.now(), }); case TalerErrorCode.BANK_PATCH_BAD_OLD_PASSWORD: return notify({ type: "error", title: i18n.str`Your current password doesn't match, can't change to a new password.`, + description: resp.detail.hint as TranslatedString, + debug: resp.detail, + when: AbsoluteTime.now(), }); case HttpStatusCode.Accepted: { updateBankState("currentChallenge", { @@ -149,7 +162,8 @@ export function UpdateAccountPassword({ {accountIsTheCurrentUser ? ( - Repeat the same password

-
-- cgit v1.2.3