Skip to content

Commit

Permalink
feat: Allow to display Programs Widget in Space with contextual info -
Browse files Browse the repository at this point in the history
…MEED-7649 - Meeds-io/MIPs#150 (#1760)

This change will alllow to display programs widget with the contextual
information of current space rather than displaying all available
programs in the platform.
  • Loading branch information
boubaker committed Oct 23, 2024
1 parent 3c7dd59 commit 9463aa2
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -428,6 +428,7 @@ search.connector.label.rules=Actions
gamification.overview.send=Send
gamification.overview.badges=Badges
gamification.overview.programs=Programs
gamification.overview.space.programs=Community Programs
gamification.overview.space.weeklyLeaderboard=Community Weekly Leaderboard
gamification.overview.space.monthlyLeaderboard=Community Monthly Leaderboard
gamification.overview.space.quarterlyLeaderboard=Community Quarterly Leaderboard
Expand All @@ -443,6 +444,7 @@ gamification.overview.noWeeklyAchievements=No contributions yet this week
gamification.overview.actions=Actions
gamification.overview.actionsList=Actions
gamification.overview.programsList=Programs
gamification.overview.space.programsList=Community Programs
gamification.overview.leaderboard.drawer.title=Leaderboard
gamification.overview.programsFilter.drawer.title=Filter by program
gamification.overview.userAchievementsList.drawer.title=Contributions
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@
</div>
<div v-else-if="!loading" class="d-flex flex-column align-center justify-center full-width full-height">
<v-icon color="tertiary" size="60">fa-puzzle-piece</v-icon>
<span class="mt-5">{{ $t('gamification.overview.programs') }}</span>
<span class="mt-5">{{ spaceId && $t('gamification.overview.space.programs') || $t('gamification.overview.programs') }}</span>
</div>
</template>
</gamification-overview-widget>
Expand All @@ -113,6 +113,7 @@ export default {
programs: [],
administrators: null,
registrationSettings: null,
spaceId: eXo.env.portal.spaceId,
hover: false,
loading: true,
}),
Expand Down Expand Up @@ -166,6 +167,7 @@ export default {
return this.$programService.getPrograms({
sortBy: this.sortBy || 'modifiedDate',
sortDescending: this.sortBy !== 'title',
spaceId: this.spaceId,
limit: this.limit || 4,
type: 'ALL',
status: 'ENABLED',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
:loading="loading"
:right="!$vuetify.rtl">
<template #title>
{{ $t('gamification.overview.programsList') }}
{{ spaceId && $t('gamification.overview.space.programsList') || $t('gamification.overview.programsList') }}
</template>
<template #titleIcons>
<v-btn
Expand All @@ -51,6 +51,7 @@ export default {
programs: [],
limitToLoad: -1,
loading: false,
spaceId: eXo.env.portal.spaceId,
}),
computed: {
actionsPageURL() {
Expand All @@ -73,6 +74,7 @@ export default {
this.loading = true;
return this.$programService.getPrograms({
limit: this.limitToLoad,
spaceId: this.spaceId,
type: 'ALL',
status: 'ENABLED',
expand: 'countActiveRules',
Expand Down

0 comments on commit 9463aa2

Please sign in to comment.