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',
|
{ key: 'persons',
|
||||||
title: 'activity.bloc_persons',
|
title: 'activity.bloc_persons',
|
||||||
persons: [],
|
persons: [],
|
||||||
included: window.activity.activityType.personsVisible !== 0
|
included: false
|
||||||
},
|
},
|
||||||
{ key: 'personsAssociated',
|
{ key: 'personsAssociated',
|
||||||
title: 'activity.bloc_persons_associated',
|
title: 'activity.bloc_persons_associated',
|
||||||
persons: [],
|
persons: [],
|
||||||
included: window.activity.activityType.personsVisible !== 0
|
included: window.activity ? window.activity.activityType.personsVisible !== 0 : true
|
||||||
},
|
},
|
||||||
{ key: 'personsNotAssociated',
|
{ key: 'personsNotAssociated',
|
||||||
title: 'activity.bloc_persons_not_associated',
|
title: 'activity.bloc_persons_not_associated',
|
||||||
persons: [],
|
persons: [],
|
||||||
included: window.activity.activityType.personsVisible !== 0
|
included: window.activity ? window.activity.activityType.personsVisible !== 0 : true
|
||||||
},
|
},
|
||||||
{ key: 'thirdparty',
|
{ key: 'thirdparty',
|
||||||
title: 'activity.bloc_thirdparty',
|
title: 'activity.bloc_thirdparty',
|
||||||
persons: [],
|
persons: [],
|
||||||
included: window.activity.activityType.thirdPartiesVisible !== 0
|
included: window.activity ? window.activity.activityType.thirdPartiesVisible !== 0 : true
|
||||||
},
|
},
|
||||||
{ key: 'users',
|
{ key: 'users',
|
||||||
title: 'activity.bloc_users',
|
title: 'activity.bloc_users',
|
||||||
persons: [],
|
persons: [],
|
||||||
included: window.activity.activityType.usersVisible !== 0
|
included: window.activity ? window.activity.activityType.usersVisible !== 0 : true
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
addPersons: {
|
addPersons: {
|
||||||
@ -76,7 +76,9 @@ export default {
|
|||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
isComponentVisible() {
|
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({
|
...mapState({
|
||||||
persons: state => state.activity.persons,
|
persons: state => state.activity.persons,
|
||||||
@ -95,6 +97,7 @@ export default {
|
|||||||
},
|
},
|
||||||
addPersonsOptions() {
|
addPersonsOptions() {
|
||||||
let optionsType = [];
|
let optionsType = [];
|
||||||
|
if (window.activity) {
|
||||||
if (window.activity.activityType.personsVisible !== 0) {
|
if (window.activity.activityType.personsVisible !== 0) {
|
||||||
optionsType.push('person')
|
optionsType.push('person')
|
||||||
}
|
}
|
||||||
@ -104,6 +107,9 @@ export default {
|
|||||||
if (window.activity.activityType.usersVisible !== 0) {
|
if (window.activity.activityType.usersVisible !== 0) {
|
||||||
optionsType.push('user')
|
optionsType.push('user')
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
optionsType = ['person', 'thirdparty', 'user'];
|
||||||
|
}
|
||||||
return {
|
return {
|
||||||
type: optionsType,
|
type: optionsType,
|
||||||
priority: null,
|
priority: null,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user