+
-
-
+
+ {image ? (
+

+ ) : (
+
+ )}
-
{text}
+
{title}
+
{description}
@@ -35,33 +51,60 @@ function WorkflowExample(props: WorkflowExampleType) {
export default function EmptyScreen(props: { isFilteredView: boolean }) {
const { t } = useLocale();
- const router = useRouter();
+ const { showDialog, setShowDialog, pendingTeamId, openDialog } = useWorkflowCreation();
- const createMutation = trpc.viewer.workflows.create.useMutation({
- onSuccess: async ({ workflow }) => {
- await router.replace(`/workflows/${workflow.id}`);
+ const workflowsExamples: WorkflowExampleType[] = [
+ { icon: "smartphone", title: t("send_sms_reminder"), description: t("send_sms_reminder_description") },
+ {
+ icon: "smartphone",
+ title: t("follow_up_with_no_shows"),
+ description: t("follow_up_with_no_shows_description"),
},
- onError: (err) => {
- if (err instanceof HttpError) {
- const message = `${err.statusCode}: ${err.message}`;
- showToast(message, "error");
- }
-
- if (err.data?.code === "UNAUTHORIZED") {
- const message = `${err.data.code}: ${t("unauthorized_create_workflow")}`;
- showToast(message, "error");
- }
+ {
+ icon: "mail",
+ title: t("remind_attendees_to_bring_id"),
+ description: t("remind_attendees_to_bring_id_description"),
},
- });
+ {
+ icon: "mail",
+ title: t("email_to_remind_booking"),
+ description: t("email_to_remind_booking_description"),
+ },
+ {
+ icon: "mail",
+ title: t("custom_email_reminder"),
+ description: t("custom_email_reminder_description"),
+ },
+ {
+ icon: "smartphone",
+ title: t("custom_sms_reminder"),
+ description: t("custom_sms_reminder_description"),
+ },
+ ];
- const workflowsExamples = [
- { icon: "smartphone", text: t("workflow_example_1") },
- { icon: "smartphone", text: t("workflow_example_2") },
- { icon: "mail", text: t("workflow_example_3") },
- { icon: "mail", text: t("workflow_example_4") },
- { icon: "mail", text: t("workflow_example_5") },
- { icon: "smartphone", text: t("workflow_example_6") },
- ] as const;
+ const calAITemplates: WorkflowExampleType[] = [
+ {
+ icon: "phone-outgoing",
+ title: t("call_to_confirm_booking"),
+ description: t("cal_ai_phone_call_action_description"),
+ iconWrapperClassName: "bg-[#2A2947]",
+ image: "/call-outgoing.svg",
+ },
+ {
+ icon: "phone-outgoing",
+ title: t("follow_up_with_no_shows"),
+ description: t("follow_up_with_no_shows_description"),
+ iconWrapperClassName: "bg-[#2A2947]",
+ image: "/call-outgoing.svg",
+ },
+ {
+ icon: "phone-outgoing",
+ title: t("remind_attendees_to_bring_id"),
+ description: t("remind_attendees_to_bring_id_description"),
+ iconWrapperClassName: "bg-[#2A2947]",
+ image: "/call-outgoing.svg",
+ },
+ ];
// new workflow example when 'after meetings ends' trigger is implemented: Send custom thank you email to attendee after event (Smile icon),
if (props.isFilteredView) {
@@ -82,21 +125,42 @@ export default function EmptyScreen(props: { isFilteredView: boolean }) {
createMutation.mutate({ teamId })}
+ createFunction={openDialog}
buttonText={t("create_workflow")}
- isPending={createMutation.isPending}
includeOrg={true}
/>