41 lines
902 B
JavaScript
41 lines
902 B
JavaScript
/*import Vue from 'vue'
|
|
import Vuex from 'vuex'
|
|
import { generateUrl } from '@nextcloud/router'
|
|
const axios = require('axios').default
|
|
|
|
Vue.use(Vuex)
|
|
|
|
export default new Vuex.Store({
|
|
state: {
|
|
agencyId: null,
|
|
agency: null,
|
|
},
|
|
mutations: {
|
|
getAgencyId(state) {
|
|
return state.agencyId
|
|
},
|
|
setAgencyId(state, id) {
|
|
state.agencyId = id
|
|
},
|
|
getAgency(state) {
|
|
return state.agency
|
|
},
|
|
setAgency(state, agency) {
|
|
state.agency = agency
|
|
},
|
|
},
|
|
actions: {
|
|
async loadAgencyData({ commit }) {
|
|
// axios.get(generateUrl('/apps/agency/getagencyidbyuser')).then(response => {
|
|
// console.log('Here we load...')
|
|
// this.agencyId = response.data.agency
|
|
// }) + this.$store.state.agencyId
|
|
const agencydata = await axios.get(generateUrl('/apps/agency/agencys/4')).then(function() {
|
|
commit('setAgency', agencydata.data)
|
|
return true
|
|
})
|
|
return false
|
|
},
|
|
},
|
|
})*/
|