createproject: keep only remote source with related linked account

This commit is contained in:
Simone Gotti 2019-05-16 00:35:11 +02:00
parent f85243acfe
commit 969cdb5182
1 changed files with 13 additions and 1 deletions

View File

@ -146,7 +146,19 @@ export default {
this.$store.dispatch("setError", error);
return;
}
this.remoteSources = data;
let allRemoteSources = data;
let remoteSources = [];
for (var i = 0; i < allRemoteSources.length; i++) {
for (var j = 0; j < this.user.linked_accounts.length; j++) {
let remotesource = allRemoteSources[i];
let la = this.user.linked_accounts[j];
if (la.remote_source_id == remotesource.id) {
remoteSources.push(remotesource);
}
}
this.remoteSources = remoteSources;
}
}
};
</script>