mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-01-09 00:49:07 +08:00
Merge pull request #7386 from aignatov-bio/ai-sci-10538-small-fixes-access-and-experiment
Fix access modal all role and experiment card [SCI-10538][SCI-10539]
This commit is contained in:
commit
eb41e25e8a
3 changed files with 8 additions and 8 deletions
|
@ -1,5 +1,5 @@
|
|||
<template>
|
||||
<div class="px-3 pt-3 pb-4 rounded border-solid border border-sn-gray flex flex-col h-56"
|
||||
<div class="px-3 pt-3 pb-4 rounded border-solid border border-sn-gray flex flex-col"
|
||||
:class="{ 'bg-sn-light-grey': dtComponent.currentViewMode === 'archived', [cardMinWidth]: true}">
|
||||
<div class="flex items-center gap-4 mb-2">
|
||||
<div class="sci-checkbox-container">
|
||||
|
@ -16,7 +16,7 @@
|
|||
<a :href="params.urls.show"
|
||||
:title="params.name"
|
||||
:class="{'pointer-events-none text-sn-grey': !params.urls.show}"
|
||||
class="font-bold mb-auto text-sn-blue hover:no-underline line-clamp-2 hover:text-sn-blue h-10">
|
||||
class="font-bold mb-4 shrink-0 text-sn-blue hover:no-underline line-clamp-2 hover:text-sn-blue h-10">
|
||||
{{ params.name }}
|
||||
</a>
|
||||
<div class="flex gap-4 mb-2.5">
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<template>
|
||||
<div v-if="!params.folder"
|
||||
:class="{ 'bg-sn-light-grey': dtComponent.currentViewMode === 'archived', [cardMinWidth]: true }"
|
||||
class="px-3 pt-3 pb-4 rounded border-solid border border-sn-gray flex flex-col h-56" >
|
||||
class="px-3 pt-3 pb-4 rounded border-solid border border-sn-gray flex flex-col" >
|
||||
<div class="flex items-center gap-4 mb-2">
|
||||
<div class="sci-checkbox-container">
|
||||
<input
|
||||
|
@ -17,7 +17,7 @@
|
|||
<a :href="params.urls.show"
|
||||
:title="params.name"
|
||||
:class="{'pointer-events-none text-sn-grey': !params.urls.show}"
|
||||
class="font-bold mb-4 text-sn-blue hover:no-underline line-clamp-3 hover:text-sn-blue h-[60px]">
|
||||
class="font-bold mb-4 text-sn-blue shrink-0 hover:no-underline line-clamp-3 hover:text-sn-blue h-[60px]">
|
||||
{{ params.name }}
|
||||
</a>
|
||||
<div class="grid gap-x-2 gap-y-3 grid-cols-[90px_auto] mt-auto text-xs">
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
<MenuDropdown
|
||||
v-if="params.object.top_level_assignable && params.object.urls.update_access"
|
||||
class="ml-auto"
|
||||
:listItems="rolesFromatted"
|
||||
:listItems="rolesFromatted(default_role)"
|
||||
:btnText="this.roles.find((role) => role[0] == default_role)[1]"
|
||||
:position="'right'"
|
||||
:caret="true"
|
||||
|
@ -59,7 +59,7 @@
|
|||
<MenuDropdown
|
||||
v-if="!userAssignment.attributes.last_owner && params.object.urls.update_access && !(userAssignment.attributes.current_user && userAssignment.attributes.inherit_message)"
|
||||
class="ml-auto"
|
||||
:listItems="rolesFromatted(userAssignment)"
|
||||
:listItems="rolesFromatted(userAssignment.attributes.user_role.id)"
|
||||
:btnText="userAssignment.attributes.user_role.name"
|
||||
:position="'right'"
|
||||
:caret="true"
|
||||
|
@ -140,7 +140,7 @@ export default {
|
|||
this.$emit('usersReloaded');
|
||||
});
|
||||
},
|
||||
rolesFromatted(userAssignment = null) {
|
||||
rolesFromatted(activeRoleId = null) {
|
||||
let roles = [];
|
||||
|
||||
if (!this.params.object.top_level_assignable) {
|
||||
|
@ -157,7 +157,7 @@ export default {
|
|||
emit: 'setRole',
|
||||
text: role[1],
|
||||
params: role[0],
|
||||
active: (userAssignment?.attributes?.user_role?.id === role[0])
|
||||
active: (activeRoleId === role[0])
|
||||
}
|
||||
)));
|
||||
|
||||
|
|
Loading…
Reference in a new issue