From e59c61b81a7e259ef2cfb886c16a5159102727cd Mon Sep 17 00:00:00 2001 From: Boubaker Khanfir Date: Wed, 23 Oct 2024 09:10:56 +0100 Subject: [PATCH] feat: Allow to display Programs Widget in Space with contextual info - 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. --- .../main/resources/locale/portlet/Challenges_en.properties | 2 ++ .../vue-app/programsOverview/components/ProgramsOverview.vue | 4 +++- .../components/ProgramsOverviewListDrawer.vue | 4 +++- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/portlets/src/main/resources/locale/portlet/Challenges_en.properties b/portlets/src/main/resources/locale/portlet/Challenges_en.properties index b7155f9209..54900e29e0 100644 --- a/portlets/src/main/resources/locale/portlet/Challenges_en.properties +++ b/portlets/src/main/resources/locale/portlet/Challenges_en.properties @@ -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 @@ -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 diff --git a/portlets/src/main/webapp/vue-app/programsOverview/components/ProgramsOverview.vue b/portlets/src/main/webapp/vue-app/programsOverview/components/ProgramsOverview.vue index 67cf93257e..a5b7c76e0a 100644 --- a/portlets/src/main/webapp/vue-app/programsOverview/components/ProgramsOverview.vue +++ b/portlets/src/main/webapp/vue-app/programsOverview/components/ProgramsOverview.vue @@ -91,7 +91,7 @@
fa-puzzle-piece - {{ $t('gamification.overview.programs') }} + {{ spaceId && $t('gamification.overview.space.programs') || $t('gamification.overview.programs') }}
@@ -113,6 +113,7 @@ export default { programs: [], administrators: null, registrationSettings: null, + spaceId: eXo.env.portal.spaceId, hover: false, loading: true, }), @@ -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', diff --git a/portlets/src/main/webapp/vue-app/programsOverview/components/ProgramsOverviewListDrawer.vue b/portlets/src/main/webapp/vue-app/programsOverview/components/ProgramsOverviewListDrawer.vue index 5b0c900a67..80aeb15aa7 100644 --- a/portlets/src/main/webapp/vue-app/programsOverview/components/ProgramsOverviewListDrawer.vue +++ b/portlets/src/main/webapp/vue-app/programsOverview/components/ProgramsOverviewListDrawer.vue @@ -24,7 +24,7 @@ :loading="loading" :right="!$vuetify.rtl">