mario-education 2.4.165-level → 2.4.166-level

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (58) hide show
  1. package/dist/MarioFramework.Education/ClientApp/src/components/Select/SelectFilter.d.ts +1 -0
  2. package/dist/MarioFramework.Education/ClientApp/src/containers/AdminTraining/views/AdminTraining.d.ts +1 -0
  3. package/dist/MarioFramework.Education/ClientApp/src/containers/Assessment/components/QuestionSplitPaneSelector.d.ts +1 -0
  4. package/dist/MarioFramework.Education/ClientApp/src/containers/AssessmentAssignment/views/AssessmentAssignmentContainer.d.ts +1 -0
  5. package/dist/MarioFramework.Education/ClientApp/src/containers/AssignAssistant/views/AssignAssistantList.d.ts +1 -0
  6. package/dist/MarioFramework.Education/ClientApp/src/containers/AssignCounselor/views/AssignCounselorList.d.ts +1 -0
  7. package/dist/MarioFramework.Education/ClientApp/src/containers/AssignSecondaryTeacher/views/AssignSecondaryTeacherList.d.ts +1 -0
  8. package/dist/MarioFramework.Education/ClientApp/src/containers/Assignment/components/AcademicClassSelector.d.ts +1 -0
  9. package/dist/MarioFramework.Education/ClientApp/src/containers/Assignment/components/AssessmentSelector.d.ts +1 -0
  10. package/dist/MarioFramework.Education/ClientApp/src/containers/Certificate/views/CertificateContainer.d.ts +1 -0
  11. package/dist/MarioFramework.Education/ClientApp/src/containers/ConferenceRubric/views/ConferenceRubricDetail.d.ts +1 -0
  12. package/dist/MarioFramework.Education/ClientApp/src/containers/CurrentLicense/views/CurrentLicense.d.ts +1 -0
  13. package/dist/MarioFramework.Education/ClientApp/src/containers/Dashboard/components/CustomBarChart.d.ts +1 -0
  14. package/dist/MarioFramework.Education/ClientApp/src/containers/Dashboard/components/CustomLineChart.d.ts +1 -0
  15. package/dist/MarioFramework.Education/ClientApp/src/containers/Dashboard/components/DashboardToPDF.d.ts +1 -0
  16. package/dist/MarioFramework.Education/ClientApp/src/containers/Dashboard/components/LearningStrategiesTable.d.ts +1 -0
  17. package/dist/MarioFramework.Education/ClientApp/src/containers/Dashboard/components/StudentByGender.d.ts +1 -0
  18. package/dist/MarioFramework.Education/ClientApp/src/containers/Dashboard/components/StudentPressureChart.d.ts +1 -0
  19. package/dist/MarioFramework.Education/ClientApp/src/containers/Dashboard/components/TopSkill.d.ts +1 -0
  20. package/dist/MarioFramework.Education/ClientApp/src/containers/Dashboard/components/TotalCard.d.ts +1 -0
  21. package/dist/MarioFramework.Education/ClientApp/src/containers/Dashboard/configs/constants.d.ts +1 -0
  22. package/dist/MarioFramework.Education/ClientApp/src/containers/Dashboard/configs/types.d.ts +35 -0
  23. package/dist/MarioFramework.Education/ClientApp/src/containers/Dashboard/hooks/useExportSessionCsv.d.ts +4 -0
  24. package/dist/MarioFramework.Education/ClientApp/src/containers/Destinations/views/Destinations.d.ts +1 -0
  25. package/dist/MarioFramework.Education/ClientApp/src/containers/FixData/views/FixDataStudent.d.ts +1 -0
  26. package/dist/MarioFramework.Education/ClientApp/src/containers/QuestionBank/components/AgGridComponents.d.ts +1 -0
  27. package/dist/MarioFramework.Education/ClientApp/src/containers/QuestionBank/components/QuestionPreview.d.ts +1 -0
  28. package/dist/MarioFramework.Education/ClientApp/src/containers/QuestionBank/components/UserForQuestion.d.ts +1 -0
  29. package/dist/MarioFramework.Education/ClientApp/src/containers/QuestionBank/views/QuestionBankContainer.d.ts +1 -0
  30. package/dist/MarioFramework.Education/ClientApp/src/containers/QuestionBank/views/SurveyQuestionContainer.d.ts +1 -0
  31. package/dist/MarioFramework.Education/ClientApp/src/containers/ReflectionForm/components/QuestionResponse/EmotionalResponse.d.ts +1 -0
  32. package/dist/MarioFramework.Education/ClientApp/src/containers/ReflectionForm/components/QuestionResponse/MultipleChoiceResponse.d.ts +1 -0
  33. package/dist/MarioFramework.Education/ClientApp/src/containers/ReflectionForm/components/QuestionResponse/RatingReponse.d.ts +1 -0
  34. package/dist/MarioFramework.Education/ClientApp/src/containers/ReflectionForm/components/QuestionResponse/RatingStarReponse.d.ts +1 -0
  35. package/dist/MarioFramework.Education/ClientApp/src/containers/ReflectionForm/components/QuestionResponse/TextInputResponse.d.ts +1 -0
  36. package/dist/MarioFramework.Education/ClientApp/src/containers/ReflectionForm/components/QuestionSplitPaneSelector.d.ts +1 -0
  37. package/dist/MarioFramework.Education/ClientApp/src/containers/ReflectionForm/views/ReflectionContainer.d.ts +1 -0
  38. package/dist/MarioFramework.Education/ClientApp/src/containers/Setup/views/SetupContainer.d.ts +1 -0
  39. package/dist/MarioFramework.Education/ClientApp/src/containers/SurveyDashboard/components/ChoiceChartType.d.ts +1 -0
  40. package/dist/MarioFramework.Education/ClientApp/src/containers/SurveyDashboard/components/TotalCard.d.ts +1 -0
  41. package/dist/MarioFramework.Education/ClientApp/src/containers/SurveyDashboard/configs/types.d.ts +1 -0
  42. package/dist/MarioFramework.Education/ClientApp/src/containers/SwitchAssistant/views/SwitchAssistantList.d.ts +1 -0
  43. package/dist/MarioFramework.Education/ClientApp/src/containers/SwitchCounselor/views/SwitchCounselorList.d.ts +1 -0
  44. package/dist/MarioFramework.Education/ClientApp/src/containers/SwitchSecondaryTeacher/views/SwitchSecondaryTeacherList.d.ts +1 -0
  45. package/dist/MarioFramework.Education/ClientApp/src/containers/SwitchTeacher/views/SwitchTeacherList.d.ts +1 -0
  46. package/dist/MarioFramework.Education/ClientApp/src/containers/TemplateSystem/components/SelectorTemplate.d.ts +1 -0
  47. package/dist/MarioFramework.Education/ClientApp/src/containers/TemplateSystem/views/TemplateContainer.d.ts +1 -0
  48. package/dist/MarioFramework.Education/ClientApp/src/containers/Training/views/Training.d.ts +1 -0
  49. package/dist/MarioFramework.Education/ClientApp/src/containers/TutorialScreen/views/TutorialScreenContainer.d.ts +1 -0
  50. package/dist/MarioFramework.Education/ClientApp/src/containers/UserDeleted/views/UserDeletedList.d.ts +1 -0
  51. package/dist/MarioFramework.Education/ClientApp/src/containers/UserRevert/views/RevertUser.d.ts +1 -0
  52. package/dist/MarioFramework.Education/ClientApp/src/containers/WelcomeEmailResend/views/WelcomeEmailResend.d.ts +1 -0
  53. package/dist/MarioFramework.Education/ClientApp/src/services/dashboardService.d.ts +1 -0
  54. package/dist/index.js +111 -2
  55. package/dist/index.js.map +1 -1
  56. package/dist/index.modern.js +111 -2
  57. package/dist/index.modern.js.map +1 -1
  58. package/package.json +1 -1
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import "react-datepicker/dist/react-datepicker.css";
2
3
  import { PROPS_FILTERS_COMPONENT } from "../../utils/type";
3
4
  declare const SelectFilter: ({ studentUserId, studentId, studentDefault, handleChangeFilters, name, icon, option, onChangeFilters, btnStyle, filter, teacherUserId, changeCurrentTeacherUserId, labelBox, setLabelBox }: PROPS_FILTERS_COMPONENT) => JSX.Element;
@@ -1,2 +1,3 @@
1
+ /// <reference types="react" />
1
2
  declare const AdminTraining: () => JSX.Element;
2
3
  export default AdminTraining;
@@ -1,2 +1,3 @@
1
+ /// <reference types="react" />
1
2
  declare const QuestionSplitPaneSelector: (props: any) => JSX.Element;
2
3
  export default QuestionSplitPaneSelector;
@@ -1,2 +1,3 @@
1
+ /// <reference types="react" />
1
2
  declare const AssessmentAssignmentContainer: () => JSX.Element;
2
3
  export default AssessmentAssignmentContainer;
@@ -1,2 +1,3 @@
1
+ /// <reference types="react" />
1
2
  declare const AssignAssistantList: () => JSX.Element;
2
3
  export default AssignAssistantList;
@@ -1,2 +1,3 @@
1
+ /// <reference types="react" />
1
2
  declare const AssignCounselorList: () => JSX.Element;
2
3
  export default AssignCounselorList;
@@ -1,2 +1,3 @@
1
+ /// <reference types="react" />
1
2
  declare const AssignSecondaryTeacherList: () => JSX.Element;
2
3
  export default AssignSecondaryTeacherList;
@@ -1,2 +1,3 @@
1
+ /// <reference types="react" />
1
2
  declare const AcademicClassSelector: (props: any) => JSX.Element;
2
3
  export default AcademicClassSelector;
@@ -1,2 +1,3 @@
1
+ /// <reference types="react" />
1
2
  declare const AssessmentSelector: (props: any) => JSX.Element;
2
3
  export default AssessmentSelector;
@@ -1,2 +1,3 @@
1
+ /// <reference types="react" />
1
2
  declare const CertificateContainer: () => JSX.Element;
2
3
  export default CertificateContainer;
@@ -1,2 +1,3 @@
1
+ /// <reference types="react" />
1
2
  declare const ConferenceRubricDetail: () => JSX.Element;
2
3
  export default ConferenceRubricDetail;
@@ -1,2 +1,3 @@
1
+ /// <reference types="react" />
1
2
  declare const CurrentLicense: () => JSX.Element;
2
3
  export default CurrentLicense;
@@ -1,2 +1,3 @@
1
+ /// <reference types="react" />
1
2
  declare const CustomBarChart: ({ data, question, chartName }: any) => JSX.Element;
2
3
  export default CustomBarChart;
@@ -1,2 +1,3 @@
1
+ /// <reference types="react" />
1
2
  declare const CustomLineChart: () => JSX.Element;
2
3
  export default CustomLineChart;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { IDashboardToPDF } from "../configs/types";
2
3
  declare const DashboardToPDF: (props: IDashboardToPDF) => JSX.Element;
3
4
  export default DashboardToPDF;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { DashboardFilter } from "../configs/types";
2
3
  interface PropsType {
3
4
  isOpen: boolean;
@@ -1,2 +1,3 @@
1
+ /// <reference types="react" />
1
2
  declare const StudentByGender: ({ data }: any) => JSX.Element;
2
3
  export default StudentByGender;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { IStudentPressureChart } from "../configs/types";
2
3
  declare const StudentPressureChart: ({ studentPressure, width }: IStudentPressureChart) => JSX.Element;
3
4
  export default StudentPressureChart;
@@ -1,2 +1,3 @@
1
+ /// <reference types="react" />
1
2
  declare const TopSkill: () => JSX.Element;
2
3
  export default TopSkill;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { TotalCardItem } from "../configs/types";
2
3
  declare const TotalCard: ({ icon, title, value }: TotalCardItem) => JSX.Element;
3
4
  export default TotalCard;
@@ -80,3 +80,4 @@ export declare const overallReadinessToLearn = "overall_readiness_to_learn";
80
80
  export declare const studentStressByZone = "student_stress_by_zone";
81
81
  export declare const studentDistribution = "student_distribution";
82
82
  export declare const chartNames: string[];
83
+ export declare const CSV_PREFIX = "data:text/csv;charset=utf-8,";
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  export declare type LoginCountingReport = {
2
3
  date: string;
3
4
  studentLoginCount: number;
@@ -308,4 +309,38 @@ export interface IOverallReadinessToLearn {
308
309
  resultQuestion: ISeries[];
309
310
  overViewQuestionLastMonth: IQuestionResponseLastMonth[];
310
311
  }
312
+ export interface SessionResponseCsv {
313
+ sessionId: number;
314
+ isOneToOneConversation: boolean;
315
+ studentName: string;
316
+ studentEmail: string;
317
+ teacherName: string;
318
+ studentResult: SessionResultCsv;
319
+ teacherResult: SessionResultCsv;
320
+ createdByTeacher: boolean;
321
+ gradeLevel: string;
322
+ teacherId: number;
323
+ studentId: number;
324
+ teacherUserId: string;
325
+ studentUserId: string;
326
+ startTime: string;
327
+ isUnlock: boolean;
328
+ }
329
+ export interface SessionResultCsv {
330
+ id: number;
331
+ questions: SessionQuestionCsv[];
332
+ learningSupportCategoryId: number;
333
+ }
334
+ export interface SessionQuestionCsv {
335
+ id: number;
336
+ type: string;
337
+ text: string;
338
+ answer: string;
339
+ learningStrategyAnswers: SessionLearningStrategyCsv[];
340
+ }
341
+ export interface SessionLearningStrategyCsv {
342
+ id: number;
343
+ text: string;
344
+ questionText: string;
345
+ }
311
346
  export {};
@@ -0,0 +1,4 @@
1
+ declare const useExportSessionCsv: () => {
2
+ exportSessionsCsv: (filters: any) => Promise<void>;
3
+ };
4
+ export default useExportSessionCsv;
@@ -1,2 +1,3 @@
1
+ /// <reference types="react" />
1
2
  declare const Destinations: () => JSX.Element;
2
3
  export default Destinations;
@@ -1,2 +1,3 @@
1
+ /// <reference types="react" />
1
2
  declare const FixDataStudent: () => JSX.Element;
2
3
  export default FixDataStudent;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  interface ActionProps {
2
3
  params: any;
3
4
  edit: (id?: number) => any;
@@ -1,2 +1,3 @@
1
+ /// <reference types="react" />
1
2
  declare const QuestionPreview: (props: any) => JSX.Element;
2
3
  export default QuestionPreview;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  interface IUserForQuestionSelect {
2
3
  value: string;
3
4
  onChange: Function;
@@ -1,2 +1,3 @@
1
+ /// <reference types="react" />
1
2
  declare const QuestionBankContainer: () => JSX.Element;
2
3
  export default QuestionBankContainer;
@@ -1,2 +1,3 @@
1
+ /// <reference types="react" />
1
2
  declare const SurveyQuestionContainer: () => JSX.Element;
2
3
  export default SurveyQuestionContainer;
@@ -1,2 +1,3 @@
1
+ /// <reference types="react" />
1
2
  declare const EmotionalResponse: (props: any) => JSX.Element;
2
3
  export default EmotionalResponse;
@@ -1,2 +1,3 @@
1
+ /// <reference types="react" />
1
2
  declare const MultipleChoiceResponse: (props: any) => JSX.Element;
2
3
  export default MultipleChoiceResponse;
@@ -1,2 +1,3 @@
1
+ /// <reference types="react" />
1
2
  declare const RatingResponse: (props: any) => JSX.Element;
2
3
  export default RatingResponse;
@@ -1,2 +1,3 @@
1
+ /// <reference types="react" />
1
2
  declare const StarRatingResponse: (props: any) => JSX.Element;
2
3
  export default StarRatingResponse;
@@ -1,2 +1,3 @@
1
+ /// <reference types="react" />
1
2
  declare const TextInputResponse: (props: any) => JSX.Element;
2
3
  export default TextInputResponse;
@@ -1,2 +1,3 @@
1
+ /// <reference types="react" />
1
2
  declare const QuestionSplitPaneSelector: (props: any) => JSX.Element;
2
3
  export default QuestionSplitPaneSelector;
@@ -1,2 +1,3 @@
1
+ /// <reference types="react" />
1
2
  declare const ReflectionContainer: () => JSX.Element;
2
3
  export default ReflectionContainer;
@@ -1,2 +1,3 @@
1
+ /// <reference types="react" />
1
2
  declare const SetupContainer: () => JSX.Element;
2
3
  export default SetupContainer;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { TYPECHART } from "../configs/constants";
2
3
  import { IChartOptions } from "../configs/types";
3
4
  interface IChoiceChartType {
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { TotalCardItem } from "../configs/types";
2
3
  declare const TotalCard: ({ icon, title, value }: TotalCardItem) => JSX.Element;
3
4
  export default TotalCard;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  export declare type LoginCountingReport = {
2
3
  date: string;
3
4
  studentLoginCount: number;
@@ -1,2 +1,3 @@
1
+ /// <reference types="react" />
1
2
  declare const SwitchAssistantList: () => JSX.Element;
2
3
  export default SwitchAssistantList;
@@ -1,2 +1,3 @@
1
+ /// <reference types="react" />
1
2
  declare const SwitchCounselorList: () => JSX.Element;
2
3
  export default SwitchCounselorList;
@@ -1,2 +1,3 @@
1
+ /// <reference types="react" />
1
2
  declare const SwitchSecondaryTeacherList: () => JSX.Element;
2
3
  export default SwitchSecondaryTeacherList;
@@ -1,2 +1,3 @@
1
+ /// <reference types="react" />
1
2
  declare const SwitchTeacherList: () => JSX.Element;
2
3
  export default SwitchTeacherList;
@@ -1,2 +1,3 @@
1
+ /// <reference types="react" />
1
2
  declare const SelectorTemplate: (props: any) => JSX.Element;
2
3
  export default SelectorTemplate;
@@ -1,2 +1,3 @@
1
+ /// <reference types="react" />
1
2
  declare const TemplateContainer: () => JSX.Element;
2
3
  export default TemplateContainer;
@@ -1,2 +1,3 @@
1
+ /// <reference types="react" />
1
2
  declare const Training: () => JSX.Element;
2
3
  export default Training;
@@ -1,2 +1,3 @@
1
+ /// <reference types="react" />
1
2
  declare const TutorialScreenContainer: () => JSX.Element;
2
3
  export default TutorialScreenContainer;
@@ -1,2 +1,3 @@
1
+ /// <reference types="react" />
1
2
  declare const UserList: () => JSX.Element;
2
3
  export default UserList;
@@ -1,2 +1,3 @@
1
+ /// <reference types="react" />
1
2
  declare const RevertUser: () => JSX.Element;
2
3
  export default RevertUser;
@@ -1,2 +1,3 @@
1
+ /// <reference types="react" />
1
2
  declare const WelcomeEmailResend: () => JSX.Element;
2
3
  export default WelcomeEmailResend;
@@ -26,3 +26,4 @@ export declare const getAllTotalSurvey: (filter: any) => Promise<import("axios")
26
26
  export declare const getDashboardFlagSurvey: (filters: any) => Promise<import("axios").AxiosResponse<any>>;
27
27
  export declare const getDashboardTemplateSurvey: (filters: any) => Promise<import("axios").AxiosResponse<any>>;
28
28
  export declare const getAllAcademicYearApi: (filters: any) => Promise<import("axios").AxiosResponse<any>>;
29
+ export declare const getSessionExportCsvApi: (filters: any) => Promise<import("axios").AxiosResponse<any>>;
package/dist/index.js CHANGED
@@ -28490,6 +28490,7 @@ var overallReadinessToLearn = "overall_readiness_to_learn";
28490
28490
  var studentStressByZone = "student_stress_by_zone";
28491
28491
  var studentDistribution = "student_distribution";
28492
28492
  var chartNames = [averageStudentSafetyName, averageStudentStressName, preparednessChartName, overallReadinessToLearn, successIndicatorsName, learningProcessName, topLearningStrategyName, studentStressByZone, studentDistribution];
28493
+ var CSV_PREFIX = "data:text/csv;charset=utf-8,";
28493
28494
 
28494
28495
  var gradeOptions = function gradeOptions(grades, studentUserId) {
28495
28496
  var result = !studentUserId ? GRAGE_DEFAULT : GRAGE_DEFAULT.filter(function (val) {
@@ -29193,6 +29194,11 @@ var getAllAcademicYearApi = function getAllAcademicYearApi(filters) {
29193
29194
  params: filters
29194
29195
  });
29195
29196
  };
29197
+ var getSessionExportCsvApi = function getSessionExportCsvApi(filters) {
29198
+ return marioCore.api.get(REPORT_URL + "/sessions/export-csv", {
29199
+ params: filters
29200
+ });
29201
+ };
29196
29202
 
29197
29203
  var TITLE$y = "Dashboard";
29198
29204
 
@@ -32146,6 +32152,92 @@ var DashboardToPDF = function DashboardToPDF(props) {
32146
32152
  }, "Export"));
32147
32153
  };
32148
32154
 
32155
+ var useExportSessionCsv = function useExportSessionCsv() {
32156
+ var dispatch = reactRedux.useDispatch();
32157
+
32158
+ var exportSessionsCsv = function exportSessionsCsv(filters) {
32159
+ try {
32160
+ var _temp3 = function _temp3() {
32161
+ dispatch(marioCore.setLoading(false));
32162
+ };
32163
+
32164
+ dispatch(marioCore.setLoading(true));
32165
+
32166
+ var _temp4 = _catch(function () {
32167
+ return Promise.resolve(getSessionExportCsvApi(filters)).then(function (res) {
32168
+ var data = res.data;
32169
+ var encodedUri = convertDataExportSession(data, filters.startDate, filters.endDate);
32170
+ var link = document.createElement("a");
32171
+ link.href = encodedUri;
32172
+ link.download = "Sessions_Template.csv";
32173
+ link.click();
32174
+ });
32175
+ }, function (err) {
32176
+ var _err$response, _err$response$data;
32177
+
32178
+ dispatch(marioCore.setAlert({
32179
+ type: "danger",
32180
+ message: ((_err$response = err.response) === null || _err$response === void 0 ? void 0 : (_err$response$data = _err$response.data) === null || _err$response$data === void 0 ? void 0 : _err$response$data.title) || err.message
32181
+ }));
32182
+ });
32183
+
32184
+ return Promise.resolve(_temp4 && _temp4.then ? _temp4.then(_temp3) : _temp3(_temp4));
32185
+ } catch (e) {
32186
+ return Promise.reject(e);
32187
+ }
32188
+ };
32189
+
32190
+ var convertDataExportSession = function convertDataExportSession(data, startDate, endDate) {
32191
+ var headers = "Student Name, ID/Email, Question, Answer, Teacher, Start Time";
32192
+
32193
+ if (startDate || endDate) {
32194
+ headers = "" + (moment(startDate).isValid() ? moment(startDate).format("DD/MM/YYYY") : '') + (moment(startDate).isValid() && moment(endDate).isValid() ? '-' : '') + moment(endDate).format("DD/MM/YYYY") + "\n" + headers;
32195
+ }
32196
+
32197
+ var content = data.map(function (session) {
32198
+ var studentName = escapeCell(session.studentName);
32199
+ var studentEmail = escapeCell(session.studentEmail ? session.studentEmail : "" + session.studentId);
32200
+ var teacherName = escapeCell(session.teacherName);
32201
+ var startTime = marioCore.utcToLocalTime(session.startTime, "DD-MM-YYYY HH:mm:ss");
32202
+ var questions = session.studentResult.questions;
32203
+ var learningStrategyQuestions = session.teacherResult.questions;
32204
+ var questionsContent = questions.map(function (question) {
32205
+ return "\n" + studentName + ", " + studentEmail + ", " + escapeCell(htmlToText(question.text)) + ", " + (question.type != "Rating" ? escapeCell(question.answer) : question.answer) + "," + teacherName + ", " + startTime;
32206
+ });
32207
+ var learningStrategyQuestionsContent = learningStrategyQuestions.map(function (learning) {
32208
+ var learningStrategyAnswers = learning.learningStrategyAnswers,
32209
+ answer = learning.answer;
32210
+ var answers = (answer === null || answer === void 0 ? void 0 : answer.split(";")) || [];
32211
+ var answerConverted = answers.map(function (a) {
32212
+ var questionAnswer = a.split("|");
32213
+ var learningAnswer = questionAnswer.length ? learningStrategyAnswers.find(function (i) {
32214
+ return "" + i.id == (questionAnswer === null || questionAnswer === void 0 ? void 0 : questionAnswer[0]);
32215
+ }) : null;
32216
+ var questionText = learningAnswer ? "" + learningAnswer.text + (learningAnswer.questionText ? "/" + learningAnswer : '') : '';
32217
+ var ans = questionAnswer.length > 1 ? questionAnswer === null || questionAnswer === void 0 ? void 0 : questionAnswer[1] : "";
32218
+ return questionText ? "\n" + studentName + ", " + studentEmail + ", " + escapeCell(questionText) + ", " + escapeCell(ans) + ", " + teacherName + ", " + startTime : '';
32219
+ });
32220
+ return answerConverted.join('');
32221
+ });
32222
+ return "" + questionsContent.join('') + learningStrategyQuestionsContent.join('');
32223
+ }).join('');
32224
+ return "" + CSV_PREFIX + headers + encodeURIComponent(content);
32225
+ };
32226
+
32227
+ var htmlToText = function htmlToText(html) {
32228
+ return html.replace(/<[^>]+>/g, '');
32229
+ };
32230
+
32231
+ var escapeCell = function escapeCell(value) {
32232
+ if (!value) return "";
32233
+ return "\"" + value.replace(/"/g, '""').replaceAll("\n", " ") + "\"";
32234
+ };
32235
+
32236
+ return {
32237
+ exportSessionsCsv: exportSessionsCsv
32238
+ };
32239
+ };
32240
+
32149
32241
  var Dashboard = function Dashboard() {
32150
32242
  var _useChartDatas = useChartDatas(),
32151
32243
  user = _useChartDatas.user,
@@ -32184,6 +32276,9 @@ var Dashboard = function Dashboard() {
32184
32276
  teacherUserId = _useBehavior.teacherUserId,
32185
32277
  changeCurrentTeacherUserId = _useBehavior.changeCurrentTeacherUserId;
32186
32278
 
32279
+ var _useExportSessionCsv = useExportSessionCsv(),
32280
+ exportSessionsCsv = _useExportSessionCsv.exportSessionsCsv;
32281
+
32187
32282
  var _useTranslation = marioCore.useTranslation(),
32188
32283
  t = _useTranslation.t;
32189
32284
 
@@ -32273,7 +32368,21 @@ var Dashboard = function Dashboard() {
32273
32368
  className: "mx-2",
32274
32369
  src: "images/waving-hand.png",
32275
32370
  alt: ""
32276
- })), React__default.createElement("button", {
32371
+ })), React__default.createElement("div", {
32372
+ className: "d-flex"
32373
+ }, React__default.createElement("button", {
32374
+ className: styles$1["button-export"] + " d-flex align-items-center border-0 p-0 mr-2",
32375
+ onClick: function onClick() {
32376
+ return exportSessionsCsv(filter);
32377
+ }
32378
+ }, React__default.createElement("div", {
32379
+ className: "" + styles$1["button-icon"]
32380
+ }, React__default.createElement("img", {
32381
+ src: "images/export-icon.svg",
32382
+ alt: ""
32383
+ })), React__default.createElement("p", {
32384
+ className: styles$1["button-content"] + " mb-0"
32385
+ }, "Export to CSV")), React__default.createElement("button", {
32277
32386
  className: styles$1["button-export"] + " d-flex align-items-center border-0 p-0",
32278
32387
  onClick: toggle
32279
32388
  }, React__default.createElement("div", {
@@ -32283,7 +32392,7 @@ var Dashboard = function Dashboard() {
32283
32392
  alt: ""
32284
32393
  })), React__default.createElement("p", {
32285
32394
  className: styles$1["button-content"] + " mb-0"
32286
- }, t("export_to_pdf")))), React__default.createElement("div", {
32395
+ }, t("export_to_pdf"))))), React__default.createElement("div", {
32287
32396
  className: styles$1['filter-mobile-block'] + " p-3 my-4"
32288
32397
  }, React__default.createElement("div", {
32289
32398
  onClick: function onClick() {