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

get status choices while creating feature

parent e64d1420
No related branches found
No related tags found
1 merge request!566REDMINE_ISSUE-17137 | Création signalement - pas de choix de statut
......@@ -509,11 +509,12 @@ export default {
},
},
allowedStatusChoices() { // ? need to check if we could use function allowedStatus2change from utils to keep same rules ?
if (this.project && this.currentFeature && this.currentFeature.properties && this.user) {
allowedStatusChoices() {
if (this.project && this.user) {
const isModerate = this.project.moderation;
const userStatus = this.USER_LEVEL_PROJECTS[this.project.slug];
const isOwnFeature = this.currentFeature.properties.creator === this.user.id; //* si le contributeur est l'auteur du signalement
const isOwnFeature = this.currentFeature && this.currentFeature.properties && //* check if feature exist already
this.currentFeature.properties.creator === this.user.id; //* si le contributeur est l'auteur du signalement
return allowedStatus2change(this.user, isModerate, userStatus, isOwnFeature, this.currentRouteName);
}
return [];
......
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