From edaa8283a0e66dbe1d73d098821e09afe937b63e Mon Sep 17 00:00:00 2001 From: Nicola Lanzilotto Date: Fri, 1 Mar 2024 12:10:29 +0100 Subject: [PATCH 01/34] Refactors the bot list page --- src/app/app.module.ts | 5 +- .../bots/bots-list/bots-list.component.html | 355 +++++++++++++++--- .../bots/bots-list/bots-list.component.scss | 286 +++++++++++++- src/app/bots/bots-list/bots-list.component.ts | 261 ++++++++++++- .../bots-sidebar/bots-sidebar.component.html | 68 ++-- .../chatbot-stats-modal.component.html | 86 +++++ .../chatbot-stats-modal.component.scss | 41 ++ .../chatbot-stats-modal.component.spec.ts | 23 ++ .../chatbot-stats-modal.component.ts | 248 ++++++++++++ .../clone-bot/clone-bot.component.html | 1 + .../template-detail.component.ts | 6 +- .../bots/templates/templates.component.html | 2 +- src/app/users/users.component.ts | 2 - src/assets/css/demo.scss | 17 + src/variables.scss | 2 +- 15 files changed, 1285 insertions(+), 118 deletions(-) create mode 100644 src/app/bots/bots-list/chatbot-stats-modal/chatbot-stats-modal.component.html create mode 100644 src/app/bots/bots-list/chatbot-stats-modal/chatbot-stats-modal.component.scss create mode 100644 src/app/bots/bots-list/chatbot-stats-modal/chatbot-stats-modal.component.spec.ts create mode 100644 src/app/bots/bots-list/chatbot-stats-modal/chatbot-stats-modal.component.ts diff --git a/src/app/app.module.ts b/src/app/app.module.ts index c3fc592996f1..a938ee6179a2 100755 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -394,6 +394,8 @@ import { KnowledgeBaseTableComponent } from './knowledge-bases/modals/knowledge- import { ModalErrorComponent } from './knowledge-bases/modals/modal-error/modal-error.component'; import { KnowledgeBasesPreviousComponent } from './knowledge-bases-previous/knowledge-bases-previous.component'; import { UserModalComponent } from './users/user-modal/user-modal.component'; +import { ChatbotStatsModalComponent } from './bots/bots-list/chatbot-stats-modal/chatbot-stats-modal.component'; + @@ -698,7 +700,8 @@ const appInitializerFn = (appConfig: AppConfigService, brandService: BrandServic KnowledgeBaseTableComponent, ModalErrorComponent, KnowledgeBasesPreviousComponent, - UserModalComponent + UserModalComponent, + ChatbotStatsModalComponent ], imports: [ TooltipModule.forRoot(CutomTooltipOptions as TooltipOptions), diff --git a/src/app/bots/bots-list/bots-list.component.html b/src/app/bots/bots-list/bots-list.component.html index 3056d61bb3c3..f23f69632102 100755 --- a/src/app/bots/bots-list/bots-list.component.html +++ b/src/app/bots/bots-list/bots-list.component.html @@ -21,12 +21,10 @@
- @@ -35,13 +33,13 @@ - +
+ +

+ +
+ +
+ +
+
+ +
+ +
+
+ +
+
+ +
+ + + + + +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ + +
+ +
+ + +
+ + + {{ faqkb.name }} + + + +
+
+
+ +
{{ faqkb?.description }} +
+
+ +
+ + {{'Created' | translate}} {{ faqkb?.createdAt | amTimeAgo}} / {{ "Updated" | translate }} {{ + faqkb?.updatedAt | amTimeAgo }} + +
+ +
+
+ +
+
+
+
+ {{ "BotsAddEditPage.Messages" | translate }} +
+
+ {{ faqkb?.message_count}} +
+
+ +
+
+ Published + Draft + +
+
+ + + + done + + + + error_outline + + +
+
+ +
+ +
+
+
+ +
+ +
+ + + + + + + +
+ +
+ + + + + + + + + + + +
+ +
+
+ +
+
+
+
+
+ + + + + -
+