aboutsummaryrefslogtreecommitdiff
path: root/packages
diff options
context:
space:
mode:
authorSebastian <sebasjm@gmail.com>2024-08-29 18:29:17 -0300
committerSebastian <sebasjm@gmail.com>2024-08-29 18:29:17 -0300
commit84118e5a3d2362c056a3913cc8ee8885980ef9af (patch)
tree9cca35f9bf7913907d280403be1a58bae8fbef4b /packages
parent551aa1a5e7e7e3a390a472fa433387da8bf3fc72 (diff)
improve #9072
Diffstat (limited to 'packages')
-rw-r--r--packages/bank-ui/src/pages/account/ShowAccountDetails.tsx7
-rw-r--r--packages/bank-ui/src/pages/admin/AccountList.tsx54
2 files changed, 33 insertions, 28 deletions
diff --git a/packages/bank-ui/src/pages/account/ShowAccountDetails.tsx b/packages/bank-ui/src/pages/account/ShowAccountDetails.tsx
index f602c67df..d06373c39 100644
--- a/packages/bank-ui/src/pages/account/ShowAccountDetails.tsx
+++ b/packages/bank-ui/src/pages/account/ShowAccountDetails.tsx
@@ -25,6 +25,7 @@ import {
parsePaytoUri,
} from "@gnu-taler/taler-util";
import {
+ Attention,
CopyButton,
Loading,
LocalNotificationBanner,
@@ -240,6 +241,12 @@ export function ShowAccountDetails({
</h1>
)}
+ {result.body.status !== "deleted" ? undefined : (
+ <Attention title={i18n.str`Removed`} type="info">
+ <i18n.Translate>This account can't be used.</i18n.Translate>
+ </Attention>
+ )}
+
<div class="grid grid-cols-1 gap-x-8 gap-y-8 pt-6 md:grid-cols-3 bg-gray-100 my-4 px-4 pb-4 rounded-lg">
<div class="px-4 sm:px-0">
<h2 class="text-base font-semibold leading-7 text-gray-900">
diff --git a/packages/bank-ui/src/pages/admin/AccountList.tsx b/packages/bank-ui/src/pages/admin/AccountList.tsx
index 6402c2bcd..83284c032 100644
--- a/packages/bank-ui/src/pages/admin/AccountList.tsx
+++ b/packages/bank-ui/src/pages/admin/AccountList.tsx
@@ -121,7 +121,11 @@ export function AccountList({
item.balance.credit_debit_indicator == "debit";
return (
- <tr key={idx}>
+ <tr
+ key={idx}
+ class="data-[status=deleted]:bg-gray-100"
+ data-status={item.status}
+ >
<td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm font-medium text-gray-900 sm:pl-0">
<a
name={`show account ${item.username}`}
@@ -159,42 +163,36 @@ export function AccountList({
)}
</td>
<td class="relative whitespace-nowrap py-4 pl-3 pr-4 text-right text-sm font-medium sm:pr-0">
- <a
- name={`update password ${item.username}`}
- href={routeUpdatePasswordAccount.url({
- account: item.username,
- })}
- class="text-indigo-600 hover:text-indigo-900"
- >
- <i18n.Translate>Change password</i18n.Translate>
- </a>
- <br />
- {/* {config.allow_conversion ?
+ {item.status === "deleted" ? (
+ <p class="text-gray-600">removed</p>
+ ) : (
<Fragment>
-
<a
- name={`show cashout ${item.username}`}
- href={routeShowCashoutsAccount.url({
+ name={`update password ${item.username}`}
+ href={routeUpdatePasswordAccount.url({
account: item.username,
})}
class="text-indigo-600 hover:text-indigo-900"
>
- <i18n.Translate>Cashouts</i18n.Translate>
+ <i18n.Translate>
+ Change password
+ </i18n.Translate>
</a>
<br />
+
+ {noBalance ? (
+ <a
+ name={`remove account ${item.username}`}
+ href={routeRemoveAccount.url({
+ account: item.username,
+ })}
+ class="text-indigo-600 hover:text-indigo-900"
+ >
+ <i18n.Translate>Remove</i18n.Translate>
+ </a>
+ ) : undefined}
</Fragment>
- : undefined} */}
- {noBalance ? (
- <a
- name={`remove account ${item.username}`}
- href={routeRemoveAccount.url({
- account: item.username,
- })}
- class="text-indigo-600 hover:text-indigo-900"
- >
- <i18n.Translate>Remove</i18n.Translate>
- </a>
- ) : undefined}
+ )}
</td>
</tr>
);