fix: user officer users and experiment table filter - #1232
Conversation
…api calls and optimised the handling of search query params
c5e6a2f to
0003da9
Compare
5e8415b to
8ea968b
Compare
|
|
2 similar comments
|
|
|
|
|
|
|
|
…ub.com:UserOfficeProject/user-office-core into SWAP-4929-user-officer-experiment-table-filter
…re into SWAP-4929-user-officer-experiment-table-filter
|
Requesting you to re-review this, as there had been significant changes since the last review. |
|
@TCMeldrum There has been continuous failure in the test case on the stfc side especially on the generalFAPS. I cannot replicate it in my local machine Would it be possible to check it out and let me know the cause of the issue, if possible with the error stacktrace. Thanks |
|
It is beacause in stfcUserDataSource |
| @Field(() => PaginationSortDirection, { nullable: true }) | ||
| public sortDirection?: PaginationSortDirection; | ||
|
|
||
| @Field({ nullable: true }) |
There was a problem hiding this comment.
Do we still need the filter string now we have searchText what is the difference
There was a problem hiding this comment.
Absolutely not. Should be removed.
You are right and thanks a lot for diagnosing it. It is my bad and i have missed to clean it up on stfc datasource. Thanks |
…ub.com:UserOfficeProject/user-office-core into SWAP-4929-user-officer-experiment-table-filter
|
@TCMeldrum Now that the test cases are passing. Requesting you to re-review and approve. |
| userRole, | ||
| subtractUsers, | ||
| orderBy, | ||
| orderDirection = 'desc', |
There was a problem hiding this comment.
question: Is that intended to remove the default value? I would suggest keeping it because if you only specify orderBy, the ordering will not take place, which is a bit unexpecged.
And if this has the default value below we don't need to check if it is set
There was a problem hiding this comment.
Not sure, if i got your suggestion in a right way
But, the changes includes
- Renaming orderBy to sortField and orderDirection to sortDirection.
- sortField has been defaulted to created_at, which loads results based on creation date in the ascending order.
- When sortDirection is not provided, the default sort direction is Desc.
…re into SWAP-4929-user-officer-experiment-table-filter
Description
Persisting the Experiment table filters and searches in the query params, so that refreshing the page retains the data rather than starting from scratch. In addition to that, additional fetching query have been avoided.
Motivation and Context
Improve usability of experiment table
How Has This Been Tested
Manually
Fixes
Changes
In Experiment Table, query params persisting have been implemented .
Depends on
Tests included/Docs Updated?