aboutsummaryrefslogtreecommitdiff
path: root/packages/demobank-ui/src/pages/AdminPage.tsx
diff options
context:
space:
mode:
authorSebastian <sebasjm@gmail.com>2023-02-20 10:18:02 -0300
committerSebastian <sebasjm@gmail.com>2023-02-20 10:18:02 -0300
commitc191a2da860fe7ba9a2439f04c94cdd894bd1fa8 (patch)
tree79e65249e23abc204c98f6d369383871429246ef /packages/demobank-ui/src/pages/AdminPage.tsx
parentaa20812fbaf215aec413bd54d6e1594984afa1e6 (diff)
downloadwallet-core-c191a2da860fe7ba9a2439f04c94cdd894bd1fa8.tar.xz
fix missing props
Diffstat (limited to 'packages/demobank-ui/src/pages/AdminPage.tsx')
-rw-r--r--packages/demobank-ui/src/pages/AdminPage.tsx24
1 files changed, 23 insertions, 1 deletions
diff --git a/packages/demobank-ui/src/pages/AdminPage.tsx b/packages/demobank-ui/src/pages/AdminPage.tsx
index d15ac02c4..b4ce58588 100644
--- a/packages/demobank-ui/src/pages/AdminPage.tsx
+++ b/packages/demobank-ui/src/pages/AdminPage.tsx
@@ -40,6 +40,7 @@ import {
WithIntermediate,
} from "../utils.js";
import { ErrorBanner } from "./BankFrame.js";
+import { ShowCashoutDetails } from "./BusinessAccount.js";
import { ShowInputErrorLabel } from "./ShowInputErrorLabel.js";
const charset =
@@ -69,6 +70,9 @@ export function AdminPage({ onLoadNotOk }: Props): VNode {
const [showCashouts, setShowCashouts] = useState<string | undefined>();
const [updatePassword, setUpdatePassword] = useState<string | undefined>();
const [removeAccount, setRemoveAccount] = useState<string | undefined>();
+ const [showCashoutDetails, setShowCashoutDetails] = useState<
+ string | undefined
+ >();
const [createAccount, setCreateAccount] = useState(false);
const { pageStateSetter } = usePageContext();
@@ -90,10 +94,28 @@ export function AdminPage({ onLoadNotOk }: Props): VNode {
const { customers } = result.data;
+ if (showCashoutDetails) {
+ return (
+ <ShowCashoutDetails
+ id={showCashoutDetails}
+ onLoadNotOk={onLoadNotOk}
+ onCancel={() => {
+ setShowCashoutDetails(undefined);
+ }}
+ />
+ );
+ }
+
if (showCashouts) {
return (
<div>
- <Cashouts account={showCashouts} />
+ <Cashouts
+ account={showCashouts}
+ onSelected={(id) => {
+ setShowCashouts(id);
+ setShowCashouts(undefined);
+ }}
+ />
<input
class="pure-button"
type="submit"