Skip to content
Snippets Groups Projects
Commit 52fd5206 authored by Timothee P's avatar Timothee P :sunflower:
Browse files

change visibility status only if moderator was selected

parent 527ed7e4
No related branches found
No related tags found
No related merge requests found
...@@ -517,7 +517,7 @@ export default { ...@@ -517,7 +517,7 @@ export default {
this.$store.commit('DISCARD_LOADER'); this.$store.commit('DISCARD_LOADER');
this.initMap(); this.initMap();
}); });
} if (!this.feature || this.feature.feature_id != this.$route.params.slug_signal) { } if (!this.feature || this.feature.feature_id !== this.$route.params.slug_signal) {
this.$store.dispatch('feature/GET_PROJECT_FEATURE', { this.$store.dispatch('feature/GET_PROJECT_FEATURE', {
project_slug: this.$route.params.slug, project_slug: this.$route.params.slug,
feature_id: this.$route.params.slug_signal feature_id: this.$route.params.slug_signal
......
...@@ -308,7 +308,7 @@ export default { ...@@ -308,7 +308,7 @@ export default {
let levels = new Array(); let levels = new Array();
if(this.levelsPermissions){ if(this.levelsPermissions){
this.levelsPermissions.forEach((item) => { this.levelsPermissions.forEach((item) => {
if (item.user_type_id != 'super_contributor') if (item.user_type_id !== 'super_contributor')
levels.push({ levels.push({
name: this.translateRoleToFrench(item.user_type_id), name: this.translateRoleToFrench(item.user_type_id),
value: item.user_type_id, value: item.user_type_id,
...@@ -324,9 +324,9 @@ export default { ...@@ -324,9 +324,9 @@ export default {
let levels = new Array(); let levels = new Array();
if(this.levelsPermissions){ if(this.levelsPermissions){
this.levelsPermissions.forEach((item) => { this.levelsPermissions.forEach((item) => {
if (item.user_type_id != 'super_contributor' if (item.user_type_id !== 'super_contributor'
&& item.user_type_id != 'admin' && item.user_type_id !== 'admin'
&& item.user_type_id != 'moderator'){ && item.user_type_id !== 'moderator'){
levels.push({ levels.push({
name: this.translateRoleToFrench(item.user_type_id), name: this.translateRoleToFrench(item.user_type_id),
value: item.user_type_id, value: item.user_type_id,
...@@ -337,14 +337,15 @@ export default { ...@@ -337,14 +337,15 @@ export default {
return levels; return levels;
} }
}, },
watch: { watch: {
'form.moderation': function (newValue){ 'form.moderation': function (newValue){
if(!newValue){ if(!newValue && this.form.access_level_arch_feature.value === 'moderator') {
this.form.access_level_pub_feature = { name: '', value: '' };
this.form.access_level_arch_feature = { name: '', value: '' }; this.form.access_level_arch_feature = { name: '', value: '' };
} }
} }
}, },
created() { created() {
this.definePageType(); this.definePageType();
if (this.action === 'create') { if (this.action === 'create') {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment