-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Add remind where or what to do the action for kudos events - ME…
…ED-3284 - Meeds-io/MIPs#105 This PR will add information in the action detail drawer so it can be useful to remind where or what to do the action
- Loading branch information
Showing
6 changed files
with
143 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
62 changes: 62 additions & 0 deletions
62
kudos-webapps/src/main/webapp/vue-app/connectorEventExtensions/components/KudosEvent.vue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
<!-- | ||
This file is part of the Meeds project (https://meeds.io/). | ||
Copyright (C) 2020 - 2024 Meeds Association [email protected] | ||
This program is free software; you can redistribute it and/or | ||
modify it under the terms of the GNU Lesser General Public | ||
License as published by the Free Software Foundation; either | ||
version 3 of the License, or (at your option) any later version. | ||
This program is distributed in the hope that it will be useful, | ||
but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
Lesser General Public License for more details. | ||
You should have received a copy of the GNU Lesser General Public License | ||
along with this program; if not, write to the Free Software Foundation, | ||
Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | ||
--> | ||
<template> | ||
<v-app v-if="!isEditing"> | ||
<div class="subtitle-1 font-weight-bold mb-2"> | ||
{{ $t('gamification.event.display.doItNow') }} | ||
</div> | ||
<div class="d-flex justify-center"> | ||
<v-btn | ||
max-width="250" | ||
class="ignore-vuetify-classes text-capitalize btn btn-primary" | ||
@click="openKudosDrawer"> | ||
{{ $t('gamification.event.display.congratulate') }} | ||
</v-btn> | ||
</div> | ||
</v-app> | ||
</template> | ||
<script> | ||
export default { | ||
props: { | ||
properties: { | ||
type: Object, | ||
default: null | ||
}, | ||
trigger: { | ||
type: String, | ||
default: null | ||
}, | ||
isEditing: { | ||
type: Boolean, | ||
default: false | ||
} | ||
}, | ||
methods: { | ||
openKudosDrawer() { | ||
this.$root.$emit('rule-detail-drawer-close'); | ||
document.dispatchEvent(new CustomEvent('exo-kudos-open-send-modal', {detail: { | ||
id: eXo.env.portal.userIdentityId, | ||
type: 'USER_PROFILE', | ||
parentId: '', | ||
owner: eXo.env.portal.userName, | ||
}})); | ||
}, | ||
} | ||
}; | ||
</script> |
30 changes: 30 additions & 0 deletions
30
kudos-webapps/src/main/webapp/vue-app/connectorEventExtensions/extensions.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
/* | ||
* This file is part of the Meeds project (https://meeds.io/). | ||
* | ||
* Copyright (C) 2020 - 2024 Meeds Association [email protected] | ||
* | ||
* This program is free software; you can redistribute it and/or | ||
* modify it under the terms of the GNU Lesser General Public | ||
* License as published by the Free Software Foundation; either | ||
* version 3 of the License, or (at your option) any later version. | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
* Lesser General Public License for more details. | ||
* You should have received a copy of the GNU Lesser General Public License | ||
* along with this program; if not, write to the Free Software Foundation, | ||
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | ||
* | ||
*/ | ||
import '../connectorEventExtensions/initComponents'; | ||
|
||
export function init() { | ||
extensionRegistry.registerComponent('engagementCenterEvent', 'connector-event-extensions', { | ||
id: 'kudos-event', | ||
name: 'kudos', | ||
vueComponent: Vue.options.components['kudos-event'], | ||
isEnabled: (params) => [ | ||
'sendKudos' | ||
].includes(params?.trigger), | ||
}); | ||
} |
26 changes: 26 additions & 0 deletions
26
kudos-webapps/src/main/webapp/vue-app/connectorEventExtensions/initComponents.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
/* | ||
* This file is part of the Meeds project (https://meeds.io/). | ||
* Copyright (C) 2020 - 2024 Meeds Association [email protected] | ||
* | ||
* This program is free software; you can redistribute it and/or | ||
* modify it under the terms of the GNU Lesser General Public | ||
* License as published by the Free Software Foundation; either | ||
* version 3 of the License, or (at your option) any later version. | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
* Lesser General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU Lesser General Public License | ||
* along with this program; if not, write to the Free Software Foundation, | ||
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | ||
*/ | ||
import KudosEvent from './components/KudosEvent.vue'; | ||
|
||
const components = { | ||
'kudos-event': KudosEvent, | ||
}; | ||
|
||
for (const key in components) { | ||
Vue.component(key, components[key]); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters