Skip to content

Commit

Permalink
pkp/pkp-lib#10684 Fix FileManager to respond to changes in props corr…
Browse files Browse the repository at this point in the history
…ectly
  • Loading branch information
jardakotesovec committed Dec 12, 2024
1 parent f22eddb commit dc60930
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions src/managers/FileManager/fileManagerStore.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import {defineComponentStore} from '@/utils/defineComponentStore';

import {ref, computed, watch} from 'vue';
import {ref, computed, watch, toRefs} from 'vue';
import {useFetch} from '@/composables/useFetch';
import {useUrl} from '@/composables/useUrl';
import {useFileManagerActions} from './useFileManagerActions';
Expand All @@ -10,13 +10,13 @@ export const useFileManagerStore = defineComponentStore(
'fileManager',
(props) => {
const submissionId = ref(props.submission.id);

const {namespace, submissionStageId} = toRefs(props);
/**
* Manager configuration
*/
const {managerConfig} = useFileManagerConfig({
namespace: props.namespace,
submissionStageId: props.submissionStageId,
namespace: namespace,
submissionStageId: submissionStageId,
});

/**
Expand Down
4 changes: 2 additions & 2 deletions src/managers/FileManager/useFileManagerConfig.js
Original file line number Diff line number Diff line change
Expand Up @@ -236,8 +236,8 @@ export function useFileManagerConfig({namespace, submissionStageId}) {
const {hasCurrentUserAtLeastOneRole} = useCurrentUser();

const managerConfig = computed(() => {
const config = FileManagerConfigurations[namespace]({
stageId: submissionStageId,
const config = FileManagerConfigurations[namespace.value]({
stageId: submissionStageId.value,
});

const permittedActions = config.actions.filter((action) => {
Expand Down

0 comments on commit dc60930

Please sign in to comment.