Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
sagemathinc
GitHub Repository: sagemathinc/cocalc
Path: blob/master/src/packages/frontend/editors/task-editor/headings-info.ts
1691 views
1
/*
2
* This file is part of CoCalc: Copyright © 2020 Sagemath, Inc.
3
* License: MS-RSL – see LICENSE.md for details
4
*/
5
6
import { Headings, HeadingsDir } from "./types";
7
8
export const HEADINGS: Headings[] = ["Custom", "Due", "Changed"];
9
export const HEADINGS_DIR: HeadingsDir[] = ["asc", "desc"];
10
11
export const SORT_INFO = {
12
Custom: {
13
key: "position",
14
reverse: false,
15
},
16
Due: {
17
key: "due_date",
18
reverse: false,
19
},
20
Changed: {
21
key: "last_edited",
22
reverse: true,
23
},
24
};
25
26
export function is_sortable(sort_column: string): boolean {
27
return sort_column == HEADINGS[0];
28
}
29
30