Skip to content

Commit

Permalink
v. 0.0.2 in PRE
Browse files Browse the repository at this point in the history
  • Loading branch information
Gabriele Panico committed Nov 2, 2023
1 parent eeebbf1 commit b2072bb
Show file tree
Hide file tree
Showing 11 changed files with 26 additions and 25 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@
- added: 404 not found component
- changed: minor UI improvements
- bug-fixed: not sent null text if textarea is null in action-reply image and gallery elements

- bug-fixed: text-area changes not saved
- bug-fixed: emoji not saved in panel-button-configuration component

### 0.0.1
- first deploy
Expand Down
6 changes: 4 additions & 2 deletions src/app/app.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,9 @@ export class AppComponent implements OnInit, AfterViewInit, OnDestroy {
private multiChannelService: MultichannelService,
private uploadService: UploadService
){

let version = environment.VERSION
const style = 'background-color: rgb(255,75,80); color: white; font-style: italic; border: 5px solid rgb(255,220,221); font-size: 1.5em; padding: 10px 30px; width: 100%; text-align: center'
console.log(`%c TILEDESK DESIGN STUDIO (v ${version})`,style);
}

ngOnInit(): void {
Expand Down Expand Up @@ -273,7 +275,7 @@ export class AppComponent implements OnInit, AfterViewInit, OnDestroy {
} else {
this.logger.warn('[APP-COMP] >>> I AM NOT LOGGED IN <<<')
this.IS_ONLINE = false;
this.goToDashboardLogin()
// this.goToDashboardLogin()
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ export class CdsActionDescriptionComponent implements OnInit {
}
// this.element = ELEMENTS_LIST.find(item => item.type === this.elementType);

if(this.actionSelected._tdActionTitle && this.actionSelected._tdActionTitle != ""){
if(this.actionSelected && this.actionSelected._tdActionTitle && this.actionSelected._tdActionTitle != ""){
this.dataInput = this.actionSelected._tdActionTitle;
}
this.logger.log('ActionDescriptionComponent action:: ', this.element);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ export class CdsActionIntentComponent implements OnInit {
ngOnInit(): void {
// console.log("[CDS-ACTION-INTENT] elementSelected: ", this.action, this.intentSelected)
this.subscriptionChangedConnector = this.intentService.isChangedConnector$.subscribe((connector: any) => {
// console.log('[CDS-ACTION-INTENT] - subcribe to isChangedConnector$ >>', connector);
console.log('[CDS-ACTION-INTENT] - subcribe to isChangedConnector$ >>', connector);
this.connector = connector;
this.updateConnector();
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,6 @@ export class CdsActionReplyTextComponent implements OnInit {
buttonChanged.__idConnector = this.connector.fromId;
buttonChanged.action = buttonChanged.action? buttonChanged.action : '#' + this.connector.toId;
buttonChanged.type = TYPE_BUTTON.ACTION;
console.log('[CdsActionReplyTextComponent] updateConnector :: ', buttonChanged);
if(!buttonChanged.__isConnected){
buttonChanged.__isConnected = true;
// if(this.connector.notify)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,9 @@ export class CdsActionWebRequestV2Component implements OnInit {

// SYSTEM FUNCTIONS //
ngOnInit(): void {
this.logger.debug("[ACTION-ASKGPT] action detail: ", this.action);
this.logger.debug("[ACTION-WEB-REQUEST-v2] action detail: ", this.action);
this.subscriptionChangedConnector = this.intentService.isChangedConnector$.subscribe((connector: any) => {
this.logger.debug('[ACTION-ASKGPT] isChangedConnector -->', connector);
// this.logger.debug('[ACTION-WEB-REQUEST-v2] isChangedConnector -->', connector);
this.connector = connector;
this.updateConnector();
});
Expand Down Expand Up @@ -122,7 +122,7 @@ export class CdsActionWebRequestV2Component implements OnInit {
}
if(this.connector.save)this.updateAndSaveAction.emit({type: TYPE_UPDATE_ACTION.CONNECTOR, element: this.connector});
} else {
this.logger.debug('[ACTION-ASKGPT] updateConnector', this.connector.toId, this.connector.fromId ,this.action, array[array.length-1]);
this.logger.debug('[ACTION-WEB-REQUEST-v2] updateConnector', this.connector.toId, this.connector.fromId ,this.action, array[array.length-1]);
if(array[array.length -1] === 'true'){
this.isConnectedTrue = true;
this.action.trueIntent = '#'+this.connector.toId;
Expand All @@ -139,7 +139,7 @@ export class CdsActionWebRequestV2Component implements OnInit {

}
} catch (error) {
this.logger.error('[ACTION-ASKGPT] updateConnector error: ', error);
this.logger.error('[ACTION-WEB-REQUEST-v2] updateConnector error: ', error);
}
}

Expand All @@ -158,7 +158,6 @@ export class CdsActionWebRequestV2Component implements OnInit {
this.body = this.formatJSON(this.body, "\t");
}
this.assignments = this.action.assignments
console.log('actionnnnnnnn', this.action);
if(this.intentSelected){
this.initializeConnector();
}
Expand All @@ -176,7 +175,7 @@ export class CdsActionWebRequestV2Component implements OnInit {
new_attributes.push({ name: "error", value: "error" });
}
variableList.userDefined = [ ...variableList.userDefined, ...new_attributes];
this.logger.debug("[ACTION ASKGPT] Initialized variableList.userDefined: ", variableList.userDefined);
this.logger.debug("[ACTION-WEB-REQUEST-v2] Initialized variableList.userDefined: ", variableList.userDefined);
}


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ export class CdsPanelWidgetComponent implements OnInit, OnDestroy {

setIframeUrl(){
console.log('[CDS-PANEL-WIDGET] setIframeUrl parameters ---> ', this.projectID, this.selectedChatbot, this.defaultDepartmentId, this.intentName)
this.WIDGET_BASE_URL = this.appConfigService.getConfig().WIDGET_BASE_URL;
this.WIDGET_BASE_URL = this.appConfigService.getConfig().widgetBaseUrl;
// const testItOutBaseUrl = this.TESTSITE_BASE_URL.substring(0, this.TESTSITE_BASE_URL.lastIndexOf('/'));
const testItOutUrl = this.WIDGET_BASE_URL + "assets/twp" + '/chatbot-panel.html'
// const testItOutUrl = "https://widget.tiledesk.com/v6/5.0.71/assets/twp"+ '/chatbot-panel.html'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,16 +76,7 @@ export class CdsDashboardComponent implements OnInit {

return new Promise((resolve, reject) => {
this.route.params.subscribe({ next: (params) => {
console.log('paramssssss', params)
// this.id_faq_kb = params['faqkbid'];
// this.id_faq = params['faqid'];
// this.botType = params['bottype'];
// this.intent_id = params['intent_id'];
this.logger.log('[ DSHBRD-SERVICE ] getUrlParams PARAMS', params);
// this.logger.log('[ DSHBRD-SERVICE ] getUrlParams BOT ID ', this.id_faq_kb);
// this.logger.log('[ DSHBRD-SERVICE ] getUrlParams FAQ ID ', this.id_faq);
// this.logger.log('[ DSHBRD-SERVICE ] getUrlParams FAQ ID ', this.intent_id);
console.log('[ DSHBRD-SERVICE ] getUrlParams', params);
this.dashboardService.setParams(params)
resolve(true);
}, error: (error) => {
Expand Down Expand Up @@ -115,7 +106,6 @@ export class CdsDashboardComponent implements OnInit {
const getCurrentProject = await this.dashboardService.getCurrentProject();
this.logger.log('[CDS DSHBRD] Risultato 3:', getCurrentProject);
this.project = this.dashboardService.project
console.log('ppppppppppp', this.project)
this.initialize()
const getBotById = await this.dashboardService.getBotById();
this.logger.log('[CDS DSHBRD] Risultato 4:', getBotById, this.selectedChatbot);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
<div class="header-left" [class.is_opened]="IS_OPEN_SIDEBAR">
<div class="header-left" [class.is_opened]="IS_OPEN_SIDEBAR"
matTooltip="v. {{version}}"
matTooltipClass="custom-mat-tooltip"
matTooltipHideDelay="100"
matTooltipPosition='below'
#tooltip="matTooltip">
<img *ngIf="!IS_OPEN_SIDEBAR" src="assets/logos/tiledesk_logo_white_small.svg">
<img *ngIf="IS_OPEN_SIDEBAR" src="assets/logos/tiledesk-logo_new_white.svg">
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
transition: 0.3s;
background-color: $blu;
border-right: 1px solid $gray-light-02;
cursor: pointer;
img {
width: 30px;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import { LoggerInstance } from 'src/chat21-core/providers/logger/loggerInstance'
import { Chatbot } from 'src/app/models/faq_kb-model';
import { EXTERNAL_URL, TYPE_INTENT_NAME } from '../../utils';
import { CdsPublishOnCommunityModalComponent } from '../utils/cds-publish-on-community-modal/cds-publish-on-community-modal.component';
import { environment } from 'src/environments/environment';

const swal = require('sweetalert');

Expand Down Expand Up @@ -53,6 +54,7 @@ export class CdsHeaderComponent implements OnInit {
TRY_ON_WA: boolean;
displayModalAttacchBotToDept: string;

version: string;
private logger: LoggerService = LoggerInstance.getInstance();

constructor(
Expand All @@ -78,6 +80,8 @@ export class CdsHeaderComponent implements OnInit {
if(this.router.url.includes('beta')){
this.isBetaUrl = true;
}

this.version = environment.VERSION
}

getOSCODE() {
Expand Down Expand Up @@ -112,7 +116,7 @@ export class CdsHeaderComponent implements OnInit {
}

getTestSiteUrl() {
this.TESTSITE_BASE_URL = this.appConfigService.getConfig().testsiteBaseUrl;
this.TESTSITE_BASE_URL = this.appConfigService.getConfig().widgetBaseUrl;
this.logger.log('[CDS DSBRD] AppConfigService getAppConfig TESTSITE_BASE_URL', this.TESTSITE_BASE_URL);
}

Expand Down

0 comments on commit b2072bb

Please sign in to comment.