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

[#161789] Access List Enhancements #3983

Merged
merged 15 commits into from
Jan 26, 2024

Conversation

LeticiaErrandonea
Copy link
Contributor

Release Notes

  • Add search feature to product Access List tab.
  • Change page size to 50 for results in Product Access List tab.

Screenshot

image image image

Additional Context

Optional. Feel free to add/modify additional headers as appropriate, e.g. "Refactorings", "Concerns".

Copy link
Contributor

@giladshanan giladshanan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work - just some minor changes and questions

app/controllers/product_users_controller.rb Outdated Show resolved Hide resolved
app/views/product_users/_users_results.html.haml Outdated Show resolved Hide resolved
app/assets/javascripts/_common.js Outdated Show resolved Hide resolved
app/views/product_users/index.html.haml Outdated Show resolved Hide resolved
app/assets/javascripts/_common.js Outdated Show resolved Hide resolved
app/views/product_users/index.html.haml Outdated Show resolved Hide resolved
app/views/product_users/index.html.haml Show resolved Hide resolved
app/assets/javascripts/_common.js Outdated Show resolved Hide resolved
app/views/product_users/_users_results.html.haml Outdated Show resolved Hide resolved
app/views/product_users/index.html.haml Show resolved Hide resolved
app/views/product_users/index.html.haml Outdated Show resolved Hide resolved
Copy link
Contributor

@giladshanan giladshanan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@LeticiaErrandonea I left some suggestions for reorganizing the code here - please let me know if they are clear enough or not. It may be easier to talk through in real time

app/assets/javascripts/_common.js Outdated Show resolved Hide resolved
app/views/product_users/index.html.haml Outdated Show resolved Hide resolved
app/views/product_users/index.html.haml Outdated Show resolved Hide resolved
app/views/product_users/_users_results.html.haml Outdated Show resolved Hide resolved
Copy link
Contributor

@giladshanan giladshanan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@LeticiaErrandonea a couple more small questions for you, almost there!

def search
@product_users = all_product_users(params[:search]).paginate(page: params[:page], per_page: USERS_PER_PAGE)

@search_action_performed = params[:search]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's called this @search_term since we're not using the boolean any more

- if @product.has_product_access_groups?
= form_for @product, url: [current_facility, @product, :update_restrictions], method: :put do |f|
= render "table", f: f
= f.submit text("update", plural_label: ProductAccessGroup.model_name.human.pluralize),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this translation still work in the new partial?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch!

@@ -20,22 +20,4 @@
= text("import_button")
%span{ style:"display:none" }= f.file_field :file, onchange: "form.submit()"

- if @product_users.nil?
- elsif @product_users.empty?
%p.notice= text("none")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think there's an entry for this in config/locales/views/admin/en.product_users.yml:7 that can be removed now

Copy link
Contributor

@giladshanan giladshanan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎉

@LeticiaErrandonea LeticiaErrandonea merged commit baca9bf into master Jan 26, 2024
3 checks passed
@LeticiaErrandonea LeticiaErrandonea deleted the 161789-access_list_enhancements branch January 26, 2024 20:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants