mirror of
https://github.com/certimate-go/certimate.git
synced 2026-09-24 23:10:13 +08:00
feat: workflow sort by name
This commit is contained in:
@@ -52,6 +52,8 @@ const WorkflowList = () => {
|
||||
{
|
||||
key: "name",
|
||||
title: t("workflow.props.name"),
|
||||
sorter: true,
|
||||
sortOrder: sorter.columnKey === "name" ? sorter.order : void 0,
|
||||
render: (_, record) => (
|
||||
<div className="flex max-w-full flex-col gap-1 truncate">
|
||||
<Typography.Text ellipsis>{record.name || "\u00A0"}</Typography.Text>
|
||||
@@ -242,7 +244,7 @@ const WorkflowList = () => {
|
||||
() => {
|
||||
const { columnKey: sorterKey, order: sorterOrder } = sorter;
|
||||
let sort: string | undefined;
|
||||
sort = sorterKey === "lastRun" ? "lastRunTime" : void 0;
|
||||
sort = sorterKey === "name" ? "name" : sorterKey === "lastRun" ? "lastRunTime" : void 0;
|
||||
sort = sort && (sorterOrder === "ascend" ? `${sort}` : sorterOrder === "descend" ? `-${sort}` : void 0);
|
||||
|
||||
return listWorkflows({
|
||||
|
||||
Reference in New Issue
Block a user