feat: dynamic time format rendering in workflows based on user settings (#10229)

This commit is contained in:
Monto authored and GitHub committed 2023-07-19 10:30:37 -04:00
1 parent 1ad4f7247e
commit 26e458be6d
25 files changed
+205 -56

No files matched your search

@@ -1,4 +1,7 @@
import { WorkflowActions, WorkflowTemplates, WorkflowTriggerEvents } from "@prisma/client";
import type { WorkflowTriggerEvents } from "@prisma/client";
import { WorkflowActions, WorkflowTemplates } from "@prisma/client";
import type { TimeFormat } from "@calcom/lib/timeFormat";
import {
whatsappEventCancelledTemplate,
@@ -61,8 +64,9 @@ export function getWhatsappTemplateFunction(template: WorkflowTemplates): typeof
export function getWhatsappTemplateForAction(
action: WorkflowActions,
template: WorkflowTemplates
template: WorkflowTemplates,
timeFormat: TimeFormat
): string | null {
const templateFunction = getWhatsappTemplateFunction(template);
return templateFunction(true, action);
return templateFunction(true, action, timeFormat);
}