mirror of
https://github.com/docmost/docmost.git
synced 2026-05-20 16:44:05 +08:00
lists sorting
This commit is contained in:
@@ -135,10 +135,12 @@ export class GroupRepo {
|
|||||||
direction: 'desc',
|
direction: 'desc',
|
||||||
key: 'memberCount',
|
key: 'memberCount',
|
||||||
},
|
},
|
||||||
|
{ expression: 'sub.name', direction: 'asc', key: 'name' },
|
||||||
{ expression: 'sub.id', direction: 'asc', key: 'id' },
|
{ expression: 'sub.id', direction: 'asc', key: 'id' },
|
||||||
],
|
],
|
||||||
parseCursor: (cursor) => ({
|
parseCursor: (cursor) => ({
|
||||||
memberCount: parseInt(cursor.memberCount, 10),
|
memberCount: parseInt(cursor.memberCount, 10),
|
||||||
|
name: cursor.name,
|
||||||
id: cursor.id,
|
id: cursor.id,
|
||||||
}),
|
}),
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -304,8 +304,11 @@ export class SpaceMemberRepo {
|
|||||||
perPage: pagination.limit,
|
perPage: pagination.limit,
|
||||||
cursor: pagination.cursor,
|
cursor: pagination.cursor,
|
||||||
beforeCursor: pagination.beforeCursor,
|
beforeCursor: pagination.beforeCursor,
|
||||||
fields: [{ expression: 'id', direction: 'asc' }],
|
fields: [
|
||||||
parseCursor: (cursor) => ({ id: cursor.id }),
|
{ expression: 'name', direction: 'asc' },
|
||||||
|
{ expression: 'id', direction: 'asc' },
|
||||||
|
],
|
||||||
|
parseCursor: (cursor) => ({ name: cursor.name, id: cursor.id }),
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -152,8 +152,11 @@ export class SpaceRepo {
|
|||||||
perPage: pagination.limit,
|
perPage: pagination.limit,
|
||||||
cursor: pagination.cursor,
|
cursor: pagination.cursor,
|
||||||
beforeCursor: pagination.beforeCursor,
|
beforeCursor: pagination.beforeCursor,
|
||||||
fields: [{ expression: 'id', direction: 'asc' }],
|
fields: [
|
||||||
parseCursor: (cursor) => ({ id: cursor.id }),
|
{ expression: 'name', direction: 'asc' },
|
||||||
|
{ expression: 'id', direction: 'asc' },
|
||||||
|
],
|
||||||
|
parseCursor: (cursor) => ({ name: cursor.name, id: cursor.id }),
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -165,8 +165,11 @@ export class UserRepo {
|
|||||||
perPage: pagination.limit,
|
perPage: pagination.limit,
|
||||||
cursor: pagination.cursor,
|
cursor: pagination.cursor,
|
||||||
beforeCursor: pagination.beforeCursor,
|
beforeCursor: pagination.beforeCursor,
|
||||||
fields: [{ expression: 'id', direction: 'asc' }],
|
fields: [
|
||||||
parseCursor: (cursor) => ({ id: cursor.id }),
|
{ expression: 'name', direction: 'asc' },
|
||||||
|
{ expression: 'id', direction: 'asc' },
|
||||||
|
],
|
||||||
|
parseCursor: (cursor) => ({ name: cursor.name, id: cursor.id }),
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user