mirror of
https://github.com/certimate-go/certimate.git
synced 2026-06-22 21:05:48 +08:00
fix: could not activate workflow again
This commit is contained in:
parent
37038469a1
commit
34749ae6e6
@ -268,6 +268,12 @@ const WorkflowRunHistoryTable = ({ className, style }: { className?: string; sty
|
||||
width: 48,
|
||||
render: (_, __, index) => index + 1,
|
||||
},
|
||||
{
|
||||
key: "id",
|
||||
title: "ID",
|
||||
width: 160,
|
||||
render: (_, record) => <span className="font-mono">{record.id}</span>,
|
||||
},
|
||||
{
|
||||
key: "name",
|
||||
title: t("workflow.props.name"),
|
||||
|
||||
@ -313,7 +313,7 @@ const WorkflowList = () => {
|
||||
|
||||
const handleRecordActiveChange = async (workflow: WorkflowModel) => {
|
||||
try {
|
||||
if (!workflow.enabled && !workflow.graphContent) {
|
||||
if (!workflow.enabled && !workflow.hasContent) {
|
||||
message.warning(t("workflow.action.enable.errmsg.unpublished"));
|
||||
return;
|
||||
}
|
||||
@ -326,7 +326,8 @@ const WorkflowList = () => {
|
||||
setTableData((prev) => {
|
||||
return prev.map((item) => {
|
||||
if (item.id === workflow.id) {
|
||||
return resp;
|
||||
item.enabled = resp.enabled;
|
||||
item.updated = resp.updated;
|
||||
}
|
||||
return item;
|
||||
});
|
||||
|
||||
Loading…
Reference in New Issue
Block a user