diff options
Diffstat (limited to 'packages/demobank-ui/src/pages/admin')
-rw-r--r-- | packages/demobank-ui/src/pages/admin/AccountForm.tsx | 44 | ||||
-rw-r--r-- | packages/demobank-ui/src/pages/admin/AccountList.tsx | 2 | ||||
-rw-r--r-- | packages/demobank-ui/src/pages/admin/CreateNewAccount.tsx | 4 |
3 files changed, 26 insertions, 24 deletions
diff --git a/packages/demobank-ui/src/pages/admin/AccountForm.tsx b/packages/demobank-ui/src/pages/admin/AccountForm.tsx index de30d473d..c63d602b7 100644 --- a/packages/demobank-ui/src/pages/admin/AccountForm.tsx +++ b/packages/demobank-ui/src/pages/admin/AccountForm.tsx @@ -370,27 +370,29 @@ export function AccountForm<PurposeType extends keyof ChangeByPurposeType>({ </p> </div> - <TextField - id="internal-account" - label={i18n.str`Internal account`} - help={ - purpose === "create" - ? i18n.str`If empty a random account id will be assigned` - : i18n.str`Share this id to receive bank transfers` - } - - error={errors?.payto_uri} - onChange={(e) => { - form.payto_uri = e as PaytoString; - updateForm(structuredClone(form)); - }} - rightIcons={<CopyButton - class="p-2 rounded-full text-black shadow-sm focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 " - getContent={() => form.payto_uri ?? defaultValue.payto_uri ?? ""} - />} - value={(form.payto_uri ?? defaultValue.payto_uri) as PaytoString} - disabled={!editableAccount} - /> + {purpose === "create" ? undefined : + <TextField + id="internal-account" + label={i18n.str`Internal account`} + help={ + purpose === "create" + ? i18n.str`If empty a random account id will be assigned` + : i18n.str`Share this id to receive bank transfers` + } + + error={errors?.payto_uri} + onChange={(e) => { + form.payto_uri = e as PaytoString; + updateForm(structuredClone(form)); + }} + rightIcons={<CopyButton + class="p-2 rounded-full text-black shadow-sm focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 " + getContent={() => form.payto_uri ?? defaultValue.payto_uri ?? ""} + />} + value={(form.payto_uri ?? defaultValue.payto_uri) as PaytoString} + disabled={!editableAccount} + /> + } <div class="sm:col-span-5"> <label diff --git a/packages/demobank-ui/src/pages/admin/AccountList.tsx b/packages/demobank-ui/src/pages/admin/AccountList.tsx index 4e3f4afe3..36e417171 100644 --- a/packages/demobank-ui/src/pages/admin/AccountList.tsx +++ b/packages/demobank-ui/src/pages/admin/AccountList.tsx @@ -74,7 +74,7 @@ export function AccountList({ </h1> <p class="mt-2 text-sm text-gray-700"> <i18n.Translate> - A list of all business account in the bank. + A list of all bank accounts. </i18n.Translate> </p> </div> diff --git a/packages/demobank-ui/src/pages/admin/CreateNewAccount.tsx b/packages/demobank-ui/src/pages/admin/CreateNewAccount.tsx index 8773df50a..6b4307417 100644 --- a/packages/demobank-ui/src/pages/admin/CreateNewAccount.tsx +++ b/packages/demobank-ui/src/pages/admin/CreateNewAccount.tsx @@ -70,7 +70,7 @@ export function CreateNewAccount({ const resp = await api.createAccount(token, submitAccount); if (resp.type === "ok") { notifyInfo( - i18n.str`Account created with password "${submitAccount.password}". The user must change the password on the next login.`, + i18n.str`Account created with password "${submitAccount.password}".`, ); onCreateSuccess(); } else { @@ -179,7 +179,7 @@ export function CreateNewAccount({ <div class="px-4 sm:px-0"> <h2 class="text-base font-semibold leading-7 text-gray-900"> - <i18n.Translate>New business account</i18n.Translate> + <i18n.Translate>New bank account</i18n.Translate> </h2> </div> <AccountForm |