Images Showing in Products Pannel
This commit is contained in:
1 parent
f4a0e88199
commit
9fcfc017be
2 files changed
+14
-9
No files matched your search
+9
-6
@@ -274,18 +274,21 @@ function newDashboard() {
|
||||
let teamProfileImages = new Map();
|
||||
let fbProfileImages = new Map();
|
||||
|
||||
for (let i = 0; i < teams.edges.lenght; i++) {
|
||||
for (let i = 0; i < teams.edges.length; i++) {
|
||||
|
||||
let team = teams.edges[i].node;
|
||||
|
||||
teamProfileImages.set(team.slug, team.profile.avatar)
|
||||
fbProfileImages.set(team.fb[0].slug, team.fb[0].avatar)
|
||||
teamProfileImages.set(team.slug, team.profile.avatar);
|
||||
console.log("TEAM SET", team.slug, team.profile.avatar);
|
||||
|
||||
if (team.fb.length > 0) {
|
||||
|
||||
fbProfileImages.set(team.slug + "-" + team.fb[0].slug, team.fb[0].avatar);
|
||||
console.log("BOT SET", team.slug + "-" + team.fb[0].slug, team.fb[0].avatar);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
console.log("TEAM PROFILES", JSON.stringify(teamProfileImages));
|
||||
console.log("FB PROFILES", JSON.stringify(fbProfileImages));
|
||||
|
||||
window.canvasApp.context.teamProfileImages = teamProfileImages;
|
||||
window.canvasApp.context.fbProfileImages = fbProfileImages;
|
||||
|
||||
|
||||
+5
-3
@@ -240,8 +240,9 @@
|
||||
imageLoaded();
|
||||
}
|
||||
|
||||
teamAvatar.src = STORAGE_URL + "/" + TEAM + "/" + TEAM + "-" + "avatar.jpg";
|
||||
teamAvatar.src = window.canvasApp.context.teamProfileImages.get(TEAM);
|
||||
console.log("TEAM NAME", TEAM);
|
||||
console.log("TEAM AVATAR", window.canvasApp.context.teamProfileImages.get(TEAM));
|
||||
/*
|
||||
TODO Temporary code: Here we will temporary download the images of bots uploaded at the Teams Module.
|
||||
*/
|
||||
@@ -254,8 +255,9 @@
|
||||
thisObject.bot.avatar = botAvatar;
|
||||
imageLoaded();
|
||||
}
|
||||
|
||||
botAvatar.src = STORAGE_URL + "/" + TEAM + "/" + BOT + "-fb-" + "avatar.jpg";
|
||||
console.log("BOT NAME", BOT);
|
||||
console.log("BOT AVATAR", window.canvasApp.context.fbProfileImages.get(TEAM + "-" + BOT));
|
||||
botAvatar.src = window.canvasApp.context.fbProfileImages.get(TEAM + "-" + BOT);
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user