Skip to content

Commit 0bf0749

Browse files
authored
only custom template needs upgrade and free users cannot edit email title and body of existing templates (calcom#24907)
1 parent 4006143 commit 0bf0749

2 files changed

Lines changed: 3 additions & 8 deletions

File tree

packages/features/ee/workflows/components/WorkflowStepContainer.tsx

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -380,11 +380,6 @@ export default function WorkflowStepContainer(props: WorkflowStepProps) {
380380
name: "steps",
381381
});
382382

383-
// Extract current step template from watched steps array
384-
const currentStepTemplate = step ? steps?.[step.stepNumber - 1]?.template : null;
385-
386-
const isReminderTemplate = currentStepTemplate === WorkflowTemplates.REMINDER;
387-
388383
const hasAiAction = hasCalAIAction(steps);
389384
const hasEmailToHostAction = steps.some((s) => s.action === WorkflowActions.EMAIL_HOST);
390385
const hasWhatsappAction = steps.some((s) => isWhatsappAction(s.action));
@@ -1335,7 +1330,7 @@ export default function WorkflowStepContainer(props: WorkflowStepProps) {
13351330
refEmailSubject.current = e;
13361331
}}
13371332
rows={2}
1338-
disabled={props.readOnly || (!hasActiveTeamPlan && !isReminderTemplate)}
1333+
disabled={props.readOnly || !hasActiveTeamPlan}
13391334
className="my-0 focus:ring-transparent"
13401335
required
13411336
{...restEmailSubjectForm}
@@ -1368,7 +1363,7 @@ export default function WorkflowStepContainer(props: WorkflowStepProps) {
13681363
editable={
13691364
!props.readOnly &&
13701365
!isWhatsappAction(step.action) &&
1371-
(hasActiveTeamPlan || isSMSAction(step.action) || isReminderTemplate)
1366+
(hasActiveTeamPlan || isSMSAction(step.action))
13721367
}
13731368
excludedToolbarItems={
13741369
!isSMSAction(step.action) ? [] : ["blockType", "bold", "italic", "link"]

packages/features/ee/workflows/lib/getOptions.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ function convertToTemplateOptions(
6262
return {
6363
label: t(`${template.toLowerCase()}`),
6464
value: template,
65-
needsTeamsUpgrade: !hasPaidPlan && template !== WorkflowTemplates.REMINDER,
65+
needsTeamsUpgrade: !hasPaidPlan && template === WorkflowTemplates.CUSTOM,
6666
} as { label: string; value: any; needsTeamsUpgrade: boolean };
6767
});
6868
}

0 commit comments

Comments
 (0)