mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
activity: generalise concernedGroups component for use with calendar
This commit is contained in:
parent
aa53df8bb0
commit
d89a948fa1
@ -46,27 +46,27 @@ export default {
|
||||
{ key: 'persons',
|
||||
title: 'activity.bloc_persons',
|
||||
persons: [],
|
||||
included: window.activity.activityType.personsVisible !== 0
|
||||
included: false
|
||||
},
|
||||
{ key: 'personsAssociated',
|
||||
title: 'activity.bloc_persons_associated',
|
||||
persons: [],
|
||||
included: window.activity.activityType.personsVisible !== 0
|
||||
included: window.activity ? window.activity.activityType.personsVisible !== 0 : true
|
||||
},
|
||||
{ key: 'personsNotAssociated',
|
||||
title: 'activity.bloc_persons_not_associated',
|
||||
persons: [],
|
||||
included: window.activity.activityType.personsVisible !== 0
|
||||
included: window.activity ? window.activity.activityType.personsVisible !== 0 : true
|
||||
},
|
||||
{ key: 'thirdparty',
|
||||
title: 'activity.bloc_thirdparty',
|
||||
persons: [],
|
||||
included: window.activity.activityType.thirdPartiesVisible !== 0
|
||||
included: window.activity ? window.activity.activityType.thirdPartiesVisible !== 0 : true
|
||||
},
|
||||
{ key: 'users',
|
||||
title: 'activity.bloc_users',
|
||||
persons: [],
|
||||
included: window.activity.activityType.usersVisible !== 0
|
||||
included: window.activity ? window.activity.activityType.usersVisible !== 0 : true
|
||||
},
|
||||
],
|
||||
addPersons: {
|
||||
@ -76,7 +76,9 @@ export default {
|
||||
},
|
||||
computed: {
|
||||
isComponentVisible() {
|
||||
return window.activity.activityType.personsVisible !== 0 || window.activity.activityType.thirdPartiesVisible !== 0 || window.activity.activityType.usersVisible !== 0
|
||||
return window.activity
|
||||
? (window.activity.activityType.personsVisible !== 0 || window.activity.activityType.thirdPartiesVisible !== 0 || window.activity.activityType.usersVisible !== 0)
|
||||
: true
|
||||
},
|
||||
...mapState({
|
||||
persons: state => state.activity.persons,
|
||||
@ -95,14 +97,18 @@ export default {
|
||||
},
|
||||
addPersonsOptions() {
|
||||
let optionsType = [];
|
||||
if (window.activity.activityType.personsVisible !== 0) {
|
||||
optionsType.push('person')
|
||||
}
|
||||
if (window.activity.activityType.thirdPartiesVisible !== 0) {
|
||||
optionsType.push('thirdparty')
|
||||
}
|
||||
if (window.activity.activityType.usersVisible !== 0) {
|
||||
optionsType.push('user')
|
||||
if (window.activity) {
|
||||
if (window.activity.activityType.personsVisible !== 0) {
|
||||
optionsType.push('person')
|
||||
}
|
||||
if (window.activity.activityType.thirdPartiesVisible !== 0) {
|
||||
optionsType.push('thirdparty')
|
||||
}
|
||||
if (window.activity.activityType.usersVisible !== 0) {
|
||||
optionsType.push('user')
|
||||
}
|
||||
} else {
|
||||
optionsType = ['person', 'thirdparty', 'user'];
|
||||
}
|
||||
return {
|
||||
type: optionsType,
|
||||
|
Loading…
x
Reference in New Issue
Block a user