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 role 'finance' for company that can view all orders for the company on manage page #107

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

frediansimanjuntak
Copy link
Contributor

@frediansimanjuntak frediansimanjuntak commented Feb 28, 2019

Description

Add role 'finance' for company, and the user with role finance can see all orders for the company on manage page.

Trello link: https://trello.com/c/m5TUg9Ej

Remarks

  • First, you need add role 'finance' in company roles, with lowercase, because the role name have sensitive case

Testing

  • Add role 'finance' in company
  • Create user or update user with role is finance
  • Login with user have role is finance
  • Then go to /manage or you can click at navbar
  • You can see all orders in that company

Checklist:

  • The code follows the conventions of Rails and this project (eg. naming of routes and variables)
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have tested my code thoroughly
  • The code does not break existing functionality
  • I have added instructions and data required to test the code
  • I have tested the changes on the front-end on Chrome, Firefox and IE

@hschin
Copy link
Member

hschin commented Feb 28, 2019

Why do you remove all the if can? :manager, Spree::Order in the code?

@hschin
Copy link
Member

hschin commented Feb 28, 2019

Also, for finance they need to see all the orders from awaiting approval to shipped and delivered.

@frediansimanjuntak
Copy link
Contributor Author

Why do you remove all the if can? :manager, Spree::Order in the code?

when i add condition with finance the order not showing. so currently i remove it first
i will search how to fix this

@frediansimanjuntak
Copy link
Contributor Author

Also, for finance they need to see all the orders from awaiting approval to shipped and delivered.

okay i will do that also

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.

2 participants