📄 Add Commercial License for ee folder (#1532)
This commit is contained in:
12
ee/packages/billing/helpers/getSeatsLimit.ts
Normal file
12
ee/packages/billing/helpers/getSeatsLimit.ts
Normal file
@@ -0,0 +1,12 @@
|
||||
import { Workspace } from '@typebot.io/schemas'
|
||||
import { seatsLimits } from '../constants'
|
||||
import { Plan } from '@typebot.io/prisma'
|
||||
|
||||
export const getSeatsLimit = ({
|
||||
plan,
|
||||
customSeatsLimit,
|
||||
}: Pick<Workspace, 'plan' | 'customSeatsLimit'>) => {
|
||||
if (plan === Plan.UNLIMITED) return 'inf'
|
||||
if (plan === Plan.CUSTOM) return customSeatsLimit ? customSeatsLimit : 'inf'
|
||||
return seatsLimits[plan]
|
||||
}
|
||||
Reference in New Issue
Block a user