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.
- package/dist/MarioFramework.Education/ClientApp/src/components/Select/SelectFilter.d.ts +1 -0
- package/dist/MarioFramework.Education/ClientApp/src/containers/AdminTraining/views/AdminTraining.d.ts +1 -0
- package/dist/MarioFramework.Education/ClientApp/src/containers/Assessment/components/QuestionSplitPaneSelector.d.ts +1 -0
- package/dist/MarioFramework.Education/ClientApp/src/containers/AssessmentAssignment/views/AssessmentAssignmentContainer.d.ts +1 -0
- package/dist/MarioFramework.Education/ClientApp/src/containers/AssignAssistant/views/AssignAssistantList.d.ts +1 -0
- package/dist/MarioFramework.Education/ClientApp/src/containers/AssignCounselor/views/AssignCounselorList.d.ts +1 -0
- package/dist/MarioFramework.Education/ClientApp/src/containers/AssignSecondaryTeacher/views/AssignSecondaryTeacherList.d.ts +1 -0
- package/dist/MarioFramework.Education/ClientApp/src/containers/Assignment/components/AcademicClassSelector.d.ts +1 -0
- package/dist/MarioFramework.Education/ClientApp/src/containers/Assignment/components/AssessmentSelector.d.ts +1 -0
- package/dist/MarioFramework.Education/ClientApp/src/containers/Certificate/views/CertificateContainer.d.ts +1 -0
- package/dist/MarioFramework.Education/ClientApp/src/containers/ConferenceRubric/views/ConferenceRubricDetail.d.ts +1 -0
- package/dist/MarioFramework.Education/ClientApp/src/containers/CurrentLicense/views/CurrentLicense.d.ts +1 -0
- package/dist/MarioFramework.Education/ClientApp/src/containers/Dashboard/components/CustomBarChart.d.ts +1 -0
- package/dist/MarioFramework.Education/ClientApp/src/containers/Dashboard/components/CustomLineChart.d.ts +1 -0
- package/dist/MarioFramework.Education/ClientApp/src/containers/Dashboard/components/DashboardToPDF.d.ts +1 -0
- package/dist/MarioFramework.Education/ClientApp/src/containers/Dashboard/components/LearningStrategiesTable.d.ts +1 -0
- package/dist/MarioFramework.Education/ClientApp/src/containers/Dashboard/components/StudentByGender.d.ts +1 -0
- package/dist/MarioFramework.Education/ClientApp/src/containers/Dashboard/components/StudentPressureChart.d.ts +1 -0
- package/dist/MarioFramework.Education/ClientApp/src/containers/Dashboard/components/TopSkill.d.ts +1 -0
- package/dist/MarioFramework.Education/ClientApp/src/containers/Dashboard/components/TotalCard.d.ts +1 -0
- package/dist/MarioFramework.Education/ClientApp/src/containers/Dashboard/configs/constants.d.ts +1 -0
- package/dist/MarioFramework.Education/ClientApp/src/containers/Dashboard/configs/types.d.ts +35 -0
- package/dist/MarioFramework.Education/ClientApp/src/containers/Dashboard/hooks/useExportSessionCsv.d.ts +4 -0
- package/dist/MarioFramework.Education/ClientApp/src/containers/Destinations/views/Destinations.d.ts +1 -0
- package/dist/MarioFramework.Education/ClientApp/src/containers/FixData/views/FixDataStudent.d.ts +1 -0
- package/dist/MarioFramework.Education/ClientApp/src/containers/QuestionBank/components/AgGridComponents.d.ts +1 -0
- package/dist/MarioFramework.Education/ClientApp/src/containers/QuestionBank/components/QuestionPreview.d.ts +1 -0
- package/dist/MarioFramework.Education/ClientApp/src/containers/QuestionBank/components/UserForQuestion.d.ts +1 -0
- package/dist/MarioFramework.Education/ClientApp/src/containers/QuestionBank/views/QuestionBankContainer.d.ts +1 -0
- package/dist/MarioFramework.Education/ClientApp/src/containers/QuestionBank/views/SurveyQuestionContainer.d.ts +1 -0
- package/dist/MarioFramework.Education/ClientApp/src/containers/ReflectionForm/components/QuestionResponse/EmotionalResponse.d.ts +1 -0
- package/dist/MarioFramework.Education/ClientApp/src/containers/ReflectionForm/components/QuestionResponse/MultipleChoiceResponse.d.ts +1 -0
- package/dist/MarioFramework.Education/ClientApp/src/containers/ReflectionForm/components/QuestionResponse/RatingReponse.d.ts +1 -0
- package/dist/MarioFramework.Education/ClientApp/src/containers/ReflectionForm/components/QuestionResponse/RatingStarReponse.d.ts +1 -0
- package/dist/MarioFramework.Education/ClientApp/src/containers/ReflectionForm/components/QuestionResponse/TextInputResponse.d.ts +1 -0
- package/dist/MarioFramework.Education/ClientApp/src/containers/ReflectionForm/components/QuestionSplitPaneSelector.d.ts +1 -0
- package/dist/MarioFramework.Education/ClientApp/src/containers/ReflectionForm/views/ReflectionContainer.d.ts +1 -0
- package/dist/MarioFramework.Education/ClientApp/src/containers/Setup/views/SetupContainer.d.ts +1 -0
- package/dist/MarioFramework.Education/ClientApp/src/containers/SurveyDashboard/components/ChoiceChartType.d.ts +1 -0
- package/dist/MarioFramework.Education/ClientApp/src/containers/SurveyDashboard/components/TotalCard.d.ts +1 -0
- package/dist/MarioFramework.Education/ClientApp/src/containers/SurveyDashboard/configs/types.d.ts +1 -0
- package/dist/MarioFramework.Education/ClientApp/src/containers/SwitchAssistant/views/SwitchAssistantList.d.ts +1 -0
- package/dist/MarioFramework.Education/ClientApp/src/containers/SwitchCounselor/views/SwitchCounselorList.d.ts +1 -0
- package/dist/MarioFramework.Education/ClientApp/src/containers/SwitchSecondaryTeacher/views/SwitchSecondaryTeacherList.d.ts +1 -0
- package/dist/MarioFramework.Education/ClientApp/src/containers/SwitchTeacher/views/SwitchTeacherList.d.ts +1 -0
- package/dist/MarioFramework.Education/ClientApp/src/containers/TemplateSystem/components/SelectorTemplate.d.ts +1 -0
- package/dist/MarioFramework.Education/ClientApp/src/containers/TemplateSystem/views/TemplateContainer.d.ts +1 -0
- package/dist/MarioFramework.Education/ClientApp/src/containers/Training/views/Training.d.ts +1 -0
- package/dist/MarioFramework.Education/ClientApp/src/containers/TutorialScreen/views/TutorialScreenContainer.d.ts +1 -0
- package/dist/MarioFramework.Education/ClientApp/src/containers/UserDeleted/views/UserDeletedList.d.ts +1 -0
- package/dist/MarioFramework.Education/ClientApp/src/containers/UserRevert/views/RevertUser.d.ts +1 -0
- package/dist/MarioFramework.Education/ClientApp/src/containers/WelcomeEmailResend/views/WelcomeEmailResend.d.ts +1 -0
- package/dist/MarioFramework.Education/ClientApp/src/services/dashboardService.d.ts +1 -0
- package/dist/index.js +111 -2
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +111 -2
- package/dist/index.modern.js.map +1 -1
- 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;
|
package/dist/MarioFramework.Education/ClientApp/src/containers/Dashboard/configs/constants.d.ts
CHANGED
|
@@ -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 {};
|
|
@@ -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("
|
|
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() {
|