| 1234567891011121314151617181920212223242526272829303132 |
- 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<string>) {
- 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)
- }
- }
|