-
Notifications
You must be signed in to change notification settings - Fork 35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
B 22559 add filtering to rejected tab int #14938
base: integrationTesting
Are you sure you want to change the base?
B 22559 add filtering to rejected tab int #14938
Conversation
…ring-To-Rejected-Tab
Main b 22039 remove lat lon
query.Where("office_users.first_name ILIKE ? AND office_users.status = 'REJECTED' OR office_users.last_name ILIKE ? AND office_users.status = 'REJECTED' OR office_users.email ILIKE ? AND office_users.status = 'REJECTED'", nameSearch, nameSearch, nameSearch) | ||
} | ||
}, | ||
"emails": func(content string) func(*pop.Query) { | ||
return func(query *pop.Query) { | ||
nameSearch := fmt.Sprintf("%%%s%%", content) | ||
query.Where("office_users.email ILIKE ? AND office_users.status = 'REJECTED'", nameSearch) | ||
} | ||
}, | ||
"firstName": func(content string) func(*pop.Query) { | ||
return func(query *pop.Query) { | ||
nameSearch := fmt.Sprintf("%%%s%%", content) | ||
query.Where("office_users.first_name ILIKE ? AND office_users.status = 'REJECTED'", nameSearch) | ||
} | ||
}, | ||
"lastName": func(content string) func(*pop.Query) { | ||
return func(query *pop.Query) { | ||
nameSearch := fmt.Sprintf("%%%s%%", content) | ||
query.Where("office_users.last_name ILIKE ? AND office_users.status = 'REJECTED'", nameSearch) | ||
} | ||
}, | ||
"offices": func(content string) func(*pop.Query) { | ||
return func(query *pop.Query) { | ||
nameSearch := fmt.Sprintf("%%%s%%", content) | ||
query.Where("transportation_offices.name ILIKE ? AND office_users.status = 'REJECTED'", nameSearch) | ||
} | ||
}, | ||
"rejectionReason": func(content string) func(*pop.Query) { | ||
return func(query *pop.Query) { | ||
nameSearch := fmt.Sprintf("%%%s%%", content) | ||
query.Where("office_users.rejection_reason ILIKE ? AND office_users.status = 'REJECTED'", nameSearch) | ||
} | ||
}, | ||
"rejectedOn": func(content string) func(*pop.Query) { | ||
return func(query *pop.Query) { | ||
nameSearch := fmt.Sprintf("%%%s%%", content) | ||
query.Where("office_users.rejected_on ILIKE ? AND office_users.status = 'REJECTED'", nameSearch) | ||
} | ||
}, | ||
"roles": func(content string) func(*pop.Query) { | ||
return func(query *pop.Query) { | ||
nameSearch := fmt.Sprintf("%%%s%%", content) | ||
query.Where("roles.role_name ILIKE ? AND office_users.status = 'REJECTED'", nameSearch) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you add backend test coverage for explicit checks on these cases?
Testing: |
Testing: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
code: looks good.
testing: failed, had some odd behavior. see comments.
B-22559
Summary
This PR adds a filter button/functionality to the rejected users tab on the admin page.
Verification Steps for Reviewers
These are to be checked by a reviewer.
How to test
How to reject office user requests
Frontend
officeApp
class or custommin-width
styling is used to hide any states the would not be visible to the user.Backend
Screenshots
Original Search

With filter
