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

#56: 1. and 3. are done

parent 69d5b751
No related branches found
No related tags found
No related merge requests found
......@@ -61,6 +61,15 @@ export default {
{
title: "Resource ID",
data: "attributes.EntityId",
fnCreatedCell: (nTd, sData, oData) => {
if (oData.attributes.Entity === 'protein') {
$(nTd).html(`<a href='/protein/${sData}'> ${sData}</a>`);
} else if (oData.attributes.Entity === 'condensate') {
$(nTd).html(`<a href='/condensate/${sData}'> ${sData}</a>`);
} else {
$(nTd).html(`${sData}`);
}
}
},
{
title: "Attribute",
......
......@@ -74,7 +74,7 @@
:class="{ active: $route.name === 'updateItems' }"
>
<router-link to="/updateItems">
Update Items
{{ userRole === 'Maintainer'? 'All Submitted Changes' : 'My Submitted Changes' }}
</router-link>
</li>
<li
......
......@@ -60,6 +60,15 @@ export default {
{
title: "Resource ID",
data: "attributes.EntityId",
fnCreatedCell: (nTd, sData, oData) => {
if (oData.attributes.Entity === 'protein') {
$(nTd).html(`<a href='/protein/${sData}'> ${sData}</a>`);
} else if (oData.attributes.Entity === 'condensate') {
$(nTd).html(`<a href='/condensate/${sData}'> ${sData}</a>`);
} else {
$(nTd).html(`${sData}`);
}
},
},
{
title: "Attribute",
......@@ -77,16 +86,15 @@ export default {
title: "Status",
data: "attributes.Status",
fnCreatedCell: (nTd, sData, oData) => {
if(sData==='synced'){
$(nTd).html(`<div class="rounded-full px-4 mr-2 bg-gray-500 text-white p-2 rounded flex items-center justify-center">${sData}</div>`);
} else if(sData==='accepted'){
$(nTd).html(`<div class="rounded-full px-4 mr-2 bg-green-500 text-white p-2 rounded flex items-center justify-center">${sData}</div>`);
}else if(sData==='rejected'){
$(nTd).html(`<div class="rounded-full px-4 mr-2 bg-red-500 text-white p-2 rounded flex items-center justify-center">${sData}</div>`);
}else if(sData==='requested'){
$(nTd).html(`<div class="rounded-full px-4 mr-2 bg-yellow-500 text-white p-2 rounded flex items-center justify-center">${sData}</div>`);
}
if (sData === 'synced') {
$(nTd).html(`<div class="rounded-full px-4 mr-2 bg-gray-500 text-white p-2 rounded flex items-center justify-center">${sData}</div>`);
} else if (sData === 'accepted') {
$(nTd).html(`<div class="rounded-full px-4 mr-2 bg-green-500 text-white p-2 rounded flex items-center justify-center">${sData}</div>`);
} else if (sData === 'rejected') {
$(nTd).html(`<div class="rounded-full px-4 mr-2 bg-red-500 text-white p-2 rounded flex items-center justify-center">${sData}</div>`);
} else if (sData === 'requested') {
$(nTd).html(`<div class="rounded-full px-4 mr-2 bg-yellow-500 text-white p-2 rounded flex items-center justify-center">${sData}</div>`);
}
},
},
{
......
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