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

Edit order_group_article result in orders screen #255

Merged
merged 3 commits into from
Feb 12, 2014

Conversation

wvengen
Copy link
Member

@wvengen wvengen commented Jan 23, 2014

Following #253, this improves the "sort by ordergroups" and "sort by articles" views, used in orders and balancing and allows in-place editing of the result (when the order is finished but not closed).

The image here is about balancing, but the same applies to viewing an order.

  • update totals after change in "sort by" views
  • allow adding articles - Q: what user-interface approach to use? (see below image)
    • A: postpone
  • Q: should editing of group_order_article results be restricted to balancing?
    • A: no, require finance permission
  • Q: do we need a new role for updating group_order_article result? !=finance !=orders
    • A: no, only allow updating with finance permission

orders_edit_groups

Would this fix #29 as well?

I'm uncertain how to ui design adding an article. The select2 dropdown listbox is used at different places, and I like it. But here it would mean that each and every ordergroup or article would get one - which is a bit too much. This could be fixed by showing the edit boxes only after pressing an "edit" button, which would also add an "add article" selectbox, but I think that is less clear.

Any ideas on this? @JuliusR @robwa @dokterbob?

@@ -7,7 +7,6 @@
//= require bootstrap-datepicker/locales/bootstrap-datepicker.de
//= require bootstrap-datepicker/locales/bootstrap-datepicker.nl
//= require bootstrap-datepicker/locales/bootstrap-datepicker.fr
//= require jquery.observe_field
Copy link
Member Author

Choose a reason for hiding this comment

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

Observe_field doesn't work when elements are replaced by ajax; besides, I needed more control: submit after leaving the delta-input textfield (so that if a user was typing something not recognised as a number, the current value would not be overwritten, and the ajax call returning wouldn't overwrite what he was typing).

@wvengen
Copy link
Member Author

wvengen commented Feb 6, 2014

I'll restrict editing GroupOrderArticle result to the finance permission. If you have it, you can do it in orders and balancing; if you don't, there'll be no edit box (and the put/post would be denied as well, of course).

@wvengen wvengen added this to the 3.3 milestone Feb 7, 2014
@wvengen
Copy link
Member Author

wvengen commented Feb 7, 2014

I got lost in git merge & rebase land. Any ideas on how to cleanup the history would be welcome.

@fsmanuel
Copy link
Contributor

fsmanuel commented Feb 7, 2014

@wvengen because it's a branch and there should be no important forks you can do a rollback to the commit you want. after that your working directory has all the new changes (current state of your files) and you can do a commit with all the changes.

@wvengen
Copy link
Member Author

wvengen commented Feb 7, 2014

Thanks @fsmanuel - what I mean is that I'd like to do an interactive rebase leaving existing commits on master intact. To squash merges in this history. Doing a rebase on master fails, since master has been merged already. But wait a minute, git rebase -i --onto 2b0d4b0ad742378767003442b0b59ad8beb79492 master might actually work.

wvengen added a commit that referenced this pull request Feb 12, 2014
Edit order_group_article result in orders screen
@wvengen wvengen merged commit 0128f72 into foodcoops:master Feb 12, 2014
@wvengen wvengen deleted the feature-orders_group_edit branch February 12, 2014 10:49
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.

Accounting by groups in finance view
2 participants