Workers Auto Approve
Bug: User Role Works Inconsistently
As a user I want to only see buttons in the `Job` page that are permitted for use based on my assigned user role.
**Describe the bug**
Custom Vue.js directive (https://vuejs.org/v2/guide/custom-directive.html) found at `src/directives/userRole.js` inconsistently works. Behavior is unpredictable.
Directive is tied to four user roles in the application:
manager: 0, // anyone who creates a job automatically gets this role
evaluator: 1, // person whom a manager assigns to review the completion of a job
worker: 2, // anyone who claims a job, but cannot be the manager or evaluator of that same job
sponsor: 3 // anyone who donates to a job
These roles are applied to the buttons found on the `job` page. Navigate to Jobs, then select a job by clicking "Learn more."
The following buttons (for example) have the directive applied:
Jobe is Done
Steps to reproduce the behavior:
1. In the navigation click "Post a Job"
2. Submit the job
3. Navigate to the newly created job
4. See error - you'll see that even though you created the job the "Claim" button is visible. Alternatively, you may see all buttons in Proof of Work
- After someone creates a job, when they return to that job they cannot claim it or claim payout, they also cannot submit proof, click job is done, approve work or disapprove work as an evaluator. They can only edit a job, sponsor it, or click "payout job."
- If someone is an evaluator they should only be able to sponsor a job, "approve work" or disapprove work"
- If someone is the worker, who claimed the job, they can only, claim payout, submit proof, click "job is done"
Definition of Done
At the moment sometimes the directive works on some buttons and not others.
[ ] Any button in the job page can have the directive applied and it show and hide based on the user's role
Data is stored in Firebase.
The roles and information saved there is accurately updating. Here is an example of schema of a job in Firebase:
This is a UI issue, however, if needed I can provide access to firebase.
Lastly, if using a custom Vue directive is not the best solution, we are open to an alternative solution. What is important is that the UI is clear to the end user that certain buttons are not an option because of their role.
Setup your profile
Tell us a little about you:
No results found for
Type to search skills..
Required [[totalcharacter]] / 240
Are you currently looking for work?
[[ option.string ]]
Setup your profile
Our tools are based on the principles of earn (💰), learn (📖), and meet (💬).
Select the ones you are interested in. You can change it later in your settings.
I'm also an organization manager looking for a great community.
Enable your organization profile
Gitcoin products can help grow community around your brand. Create your tribe, events, and incentivize your community with bounties. Announce new and upcoming events using townsquare. Find top-quality hackers and fund them to work with you on a grant.
These are the organizations you own. If you don't see your organization here please be sure that information is public on your GitHub profile. Gitcoin will sync this information for you.
Select the products you are interested in:
Out of the box you will receive Tribes Lite for your organization. Please provide us with a contact email: