Skip to content

Commit

Permalink
Fix save for later issue
Browse files Browse the repository at this point in the history
  • Loading branch information
salmanm2003 authored Nov 18, 2024
1 parent b67a68d commit bad6bf3
Showing 1 changed file with 46 additions and 2 deletions.
48 changes: 46 additions & 2 deletions src/components/Container/SubmissionWizardPage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -418,6 +418,52 @@ export default {
}
},
/**
* Submit the revisions
*/
submitRevisions() {
console.log(this.submitApiUrl);
this.openDialog({
name: 'submitConfirmation',
title: this.i18nSubmit,
message: this.i18nConfirmSubmit,
actions: [
{
label: this.i18nSubmit,
isPrimary: true,
callback: (close) => {
$.ajax({
url: this.submitApiUrl,
context: this,
method: 'POST',
data: {roundId: this.reviewRoundId},
headers: {
'X-Csrf-Token': pkp.currentUser.csrfToken,
'X-Http-Method-Override': 'PUT',
},
error(r) {
if (!r.responseJSON) {
this.ajaxErrorCallback();
} else {
this.errors = r.responseJSON;
}
close();
},
success() {
window.location = this.submissionWizardUrl;
},
});
},
},
{
label: this.t('common.cancel'),
isWarnable: true,
callback: (close) => close(),
},
],
});
},
/**
* Show a pop-up when save for later fails
*/
Expand All @@ -432,7 +478,6 @@ export default {
callback: (close) => close(),
},
],
modalStyle: 'negative',
});
},
Expand Down Expand Up @@ -662,7 +707,6 @@ export default {
callback: (close) => close(),
},
],
modalStyle: 'primary',
});
},
Expand Down

0 comments on commit bad6bf3

Please sign in to comment.