feat(ui): new WorkflowStartNodeForm using antd
This commit is contained in:
@@ -2,6 +2,7 @@ import { cloneElement, useMemo } from "react";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { useControllableValue } from "ahooks";
|
||||
import { Alert, Drawer } from "antd";
|
||||
import { CircleCheck as CircleCheckIcon, CircleX as CircleXIcon } from "lucide-react";
|
||||
|
||||
import Show from "@/components/Show";
|
||||
import { type WorkflowRunModel } from "@/domain/workflowRun";
|
||||
@@ -9,6 +10,7 @@ import { type WorkflowRunModel } from "@/domain/workflowRun";
|
||||
export type WorkflowRunDetailDrawerProps = {
|
||||
data?: WorkflowRunModel;
|
||||
loading?: boolean;
|
||||
open?: boolean;
|
||||
trigger?: React.ReactElement;
|
||||
onOpenChange?: (open: boolean) => void;
|
||||
};
|
||||
@@ -43,11 +45,11 @@ const WorkflowRunDetailDrawer = ({ data, loading, trigger, ...props }: WorkflowR
|
||||
<Drawer closable destroyOnClose open={open} loading={loading} placement="right" title={data?.id} width={640} onClose={() => setOpen(false)}>
|
||||
<Show when={!!data}>
|
||||
<Show when={data!.succeed}>
|
||||
<Alert showIcon type="success" message={t("workflow_run.props.status.succeeded")} />
|
||||
<Alert showIcon type="success" message={t("workflow_run.props.status.succeeded")} icon={<CircleCheckIcon size={16} />} />
|
||||
</Show>
|
||||
|
||||
<Show when={!data!.succeed}>
|
||||
<Alert showIcon type="error" message={t("workflow_run.props.status.failed")} description={data!.error} />
|
||||
<Show when={!!data!.error}>
|
||||
<Alert showIcon type="error" message={t("workflow_run.props.status.failed")} description={data!.error} icon={<CircleXIcon size={16} />} />
|
||||
</Show>
|
||||
|
||||
<div className="mt-4 p-4 bg-black text-stone-200 rounded-md">
|
||||
|
||||
@@ -4,7 +4,6 @@ import { useTranslation } from "react-i18next";
|
||||
import { useRequest } from "ahooks";
|
||||
import { Button, Empty, notification, Space, Table, theme, Tooltip, Typography, type TableProps } from "antd";
|
||||
import { CircleCheck as CircleCheckIcon, CircleX as CircleXIcon, Eye as EyeIcon } from "lucide-react";
|
||||
import dayjs from "dayjs";
|
||||
import { ClientResponseError } from "pocketbase";
|
||||
|
||||
import WorkflowRunDetailDrawer from "./WorkflowRunDetailDrawer";
|
||||
@@ -64,7 +63,7 @@ const WorkflowRuns = ({ className, style }: WorkflowRunsProps) => {
|
||||
key: "startedAt",
|
||||
title: t("workflow_run.props.started_at"),
|
||||
ellipsis: true,
|
||||
render: (_, record) => {
|
||||
render: () => {
|
||||
return "TODO";
|
||||
},
|
||||
},
|
||||
@@ -72,7 +71,7 @@ const WorkflowRuns = ({ className, style }: WorkflowRunsProps) => {
|
||||
key: "completedAt",
|
||||
title: t("workflow_run.props.completed_at"),
|
||||
ellipsis: true,
|
||||
render: (_, record) => {
|
||||
render: () => {
|
||||
return "TODO";
|
||||
},
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user