Skip to content

Conversation

sinejespersen
Copy link
Contributor

Link to ticket

https://leantime.itkdev.dk/TimeTable/TimeTable?showTicketModal=5276#/tickets/showTicket/4905
#283

Description

  • Add hook that fetches all data
  • Use hook in tables
  • Rewrite mapData as it was impossible to remove items
  • Add map-to-ids.js helper
  • Remove <PaginationButton
  • Clean up translations a bit

Screenshot of the result

🖼️

@sinejespersen sinejespersen force-pushed the feature/4905-rewrite-get-data-to-fix-bug branch from 913a396 to 47e3684 Compare September 9, 2025 11:36
@sinejespersen sinejespersen requested a review from tuj September 10, 2025 07:15
@sinejespersen sinejespersen self-assigned this Sep 10, 2025
@sinejespersen sinejespersen added the bug Something isn't working label Sep 10, 2025
@sinejespersen sinejespersen marked this pull request as draft September 10, 2025 07:15
@sinejespersen sinejespersen removed the request for review from tuj September 10, 2025 07:16
@sinejespersen sinejespersen force-pushed the feature/4905-rewrite-get-data-to-fix-bug branch 2 times, most recently from da915d0 to f606afc Compare September 10, 2025 11:18
@sinejespersen sinejespersen marked this pull request as ready for review September 10, 2025 11:34
@sinejespersen sinejespersen requested a review from tuj September 10, 2025 11:34
apiCall({
...params,
page,
itemsPerPage: 10,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The max items per page is 30: https://github.com/os2display/display-api-service/blob/develop/config/packages/api_platform.yaml#L11
Let's fetch as many results as possible when fetching all.


totalItems = hydraTotalItems;
fetchedItems = fetchedItems.concat(itemsWithOriginalArgs);
page++;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of page++ iteration you can use the
"hydra:next"
When it is not set, there are no more pages.

Screenshot 2025-09-12 at 07 44 21

@tuj tuj added this to the 3.0.0 milestone Sep 12, 2025
@sinejespersen sinejespersen force-pushed the feature/4905-rewrite-get-data-to-fix-bug branch from f606afc to 1c8560a Compare September 17, 2025 08:31
@sinejespersen sinejespersen requested a review from tuj September 17, 2025 09:12
@tuj tuj merged commit abb1d26 into release/3.0.0 Sep 17, 2025
17 checks passed
@tuj tuj deleted the feature/4905-rewrite-get-data-to-fix-bug branch September 17, 2025 10:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants