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

Promotion start/expiration times #3158

Merged
merged 2 commits into from
Apr 8, 2019
Merged

Promotion start/expiration times #3158

merged 2 commits into from
Apr 8, 2019

Conversation

aldesantis
Copy link
Member

@aldesantis aldesantis commented Apr 2, 2019

Description

Fixes the promotion form in the admin panel to also display the start and expiration times. This allows admins to change the exact time a promotion starts or expires.

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)

@aldesantis aldesantis changed the title Allow admins to edit promotion start and expiration times Promotion start/expiration times Apr 2, 2019
Copy link
Member

@tvdeyen tvdeyen left a comment

Choose a reason for hiding this comment

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

I love that feature, but would like to have a change on the helper

backend/app/views/spree/admin/promotions/_form.html.erb Outdated Show resolved Hide resolved
backend/app/helpers/spree/admin/base_helper.rb Outdated Show resolved Hide resolved
@aldesantis
Copy link
Member Author

@tvdeyen updated! I called the argument with_time instead of your proposed time because I wanted it to be clear that it's a boolean flag and not a time instance you're supposed to pass. Let me know how it looks.

Copy link
Member

@tvdeyen tvdeyen left a comment

Choose a reason for hiding this comment

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

Thanks 👍

Copy link
Contributor

@aitbw aitbw left a comment

Choose a reason for hiding this comment

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

Fantastic work, @aldesantis! 👏

Is it possible for you to rebase against current master? Tests should be fixed by now 🙏

The Spree::Promotion model takes start and expiration times into
account, so there's no reason we shouldn't allow admins to manage
the times when creating/editing a promotion.
Admins can now specify the exact time a promotion starts or expires,
so we also need to display this information in the promotions list.
@aldesantis
Copy link
Member Author

@aitbw done!

Copy link
Contributor

@aitbw aitbw left a comment

Choose a reason for hiding this comment

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

👏

@kennyadsl kennyadsl merged commit 65fc8e5 into solidusio:master Apr 8, 2019
@kennyadsl
Copy link
Member

@aldesantis thanks!

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.

5 participants