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

Create custom orders index component for solidus_legacy_promotions #5779

Merged
merged 1 commit into from
Jun 7, 2024

Conversation

mamhoff
Copy link
Contributor

@mamhoff mamhoff commented Jun 6, 2024

The new admin allows orders to be filtered by promotion name. However, with the legacy promotion system extracted into an extension, we can't rely on Spree::Promotion to exist in solidus_admin. In order to get around this issue, we create a new index component for the admin orders page that includes the filter, and register it in an initializer.

This also adds a spec for filtering by promotion name.

@mamhoff mamhoff force-pushed the legacy-promotions-orders-index branch from d29d00b to 972e89f Compare June 6, 2024 14:36
Copy link

codecov bot commented Jun 6, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 88.88%. Comparing base (ea09d7e) to head (79c1195).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #5779   +/-   ##
=======================================
  Coverage   88.87%   88.88%           
=======================================
  Files         711      712    +1     
  Lines       16885    16892    +7     
=======================================
+ Hits        15007    15014    +7     
  Misses       1878     1878           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@kennyadsl
Copy link
Member

It's wonderful seeing this used. cc @elia @rainerdema 👏 And thanks @mamhoff!

@mamhoff mamhoff marked this pull request as ready for review June 6, 2024 14:55
@mamhoff mamhoff requested a review from a team as a code owner June 6, 2024 14:55
The new admin allows orders to be filtered by promotion name. However,
with the legacy promotion system extracted into an extension, we can't
rely on `Spree::Promotion` to exist in `solidus_admin`. In order to get
around this issue, we create a new index component for the admin orders
page that includes the filter, and register it in an initializer.

This also adds a spec for filtering by promotion name.
@mamhoff mamhoff force-pushed the legacy-promotions-orders-index branch from 972e89f to 79c1195 Compare June 7, 2024 07:16
@kennyadsl kennyadsl merged commit dc780f6 into solidusio:main Jun 7, 2024
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants