diff --git a/src/pages/dashboard/composables/useEditorialLogic.js b/src/pages/dashboard/composables/useEditorialLogic.js index 158d8fbb2..c865b491b 100644 --- a/src/pages/dashboard/composables/useEditorialLogic.js +++ b/src/pages/dashboard/composables/useEditorialLogic.js @@ -2,9 +2,8 @@ import {useSubmission} from '@/composables/useSubmission.js'; import {useLocalize} from '@/composables/useLocalize'; import {useDate} from '@/composables/useDate'; import {Actions as ParticipantManagerActions} from '@/managers/ParticipantManager/useParticipantManagerActions'; -import {Actions as WorkflowActions} from '@/pages/workflow/composables/useWorkflowActions'; import {Actions as ReviewerManagerActions} from '@/managers/ReviewerManager/useReviewerManagerActions'; - +import {Actions as FileManagerActions} from '@/managers/FileManager/useFileManagerActions'; const {formatShortDate} = useDate(); const {t} = useLocalize(); @@ -212,7 +211,10 @@ export function useEditorialLogic() { function getEditorialActivityForMySubmissions(submission) { const activeStage = getActiveStage(submission); - if (activeStage.id === pkp.const.WORKFLOW_STAGE_ID_EXTERNAL_REVIEW) { + if ( + activeStage.id === pkp.const.WORKFLOW_STAGE_ID_EXTERNAL_REVIEW || + activeStage.id === pkp.const.WORKFLOW_STAGE_ID_INTERNAL_REVIEW + ) { const activeRound = getCurrentReviewRound(submission); if ( @@ -220,13 +222,23 @@ export function useEditorialLogic() { activeRound.statusId, ) ) { + const fileStage = + activeStage.id === pkp.const.WORKFLOW_STAGE_ID_INTERNAL_REVIEW + ? pkp.const.SUBMISSION_FILE_INTERNAL_REVIEW_REVISION + : pkp.const.SUBMISSION_FILE_REVIEW_REVISION; return [ { component: 'CellSubmissionActivityActionAlert', props: { alert: t('dashboard.revisionRequested'), actionLabel: t('dashboard.submitRevisions'), - actionName: WorkflowActions.UPLOAD_REVISIONS, + actionName: FileManagerActions.FILE_UPLOAD, + actionArgs: { + submissionId: submission.id, + fileStage, + reviewRoundId: activeRound.id, + wizardTitleKey: t('editor.submissionReview.uploadFile'), + }, }, }, ]; diff --git a/src/pages/dashboard/dashboardPageStore.js b/src/pages/dashboard/dashboardPageStore.js index 8a1ef887c..0c3afa199 100644 --- a/src/pages/dashboard/dashboardPageStore.js +++ b/src/pages/dashboard/dashboardPageStore.js @@ -14,6 +14,7 @@ import {useWorkflowActions} from '../workflow/composables/useWorkflowActions'; import {useReviewerManagerActions} from '@/managers/ReviewerManager/useReviewerManagerActions'; import {useDashboardBulkDelete} from './composables/useDashboardBulkDelete'; import {useParticipantManagerActions} from '@/managers/ParticipantManager/useParticipantManagerActions'; +import {useFileManagerActions} from '@/managers/FileManager/useFileManagerActions'; import {useEditorialLogic} from './composables/useEditorialLogic'; import {useReviewActivityLogic} from './composables/useReviewActivityLogic'; @@ -230,7 +231,7 @@ export const useDashboardPageStore = defineComponentStore( const _reviewerManagerActionFns = useReviewerManagerActions(pageInitConfig); const _participantManagerActionsFns = useParticipantManagerActions(pageInitConfig); - + const _fileManagerActionFns = useFileManagerActions(); const {getCurrentPublication} = useSubmission(); function refetchCallback() { @@ -336,6 +337,13 @@ export const useDashboardPageStore = defineComponentStore( ); } + /** + * File Manager actions + */ + function fileUpload(args) { + _fileManagerActionFns.fileUpload(enrichActionArgs(args), refetchCallback); + } + /** * Participants Actions * @@ -459,6 +467,9 @@ export const useDashboardPageStore = defineComponentStore( // Reviewer listing openReviewerForm, + // File manager actions + fileUpload, + // Reviewer manager actions reviewerAddReviewer, reviewerReviewDetails,