Skip to content

Commit

Permalink
addressing comments
Browse files Browse the repository at this point in the history
  • Loading branch information
tiagoapolo committed Jan 2, 2025
1 parent ebb2211 commit 883b844
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 10 deletions.
7 changes: 2 additions & 5 deletions frontend/common/utils/utils.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -354,10 +354,7 @@ const Utils = Object.assign({}, require('./base/_utils'), {
if (plan && plan.includes('start-up')) {
return planNames.startup
}
if (
global.flagsmithVersion?.backend.is_enterprise ||
(plan && plan.includes('enterprise'))
) {
if (Utils.isEnterpriseImage() || (plan && plan.includes('enterprise'))) {
return planNames.enterprise
}
return planNames.free
Expand Down Expand Up @@ -555,6 +552,7 @@ const Utils = Object.assign({}, require('./base/_utils'), {
getViewIdentitiesPermission() {
return 'VIEW_IDENTITIES'
},
isEnterpriseImage: () => global.flagsmithVersion?.backend.is_enterprise,
isMigrating() {
const model = ProjectStore.model as null | ProjectType
if (
Expand All @@ -566,7 +564,6 @@ const Utils = Object.assign({}, require('./base/_utils'), {
return false
},
isSaas: () => global.flagsmithVersion?.backend?.is_saas,

isValidNumber(value: any) {
return /^-?\d*\.?\d+$/.test(`${value}`)
},
Expand Down
2 changes: 1 addition & 1 deletion frontend/web/components/AdminAPIKeys.js
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ export class CreateAPIKey extends PureComponent {
<Input
ref={(v) => {
setTimeout(() => {
v?.focus()
v.focus()
}, 500)
}}
value={this.state.name}
Expand Down
2 changes: 1 addition & 1 deletion frontend/web/components/LicensingTabContent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ const LicensingTabContent: React.FC<LicensingTabContentProps> = ({
toast(
Array.isArray(error?.data)
? error?.data[0]
: 'Upload was not successfull',
: 'Upload was not successful',
'danger',
)
}
Expand Down
5 changes: 2 additions & 3 deletions frontend/web/components/pages/OrganisationSettingsPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -231,9 +231,8 @@ const OrganisationSettingsPage = class extends Component {
const { chargebee_email } = subscriptionMeta || {}

const displayedTabs = []
const isEnterprise =
global.flagsmithVersion?.backend.is_enterprise
const isSaas = global.flagsmithVersion?.backend?.isSaas
const isEnterprise = Utils.isEnterpriseImage()
const isSaas = Utils.isSaas()

if (
AccountStore.getUser() &&
Expand Down

0 comments on commit 883b844

Please sign in to comment.