fix: Draft, Articles, Archived are counted wrong in help-center (#7761)

This commit is contained in:
Sivin Varghese
2023-08-21 12:42:10 +05:30
committed by GitHub
parent 55972cc17a
commit 18235d3fb5
3 changed files with 19 additions and 0 deletions

View File

@@ -189,6 +189,7 @@ export default {
articleId: this.articleSlug,
status: status,
});
this.$emit('update-meta');
this.statusUpdateSuccessMessage(status);
this.closeActionsDropdown();
if (status === this.ARTICLE_STATUS_TYPES.ARCHIVE) {

View File

@@ -209,15 +209,21 @@ export default {
},
onClickAssignAuthor({ id }) {
this.$emit('save-article', { author_id: id });
this.updateMeta();
},
onChangeMetaInput() {
this.saveArticle();
},
onClickArchiveArticle() {
this.$emit('archive-article');
this.updateMeta();
},
onClickDeleteArticle() {
this.$emit('delete-article');
this.updateMeta();
},
updateMeta() {
this.$emit('update-meta');
},
},
};

View File

@@ -13,6 +13,7 @@
@open="openArticleSettings"
@close="closeArticleSettings"
@show="showArticleInPortal"
@update-meta="updateMeta"
/>
<div v-if="isFetching" class="text-center p-normal fs-default h-full">
<spinner size="" />
@@ -31,6 +32,7 @@
@save-article="saveArticle"
@delete-article="openDeletePopup"
@archive-article="archiveArticle"
@update-meta="updateMeta"
/>
<woot-delete-modal
:show.sync="showDeleteConfirmationPopup"
@@ -87,6 +89,9 @@ export default {
selectedPortalSlug() {
return this.$route.params.portalSlug;
},
selectedLocale() {
return this.$route.params.locale;
},
portalLink() {
const slug = this.$route.params.portalSlug;
return buildPortalArticleURL(
@@ -183,6 +188,13 @@ export default {
this.showAlert(this.alertMessage);
}
},
updateMeta() {
const selectedPortalParam = {
portalSlug: this.selectedPortalSlug,
locale: this.selectedLocale,
};
return this.$store.dispatch('portals/show', selectedPortalParam);
},
openArticleSettings() {
this.showArticleSettings = true;
},