Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Hide reactivate org button for cancelled accounts #6734

Merged
merged 1 commit into from
Jun 20, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions src/operator/OrgOverlay.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import {useHistory, useParams} from 'react-router-dom'
import {
ButtonBase,
ButtonShape,
ButtonType,
Columns,
ComponentColor,
ComponentSize,
Expand Down Expand Up @@ -56,7 +57,9 @@ const OrgOverlay: FC = () => {
const {orgID} = useParams<{orgID: string}>()
const history = useHistory()
const canReactivateOrg =
hasWritePermissions && organization?.state === 'suspended'
hasWritePermissions &&
organization?.state === 'suspended' &&
organization?.account?.type != 'cancelled'

const isIOx =
organization?.storageType &&
Expand Down Expand Up @@ -85,7 +88,6 @@ const OrgOverlay: FC = () => {

const reactivateOrg = async () => {
await handleReactivateOrg(orgID)
history.goBack()
}

return (
Expand Down Expand Up @@ -151,6 +153,7 @@ const OrgOverlay: FC = () => {
: ComponentStatus.Default
}
testID="org-overlay-reactivate-organization--button"
type={ButtonType.Button}
>
Reactivate Organization
</ButtonBase>
Expand Down