Skip to content

Commit

Permalink
feat: Update Portlet instance enablement message - MEED-6916 - Meeds-…
Browse files Browse the repository at this point in the history
  • Loading branch information
boubaker committed Jun 4, 2024
1 parent b05e039 commit cd1d79b
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,8 @@ portlets.instances=instances
portlets.filter.placeholder=Filter by name, description
portlets.label.disableInstance=Disable instance
portlets.label.enableInstance=Enable instance
portlets.status.update.success=Portlet instance status successfully updated
portlets.status.enabled.success=Instance successfully activated
portlets.status.disabled.success=Instance successfully deactivated
portlets.status.update.error=An unknown error occurred while updating instance. Please contact the administrator or try agan later.
portlets.layout.update.success=Portlet instance successfully updated
portlets.layout.update.error=An unknown error occurred while updating instance. Please contact the administrator or try agan later.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ export function init() {
this.$portletInstanceCategoryService.getPortletInstanceCategories()
.then(categories => this.applicationCategories = categories);
this.$portletInstanceService.getPortletInstances()
.then(applications => this.allApplications = applications);
.then(applications => this.allApplications = applications.filter(a => !a.disabled));
this.$brandingService.getBrandingInformation()
.then(data => this.branding = data);
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ export default {
});
})
.then(() => {
this.$root.$emit('alert-message', this.$t('portlets.status.update.success'), 'success');
this.$root.$emit('alert-message', this.enabled && this.$t('portlets.status.disabled.success') || this.$t('portlets.status.enabled.success'), 'success');
})
.catch(() => this.$root.$emit('alert-message', this.$t('portlets.status.update.error'), 'error'))
.finally(() => this.loading = false);
Expand Down

0 comments on commit cd1d79b

Please sign in to comment.