Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pkp/pkp-lib#10674 Bring back the Submit Revision button on Author das… #479

Merged
merged 1 commit into from
Jan 8, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 16 additions & 4 deletions src/pages/dashboard/composables/useEditorialLogic.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down Expand Up @@ -212,21 +211,34 @@ 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 (
[pkp.const.REVIEW_ROUND_STATUS_REVISIONS_REQUESTED].includes(
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'),
},
},
},
];
Expand Down
13 changes: 12 additions & 1 deletion src/pages/dashboard/dashboardPageStore.js
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down Expand Up @@ -227,7 +228,7 @@ export const useDashboardPageStore = defineComponentStore(
const _reviewerManagerActionFns = useReviewerManagerActions(pageInitConfig);
const _participantManagerActionsFns =
useParticipantManagerActions(pageInitConfig);

const _fileManagerActionFns = useFileManagerActions();
const {getCurrentPublication} = useSubmission();

function refetchCallback() {
Expand Down Expand Up @@ -332,6 +333,13 @@ export const useDashboardPageStore = defineComponentStore(
);
}

/**
* File Manager actions
*/
function fileUpload(args) {
_fileManagerActionFns.fileUpload(enrichActionArgs(args), refetchCallback);
}

/**
* Participants Actions
*
Expand Down Expand Up @@ -453,6 +461,9 @@ export const useDashboardPageStore = defineComponentStore(
// Reviewer listing
openReviewerForm,

// File manager actions
fileUpload,

// Reviewer manager actions
reviewerAddReviewer,
reviewerReviewDetails,
Expand Down
Loading