Skip to content

Commit

Permalink
Merge pull request #1089 from Gepardgame/fix/1088
Browse files Browse the repository at this point in the history
  • Loading branch information
nscuro authored Nov 19, 2024
2 parents 3222606 + 6b13831 commit 8f0e236
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/views/portfolio/projects/ProjectCreateProjectModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,7 @@ import { Switch as cSwitch } from '@coreui/vue';
import permissionsMixin from '../../../mixins/permissionsMixin';
import Multiselect from 'vue-multiselect';
import BInputGroupFormSwitch from '@/forms/BInputGroupFormSwitch.vue';
import common from '../../../shared/common';
export default {
name: 'ProjectCreateProjectModal',
Expand Down Expand Up @@ -312,20 +313,20 @@ export default {
async getACLEnabled() {
let url = `${this.$api.BASE_URL}/${this.$api.URL_CONFIG_PROPERTY}/public/access-management/acl.enabled`;
let response = await this.axios.get(url);
this.requiresTeam = response.data.propertyValue.toString();
this.requiresTeam = common.toBoolean(
response.data.propertyValue.toString(),
);
},
async getAvailableTeams() {
let url = `${this.$api.BASE_URL}/${this.$api.URL_TEAM}/visible`;
let response = await this.axios.get(url);
console.log(response.data);
let convertedTeams = response.data.map((team) => {
console.log(team.uuid);
return { text: team.name, value: team.uuid };
});
this.availableTeams = convertedTeams;
this.teams = response.data;
if (this.requiresTeam && this.availableTeams.length == 1) {
this.project.team = teams[0][0].value;
this.project.team = this.availableTeams[0].value;
this.isDisabled = true;
}
this.availableTeams.sort(function (a, b) {
Expand Down

0 comments on commit 8f0e236

Please sign in to comment.