|
|
@@ -26,22 +26,22 @@ export default defineNuxtPlugin(() => {
|
|
|
*
|
|
|
* @see https://pinia.vuejs.org/core-concepts/actions.html#Subscribing-to-actions
|
|
|
*/
|
|
|
- const unsubscribe = organizationProfile.$onAction(
|
|
|
- ({
|
|
|
- name, // name of the action
|
|
|
- after, // hook after the action returns or resolves
|
|
|
- }) => {
|
|
|
- after((_) => {
|
|
|
- if (name === 'initiateProfile') {
|
|
|
- // On construit les habilités et on les enregistre dans le store
|
|
|
- // noinspection UnnecessaryLocalVariableJS
|
|
|
- const abilities = abilityUtils.buildAbilities()
|
|
|
- accessProfile.abilities = abilities
|
|
|
-
|
|
|
- // Unsubscribe pour éviter les memory leaks
|
|
|
- unsubscribe()
|
|
|
- }
|
|
|
- })
|
|
|
- },
|
|
|
- )
|
|
|
+ // const unsubscribe = organizationProfile.$onAction(
|
|
|
+ // ({
|
|
|
+ // name, // name of the action
|
|
|
+ // after, // hook after the action returns or resolves
|
|
|
+ // }) => {
|
|
|
+ // after((_) => {
|
|
|
+ // if (name === 'initiateProfile') {
|
|
|
+ // // On construit les habilités et on les enregistre dans le store
|
|
|
+ // // noinspection UnnecessaryLocalVariableJS
|
|
|
+ // const abilities = abilityUtils.buildAbilities()
|
|
|
+ // accessProfile.abilities = abilities
|
|
|
+ //
|
|
|
+ // // Unsubscribe pour éviter les memory leaks
|
|
|
+ // unsubscribe()
|
|
|
+ // }
|
|
|
+ // })
|
|
|
+ // },
|
|
|
+ // )
|
|
|
})
|