Skip to content

Time entries pagination #192

@juanultimate

Description

@juanultimate

The reports page is going to show a huge quantity of data, so we need to think about paginating this data. The backend should modify the time-entries endpoint so that it can return only certain data.

Acceptance criteria

  • Create a new GET time-entries/paginated endpoint.

  • The GET time-entries/paginated receives the following query parameters:

  1. length (number): The number of rows the endpoint should return
  2. start: ( number): The number of rows to be removed from the query. ( aka offset)
  3. search (string): A string query to be used as a data filter.
  • The GET time-entries/paginated returns the following body:
{"recordsTotal":57,"recordsFiltered":1,"data":[{running: true, owner_id: "dd76e5d6-3949-46fd-b418-f15bf7c354fa", project_name: "Time Tracker",…}]}

where:
recordsTotal: Total number of entries
recordsFiltered: Number of entries returned by the endpoint
data: the entry list

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions