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

[Admin] Automatically check edited return items in RMA form #3904

Merged

Conversation

spaghetticode
Copy link
Member

This feature got lost with #3565. It automatically checks rows where the admin changes something, under the assumption that, if a value is changed, then the user means to include the row into the RMA/return.

An integration spec is added to properly track this feature.

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)

@spaghetticode spaghetticode self-assigned this Jan 20, 2021
@spaghetticode spaghetticode force-pushed the spaghetticode/autocheck-return-items branch from 970742a to 05851c8 Compare January 20, 2021 11:57
@@ -4,6 +4,10 @@ Spree.Views.Tables.ReturnItems = Backbone.View.extend({
var tfoot = document.createElement('tfoot')
new Spree.Views.Tables.SelectableTable.SumReturnItemAmount({el: tfoot, model: this.model});
this.$el.append(tfoot);

this.$el.find('input, select').not('.add-item').on('change', function(e) {
$(this).closest('tr').find('input.add-item').prop('checked', true).change();

Choose a reason for hiding this comment

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

Expected line break before .change newline-per-chained-call

Copy link
Member

@aldesantis aldesantis left a comment

Choose a reason for hiding this comment

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

@spaghetticode thanks, looking good. The only comment I have is that the PR title/commit message could maybe describe what is being changed a bit better — it isn't 100% clear that this is affecting the RMA flow.

Copy link
Member

@jarednorman jarednorman left a comment

Choose a reason for hiding this comment

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

I like this change.

@kennyadsl kennyadsl added this to the 2.11 milestone Jan 21, 2021
@kennyadsl kennyadsl added Needs Backport changelog:solidus_backend Changes to the solidus_backend gem labels Jan 21, 2021
@spaghetticode spaghetticode changed the title [Admin] Automatically check edited line items [Admin] Automatically check edited return items in RMA form Jan 21, 2021
This feature got lost with solidusio#3565. It automatically checks rows
where the admin changes something, under the assumption that,
if a value is changed, then the user means to include the row
into the RMA/return.

An integration spec is added to properly track this feature.
@spaghetticode spaghetticode force-pushed the spaghetticode/autocheck-return-items branch from 05851c8 to 3c5e610 Compare January 21, 2021 09:01
@kennyadsl
Copy link
Member

Merging, the only failing spec is already addressed in master.

@kennyadsl kennyadsl merged commit 0f63411 into solidusio:master Jan 28, 2021
@kennyadsl kennyadsl deleted the spaghetticode/autocheck-return-items branch January 28, 2021 15:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changelog:solidus_backend Changes to the solidus_backend gem
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants