Sort employee signatures and approvals by most recently updated

Signed-off-by: Sacha Al Himdani <sacha@getprobo.com>
This commit is contained in:
Sacha Al Himdani
2026-04-03 15:56:07 +02:00
parent b610a19b84
commit 2b377a22e7
6 changed files with 14 additions and 2 deletions

View File

@@ -542,6 +542,10 @@ enum DocumentOrderField
@goEnum(
value: "go.probo.inc/probo/pkg/coredata.DocumentOrderFieldCreatedAt"
)
UPDATED_AT
@goEnum(
value: "go.probo.inc/probo/pkg/coredata.DocumentOrderFieldUpdatedAt"
)
DOCUMENT_TYPE
@goEnum(
value: "go.probo.inc/probo/pkg/coredata.DocumentOrderFieldDocumentType"

View File

@@ -103,6 +103,8 @@ func (d EmployeeDocument) CursorKey(orderBy coredata.DocumentOrderField) page.Cu
switch orderBy {
case coredata.DocumentOrderFieldCreatedAt:
return page.NewCursorKey(d.ID, d.CreatedAt)
case coredata.DocumentOrderFieldUpdatedAt:
return page.NewCursorKey(d.ID, d.UpdatedAt)
case coredata.DocumentOrderFieldTitle:
return page.NewCursorKey(d.ID, d.Title)
case coredata.DocumentOrderFieldDocumentType: