fix(account): enable add access token button EE-7059 (#11745)
parent
5a5a10821d
commit
4ef71f4aca
|
@ -26,7 +26,8 @@ export const accountModule = angular
|
|||
)
|
||||
.component(
|
||||
'accessTokensDatatable',
|
||||
r2a(withUIRouter(withReactQuery(withCurrentUser(AccessTokensDatatable))), [
|
||||
'canExit',
|
||||
])
|
||||
r2a(
|
||||
withUIRouter(withReactQuery(withCurrentUser(AccessTokensDatatable))),
|
||||
[]
|
||||
)
|
||||
).name;
|
||||
|
|
|
@ -12,7 +12,7 @@ import { TableActions } from './TableActions';
|
|||
const tableKey = 'access-tokens';
|
||||
const store = createPersistedStore(tableKey);
|
||||
|
||||
export function AccessTokensDatatable({ canExit }: { canExit?: boolean }) {
|
||||
export function AccessTokensDatatable() {
|
||||
const query = useAccessTokens();
|
||||
const tableState = useTableState(store, tableKey);
|
||||
|
||||
|
@ -25,7 +25,7 @@ export function AccessTokensDatatable({ canExit }: { canExit?: boolean }) {
|
|||
title="Access tokens"
|
||||
titleIcon={Key}
|
||||
renderTableActions={(selectedItems) => (
|
||||
<TableActions selectedItems={selectedItems} canExit={canExit} />
|
||||
<TableActions selectedItems={selectedItems} />
|
||||
)}
|
||||
data-cy="access-tokens-datatable"
|
||||
/>
|
||||
|
|
|
@ -9,10 +9,8 @@ import { useDeleteAccessTokensMutation } from './useDeleteAccessTokensMutation';
|
|||
|
||||
export function TableActions({
|
||||
selectedItems,
|
||||
canExit,
|
||||
}: {
|
||||
selectedItems: AccessToken[];
|
||||
canExit?: boolean;
|
||||
}) {
|
||||
const deleteMutation = useDeleteAccessTokensMutation();
|
||||
|
||||
|
@ -25,11 +23,7 @@ export function TableActions({
|
|||
data-cy="access-tokens-delete-button"
|
||||
/>
|
||||
|
||||
<AddButton
|
||||
to=".new-access-token"
|
||||
disabled={!canExit}
|
||||
data-cy="access-tokens-add-button"
|
||||
>
|
||||
<AddButton to=".new-access-token" data-cy="access-tokens-add-button">
|
||||
Add access token
|
||||
</AddButton>
|
||||
</>
|
||||
|
|
Loading…
Reference in New Issue