diff --git a/src/components/Button/Button.vue b/src/components/Button/Button.vue index a6f860f81..8f0deb06b 100644 --- a/src/components/Button/Button.vue +++ b/src/components/Button/Button.vue @@ -69,11 +69,11 @@ function click(e) { const styles = computed(() => ({ // Base - 'inline-flex relative items-center gap-x-1 text-lg-semibold': true, + 'inline-flex relative items-center gap-x-1 ': true, // Button - '': !props.isLink, + 'text-lg-semibold': !props.isLink, // Link (adding border to keep dimensions consistent with button) - 'border-transparent hover:enabled:underline disabled:text-disabled': + 'border-transparent hover:enabled:underline disabled:text-disabled text-lg-medium': props.isLink, // Primary colors 'bg-primary border-transparent text-on-dark hover:bg-hover hover:text-on-dark disabled:bg-disabled disabled:text-disabled': diff --git a/src/components/Table/Table.vue b/src/components/Table/Table.vue index da14b207d..5b373676e 100644 --- a/src/components/Table/Table.vue +++ b/src/components/Table/Table.vue @@ -36,6 +36,7 @@
@@ -43,7 +44,7 @@ diff --git a/src/composables/useCurrentUser.js b/src/composables/useCurrentUser.js index 50627b88a..8b6549275 100644 --- a/src/composables/useCurrentUser.js +++ b/src/composables/useCurrentUser.js @@ -1,3 +1,5 @@ +import {useSubmission} from './useSubmission'; + export const EditorialRoles = [ pkp.const.ROLE_ID_SITE_ADMIN, pkp.const.ROLE_ID_MANAGER, @@ -14,6 +16,29 @@ export function useCurrentUser() { return pkp.currentUser.id; } + function hasCurrentUserAtLeastOneAssignedRoleInStage( + submission, + stageId, + roles = [], + ) { + const {getStageById} = useSubmission(); + const assignedRoleIds = []; + + const stage = getStageById(submission, stageId); + stage.currentUserAssignedRoles.forEach((assignedRoleId) => { + if (!assignedRoleIds.includes(assignedRoleId)) { + assignedRoleIds.push(assignedRoleId); + } + }); + + console.log('hasCurrentUserAtLeastOneAssignedRoleInStage'); + console.log( + assignedRoleIds, + roles.some((role) => assignedRoleIds.includes(role)), + ); + return roles.some((role) => assignedRoleIds.includes(role)); + } + function hasCurrentUserAtLeastOneAssignedRoleInAnyStage( submission, roles = [], @@ -33,6 +58,7 @@ export function useCurrentUser() { return { hasCurrentUserAtLeastOneRole, getCurrentUserId, + hasCurrentUserAtLeastOneAssignedRoleInStage, hasCurrentUserAtLeastOneAssignedRoleInAnyStage, }; } diff --git a/src/managers/FileManager/FileManager.vue b/src/managers/FileManager/FileManager.vue index 41dd24e41..00438bc4b 100644 --- a/src/managers/FileManager/FileManager.vue +++ b/src/managers/FileManager/FileManager.vue @@ -39,20 +39,17 @@ :file="file" > + -
- - {{ action.label }} - -