Skip to content

Commit

Permalink
[UI-LIBRARY][main] #7505 Fix testing regression (#306)
Browse files Browse the repository at this point in the history
* pkp/pkp-lib#7505 Fix testing regression

* pkp/pkp-lib#7505 Change getAndUpdatePublication function
  • Loading branch information
defstat authored Dec 19, 2023
1 parent fa798c7 commit 779060f
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions src/components/ListPanel/contributors/ContributorsListPanel.vue
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,9 @@ export default {
openPreviewModal() {
this.isLoading = true;
this.getAndUpdatePublication();
this.getAndUpdatePublication(() => {
this.isModalOpenedPreview = true;
});
},
/**
Expand Down Expand Up @@ -520,10 +522,10 @@ export default {
cancelOrdering() {
this.$emit('updated:contributors', this.itemsBeforeReordering);
this.getAndUpdatePublication();
this.itemsBeforeReordering = null;
this.isOrdering = false;
this.getAndUpdatePublication();
},
/**
Expand Down Expand Up @@ -636,13 +638,15 @@ export default {
* Update the publication in the background so that
* any author strings are updated
*/
getAndUpdatePublication() {
getAndUpdatePublication(onComplete = () => {}) {
$.ajax({
url: this.publicationApiUrl,
context: this,
type: 'GET',
success(publication) {
this.$emit('updated:publication', publication);
onComplete();
},
complete() {
this.isLoading = false;
Expand Down

0 comments on commit 779060f

Please sign in to comment.