Skip to content

Commit

Permalink
feat: Add Create Program Application - MEED-2804 - Meeds-io/MIPs#100 (#…
Browse files Browse the repository at this point in the history
…1279)

This change will introduce a enw application to display 'Create Program
Button' application. In addition, this change will review the default
placeholder of Gamification Widgets to display simplified Label with
Icon.
  • Loading branch information
boubaker authored and exo-swf committed Nov 10, 2023
1 parent b07cc74 commit 53d5bd1
Show file tree
Hide file tree
Showing 7 changed files with 56 additions and 65 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -253,8 +253,8 @@ program.form.programColor.RuleExampleDescription=Here is the description when ex
program.form.programColor.programColorAlreadyUsed=Color already used by another program. Please select another one.
program.form.errorSavingProgram=An error occurred while saving your program. Please contact administrators.

program.createProgramsTitle=List incentive programs as open so visitors can start participating
program.createProgram=Manage Programs
program.createProgramsTitle=Create incentive programs and start rewarding your users
program.createProgram=Create program

rule.form.translateTitle=Add translations to title
rule.form.translateDescription=Add translations to description
Expand Down Expand Up @@ -389,9 +389,6 @@ gamification.overview.label.firstAnnounecement=Be the first to do it
gamification.overview.label.actionsAvailable=Available Actions
search.connector.label.rules=Actions

gamification.overview.programsOverviewSummary=Let's do it smoothly by {0}doing this program{1}
gamification.overview.topChallengersSummary=Challenge yourself by taking actions and be known
gamification.overview.challengesOverviewSummary=Don't rush and {0}start checking these actions{1}
gamification.overview.programs=Programs
gamification.overview.leaderboard=Leaderboard
gamification.overview.actions=Actions
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -389,19 +389,11 @@ gamification.overview.label.firstAnnounecement=A vous de participer
gamification.overview.label.actionsAvailable=Actions disponibles
search.connector.label.rules=Actions

gamification.overview.programs=Programmes
gamification.overview.weeklyLeaderboard=Classement hebdomadaire
gamification.overview.actions=Actions
gamification.overview.actionsList=Actions pour la sélection
gamification.overview.programsList=Liste des programmes
gamification.overview.leaderboard.drawer.title=Classement
gamification.overview.programsFilter.drawer.title=Filtrer par programme
gamification.overview.userAchievementsList.drawer.title=Liste des accomplissements
gamification.overview.reputationKudosSummary={0}Félicitez vos pairs{1} pour les encourager à contribuer et à partager davantage
gamification.overview.reputationKudosSummaryForExternal=Envoyez des kudos aux autres membres de votre communauté pour les encourager à participer davantage !
gamification.overview.reputationBadgesSummary=Obtenez des badges liés à vos actions et valorisez vos compétences
gamification.overview.firstActionsToDoTitle=Actions à faire en premier
gamification.overview.endingActionsTitle=Bientôt terminé
gamification.overview.reputationKudosSummary={0}F\u00E9licitez vos pairs{1} pour les encourager \u00E0 contribuer et \u00E0 partager davantage
gamification.overview.reputationKudosSummaryForExternal=Envoyez des kudos aux autres membres de votre communaut\u00E9 pour les encourager \u00E0 participer davantage !
gamification.overview.reputationBadgesSummary=Obtenez des badges li\u00E9s \u00E0 vos actions et valorisez vos comp\u00E9tences
gamification.overview.firstActionsToDoTitle=Actions \u00E0 faire en premier
gamification.overview.endingActionsTitle=Bient\u00F4t termin\u00E9
gamification.overview.availableActionsTitle=Actions disponibles
gamification.overview.upcomingActionsTitle=Actions à venir
gamification.hiddenProgram=Programme caché
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
*/
import './initComponents.js';

const lang = eXo?.env?.portal?.language || 'en';
const lang = eXo && eXo.env && eXo.env.portal && eXo.env.portal.language || 'en';
const urls = [
`${eXo.env.portal.context}/${eXo.env.portal.rest}/i18n/bundle/locale.portlet.Challenges-${lang}.json`
];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -475,13 +475,6 @@ export default {
window.location.hash = '';
}
},
spaceId() {
this.openSpace = null;
if (this.spaceId) {
this.$spaceService.getSpaceById(this.spaceId)
.then(space => this.openSpace = (space?.subscription === 'open'));
}
},
},
created() {
this.$root.$on('program-form-open', this.open);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,20 +44,20 @@
:key="index"
class="flex-grow-1" />
</template>
<gamification-program-list-drawer
ref="listDrawer" />
</div>
<gamification-overview-widget-row v-else-if="!loading" class="my-auto">
<template #content>
<div class="d-flex flex-column align-center justify-center">
<v-icon color="secondary" size="54">fa-puzzle-piece</v-icon>
<span class="subtitle-1 font-weight-bold mt-7">{{ $t('gamification.overview.programs') }}</span>
</div>
</template>
</gamification-overview-widget-row>
</template>
<template v-else-if="!loading" #content>
<gamification-overview-widget-row class="my-auto">
<template #content>
<div class="d-flex flex-column align-center justify-center">
<v-icon color="secondary" size="54">fa-puzzle-piece</v-icon>
<span class="subtitle-1 font-weight-bold mt-7">{{ $t('gamification.overview.programs') }}</span>
</div>
</template>
</gamification-overview-widget-row>
</template>
</gamification-overview-widget>
<gamification-program-detail-drawer v-if="programsDisplayed" />
<engagement-center-rule-extensions />
<engagement-center-rule-extensions v-if="programsDisplayed" />
</v-app>
</template>
<script>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,17 +80,22 @@
<gamification-rules-overview-list-drawer
ref="listDrawer" />
</template>
<gamification-overview-widget-row
v-else
v-show="!loading"
class="my-auto">
<template #content>
<div class="d-flex flex-column align-center justify-center">
<v-icon color="secondary" size="48">fa-rocket</v-icon>
<span class="subtitle-1 font-weight-bold mt-7">{{ $t('gamification.overview.actions') }}</span>
</div>
</template>
</gamification-overview-widget-row>
</gamification-overview-widget>
<gamification-overview-widget
v-else
:loading="loading">
<template #content>
<gamification-overview-widget-row
v-show="!loading"
class="my-auto">
<template #content>
<div class="d-flex flex-column align-center justify-center">
<v-icon color="secondary" size="48">fa-rocket</v-icon>
<span class="subtitle-1 font-weight-bold mt-7">{{ $t('gamification.overview.actions') }}</span>
</div>
</template>
</gamification-overview-widget-row>
</template>
</gamification-overview-widget>
</template>
<script>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,22 +22,26 @@
<template>
<v-app>
<gamification-overview-widget
:loading="loading">
<template #title>
<div v-if="!displayPlaceholder && !loading" class="d-flex flex-grow-1 full-width">
<div class="widget-text-header text-capitalize-first-letter text-truncate">
{{ $t('gamification.overview.topChallengersTitle') }}
</div>
<div class="spacer"></div>
<v-btn
height="auto"
min-width="auto"
class="pa-0"
text
@click="$refs.detailsDrawer.open()">
<span class="primary--text text-none">{{ $t('rules.seeAll') }}</span>
</v-btn>
</div>
:title="!displayPlaceholder && $t('gamification.overview.topChallengersTitle')"
:loading="loading"
:action-url="!displayPlaceholder && !isExternal && peopleURL || ''">
<template #content>
<gamification-overview-widget-row
v-show="displayPlaceholder"
disabled
class="my-auto">
<template #content>
<div class="d-flex flex-column align-center justify-center">
<v-icon color="secondary" size="54">fa-trophy</v-icon>
<span class="subtitle-1 font-weight-bold mt-7">{{ $t('gamification.overview.leaderboard') }}</span>
</div>
</template>
</gamification-overview-widget-row>
<gamification-overview-widget-row class="my-auto" v-show="rankDisplayed && !isExternal">
<template #content>
<gamification-rank :is-overview-display="true" />
</template>
</gamification-overview-widget-row>
</template>
<gamification-overview-widget-row
v-if="displayPlaceholder"
Expand Down

0 comments on commit 53d5bd1

Please sign in to comment.