Skip to content

Commit 779060f

Browse files
authored
[UI-LIBRARY][main] #7505 Fix testing regression (#306)
* pkp/pkp-lib#7505 Fix testing regression * pkp/pkp-lib#7505 Change getAndUpdatePublication function
1 parent fa798c7 commit 779060f

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

src/components/ListPanel/contributors/ContributorsListPanel.vue

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -376,7 +376,9 @@ export default {
376376
openPreviewModal() {
377377
this.isLoading = true;
378378
379-
this.getAndUpdatePublication();
379+
this.getAndUpdatePublication(() => {
380+
this.isModalOpenedPreview = true;
381+
});
380382
},
381383
382384
/**
@@ -520,10 +522,10 @@ export default {
520522
cancelOrdering() {
521523
this.$emit('updated:contributors', this.itemsBeforeReordering);
522524
523-
this.getAndUpdatePublication();
524-
525525
this.itemsBeforeReordering = null;
526526
this.isOrdering = false;
527+
528+
this.getAndUpdatePublication();
527529
},
528530
529531
/**
@@ -636,13 +638,15 @@ export default {
636638
* Update the publication in the background so that
637639
* any author strings are updated
638640
*/
639-
getAndUpdatePublication() {
641+
getAndUpdatePublication(onComplete = () => {}) {
640642
$.ajax({
641643
url: this.publicationApiUrl,
642644
context: this,
643645
type: 'GET',
644646
success(publication) {
645647
this.$emit('updated:publication', publication);
648+
649+
onComplete();
646650
},
647651
complete() {
648652
this.isLoading = false;

0 commit comments

Comments
 (0)