-
Notifications
You must be signed in to change notification settings - Fork 5
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
Access update #100
Access update #100
Conversation
client/src/views/Admin/EditUser.vue
Outdated
const confirmation = confirm( | ||
`Are you sure you want to change your access level to a ${oppositeRole}?` | ||
); | ||
if(!confirmation) return; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is good!
But it will give a very generic prompt, could you do something that warns the admin if she is trying to downgrade herself
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also if possible could you make a separate PR for the Google Analytics addition
I'll be bit easier that way
client/src/views/Admin/EditUser.vue
Outdated
computed: { | ||
...getters, | ||
adminInfo(){ | ||
return this.user | ||
} | ||
}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks a little cryptic
I'd say just do ...getters
in the methods and use the user()
method
The current one is giving me an error adminInfo is not defined
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ya exactly i tried that, but the problem I got when using ...getters
in the methods was, the keyword user
whenever used afterwards then address user
from the ...getters
so I thought using it in computed and then calling a function might work.
So should I change the user variable name in the template for it to work?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok I beleive the error simply is that user
is not a variable it is a method user()
try replacing it and see if it works
I haven't tried it
Ok I will make a new PR for Google Analytics. |
No description provided.