diff --git a/frontend/web/components/pages/organisation-settings/tabs/general-tab/sections/DeleteOrganisation.tsx b/frontend/web/components/pages/organisation-settings/tabs/general-tab/sections/DeleteOrganisation.tsx index 1d8f9fb8eae7..f35b3ad90fc9 100644 --- a/frontend/web/components/pages/organisation-settings/tabs/general-tab/sections/DeleteOrganisation.tsx +++ b/frontend/web/components/pages/organisation-settings/tabs/general-tab/sections/DeleteOrganisation.tsx @@ -1,5 +1,6 @@ import React from 'react' import { useHistory } from 'react-router-dom' +import { planNames } from 'common/utils/utils' import { Organisation } from 'common/types/responses' import { useDeleteOrganisationWithToast } from 'components/pages/organisation-settings/hooks' import ConfirmRemoveOrganisation from 'components/modals/ConfirmRemoveOrganisation' @@ -53,7 +54,12 @@ export const DeleteOrganisation = ({ data-test='delete-org-btn' onClick={handleDelete} theme='danger' - disabled={isLoading} + disabled={ + isLoading || + (Utils.getPlanName(organisation.subscription?.plan ?? '') !== + planNames.free && + !organisation.subscription?.cancellation_date) + } > {isLoading ? 'Deleting...' : 'Delete Organisation'}