Skip to content
Snippets Groups Projects
Commit 8d289589 authored by moon's avatar moon
Browse files

#92: User List and Profile Pages for Maintainers and Admin

parent 8d4db8d7
No related branches found
No related tags found
No related merge requests found
......@@ -103,7 +103,22 @@ export default {
},
{
title: 'Submitted By',
data: 'attributes.submittedBy.data.attributes.username',
data: 'attributes.submittedBy',
className: 'whitespace-normal',
render: function (data, type, row, meta) {
if (data.data) {
return data.data.attributes.username;
} else {
return '';
}
},
fnCreatedCell: (nTd, sData, oData) => {
if(sData) {
// console.log(oData)
// $(nTd).html(`${oData.attributes.submittedBy.data.id}`);
$(nTd).html(`<a class='resource-link' href="/updateuser/${oData.attributes.submittedBy.data.id}">${sData.data.attributes.username}</a>`);
}
},
},
{
title: 'Submitted At',
......
......@@ -161,6 +161,13 @@ export default {
return '';
}
},
fnCreatedCell: (nTd, sData, oData) => {
if(sData) {
// console.log(oData)
// $(nTd).html(`${oData.attributes.submittedBy.data.id}`);
$(nTd).html(`<a class='resource-link' href="/updateuser/${oData.attributes.submittedBy.data.id}">${sData.data.attributes.username}</a>`);
}
},
},
{
title: 'Reviewer',
......
......@@ -443,7 +443,7 @@
</fetch-profile>
<fetch-users
v-if="getRole === 'Administrator'"
v-if="getRole === 'Administrator' || getRole === 'Maintainer' "
:key="'users-' + updatedUsersKey"
>
<template slot-scope="{ response, loading }">
......
......@@ -270,11 +270,14 @@ export default {
const vm = this;
const jwt = vm.jwt;
if(jwt === null) {
vm.$router.push('/login')
} else {
} else if(vm.userRole === 'Maintainer' || vm.userRole === 'Administrator') {
vm.preload();
vm.load(vm.user)
} else {
vm.$router.push('/profile')
}
},
methods: {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment