diff --git a/packages/client/components/ActivityLibrary/ActivityDetails/TemplateDetails.tsx b/packages/client/components/ActivityLibrary/ActivityDetails/TemplateDetails.tsx
index 0c2b77bef15..b86554fb3ef 100644
--- a/packages/client/components/ActivityLibrary/ActivityDetails/TemplateDetails.tsx
+++ b/packages/client/components/ActivityLibrary/ActivityDetails/TemplateDetails.tsx
@@ -267,7 +267,7 @@ export const TemplateDetails = (props: Props) => {
/>
{error &&
{error.message}}
diff --git a/packages/client/modules/meeting/components/AddNewReflectTemplate.tsx b/packages/client/modules/meeting/components/AddNewReflectTemplate.tsx
index eea0c89ab03..61429332903 100644
--- a/packages/client/modules/meeting/components/AddNewReflectTemplate.tsx
+++ b/packages/client/modules/meeting/components/AddNewReflectTemplate.tsx
@@ -7,7 +7,6 @@ import TooltipStyled from '../../../components/TooltipStyled'
import useAtmosphere from '../../../hooks/useAtmosphere'
import useMutationProps from '../../../hooks/useMutationProps'
import AddReflectTemplateMutation from '../../../mutations/AddReflectTemplateMutation'
-import {Threshold} from '../../../types/constEnums'
import {AddNewReflectTemplate_reflectTemplates$key} from '../../../__generated__/AddNewReflectTemplate_reflectTemplates.graphql'
import {AddNewReflectTemplate_team$key} from '../../../__generated__/AddNewReflectTemplate_team.graphql'
@@ -79,13 +78,6 @@ const AddNewReflectTemplate = (props: Props) => {
displayUpgradeDetails()
return
}
- if (reflectTemplates.length >= Threshold.MAX_RETRO_TEAM_TEMPLATES) {
- onError(new Error('You may only have 20 templates per team. Please remove one first.'))
- errorTimerId.current = window.setTimeout(() => {
- onCompleted()
- }, 8000)
- return
- }
if (reflectTemplates.find((template) => template.name.startsWith('*New Template'))) {
onError(new Error('You already have a new template. Try renaming that one first.'))
errorTimerId.current = window.setTimeout(() => {
@@ -102,8 +94,7 @@ const AddNewReflectTemplate = (props: Props) => {
template.name.startsWith('*New Template')
)
- if (reflectTemplates.length > Threshold.MAX_RETRO_TEAM_TEMPLATES || containsNewTemplate)
- return null
+ if (containsNewTemplate) return null
return (
{error && {error.message}}
diff --git a/packages/client/modules/meeting/components/CloneTemplate.tsx b/packages/client/modules/meeting/components/CloneTemplate.tsx
index 66cc6cc7d3e..6fbc5a1460a 100644
--- a/packages/client/modules/meeting/components/CloneTemplate.tsx
+++ b/packages/client/modules/meeting/components/CloneTemplate.tsx
@@ -2,15 +2,12 @@ import React from 'react'
import DetailAction from '../../../components/DetailAction'
interface Props {
- canClone: boolean
onClick: () => void
}
const CloneTemplate = (props: Props) => {
- const {canClone, onClick} = props
- const tooltip = canClone ? 'Clone & Edit Template' : 'Too many team templates! Remove one first'
- return (
-
- )
+ const {onClick} = props
+ const tooltip = 'Clone & Edit Template'
+ return
}
export default CloneTemplate
diff --git a/packages/client/modules/meeting/components/PokerTemplateDetails.tsx b/packages/client/modules/meeting/components/PokerTemplateDetails.tsx
index 3dcb51ec48a..c42794d1508 100644
--- a/packages/client/modules/meeting/components/PokerTemplateDetails.tsx
+++ b/packages/client/modules/meeting/components/PokerTemplateDetails.tsx
@@ -6,7 +6,6 @@ import useAtmosphere from '../../../hooks/useAtmosphere'
import useMutationProps from '../../../hooks/useMutationProps'
import AddPokerTemplateMutation from '../../../mutations/AddPokerTemplateMutation'
import {PALETTE} from '../../../styles/paletteV3'
-import {Threshold} from '../../../types/constEnums'
import getTemplateList from '../../../utils/getTemplateList'
import useTemplateDescription from '../../../utils/useTemplateDescription'
import {PokerTemplateDetails_settings$key} from '../../../__generated__/PokerTemplateDetails_settings.graphql'
@@ -108,12 +107,10 @@ const PokerTemplateDetails = (props: Props) => {
const lowestScope = getTemplateList(teamId, orgId, activeTemplate)
const isOwner = activeTemplate.teamId === teamId
const description = useTemplateDescription(lowestScope, activeTemplate, tier)
- const templateCount = teamTemplates.length
const atmosphere = useAtmosphere()
const {onError, onCompleted, submitting, submitMutation} = useMutationProps()
- const canClone = templateCount < Threshold.MAX_POKER_TEAM_TEMPLATES
const onClone = () => {
- if (submitting || !canClone) return
+ if (submitting) return
submitMutation()
AddPokerTemplateMutation(
atmosphere,
@@ -145,7 +142,7 @@ const PokerTemplateDetails = (props: Props) => {
type='poker'
/>
)}
- {showClone && }
+ {showClone && }
{description}
diff --git a/packages/client/modules/meeting/components/ReflectTemplateDetails.tsx b/packages/client/modules/meeting/components/ReflectTemplateDetails.tsx
index dec65509954..2d45402d52e 100644
--- a/packages/client/modules/meeting/components/ReflectTemplateDetails.tsx
+++ b/packages/client/modules/meeting/components/ReflectTemplateDetails.tsx
@@ -6,7 +6,6 @@ import useAtmosphere from '../../../hooks/useAtmosphere'
import useMutationProps from '../../../hooks/useMutationProps'
import AddReflectTemplateMutation from '../../../mutations/AddReflectTemplateMutation'
import {PALETTE} from '../../../styles/paletteV3'
-import {Threshold} from '../../../types/constEnums'
import getTemplateList from '../../../utils/getTemplateList'
import useTemplateDescription from '../../../utils/useTemplateDescription'
import {ReflectTemplateDetails_settings$key} from '../../../__generated__/ReflectTemplateDetails_settings.graphql'
@@ -116,12 +115,10 @@ const ReflectTemplateDetails = (props: Props) => {
const lowestScope = getTemplateList(teamId, orgId, activeTemplate)
const isOwner = activeTemplate.teamId === teamId
const description = useTemplateDescription(lowestScope, activeTemplate, tier)
- const templateCount = teamTemplates.length
const atmosphere = useAtmosphere()
const {onError, onCompleted, submitting, submitMutation} = useMutationProps()
- const canClone = templateCount < Threshold.MAX_RETRO_TEAM_TEMPLATES
const onClone = () => {
- if (submitting || !canClone) return
+ if (submitting) return
submitMutation()
AddReflectTemplateMutation(
atmosphere,
@@ -153,7 +150,7 @@ const ReflectTemplateDetails = (props: Props) => {
type='retrospective'
/>
)}
- {showClone && }
+ {showClone && }
{description}
diff --git a/packages/client/types/constEnums.ts b/packages/client/types/constEnums.ts
index fe42a13d6be..28bbd744b85 100644
--- a/packages/client/types/constEnums.ts
+++ b/packages/client/types/constEnums.ts
@@ -397,8 +397,6 @@ export const enum Threshold {
MAX_POKER_TEMPLATE_SCALES = 12,
MAX_POKER_SCALE_VALUES = 30,
POKER_SCALE_VALUE_MAX_LENGTH = 3,
- MAX_RETRO_TEAM_TEMPLATES = 20,
- MAX_POKER_TEAM_TEMPLATES = 20,
MAX_POKER_DIMENSION_NAME = 50,
MAX_QUAL_AI_MEETINGS = 3,
MAX_REACTJIS = 12,
diff --git a/packages/server/graphql/mutations/addPokerTemplate.ts b/packages/server/graphql/mutations/addPokerTemplate.ts
index ec470279865..3b4e6dbccc0 100644
--- a/packages/server/graphql/mutations/addPokerTemplate.ts
+++ b/packages/server/graphql/mutations/addPokerTemplate.ts
@@ -1,5 +1,5 @@
import {GraphQLID, GraphQLNonNull} from 'graphql'
-import {SprintPokerDefaults, SubscriptionChannel, Threshold} from 'parabol-client/types/constEnums'
+import {SprintPokerDefaults, SubscriptionChannel} from 'parabol-client/types/constEnums'
import getRethink from '../../database/rethinkDriver'
import PokerTemplate from '../../database/types/PokerTemplate'
import TemplateDimension from '../../database/types/TemplateDimension'
@@ -45,9 +45,6 @@ const addPokerTemplate = {
dataLoader.get('teams').load(teamId),
dataLoader.get('users').loadNonNull(viewerId)
])
- if (allTemplates.length >= Threshold.MAX_RETRO_TEAM_TEMPLATES) {
- return standardError(new Error('Too many templates'), {userId: viewerId})
- }
if (!viewerTeam) {
return standardError(new Error('Team not found'), {userId: viewerId})
diff --git a/packages/server/graphql/mutations/addReflectTemplate.ts b/packages/server/graphql/mutations/addReflectTemplate.ts
index 46c91713490..d4c3825338a 100644
--- a/packages/server/graphql/mutations/addReflectTemplate.ts
+++ b/packages/server/graphql/mutations/addReflectTemplate.ts
@@ -1,5 +1,5 @@
import {GraphQLID, GraphQLNonNull} from 'graphql'
-import {SubscriptionChannel, Threshold} from 'parabol-client/types/constEnums'
+import {SubscriptionChannel} from 'parabol-client/types/constEnums'
import {PALETTE} from '../../../client/styles/paletteV3'
import getRethink from '../../database/rethinkDriver'
import ReflectTemplate from '../../database/types/ReflectTemplate'
@@ -47,9 +47,6 @@ const addReflectTemplate = {
dataLoader.get('users').loadNonNull(viewerId)
])
- if (allTemplates.length >= Threshold.MAX_RETRO_TEAM_TEMPLATES) {
- return standardError(new Error('Too many templates'), {userId: viewerId})
- }
if (!viewerTeam) {
return standardError(new Error('Team not found'), {userId: viewerId})
}