Skip to content

Commit

Permalink
Bug fixing
Browse files Browse the repository at this point in the history
  • Loading branch information
Nicola Lanzilotto committed Apr 16, 2024
1 parent 3322c34 commit d577e55
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 8 deletions.
28 changes: 21 additions & 7 deletions src/app/integrations/integrations.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -216,43 +216,57 @@ export class IntegrationsComponent implements OnInit, OnDestroy {
let whatsappApp = response.apps.find(a => (a.title === APPS_TITLE.WHATSAPP && a.version === "v2"));
if (environment['whatsappConfigUrl']) {
if (whatsappApp) {
whatsappApp.runUrl = environment['whatsappConfigUrl'];
whatsappApp.runURL = environment['whatsappConfigUrl'];
whatsappApp.channel = "whatsapp";
} else {
whatsappApp = {
runUrl: environment['whatsappConfigUrl'],
runURL: environment['whatsappConfigUrl'],
channel: "whatsapp"
}
}
} else {
if (whatsappApp) {
whatsappApp.channel = "whatsapp";
}
}
this.availableApps.push(whatsappApp);

let messengerApp = response.apps.find(a => (a.title === APPS_TITLE.MESSENGER && a.version === "v2"));
if (environment['messengerConfigUrl']) {
if (messengerApp) {
messengerApp.runUrl = environment['messengerConfigUrl'];
messengerApp.runURL = environment['messengerConfigUrl'];
messengerApp.channel = "messenger";
} else {
messengerApp = {
runUrl: environment['messengerConfigUrl'],
runURL: environment['messengerConfigUrl'],
channel: "messenger"
}
}
}
else {
if (messengerApp) {
messengerApp.channel = "messenger";
}
}
this.availableApps.push(messengerApp);

let telegramApp = response.apps.find(a => (a.title === APPS_TITLE.TELEGRAM && a.version === "v2"));
if (environment['telegramConfigUrl']) {
if (telegramApp) {
telegramApp.runUrl = environment['telegramConfigUrl'];
telegramApp.runURL = environment['telegramConfigUrl'];
telegramApp.channel = "telegram";
} else {
telegramApp = {
runUrl: environment['telegramConfigUrl'],
runURL: environment['telegramConfigUrl'],
channel: "telegram"
}
}
}
else {
if (telegramApp) {
telegramApp.channel = "telegram";
}
}
this.availableApps.push(telegramApp);

resolve(true);
Expand All @@ -275,7 +289,7 @@ export class IntegrationsComponent implements OnInit, OnDestroy {
this.integrationSelectedName = "external";
this.showInIframe = true;
let app = this.availableApps.find(a => a.channel === integration.key);
this.renderUrl = app.runUrl;
this.renderUrl = app.runURL;
} else {
this.showInIframe = false;
}
Expand Down
2 changes: 1 addition & 1 deletion src/app/integrations/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ export const INTEGRATION_LIST_ARRAY = [
{ name: "Messenger", category: INTEGRATIONS_CATEGORIES.CHANNEL, key: INTEGRATIONS_KEYS.MESSENGER, src_icon: "assets/img/int/messenger-icon.png", src_logo: "assets/img/int/messenger-logo.jpeg", pro: true, plan: 'Premium' },
//{ name: "Pipedrive", category: INTEGRATIONS_CATEGORIES.CRM, key: INTEGRATIONS_KEYS.PIPEDRIVE, src_icon: "assets/img/int/pipedrive-icon.png", src_logo: "assets/img/int/pipedrive-logo.png", pro: true, plan: 'Premium' },
//{ name: "Salesforce", category: INTEGRATIONS_CATEGORIES.CRM, key: INTEGRATIONS_KEYS.SALESFORCE, src_icon: "assets/img/int/salesforce-icon.png", src_logo: "assets/img/int/salesforce-logo.png", pro: true, plan: 'Premium' },
{ name: "Telegram", category: INTEGRATIONS_CATEGORIES.CHANNEL, key: INTEGRATIONS_KEYS.TELEGRAM, src_icon: "assets/img/int/telegram-icon.png", src_logo: "assets/img/int/telegram-logo.png", pro: true, plan: 'Premium' },
{ name: "Telegram", category: INTEGRATIONS_CATEGORIES.CHANNEL, key: INTEGRATIONS_KEYS.TELEGRAM, src_icon: "assets/img/int/telegram-icon.png", src_logo: "assets/img/int/telegram-logo.png", pro: false, plan: 'Sandbox' },
{ name: "WhatsApp", category: INTEGRATIONS_CATEGORIES.CHANNEL, key: INTEGRATIONS_KEYS.WHATSAPP, src_icon: "assets/img/int/whatsapp-icon.png", src_logo: "assets/img/int/whatsapp-logo.png", pro: true, plan: 'Premium' },
//{ name: "Zapier", category: INTEGRATIONS_CATEGORIES.INT_PLAT, key: INTEGRATIONS_KEYS.ZAPIER, src_icon: "assets/img/int/zapier-icon.png", src_logo: "assets/img/int/zapier-logo.svg", pro: true, plan: 'Basic' },
//{ name: "Zendesk", category: INTEGRATIONS_CATEGORIES.LIVE_CHAT, key: INTEGRATIONS_KEYS.ZENDESK, src_icon: "assets/img/int/zendesk-icon.png", src_logo: "assets/img/int/zendesk-logo.png", pro: true, plan: 'Premium' },
Expand Down

0 comments on commit d577e55

Please sign in to comment.