Skip to content
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

Commits on Jun 15, 2023

  1. 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
    abdellani authored and mkllnk committed Jun 15, 2023
    Configuration menu
    Copy the full SHA
    ebc3073 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    608ff05 View commit details
    Browse the repository at this point in the history
  3. 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.
    mkllnk committed Jun 15, 2023
    Configuration menu
    Copy the full SHA
    9910d10 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    107b17a View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    298ae8f View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    22a6861 View commit details
    Browse the repository at this point in the history
  7. Remove useless code

    mkllnk committed Jun 15, 2023
    Configuration menu
    Copy the full SHA
    ebebcf7 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    9bd6615 View commit details
    Browse the repository at this point in the history
  9. Remove unnecessary writes on customer creation

    The form only submits enterprise id and email address. We don't need to
    assign any other attributes.
    mkllnk committed Jun 15, 2023
    Configuration menu
    Copy the full SHA
    a655d3d View commit details
    Browse the repository at this point in the history
  10. Simplify customer code

    The API endpoint merges the created_manually flag in the params already.
    No need to write it separately.
    mkllnk committed Jun 15, 2023
    Configuration menu
    Copy the full SHA
    75cce8b View commit details
    Browse the repository at this point in the history
  11. 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.
    mkllnk committed Jun 15, 2023
    Configuration menu
    Copy the full SHA
    a46917a View commit details
    Browse the repository at this point in the history
  12. Use builtin Rails method

    dacook committed Jun 15, 2023
    Configuration menu
    Copy the full SHA
    d195882 View commit details
    Browse the repository at this point in the history