import {organizationState} from "~/types/types"; export const state = () => ({ name: '', product: '', modules: [], hasChildren: false }) export const mutations = { setName(state:organizationState, name:string){ state.name = name }, setProduct(state:organizationState, product:string){ state.product = product }, setModules(state:organizationState, modules:Array) { state.modules = modules }, setHasChildren(state:organizationState, hasChildren:boolean) { state.hasChildren = hasChildren } } export const actions = { setProfile(context:any, profile:any){ context.commit('setName', profile.name) context.commit('setProduct', profile.product) context.commit('setModules', profile.modules) context.commit('setHasChildren', profile.hasChildren) } }