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 {
this.$store.commit('DISCARD_LOADER');
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', {
project_slug: this.$route.params.slug,
feature_id: this.$route.params.slug_signal
......
......@@ -308,7 +308,7 @@ export default {
let levels = new Array();
if(this.levelsPermissions){
this.levelsPermissions.forEach((item) => {
if (item.user_type_id != 'super_contributor')
if (item.user_type_id !== 'super_contributor')
levels.push({
name: this.translateRoleToFrench(item.user_type_id),
value: item.user_type_id,
......@@ -324,9 +324,9 @@ export default {
let levels = new Array();
if(this.levelsPermissions){
this.levelsPermissions.forEach((item) => {
if (item.user_type_id != 'super_contributor'
&& item.user_type_id != 'admin'
&& item.user_type_id != 'moderator'){
if (item.user_type_id !== 'super_contributor'
&& item.user_type_id !== 'admin'
&& item.user_type_id !== 'moderator'){
levels.push({
name: this.translateRoleToFrench(item.user_type_id),
value: item.user_type_id,
......@@ -337,14 +337,15 @@ export default {
return levels;
}
},
watch: {
'form.moderation': function (newValue){
if(!newValue){
this.form.access_level_pub_feature = { name: '', value: '' };
if(!newValue && this.form.access_level_arch_feature.value === 'moderator') {
this.form.access_level_arch_feature = { name: '', value: '' };
}
}
},
created() {
this.definePageType();
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