mirror of
https://gitlab.com/wgp/dougal/software.git
synced 2025-12-06 12:57:08 +00:00
Sort sequence list by sequence descending by default
This commit is contained in:
@@ -7,8 +7,8 @@ async function list (projectId, opts = {}) {
|
|||||||
"sequence", "line", "length", "azimuth", "fsp", "lsp",
|
"sequence", "line", "length", "azimuth", "fsp", "lsp",
|
||||||
"ts0", "ts1", "duration", "num_points", "missing_shots", "remarks"
|
"ts0", "ts1", "duration", "num_points", "missing_shots", "remarks"
|
||||||
];
|
];
|
||||||
const sortKey = opts.sortBy && sortFields.includes(opts.sortBy) && opts.sortBy || "line";
|
const sortKey = opts.sortBy && sortFields.includes(opts.sortBy) && opts.sortBy || "sequence";
|
||||||
const sortDir = opts.sortDesc == "true" ? "DESC" : "ASC";
|
const sortDir = opts.sortDesc == "false" ? "ASC" : "DESC";
|
||||||
const offset = Math.abs((opts.page-1)*opts.itemsPerPage) || 0;
|
const offset = Math.abs((opts.page-1)*opts.itemsPerPage) || 0;
|
||||||
const limit = Math.abs(Number(opts.itemsPerPage)) || null;
|
const limit = Math.abs(Number(opts.itemsPerPage)) || null;
|
||||||
const filter = opts.filter;
|
const filter = opts.filter;
|
||||||
|
|||||||
Reference in New Issue
Block a user