Covivo/mobicoop

View on GitHub
client/src/MobicoopBundle/Resources/assets/js/store/gamification.module.js

Summary

Maintainability
A
2 hrs
Test Coverage
export const gamification = {
  namespaced: true,
  state: {
    active: false,
    gamificationNotifications: [],
    userAccept: true
  },
  mutations: {
    updateGamificationNotifications (state, gamificationNotifications) {
      state.gamificationNotifications = gamificationNotifications;
    },
    setActive (state, active) {
      state.active = active;
    },
    setUserAccept (state, userAccept) {
      state.userAccept = userAccept;
    }    
  },
  getters: {
    gamificationNotifications (state) {
      return state.gamificationNotifications;
    },
    isActive (state) {
      return state.active;
    },
    hasUserAccept (state) {
      return state.userAccept;
    }
  } 
}