Files
kandev/apps/web/app/tasks/mobile-tasks-create-dialog.tsx
T
Alassane 0700911e05 feat(plugins): plugin task list facets for sort and group (#2932)
Co-authored-by: ayattara <alassane.yattara@savoirfairelinux.com>
Co-authored-by: Carlos Florencio <carlosmflorencio@gmail.com>
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-08-25 06:59:14 +00:00

43 lines
940 B
TypeScript

import { TaskCreateDialog } from "@/components/task-create-dialog";
export type MobileTaskStep = {
id: string;
title: string;
events?: {
on_enter?: Array<{ type: string; config?: Record<string, unknown> }>;
on_turn_complete?: Array<{ type: string; config?: Record<string, unknown> }>;
};
};
export function MobileTasksCreateDialog({
open,
onOpenChange,
workspaceId,
workflowId,
steps,
onCreated,
}: {
open: boolean;
onOpenChange: (open: boolean) => void;
workspaceId: string;
workflowId: string | null;
steps: MobileTaskStep[];
onCreated: () => Promise<void>;
}) {
return (
<TaskCreateDialog
open={open}
onOpenChange={onOpenChange}
mode="create"
workspaceId={workspaceId}
workflowId={workflowId}
defaultStepId={steps[0]?.id ?? null}
steps={steps}
onSuccess={() => {
onOpenChange(false);
void onCreated();
}}
/>
);
}