Skip to content

Commit

Permalink
Merge branch 'master' into DS-dario
Browse files Browse the repository at this point in the history
  • Loading branch information
dariodepa75 committed Nov 9, 2023
2 parents e55689e + fdab191 commit c39d203
Show file tree
Hide file tree
Showing 7 changed files with 48 additions and 42 deletions.
14 changes: 11 additions & 3 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@ on:
push:
tags:
- '**' # Push events to every tag including hierarchical tags like
jobs:

jobs:
push_to_registry:
name: Push Docker image to Docker Hub
runs-on: ubuntu-latest

steps:
- name: Check out the repo
- name: Check out the repo
uses: actions/checkout@v4

- name: Login to Docker Hub
Expand All @@ -23,5 +23,13 @@ jobs:
repository: tiledesk/design-studio
tag_with_ref: true

- name: Build and push
- name: Build and push
uses: docker/build-push-action@v4

- name: Build and push
uses: docker/build-push-action@v4
with:
context: .
file: ./Dockerfile
push: true
tags: latest
4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@
### **Copyrigth**: *Tiledesk SRL*

### 0.0.5
- added: cds-secrets component in cds-sidebar
- added: loader on cds-dashboard
- added: cds-secrets component in cds-sidebar (beta)
- bug-fixed: buttons connector not aligned with button-container while dragging

### 0.0.4
- added: new cds-modal-activate-bot while publishing a chatbot
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,7 +1,7 @@
{
"name": "@tiledesk/cds",
"author": "Tiledesk SRL",
"version": "0.0.4",
"version": "0.0.5",
"license": "MIT",
"homepage": "https://www.tiledesk.com",
"repository": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<!-- ---------------------------------------------- -->
<div class="cds-modal-content">
<div class="cds-modal-header">
<h1 mat-dialog-title>{{ "HookTheBot" | translate }}</h1>
<h1>{{ "HookTheBot" | translate }}</h1>
<mat-dialog-actions>
<button mat-button mat-dialog-close>
<span class="material-icons">
Expand All @@ -26,12 +26,7 @@ <h1 mat-dialog-title>{{ "HookTheBot" | translate }}</h1>

<div class="cds-modal-body" id="deptsChoise">

<div *ngIf="!DISPLAY_SELECT_DEPTS_WITHOUT_BOT && HAS_COMPLETED_HOOK_BOOT_TO_DEPT === false && !DISPLAY_INSTALL_SCRIPT" class="field-box modal-flex">
<label class="title-label" [innerHTML]="'DoYouWantToActivateTheBotForNewConversations' | translate: translateparamBotName "></label>
<!-- <h3> {{ 'DoYouWantToActivateTheBotForNewVonversations' | translate: translateparamBotName }} </h3> -->
</div>

<div *ngIf="DISPLAY_SELECT_DEPTS_WITHOUT_BOT && HAS_COMPLETED_HOOK_BOOT_TO_DEPT === false && !DISPLAY_INSTALL_SCRIPT" class="field-box modal-flex">
<div class="field-box modal-flex">
<label class="title-label" [innerHTML]="'DoYouWantToActivateBotForOneOfTheFollowingDepts' | translate: translateparamBotName "></label>
<cds-select
[items]="depts_without_bot_array"
Expand All @@ -45,7 +40,7 @@ <h1 mat-dialog-title>{{ "HookTheBot" | translate }}</h1>
</div>


<div *ngIf="HAS_COMPLETED_HOOK_BOOT_TO_DEPT && !DISPLAY_INSTALL_SCRIPT" class="modal-flex">
<!-- <div *ngIf="HAS_COMPLETED_HOOK_BOOT_TO_DEPT && !DISPLAY_INSTALL_SCRIPT" class="modal-flex">
<span *ngIf="HAS_COMPLETED_HOOK_BOOT_TO_DEPT_SUCCESS" class="field-box modal-flex">
Expand Down Expand Up @@ -73,7 +68,7 @@ <h5 style="color:#73AF55;"> {{'BotSuccessfullyActivated' | translate }}</h5>
</svg>
<h5 style="color:#D06079;"> {{'AnErroOccurredWhileActivatingTheBot' | translate }}</h5>
</span>
</div>
</div> -->


<div *ngIf="DISPLAY_INSTALL_SCRIPT" class="modal-flex">
Expand All @@ -86,16 +81,12 @@ <h5 style="color:#D06079;"> {{'AnErroOccurredWhileActivatingTheBot' | translate

<div class="cds-modal-footer">

<div (click)="DISPLAY_INSTALL_SCRIPT = !DISPLAY_INSTALL_SCRIPT" id="installBtn">
<span> {{ "Install" | translate }} </span>
</div>

<button *ngIf="!deptSelected && HAS_COMPLETED_HOOK_BOOT_TO_DEPT === false && !DISPLAY_INSTALL_SCRIPT" id="ignoreBtn"
<button id="ignoreBtn"
class="btn btn-primary cds-blue-button" (click)="DEPTS_HAS_NOT_A_BOT = !DEPTS_HAS_NOT_A_BOT">
<span> {{ 'Ignore' | translate}} </span>
</button>

<button *ngIf="deptSelected && HAS_COMPLETED_HOOK_BOOT_TO_DEPT === false"
<button *ngIf="deptSelected && HAS_COMPLETED_HOOK_BOOT_TO_DEPT === false"
class="btn btn-primary cds-blue-button" (click)="hookBotToDept()">
<i *ngIf="HAS_CLICKED_HOOK_BOOT_TO_DEPT === true && HAS_COMPLETED_HOOK_BOOT_TO_DEPT === false"
class="fa fa-spinner fa-spin"></i>
Expand All @@ -108,19 +99,18 @@ <h5 style="color:#D06079;"> {{'AnErroOccurredWhileActivatingTheBot' | translate
<span> {{ "BotsAddEditPage.Continue" | translate }} </span>
</button>

<button *ngIf="DISPLAY_INSTALL_SCRIPT"
class="btn btn-primary cds-blue-button" (click)="DISPLAY_INSTALL_SCRIPT = !DISPLAY_INSTALL_SCRIPT">
<span> < {{ "Back" | translate }} </span>
</button>

</div> <!-- /.modal-footer -->

</ng-template>


<ng-template #publishStep>
<div class="cds-modal-body" id="publishStep">
<div *ngIf="!HAS_COMPLETED_PUBLISH" class="field-box modal-flex">
<label class="title-label">Publish your flow?</label>
<div class="field-box modal-flex">
<label class="title-label">Complimenti! Stai per pubblicare il tuo Chatbot 🚀 </label>

<label class="title-label"> <a>Segui</a> queste semplici istruzioni per attivarlo sul tuo sito web </label>
<!-- <h3> {{ 'DoYouWantToActivateTheBotForNewVonversations' | translate: translateparamBotName }} </h3> -->
</div>

Expand Down Expand Up @@ -157,6 +147,15 @@ <h5 style="color:#D06079;"> {{'AnErroOccurredWhilePublishingTheBot' | translate

<div class="cds-modal-footer" id="publishStep">

<div *ngIf="!DISPLAY_INSTALL_SCRIPT" (click)="DISPLAY_INSTALL_SCRIPT = !DISPLAY_INSTALL_SCRIPT" id="installBtn">
<span> {{ "Install" | translate }} </span>
</div>

<button *ngIf="DISPLAY_INSTALL_SCRIPT"
class="btn btn-primary cds-blue-button" (click)="DISPLAY_INSTALL_SCRIPT = !DISPLAY_INSTALL_SCRIPT">
<span> < {{ "Back" | translate }} </span>
</button>

<button *ngIf="!HAS_COMPLETED_PUBLISH" (click)="publish()"
class="btn btn-primary cds-blue-button">
<span> {{ "Publish" | translate }} </span>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,9 @@
display: flex;
width: 100%;
align-items: center;
justify-content: space-between;

flex-direction: row-reverse;
gap: 10px;

#ignoreBtn{
background-color: $blu-light-02;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export class CdsModalActivateBotComponent implements OnInit {


defaultDepartmentId: string;
DISPLAY_SELECT_DEPTS_WITHOUT_BOT: boolean;
// DISPLAY_SELECT_DEPTS_WITHOUT_BOT: boolean;
DISPLAY_INSTALL_SCRIPT: boolean = false;
// PRESENTS_MODAL_ATTACH_BOT_TO_DEPT: boolean = false;
depts_without_bot_array = [];
Expand All @@ -42,7 +42,7 @@ export class CdsModalActivateBotComponent implements OnInit {
HAS_COMPLETED_PUBLISH_ERROR: boolean = false

translateparamBotName: any
DEPTS_HAS_NOT_A_BOT: boolean = true
DEPTS_HAS_NOT_A_BOT: boolean = false


webScript: string;
Expand Down Expand Up @@ -82,30 +82,26 @@ export class CdsModalActivateBotComponent implements OnInit {
this.logger.log('[ACTIVATE-BOT-MODAL-COMPONENT] ---> GET DEPTS DEPTS LENGHT ', depts_length);

if (depts_length === 1) {
this.DISPLAY_SELECT_DEPTS_WITHOUT_BOT = false;
// this.DISPLAY_SELECT_DEPTS_WITHOUT_BOT = false;
this.deptSelected = {id: this.departments[0]._id, name: this.departments[0].name}

this.logger.log('[ACTIVATE-BOT-MODAL-COMPONENT] ---> DEFAULT DEPT HAS BOT ', this.departments[0].hasBot);
if (this.departments[0].hasBot === true) {
this.DEPTS_HAS_NOT_A_BOT = false
if (!this.departments[0].hasBot) {
this.DEPTS_HAS_NOT_A_BOT = true
this.hookBotToDept()
this.logger.log('[ACTIVATE-BOT-MODAL-COMPONENT] ---> DEFAULT DEPT HAS BOT ');
// this.DISPLAY_BTN_ACTIVATE_BOT_FOR_NEW_CONV = false;
// this.logger.log('Bot Create ---> DEFAULT DEPT HAS BOT DISPLAY_BTN_ACTIVATE_BOT_FOR_NEW_CONV ', this.DISPLAY_BTN_ACTIVATE_BOT_FOR_NEW_CONV);
}
}


if (depts_length > 1) {
this.DISPLAY_SELECT_DEPTS_WITHOUT_BOT = true;
this.DEPTS_HAS_NOT_A_BOT = false
this.departments.forEach(dept => {
if (dept.hasBot === true) {

// this.logger.log('[CDS DSBRD] ---> DEPT HAS BOT ');
} else {
if (!dept.hasBot) {
this.DEPTS_HAS_NOT_A_BOT = true
this.depts_without_bot_array.push({ id: dept._id, name: dept.name })
}

}
});

// this.logger.log('[CDS DSBRD] ---> DEPT ARRAY OF DEPT WITHOUT BOT ', this.depts_without_bot_array);
Expand Down

0 comments on commit c39d203

Please sign in to comment.