-
Notifications
You must be signed in to change notification settings - Fork 120
Bookings: Update service/event filter to search by name only #16306
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
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -235,9 +235,16 @@ private extension ProductStore { | |
| do { | ||
| let products: [Product] | ||
| switch filter { | ||
| case .all: | ||
| case .all, .name: | ||
| let searchFields: [ProductSearchField] = { | ||
| if filter == .name { | ||
|
||
| return [.name] | ||
| } | ||
| return [] | ||
| }() | ||
| products = try await remote.searchProducts(for: siteID, | ||
| keyword: keyword, | ||
| searchFields: searchFields, | ||
| pageNumber: pageNumber, | ||
| pageSize: pageSize, | ||
| stockStatus: stockStatus, | ||
|
|
||
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.
I know you've only updated the mapping here, but the documentation for this function seems to lag, as it still says it searches in "name, description, and short_description". Could you please update it?
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.
Updated in 1414442.