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
Hide users with no completed orders from a hub's customers list #10704
Merged
filipefurtad0
merged 12 commits into
openfoodfoundation:master
from
abdellani:hide-customers-with-no-completed-orders
Jun 30, 2023
Merged
Hide users with no completed orders from a hub's customers list #10704
filipefurtad0
merged 12 commits into
openfoodfoundation:master
from
abdellani:hide-customers-with-no-completed-orders
Jun 30, 2023
Commits on Jun 15, 2023
-
use Customer#visible on the customers listing endpoints
Update app/models/customer.rb Co-authored-by: Maikel <maikel@email.org.au> Update spec/models/customer_spec.rb Co-authored-by: Maikel <maikel@email.org.au> Update spec/models/customer_spec.rb Co-authored-by: Maikel <maikel@email.org.au> authorize created_manually field to be set on APIv1
Configuration menu - View commit details
-
Copy full SHA for ebc3073 - Browse repository at this point
Copy the full SHA ebc3073View commit details -
Configuration menu - View commit details
-
Copy full SHA for 608ff05 - Browse repository at this point
Copy the full SHA 608ff05View commit details -
Simplify and speed-up customers migration
This reduces the migration run time from 9.6 seconds to 0.16 seconds on a production database. * Simplify model naming. * Remove unnecessary model code. * Use Rails `missing` scope for efficient simplicity. * Add `down` method for rollback instead of running `change` again.
Configuration menu - View commit details
-
Copy full SHA for 9910d10 - Browse repository at this point
Copy the full SHA 9910d10View commit details -
Configuration menu - View commit details
-
Copy full SHA for 107b17a - Browse repository at this point
Copy the full SHA 107b17aView commit details -
Configuration menu - View commit details
-
Copy full SHA for 298ae8f - Browse repository at this point
Copy the full SHA 298ae8fView commit details -
Configuration menu - View commit details
-
Copy full SHA for 22a6861 - Browse repository at this point
Copy the full SHA 22a6861View commit details -
Configuration menu - View commit details
-
Copy full SHA for ebebcf7 - Browse repository at this point
Copy the full SHA ebebcf7View commit details -
Configuration menu - View commit details
-
Copy full SHA for 9bd6615 - Browse repository at this point
Copy the full SHA 9bd6615View commit details -
Remove unnecessary writes on customer creation
The form only submits enterprise id and email address. We don't need to assign any other attributes.
Configuration menu - View commit details
-
Copy full SHA for a655d3d - Browse repository at this point
Copy the full SHA a655d3dView commit details -
The API endpoint merges the created_manually flag in the params already. No need to write it separately.
Configuration menu - View commit details
-
Copy full SHA for 75cce8b - Browse repository at this point
Copy the full SHA 75cce8bView commit details -
Remove NULL possibility from customer flag
It should only be true or false. This was flagged by Rubocop. I also added another Rubocop suggestion and combined two migrations because they are related.
Configuration menu - View commit details
-
Copy full SHA for a46917a - Browse repository at this point
Copy the full SHA a46917aView commit details -
Configuration menu - View commit details
-
Copy full SHA for d195882 - Browse repository at this point
Copy the full SHA d195882View commit details
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.