bcgov / PIMS

Property Inventory Management System
https://pims.gov.bc.ca
Apache License 2.0
47 stars 43 forks source link

PIMS-1743: Server Side Pagination #2457

Closed GrahamS-Quartech closed 3 months ago

GrahamS-Quartech commented 3 months ago

šŸŽÆ Summary

[PIMS-1743](https://apps.itsm.gov.bc.ca/jira/browse/PIMS-1743) * GET endpoint can now take an additional sorting key to specify a relation to sort on in addition to the actual property name. * The options provided to the where section of TypeORM's find were changed to be an array (this constructs the query with OR instead of AND) * Added helper methods to make it easier to add parameters to that array in a more generic way. Expects the operator strings provided by MUI's filtering model. * FilterSearchDataGrid now expects an api call as a parameter (dataSource). It uses this to query the database when changing the pagination, sorting, or filtering mode of the data grid. ## šŸ”° Checklist - [x] I have read and agree with the following checklist and am following the guidelines in our [Code of Conduct](CODE_OF_CONDUCT.md) document. > - I have performed a self-review of my code. > - I have commented my code, particularly in hard-to-understand areas. > - I have made corresponding changes to the documentation where required. > - I have tested my changes to the best of my ability. > - My changes generate no new warnings.
github-actions[bot] commented 3 months ago

šŸš€ Deployment Information

The Express API Image has been built with the tag: 2457. Please make sure to utilize this specific tag when promoting these changes to the TEST and PROD environments during the API deployment. For more updates please monitor Image Tags Page on Wiki.

codeclimate[bot] commented 3 months ago

Code Climate has analyzed commit 156373d0 and detected 1 issue on this pull request.

Here's the issue category breakdown:

Category Count
Complexity 1

The test coverage on the diff in this pull request is 71.3% (50% is the threshold).

This pull request will bring the total coverage in the repository to 93.7%.

View more on Code Climate.

GrahamS-Quartech commented 3 months ago

The pre-set filter dropdowns don't appear to work anymore. The filter is set, but it's not affecting the results. This could be because the filter on IsDisabled doesn't seem to be working in general.

This should work now, the isDisabled filter is present on agencies and admin areas at least.

The counts in the table headers don't update. (Always 0)

I've made it so that this is just hidden when in server side pagination mode, at least for now.