working import binding

ref #15
This commit is contained in:
Philipp Dormann 2021-01-30 17:45:12 +01:00
parent acf0562851
commit 7dd0881d29
2 changed files with 3 additions and 5 deletions

View File

@ -37,12 +37,10 @@
let orgs = []; let orgs = [];
RunnerOrganizationService.runnerOrganizationControllerGetAll().then((val) => { RunnerOrganizationService.runnerOrganizationControllerGetAll().then((val) => {
orgs = val; orgs = val;
console.log(val);
}); });
let teams = []; let teams = [];
RunnerTeamService.runnerTeamControllerGetAll().then((val) => { RunnerTeamService.runnerTeamControllerGetAll().then((val) => {
teams = val; teams = val;
console.log(val);
}); });
let selected_org; let selected_org;
let selected_org_or_team; let selected_org_or_team;
@ -142,6 +140,7 @@
mapped mapped
) )
.then((resp) => { .then((resp) => {
current_runners = current_runners.concat(resp);
toast.hideToast(); toast.hideToast();
recent_processed = true; recent_processed = true;
Toastify({ Toastify({
@ -150,7 +149,6 @@
backgroundColor: "linear-gradient(to right, #00b09b, #96c93d)", backgroundColor: "linear-gradient(to right, #00b09b, #96c93d)",
}).showToast(); }).showToast();
cancelModal(); cancelModal();
current_runners = current_runners.concat(mapped);
}) })
.catch((err) => { .catch((err) => {
toast.hideToast(); toast.hideToast();
@ -164,6 +162,7 @@
mapped mapped
) )
.then((resp) => { .then((resp) => {
current_runners = current_runners.concat(resp);
toast.hideToast(); toast.hideToast();
recent_processed = true; recent_processed = true;
Toastify({ Toastify({
@ -172,7 +171,6 @@
backgroundColor: "linear-gradient(to right, #00b09b, #96c93d)", backgroundColor: "linear-gradient(to right, #00b09b, #96c93d)",
}).showToast(); }).showToast();
cancelModal(); cancelModal();
current_runners = current_runners.concat(mapped);
}) })
.catch((err) => { .catch((err) => {
toast.hideToast(); toast.hideToast();

View File

@ -43,7 +43,7 @@
passed_team={{}} passed_team={{}}
passed_orgs={[]} passed_orgs={[]}
passed_org={{}} passed_org={{}}
current_runners={current_runners} bind:current_runners
opened_from="RunnerOverview" opened_from="RunnerOverview"
bind:import_modal_open /> bind:import_modal_open />
{/if} {/if}