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

Add an HTML select element to filter orders by the shipment state #4089

Conversation

willianveiga
Copy link
Contributor

Description
Add an HTML select element to filter orders by the shipment state.

Fixes #4023

Checklist:

  • I have followed Pull Request guidelines
  • I have added a detailed description into each commit message
  • I have updated Guides and README accordingly to this change (if needed)
  • I have added tests to cover this change (if needed)
  • I have attached screenshots to this PR for visual changes (if needed)

@willianveiga willianveiga changed the title Add a select HTML element to filter orders by shipment state. Add an HTML select element to filter orders by the shipment state May 28, 2021
jarednorman
jarednorman approved these changes May 28, 2021
@kennyadsl
Copy link
Member

Spec failures seem legit:

ActionView::Template::Error:
  translation missing: en.shipment_states.backorder

Can you please address this? Thanks!

@willianveiga willianveiga requested a review from jarednorman June 1, 2021 20:36
@willianveiga willianveiga reopened this Jun 1, 2021
@willianveiga
Copy link
Contributor Author

Closed by mistake 🤦

Done, @kennyadsl.

Thanks.

@jarednorman
Copy link
Member

This looks good. Do you mind squashing the commits together?

@willianveiga willianveiga force-pushed the feature/filter-order-by-shipment-status branch 2 times, most recently from 85f06d3 to 238ccb5 Compare June 1, 2021 22:37
@willianveiga
Copy link
Contributor Author

I squashed both commits, @jarednorman.

Thanks.

@jarednorman
Copy link
Member

Thanks! Looks good.

Copy link
Member

@kennyadsl kennyadsl left a comment

Choose a reason for hiding this comment

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

Left one comment, thanks!

@@ -48,6 +48,10 @@
<%= f.text_field :shipments_number_start %>
</div>

<div class="field">
<%= label_tag :q_shipment_state, t('spree.shipment_state') %>
<%= f.select :shipment_state_eq, %i[backorder canceled partial pending ready shipped].map { |s| [t("spree.shipment_states.#{s}"), s] }, { include_blank: true }, { class: "custom-select fullwidth" } %>
Copy link
Member

Choose a reason for hiding this comment

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

I prefer to have a longer line (especially because it's already very long) but without the single-letter variable. Can we please change s into state?

@willianveiga willianveiga force-pushed the feature/filter-order-by-shipment-status branch from 238ccb5 to 15af307 Compare June 7, 2021 21:14
@willianveiga willianveiga requested a review from kennyadsl June 7, 2021 21:45
Copy link
Member

@kennyadsl kennyadsl left a comment

Choose a reason for hiding this comment

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

Thanks!

@kennyadsl kennyadsl merged commit 6c0da5d into solidusio:master Jun 8, 2021
@willianveiga willianveiga deleted the feature/filter-order-by-shipment-status branch June 8, 2021 10:45
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.

Orders: Unfulfilled orders/Shipment state filter missing
3 participants