Skip to content

Commit

Permalink
Merge branch 'master-PRE' into features/tables-pre-1
Browse files Browse the repository at this point in the history
# Conflicts:
#	CHANGELOG.md
#	package-lock.json
#	package.json
#	src/app/knowledge-bases/knowledge-bases.component.ts
  • Loading branch information
Nicola Lanzilotto committed Mar 15, 2024
2 parents 1323099 + 728ff1b commit 99b7362
Show file tree
Hide file tree
Showing 71 changed files with 2,358 additions and 730 deletions.
27 changes: 13 additions & 14 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,21 @@
# tiledesk-dashboard

### 2.5.20
- Deploys in production
- Refactors the teammates table
### 2.6.0-rc6
- Improves Knowledge Base

### 2.5.19
- Deploys in production
- Fixes the bug: not all chatbot images are displayed
- Fixes the bug: published chatbots is not appearing as a draft
### 2.6.0-rc4
- Improves Knowledge Base

### 2.5.18
- Deploys in production
- Fixes the bug: in the settings sidebar 'setAttribute' on 'Element' is not a valid attribute name
- User profile image is called in loop
### 2.6.0-rc3
- Improves Knowledge Base

### 2.5.17
- Deploys in production
- Fixes the bug: multiple status call in kb page
### 2.6.0-rc2
- Improves Knowledge Base (added sitemap)

### 2.6.0-rc1
- Improves Knowledge Base
- Adds the customer.io integration
- Refactors the bot list page

### 2.5.16
- Deploys in production
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@tiledesk/tiledesk-dashboard",
"version": "2.5.20",
"version": "2.6.0-rc6",
"scripts": {
"ng": "ng",
"start": "ng serve --aot",
Expand Down
2 changes: 1 addition & 1 deletion src/app/app-store/app-store.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -520,7 +520,7 @@ <h4 class="card-create-app-text">
</div>
</div>
</div>
<h5 class="card-title" style="min-height: 52px;margin-bottom: 5px;">
<h5 class="card-title" style="min-height: 48px;margin-bottom: 5px;">
External
</h5>

Expand Down
4 changes: 4 additions & 0 deletions src/app/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -393,6 +393,8 @@ import { ModalDetailKnowledgeBaseComponent } from './knowledge-bases/modals/moda
import { KnowledgeBaseTableComponent } from './knowledge-bases/modals/knowledge-base-table/knowledge-base-table.component';
import { ModalErrorComponent } from './knowledge-bases/modals/modal-error/modal-error.component';
import { KnowledgeBasesPreviousComponent } from './knowledge-bases-previous/knowledge-bases-previous.component';
import { ModalUrlsKnowledgeBaseComponent } from './knowledge-bases/modals/modal-urls-knowledge-base/modal-urls-knowledge-base.component';
import { AddContentMenuComponent } from './knowledge-bases/menu/add-content-menu/add-content-menu.component';
import { UserModalComponent } from './users/user-modal/user-modal.component';
import { MessagesStatsModalComponent } from './components/modals/messages-stats-modal/messages-stats-modal.component';

Expand Down Expand Up @@ -700,6 +702,8 @@ const appInitializerFn = (appConfig: AppConfigService, brandService: BrandServic
KnowledgeBaseTableComponent,
ModalErrorComponent,
KnowledgeBasesPreviousComponent,
ModalUrlsKnowledgeBaseComponent,
AddContentMenuComponent,
UserModalComponent,
MessagesStatsModalComponent
],
Expand Down
1 change: 1 addition & 0 deletions src/app/chatbot-design-studio/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -315,6 +315,7 @@ export function patchActionId(action) {
return action;
}


// export function retriveListOfVariables(intents: Array<Intent>) {
// variableList.userDefined = []
// intents.forEach(intent => {
Expand Down
2 changes: 2 additions & 0 deletions src/app/core/notify.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -513,6 +513,8 @@ export class NotifyService {
icon_bckgrnd_color = '#d2291c'
} else if (notificationColor === 2) {
icon_bckgrnd_color = '#449d48'
} else if(notificationColor === 3){
icon_bckgrnd_color = '#ffecb5'
}
this.notify = $.notify({
// icon: 'glyphicon glyphicon-warning-sign',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,13 @@ export class BrevoIntegrationComponent implements OnInit {
}

saveIntegration() {
this.checkKey(this.integration.value.apikey).then((status) => {
let data = {
integration: this.integration,
isVerified: status
}
this.onUpdateIntegration.emit(data);
})
// this.checkKey(this.integration.value.apikey).then((status) => {
// let data = {
// integration: this.integration,
// isVerified: status
// }
// this.onUpdateIntegration.emit(data);
// })
}

deleteIntegration() {
Expand All @@ -56,21 +56,6 @@ export class BrevoIntegrationComponent implements OnInit {
}

checkKey(key: string) {
return new Promise((resolve, reject) => {
this.integrationService.checkKeyQapla(key).subscribe((resp: any) => {
if (resp.getCouriers.result === 'OK') {
this.isVerified = true;
resolve(true);
} else {
this.isVerified = false;
resolve(false);
}
}, (error) => {
this.logger.error("[INT-Qapla] Key verification failed: ", error);
this.isVerified = false;
resolve(false);
})
})
}

resetValues() {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
<div class="header">
<p>Start for free with <b>Customer.io.</b><a href="https://fly.customer.io/signup" target="_blank"> Sign up now!</a></p>
<!-- <p>Start for free with <b>Customer.io.</b><a href="https://fly.customer.io/signup" target="_blank"> Sign up now!</a></p> -->

<!-- <div *ngIf="isVerified === true" class="status">
<div class="signup">
<p [innerHTML]="'Integration.StartForFree' | translate: translateparams"></p><a href="https://fly.customer.io/signup" target="_blank" style="margin-left: 4px;"> {{ 'Integration.SignupNow' | translate }}</a>
</div>

<div *ngIf="isVerified === true" class="status">
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 130.2 130.2">
<circle class="path circle" fill="none" stroke="#73AF55" stroke-width="6" stroke-miterlimit="10" cx="65.1"
cy="65.1" r="62.1" />
Expand All @@ -21,7 +25,7 @@
stroke-miterlimit="10" x1="95.8" y1="38" x2="34.4" y2="92.2" />
</svg>
<p class="error">Failed!</p>
</div> -->
</div>
</div>

<div class="content">
Expand All @@ -36,7 +40,7 @@
<label>Api Key</label>
<div class="password-input">
<input id="api-key-input" type="password" placeholder="Your api key"
[(ngModel)]="integration.value.apikey">
[(ngModel)]="integration.value.key">
<div class="show-hide-button">
<span *ngIf="keyVisibile === false" class="material-icons-outlined"
(click)="showHideKey()">visibility</span>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,16 @@ p {
flex-direction: row;
align-items: center;
justify-content: space-between;
height: 50px;

.signup {
display: flex;

p {
margin: 0 0 0 5px;
}
}

.status {
display: flex;
align-items: center;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,18 @@ export class CustomerioIntegrationComponent implements OnInit {
keyVisibile: boolean = false;
isVerified: boolean;

translateparams: any;

constructor(
private integrationService: IntegrationService,
private logger: LoggerService
) { }

ngOnInit(): void {
this.logger.log("[INT-Customer.io] integration ", this.integration)
this.logger.debug("[INT-Customer.io] integration ", this.integration)
this.translateparams = { intname: "Customer.io" };
if (this.integration.value.apikey) {
this.checkKey(this.integration.value.apikey);
this.checkKey();
}
}

Expand All @@ -41,7 +43,9 @@ export class CustomerioIntegrationComponent implements OnInit {
}

saveIntegration() {
this.checkKey(this.integration.value.apikey).then((status) => {
let apikey = btoa(this.integration.value.siteid + ":" + this.integration.value.key);
this.integration.value.apikey = apikey;
this.checkKey().then((status) => {
let data = {
integration: this.integration,
isVerified: status
Expand All @@ -55,16 +59,13 @@ export class CustomerioIntegrationComponent implements OnInit {
this.onDeleteIntegration.emit(this.integration);
}

checkKey(key: string) {
return new Promise((resolve, reject) => {
this.integrationService.checkKeyQapla(key).subscribe((resp: any) => {
if (resp.getCouriers.result === 'OK') {
this.isVerified = true;
resolve(true);
} else {
this.isVerified = false;
resolve(false);
}
checkKey() {
return new Promise((resolve) => {
let url = "https://track.customer.io/api/v1/accounts/region";
let apikey = 'Basic ' + this.integration.value.apikey;
this.integrationService.checkIntegrationKeyValidity(url, apikey).subscribe((resp: any) => {
this.isVerified = true;
resolve(true);
}, (error) => {
this.logger.error("[INT-Customer.io] Key verification failed: ", error);
this.isVerified = false;
Expand All @@ -75,8 +76,9 @@ export class CustomerioIntegrationComponent implements OnInit {

resetValues() {
this.integration.value = {
apikey: null,
siteid: null
siteid: null,
key: null,
apikey: null
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@
<a href="https://www.hubspot.com/" target="_blank">{{ 'Integration.Signup' | translate }}</a><p [innerHTML]="'Integration.FreeAccount' | translate: translateparams"></p>
</div>

<!-- // check the verify service function -->
<!-- <div *ngIf="isVerified === true" class="status">
<div *ngIf="isVerified === true" class="status">
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 130.2 130.2">
<circle class="path circle" fill="none" stroke="#73AF55" stroke-width="6" stroke-miterlimit="10" cx="65.1"
cy="65.1" r="62.1" />
Expand All @@ -25,7 +24,7 @@
</svg>
<p class="error">Failed!</p>
</div>
-->

</div>

<div class="content">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ p {
flex-direction: row;
align-items: center;
justify-content: space-between;

height: 50px;

.signup {
display: flex;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export class HubspotIntegrationComponent implements OnInit {
this.logger.debug("[INT-Hubspot] integration ", this.integration)
this.translateparams = { intname: 'Hubspot' };
if (this.integration.value.apikey) {
this.checkKey(this.integration.value.apikey);
this.checkKey();
}
}

Expand All @@ -44,7 +44,7 @@ export class HubspotIntegrationComponent implements OnInit {
}

saveIntegration() {
this.checkKey(this.integration.value.apikey).then((status) => {
this.checkKey().then((status) => {
let data = {
integration: this.integration,
isVerified: status
Expand Down Expand Up @@ -87,27 +87,29 @@ export class HubspotIntegrationComponent implements OnInit {
// })
// }

checkKey(key: string) {
return new Promise((resolve, reject) => {
this.integrationService.checkKeyQapla(key).subscribe((resp: any) => {
if (resp.getCouriers.result === 'OK') {
this.isVerified = true;
resolve(true);
checkKey() {
return new Promise((resolve) => {
let url = "https://api.hubapi.com/crm/v3/objects/contacts?limit=10";
let key = "Bearer " + this.integration.value.apikey;
this.integrationService.checkIntegrationKeyValidity(url, key).subscribe((resp: any) => {
this.isVerified = true;
resolve(true);
}, (error) => {
this.logger.error("[INT-Hubspot] Key verification failed: ", error);
if (error.status === 0) {
resolve(false);
} else {
this.isVerified = false;
resolve(false);

}
}, (error) => {
this.logger.error("[INT-Qapla] Key verification failed: ", error);
this.isVerified = false;
resolve(false);
})
})
}

resetValues() {
this.integration.value = {
apikey: null,
apikey: null
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ p {
flex-direction: row;
align-items: center;
justify-content: space-between;
height: 50px;

.signup {
display: flex;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,17 @@
</div>
<!-- <p><a href="https://openai.com/" target="_blank">Sign up</a> for a free <b>OpenAI</b> account!</p> -->

<!-- <div *ngIf="isVerified === true" class="status">
<div *ngIf="isVerified === true" class="status">
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 130.2 130.2">
<circle class="path circle" fill="none" stroke="#73AF55" stroke-width="6" stroke-miterlimit="10" cx="65.1"
cy="65.1" r="62.1" />
<polyline class="path check" fill="none" stroke="#73AF55" stroke-width="6" stroke-linecap="round"
stroke-miterlimit="10" points="100.2,40.2 51.5,88.8 29.8,67.5 " />
</svg>
<p class="success">{{ 'Integration.Verified' | translate }}</p>
</div> -->
</div>

<!-- <div *ngIf="isVerified === false" class="status">
<div *ngIf="isVerified === false" class="status">
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 130.2 130.2">
<circle class="path circle" fill="none" stroke="#D06079" stroke-width="6" stroke-miterlimit="10" cx="65.1"
cy="65.1" r="62.1" />
Expand All @@ -25,7 +25,7 @@
stroke-miterlimit="10" x1="95.8" y1="38" x2="34.4" y2="92.2" />
</svg>
<p class="error">{{ 'Integration.Failed' | translate }}</p>
</div> -->
</div>
</div>

<div class="content">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ p {
flex-direction: row;
align-items: center;
justify-content: space-between;

height: 50px;

.signup {
display: flex;

Expand Down
Loading

0 comments on commit 99b7362

Please sign in to comment.