File tree Expand file tree Collapse file tree 1 file changed +17
-3
lines changed
app/preprints/-components/submit/preprint-state-machine Expand file tree Collapse file tree 1 file changed +17
-3
lines changed Original file line number Diff line number Diff line change @@ -213,7 +213,23 @@ export default class PreprintStateMachine extends Component<StateMachineArgs>{
213213 @waitFor
214214 public async onSubmit ( ) : Promise < void > {
215215 this . args . resetPageDirty ( ) ;
216- if ( ! this . isEditFlow ) {
216+
217+ if ( this . isEditFlow ) {
218+ if ( this . preprint . reviewsState !== ReviewsState . ACCEPTED ) {
219+ if ( this . provider . reviewsWorkflow ) {
220+ const reviewAction = this . store . createRecord ( 'review-action' , {
221+ actionTrigger : 'submit' ,
222+ target : this . preprint ,
223+ } ) ;
224+ await reviewAction . save ( ) ;
225+ } else {
226+ this . preprint . isPublished = true ;
227+ await this . preprint . save ( ) ;
228+ }
229+ } else {
230+ await this . preprint . save ( ) ;
231+ }
232+ } else {
217233 if ( this . provider . reviewsWorkflow ) {
218234 const reviewAction = this . store . createRecord ( 'review-action' , {
219235 actionTrigger : 'submit' ,
@@ -224,11 +240,9 @@ export default class PreprintStateMachine extends Component<StateMachineArgs>{
224240 this . preprint . isPublished = true ;
225241 await this . preprint . save ( ) ;
226242 }
227-
228243 }
229244
230245 await this . preprint . reload ( ) ;
231-
232246 await this . router . transitionTo ( 'preprints.detail' , this . provider . id , this . preprint . id ) ;
233247 }
234248
You can’t perform that action at this time.
0 commit comments