mirror of
https://github.com/certimate-go/certimate.git
synced 2026-06-22 21:05:48 +08:00
fix(ui): incorrect default list sort
This commit is contained in:
parent
1f4b04a9b0
commit
65e0889af3
@ -238,7 +238,7 @@ const CertificateList = () => {
|
||||
() => {
|
||||
const { columnKey: sorterKey, order: sorterOrder } = sorter;
|
||||
let sort: string | undefined;
|
||||
sort = sorterKey === "validity" ? "validityNotAfter" : "";
|
||||
sort = sorterKey === "validity" ? "validityNotAfter" : void 0;
|
||||
sort = sort && (sorterOrder === "ascend" ? `${sort}` : sorterOrder === "descend" ? `-${sort}` : void 0);
|
||||
|
||||
return listCertificates({
|
||||
|
||||
@ -235,7 +235,7 @@ const WorkflowList = () => {
|
||||
() => {
|
||||
const { columnKey: sorterKey, order: sorterOrder } = sorter;
|
||||
let sort: string | undefined;
|
||||
sort = sorterKey === "lastRun" ? "lastRunTime" : "";
|
||||
sort = sorterKey === "lastRun" ? "lastRunTime" : void 0;
|
||||
sort = sort && (sorterOrder === "ascend" ? `${sort}` : sorterOrder === "descend" ? `-${sort}` : void 0);
|
||||
|
||||
return listWorkflows({
|
||||
|
||||
@ -55,7 +55,7 @@ export const list = async ({
|
||||
expand: ["workflowRef"].join(","),
|
||||
fields: [..._commonFields, ..._expandFields].join(","),
|
||||
filter: filters.join(" && "),
|
||||
sort: sort,
|
||||
sort: sort || "-created",
|
||||
requestKey: null,
|
||||
});
|
||||
};
|
||||
|
||||
@ -57,7 +57,7 @@ export const list = async ({
|
||||
expand: expand ? ["lastRunRef"].join(",") : void 0,
|
||||
fields: [..._commonFields, ..._expandFields].join(","),
|
||||
filter: filters.join(" && "),
|
||||
sort: sort,
|
||||
sort: sort || "-created",
|
||||
requestKey: null,
|
||||
});
|
||||
};
|
||||
|
||||
Loading…
Reference in New Issue
Block a user