From 1723f16b9c4b008e9e44578c2587c7a1bd6560b4 Mon Sep 17 00:00:00 2001 From: Sebastian Date: Sat, 25 Feb 2023 19:43:45 -0300 Subject: some fixes afte testing demobank with ms --- packages/demobank-ui/src/pages/AdminPage.tsx | 45 ++++++++++++++++++---------- 1 file changed, 30 insertions(+), 15 deletions(-) (limited to 'packages/demobank-ui/src/pages/AdminPage.tsx') diff --git a/packages/demobank-ui/src/pages/AdminPage.tsx b/packages/demobank-ui/src/pages/AdminPage.tsx index b4ce58588..0a1dc26ec 100644 --- a/packages/demobank-ui/src/pages/AdminPage.tsx +++ b/packages/demobank-ui/src/pages/AdminPage.tsx @@ -59,7 +59,9 @@ function randomPassword(): string { } interface Props { - onLoadNotOk: (error: HttpResponsePaginated) => VNode; + onLoadNotOk: ( + error: HttpResponsePaginated, + ) => VNode; } /** * Query account information and show QR code if there is pending withdrawal @@ -109,6 +111,11 @@ export function AdminPage({ onLoadNotOk }: Props): VNode { if (showCashouts) { return (
+
+

+ Cashout for account {showCashouts} +

+
{ @@ -116,15 +123,17 @@ export function AdminPage({ onLoadNotOk }: Props): VNode { setShowCashouts(undefined); }} /> - { - e.preventDefault(); - setShowCashouts(undefined); - }} - /> +

+ { + e.preventDefault(); + setShowCashouts(undefined); + }} + /> +

); } @@ -184,7 +193,7 @@ export function AdminPage({ onLoadNotOk }: Props): VNode { onClose={() => setCreateAccount(false)} onCreateSuccess={(password) => { showInfoMessage( - i18n.str`Account created with password "${password}"`, + i18n.str`Account created with password "${password}". The user must change the password on the next login.`, ); setCreateAccount(false); }} @@ -326,7 +335,9 @@ export function UpdateAccountPassword({ onUpdateSuccess, onLoadNotOk, }: { - onLoadNotOk: (error: HttpResponsePaginated) => VNode; + onLoadNotOk: ( + error: HttpResponsePaginated, + ) => VNode; onClear: () => void; onUpdateSuccess: () => void; account: string; @@ -521,7 +532,9 @@ export function ShowAccountDetails({ onLoadNotOk, onChangePassword, }: { - onLoadNotOk: (error: HttpResponsePaginated) => VNode; + onLoadNotOk: ( + error: HttpResponsePaginated, + ) => VNode; onClear?: () => void; onChangePassword: () => void; onUpdateSuccess: () => void; @@ -628,7 +641,9 @@ function RemoveAccount({ onUpdateSuccess, onLoadNotOk, }: { - onLoadNotOk: (error: HttpResponsePaginated) => VNode; + onLoadNotOk: ( + error: HttpResponsePaginated, + ) => VNode; onClear: () => void; onUpdateSuccess: () => void; account: string; @@ -806,7 +821,7 @@ function AccountForm({ />
- +