diff options
Diffstat (limited to 'packages/bank-ui/src/pages/account/UpdateAccountPassword.tsx')
-rw-r--r-- | packages/bank-ui/src/pages/account/UpdateAccountPassword.tsx | 17 |
1 files changed, 15 insertions, 2 deletions
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({ <Fragment> <LocalNotificationBanner notification={notification} /> {accountIsTheCurrentUser ? ( - <ProfileNavigation current="credentials" + <ProfileNavigation + current="credentials" routeMyAccountCashout={routeMyAccountCashout} routeMyAccountDelete={routeMyAccountDelete} routeMyAccountDetails={routeMyAccountDetails} @@ -273,7 +287,6 @@ export function UpdateAccountPassword({ <i18n.Translate>Repeat the same password</i18n.Translate> </p> </div> - </div> </div> <div class="flex items-center justify-between gap-x-6 border-t border-gray-900/10 px-4 py-4 sm:px-8"> |