Fixed orgs/teams not being marked as selected on initial modal opening

ref #64
This commit is contained in:
Nicolai Ort 2021-02-20 16:46:55 +01:00
parent 09b61ec684
commit 44ed633cbf

View File

@ -38,10 +38,16 @@
let orgs = []; let orgs = [];
RunnerOrganizationService.runnerOrganizationControllerGetAll().then((val) => { RunnerOrganizationService.runnerOrganizationControllerGetAll().then((val) => {
orgs = val; orgs = val;
if(opened_from === 'OrgOverview'){
selected_org = orgs[0].id
}
}); });
let teams = []; let teams = [];
RunnerTeamService.runnerTeamControllerGetAll().then((val) => { RunnerTeamService.runnerTeamControllerGetAll().then((val) => {
teams = val; teams = val;
if (opened_from === "RunnerOverview") {
selected_org_or_team = "TEAM_" + teams[0].id;
}
}); });
let selected_org; let selected_org;
$: selected_org_or_team = ""; $: selected_org_or_team = "";