Cleanup unused code, app choices to be handled by the core

This commit is contained in:
Alexandre Aubin 2022-01-24 18:30:18 +01:00
parent e685fd55a8
commit 9f704e7f75

View file

@ -11,7 +11,6 @@ export default {
users: undefined, // basic user data: Object {username: {data}} users: undefined, // basic user data: Object {username: {data}}
users_details: {}, // precise user data: Object {username: {data}} users_details: {}, // precise user data: Object {username: {data}}
groups: undefined, groups: undefined,
apps: undefined,
permissions: undefined permissions: undefined
}), }),
@ -45,15 +44,6 @@ export default {
Vue.set(state.users, user.username, user) Vue.set(state.users, user.username, user)
}, },
'SET_APPS' (state, [apps]) {
state.apps = apps || null
},
'ADD_APPS' (state, [app]) {
if (!state.apps) state.apps = {}
Vue.set(state.apps, app.id, app)
},
'SET_USERS_DETAILS' (state, [username, userData]) { 'SET_USERS_DETAILS' (state, [username, userData]) {
Vue.set(state.users_details, username, userData) Vue.set(state.users_details, username, userData)
if (!state.users) return if (!state.users) return
@ -186,16 +176,6 @@ export default {
mainDomain: state => state.main_domain, mainDomain: state => state.main_domain,
appsAsChoices: state => {
const choices = [{ value: "_none", text: "---" }]
if (state.apps) {
return choices.concat(Object.values(state.apps).map(({ id, name, domain_path }) => {
return { value: id, text: `${name} (${domain_path})` }
}))
}
return choices
},
domainsAsChoices: state => { domainsAsChoices: state => {
const mainDomain = state.main_domain const mainDomain = state.main_domain
return state.domains.map(domain => { return state.domains.map(domain => {