From 5879fa8f5a3a306e2d9c7739422880b52fd39409 Mon Sep 17 00:00:00 2001
From: Thomas Hansen
Date: Mon, 18 Sep 2023 09:14:32 +0300
Subject: [PATCH] Changing to conversations
---
...nnaires.get.hl => ml_requests_export_conversations.get.hl} | 2 +-
.../_general/services/machine-learning-training.service.ts | 4 ++--
.../machine-learning-history.component.html | 2 ++
3 files changed, 5 insertions(+), 3 deletions(-)
rename backend/files/system/magic/{ml_requests_export_questionnaires.get.hl => ml_requests_export_conversations.get.hl} (97%)
diff --git a/backend/files/system/magic/ml_requests_export_questionnaires.get.hl b/backend/files/system/magic/ml_requests_export_conversations.get.hl
similarity index 97%
rename from backend/files/system/magic/ml_requests_export_questionnaires.get.hl
rename to backend/files/system/magic/ml_requests_export_conversations.get.hl
index a45e391cd6..6ffddedcc0 100644
--- a/backend/files/system/magic/ml_requests_export_questionnaires.get.hl
+++ b/backend/files/system/magic/ml_requests_export_conversations.get.hl
@@ -74,7 +74,7 @@ data.connect:[generic|magic]
response.headers.set
Content-Type:text/csv
Access-Control-Expose-Headers:Content-Disposition
- Content-Disposition:"attachment; filename=\"leads.csv\""
+ Content-Disposition:"attachment; filename=\"conversations.csv\""
// Returning content to caller.
return:x:@lambda2csv
diff --git a/frontend/src/app/_general/services/machine-learning-training.service.ts b/frontend/src/app/_general/services/machine-learning-training.service.ts
index face8b4435..f061e08f81 100644
--- a/frontend/src/app/_general/services/machine-learning-training.service.ts
+++ b/frontend/src/app/_general/services/machine-learning-training.service.ts
@@ -110,7 +110,7 @@ export class MachineLearningTrainingService {
ml_export_questionnaires(filter: any = null) {
this.httpService.download(
- '/magic/system/magic/ml_requests_export_questionnaires' +
+ '/magic/system/magic/ml_requests_export_conversations' +
(filter?.type ? this.queryArgService.getQueryArgs(filter) : '')).subscribe({
next: (res) => {
@@ -121,7 +121,7 @@ export class MachineLearningTrainingService {
},
error: () => {
- this.generalService.showFeedback('No questionnaire data was found', 'errorMessage');
+ this.generalService.showFeedback('No conversation data was found', 'errorMessage');
}
});
}
diff --git a/frontend/src/app/_protected/pages/manage/machine-learning/machine-learning-history/machine-learning-history.component.html b/frontend/src/app/_protected/pages/manage/machine-learning/machine-learning-history/machine-learning-history.component.html
index 1272fd3e33..152fc3f9a5 100644
--- a/frontend/src/app/_protected/pages/manage/machine-learning/machine-learning-history/machine-learning-history.component.html
+++ b/frontend/src/app/_protected/pages/manage/machine-learning/machine-learning-history/machine-learning-history.component.html
@@ -23,8 +23,10 @@ Machine Learning history
(filterList)="filterList($event)"
buttonText="Export leads"
(buttonClick)="exportLeads()"
+ [buttonDisabled]="!type"
button2Text="Export conversations"
(button2Click)="exportQuestionnaires()"
+ [button2Disabled]="!type"
[(type)]="type"
[types]="types">
|