Skip to content

Commit

Permalink
fix: pouvoir choisir "Créer un nouveau profil" (en cas de initial ste…
Browse files Browse the repository at this point in the history
…p avec attr queryParamForActionPre + optional profilename_to_modify) (GLPI UP1#179140)
  • Loading branch information
prigaux committed Nov 18, 2024
1 parent c37de36 commit 90e32c1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/src/controllers/InitialStep.vue
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ export default Vue.extend({
return includes(u.global_profilename, choice.const);
});
if (need_profile.optional) {
oneOf.unshift({ const: '', title: 'Créer un nouveau profil' })
oneOf.unshift({ const: '__NONE__', title: 'Créer un nouveau profil' })
}
if (oneOf.length === 1) {
this.gotoStep(u, oneOf[0].const);
Expand All @@ -98,7 +98,7 @@ export default Vue.extend({
}
},
gotoStep(u, profilename = undefined) {
router.push(`/${this.step.id}?uid=${u.uid}` + (profilename ? `&profilename_to_modify=${profilename}` : ''));
router.push(`/${this.step.id}?uid=${u.uid}` + (profilename && profilename !== '__NONE__' ? `&profilename_to_modify=${profilename}` : ''));
},
},
});
Expand Down

0 comments on commit 90e32c1

Please sign in to comment.