1
0
Fork 0

Add a new dashboard page.

This commit is contained in:
Jorge Gonzalez 2019-08-26 18:15:41 +02:00 committed by Ludovic Fernandez
parent 89150e1164
commit fd24b1898e
133 changed files with 17303 additions and 11112 deletions

View file

@ -0,0 +1,14 @@
import entrypointsService from '../../_services/EntrypointsService'
export function getAll ({ commit }) {
commit('getAllRequest')
return entrypointsService.getAll()
.then(body => {
commit('getAllSuccess', body)
return body
})
.catch(error => {
commit('getAllFailure', error)
return Promise.reject(error)
})
}

View file

@ -0,0 +1,6 @@
// ----------------------------
// all
// ----------------------------
export function all (state) {
return state.all
}

View file

@ -0,0 +1,12 @@
import state from './state'
import * as getters from './getters'
import * as mutations from './mutations'
import * as actions from './actions'
export default {
namespaced: true,
getters,
mutations,
actions,
state
}

View file

@ -0,0 +1,18 @@
// ----------------------------
// Get All
// ----------------------------
export function getAllRequest (state) {
state.all.loading = true
}
export function getAllSuccess (state, body) {
state.all = { items: body, loading: false }
}
export function getAllFailure (state, error) {
state.all = { error }
}
export function getAllClear (state) {
state.all = {}
}

View file

@ -0,0 +1,4 @@
export default {
all: {},
byName: {}
}