Skip to content

Commit

Permalink
minor logic improvement on variables
Browse files Browse the repository at this point in the history
  • Loading branch information
Gabriele Panico committed Nov 7, 2023
1 parent 18238cf commit 80bf5f4
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 15 deletions.
6 changes: 4 additions & 2 deletions src/app/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import { WhatsappService } from './services/whatsapp.service';
import { TranslateLoader, TranslateModule } from '@ngx-translate/core';
import { BrandService } from './services/brand.service';
import { MultichannelService } from './services/multichannel.service';
import { MatDialogModule } from '@angular/material/dialog';
import { MAT_DIALOG_DATA, MatDialogModule, MatDialogRef} from '@angular/material/dialog';
import { NgSelectModule } from '@ng-select/ng-select';
import { SatPopoverModule } from '@ncstate/sat-popover';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
Expand Down Expand Up @@ -194,7 +194,9 @@ export function uploadFactory(http: HttpClient, appConfig: AppConfigService, app
WebSocketJs,
DatePipe,
NotifyService,
{ provide: LocationStrategy, useClass: HashLocationStrategy }
{ provide: LocationStrategy, useClass: HashLocationStrategy },
{ provide: MAT_DIALOG_DATA, useValue: {} },
{ provide: MatDialogRef, useValue: {} }
]
})
export class AppModule { }
Original file line number Diff line number Diff line change
Expand Up @@ -110,11 +110,11 @@ export class CDSTextareaComponent implements OnInit {
if(this.elTextarea)this.elTextarea.value = '';
// console.log("SI:: readonly -- text --", this.text, " -- textTag --", this.textTag);
} else {
this.text = event;
this.text = event.trim();
// console.log("NO:: readonly -- text --", this.text, " -- textTag --", this.textTag);
}
if(!this.isSelected || !this.readonly){
this.changeTextarea.emit(event);
this.changeTextarea.emit(event.trim());
}
}

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

this.projectID = this.dashboardService.projectID;
this.selectedChatbot = this.dashboardService.selectedChatbot;
this.defaultDepartmentId = this.dashboardService.defaultDepartmentId;
this.defaultDepartmentId = this.dashboardService.defaultDepartment._id;
this.setIframeUrl()
}

Expand Down
22 changes: 12 additions & 10 deletions src/app/chatbot-design-studio/chatbot-design-studio.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,10 @@ import { MatSlideToggleModule } from '@angular/material/slide-toggle';
import { MatTooltipModule } from '@angular/material/tooltip';
import { MatDialogModule } from '@angular/material/dialog';
import { MatTabsModule } from '@angular/material/tabs';

import { MatButtonModule } from '@angular/material/button';
import { MatIconModule } from '@angular/material/icon';
import { MatMenuModule } from '@angular/material/menu';
import {MatButtonToggleModule} from '@angular/material/button-toggle';
import { MatButtonToggleModule } from '@angular/material/button-toggle';



Expand Down Expand Up @@ -95,7 +94,6 @@ import { PanelIntentControlsComponent } from './cds-dashboard/cds-canvas/cds-int



import { CdsPublishOnCommunityModalComponent } from './cds-dashboard/utils/cds-publish-on-community-modal/cds-publish-on-community-modal.component';
import { SelectComponent } from './cds-base-element/select/select.component';
// import { VariableListComponent } from './cds-dashboard/cds-canvas/panel-intent-detail/actions/action-json-condition/variable-list/variable-list.component';
import { TextEditableDivComponent } from './cds-base-element/text-editable-div/text-editable-div.component';
Expand All @@ -109,7 +107,6 @@ import { CDSRadioButtonComponent } from './cds-base-element/radio-button/radio-b
import { CDSDetailBotDetailComponent } from './cds-chatbot-details/detail/detail.component';
import { CDSDetailImportExportComponent } from './cds-chatbot-details/import-export/import-export.component';
import { WsChatbotService } from 'src/app/services/websocket/ws-chatbot.service';
import { ChangeBotLangModalComponent } from 'src/app/modals/change-bot-lang/change-bot-lang.component';
// import { ActionWhatsappStaticComponent } from './cds-dashboard/panel-intent-detail/actions/action-whatsapp-static/action-whatsapp-static.component';
// import { ActionWhatsappAttributeComponent } from './cds-dashboard/panel-intent-detail/actions/action-whatsapp-attribute/action-whatsapp-attribute.component';
// import { ActionWhatsappSegmentComponent } from './cds-dashboard/panel-intent-detail/actions/action-whatsapp-segment/action-whatsapp-segment.component';
Expand All @@ -121,7 +118,6 @@ import { ChangeBotLangModalComponent } from 'src/app/modals/change-bot-lang/chan


import { CdsPopupComponent } from './cds-dashboard/utils/cds-popup/cds-popup.component';
import { CdsModalActivateBotComponent } from './cds-dashboard/utils/cds-modal-activate-bot/cds-modal-activate-bot.component';
import { CdsPanelElementsComponent } from './cds-dashboard/cds-canvas/cds-panel-elements/cds-panel-elements.component';
import { CdsPanelActionsComponent } from './cds-dashboard/cds-canvas/cds-panel-elements/cds-panel-actions/cds-panel-actions.component';
import { CdsPanelIntentListComponent } from './cds-dashboard/cds-canvas/cds-panel-intent-list/cds-panel-intent-list.component';
Expand Down Expand Up @@ -189,6 +185,11 @@ import { FormFieldComponent } from './cds-dashboard/cds-canvas/actions/list/form
import { FormEditAddComponent } from './cds-dashboard/cds-canvas/actions/list/form/form-edit-add/form-edit-add.component';
import { ModalWindowComponent } from './cds-dashboard/cds-canvas/actions/list/form/modal-window/modal-window.component';

//MODALS
import { CdsPublishOnCommunityModalComponent } from '../modals/cds-publish-on-community-modal/cds-publish-on-community-modal.component';
import { ChangeBotLangModalComponent } from 'src/app/modals/change-bot-lang/change-bot-lang.component';
import { CdsModalActivateBotComponent } from '../modals/cds-modal-activate-bot/cds-modal-activate-bot.component';


import { CdsActionArrowComponent } from './cds-dashboard/cds-canvas/actions/shared/cds-action-controls/cds-action-arrow/cds-action-arrow.component';
import { CdsActionControlsComponent } from './cds-dashboard/cds-canvas/actions/shared/cds-action-controls/cds-action-controls/cds-action-controls.component';
Expand All @@ -201,6 +202,7 @@ import { CdsRuleComponent } from './cds-dashboard/cds-rule/cds-rule.component';

import { CdsOptionsComponent } from './cds-dashboard/cds-canvas/cds-options/cds-options.component';


@NgModule({
declarations: [
CdsDashboardComponent,
Expand Down Expand Up @@ -329,16 +331,16 @@ import { CdsOptionsComponent } from './cds-dashboard/cds-canvas/cds-options/cds-
CDSDetailImportExportComponent,
CDSDetailCommunityComponent,
CDSDetailDeveloperComponent,
ChangeBotLangModalComponent,
// ******* CDS CHATBOT DETAIL:: end *******

//UTILS
CdsPopupComponent,
CdsSplashScreenComponent,

//MODALS
CdsModalActivateBotComponent,
CdsPublishOnCommunityModalComponent,
CdsSplashScreenComponent,


ChangeBotLangModalComponent,

//EVENT BASE COMPONENT
CdsEventComponent,
Expand Down Expand Up @@ -389,7 +391,7 @@ import { CdsOptionsComponent } from './cds-dashboard/cds-canvas/cds-options/cds-
})
],
providers: [
WsChatbotService
WsChatbotService,
// DragDropService
],
entryComponents: [
Expand Down

0 comments on commit 80bf5f4

Please sign in to comment.