mario-education 2.4.16-beta → 2.4.19-beta
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/containers/Classes/components/StudentItemSelector.d.ts +1 -0
- package/dist/MarioFramework.Education/ClientApp/src/containers/Classes/components/TeacherItemSelector.d.ts +2 -0
- package/dist/MarioFramework.Education/ClientApp/src/containers/Dashboard/configs/constants.d.ts +1 -2
- package/dist/MarioFramework.Education/ClientApp/src/containers/Dashboard/configs/utils.d.ts +2 -1
- package/dist/MarioFramework.Education/ClientApp/src/containers/Dashboard/hooks/useDashboard.d.ts +4 -0
- package/dist/MarioFramework.Education/ClientApp/src/services/classService.d.ts +2 -2
- package/dist/MarioFramework.Education/ClientApp/src/services/dashboardService.d.ts +1 -1
- package/dist/index.css +3 -2
- package/dist/index.js +145 -56
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +145 -56
- package/dist/index.modern.js.map +1 -1
- package/package.json +2 -2
|
@@ -2,10 +2,12 @@ import { FC } from "react";
|
|
|
2
2
|
interface Props {
|
|
3
3
|
defaultValue: number | null | undefined;
|
|
4
4
|
onChange: Function;
|
|
5
|
+
studentUserId: string;
|
|
5
6
|
}
|
|
6
7
|
export interface Option {
|
|
7
8
|
label: string;
|
|
8
9
|
value: number;
|
|
10
|
+
teacherUserId: string;
|
|
9
11
|
}
|
|
10
12
|
declare const TeacherItemSelector: FC<Props>;
|
|
11
13
|
export default TeacherItemSelector;
|
package/dist/MarioFramework.Education/ClientApp/src/containers/Dashboard/configs/constants.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
export declare const colors: string[];
|
|
3
2
|
export declare const INITIAL_BEST_FRIENDS: {
|
|
4
3
|
friends: number;
|
|
@@ -16,4 +15,4 @@ export declare const LEARNING_STRATEGY_CHART_COLORS: string[];
|
|
|
16
15
|
export declare const LEARNING_STRATEGY_INIT: {
|
|
17
16
|
learningStrategies: never[];
|
|
18
17
|
};
|
|
19
|
-
export declare const GRAGE_DEFAULT:
|
|
18
|
+
export declare const GRAGE_DEFAULT: string[];
|
|
@@ -30,8 +30,9 @@ export declare const mtssOptions: {
|
|
|
30
30
|
export declare const learningStrategyChartOptions: (labelNames: string[], usageCountList: number[]) => ApexOptions;
|
|
31
31
|
export declare const ReadinessToLearnOptions: (questionTexts: string[]) => ApexOptions;
|
|
32
32
|
export declare const optionsChartGrade: (maxDatas: number, colorCharts: string[]) => ApexOptions;
|
|
33
|
-
export declare const studentBySpecialNeedOptions: (seriesValue: IseriesChart) => ApexOptions;
|
|
33
|
+
export declare const studentBySpecialNeedOptions: (seriesValue: IseriesChart, colors: string[]) => ApexOptions;
|
|
34
34
|
export declare const seriesConvert: (gradeAndQuantity: IStudentByGrade[]) => ISeries[];
|
|
35
35
|
export declare const maxSeries: (series: ISeries[]) => number;
|
|
36
36
|
export declare const average: (arr: number[]) => number;
|
|
37
37
|
export declare const colorCharts: (series: ISeries[]) => string[];
|
|
38
|
+
export declare const colorChartsSpecialNeedOptions: (series: IseriesChart[]) => string[];
|
package/dist/MarioFramework.Education/ClientApp/src/containers/Dashboard/hooks/useDashboard.d.ts
CHANGED
|
@@ -25,5 +25,9 @@ declare const useDashboard: () => {
|
|
|
25
25
|
studentId: number;
|
|
26
26
|
setStudentId: import("react").Dispatch<import("react").SetStateAction<number>>;
|
|
27
27
|
onFilter: () => void;
|
|
28
|
+
studentUserId: string;
|
|
29
|
+
setStudentUserId: import("react").Dispatch<import("react").SetStateAction<string>>;
|
|
30
|
+
teacherUserId: string;
|
|
31
|
+
setTeacherUserId: import("react").Dispatch<import("react").SetStateAction<string>>;
|
|
28
32
|
};
|
|
29
33
|
export default useDashboard;
|
|
@@ -5,5 +5,5 @@ export declare const create: (data: any) => Promise<import("axios").AxiosRespons
|
|
|
5
5
|
export declare const update: (data: any) => Promise<import("axios").AxiosResponse<any>>;
|
|
6
6
|
export declare const remove: (id: number) => Promise<import("axios").AxiosResponse<any>>;
|
|
7
7
|
export declare const getStudents: (classId: number) => Promise<import("axios").AxiosResponse<any>>;
|
|
8
|
-
export declare const getAllStudents: (searchString
|
|
9
|
-
export declare const getAllTeachers: () => Promise<import("axios").AxiosResponse<any>>;
|
|
8
|
+
export declare const getAllStudents: (searchString?: string | undefined, userId?: string | undefined) => Promise<import("axios").AxiosResponse<any>>;
|
|
9
|
+
export declare const getAllTeachers: (studentUserId?: string | undefined) => Promise<import("axios").AxiosResponse<any>>;
|
|
@@ -16,4 +16,4 @@ export declare const getActivityCircleItems: (filter: any) => Promise<import("ax
|
|
|
16
16
|
export declare const getStudentBySpecialNeed: (filter: any) => Promise<import("axios").AxiosResponse<any>>;
|
|
17
17
|
export declare const getStudentByAge: (filter: any) => Promise<import("axios").AxiosResponse<any>>;
|
|
18
18
|
export declare const getStudentByGender: (filter: any) => Promise<import("axios").AxiosResponse<any>>;
|
|
19
|
-
export declare const getGrades: () => Promise<import("axios").AxiosResponse<any>>;
|
|
19
|
+
export declare const getGrades: (studentUserId: string) => Promise<import("axios").AxiosResponse<any>>;
|
package/dist/index.css
CHANGED
|
@@ -229,7 +229,6 @@ h6._3zOGW {
|
|
|
229
229
|
|
|
230
230
|
._6yLxd {
|
|
231
231
|
min-width: 200px;
|
|
232
|
-
margin-left: 20px;
|
|
233
232
|
margin-bottom: 10px;
|
|
234
233
|
height: 100%;
|
|
235
234
|
background-color: hsl(0, 0%, 100%);
|
|
@@ -245,6 +244,7 @@ h6._3zOGW {
|
|
|
245
244
|
display: flex;
|
|
246
245
|
justify-content: flex-start;
|
|
247
246
|
flex-wrap: wrap;
|
|
247
|
+
padding: 0px 16px;
|
|
248
248
|
}
|
|
249
249
|
|
|
250
250
|
._3e2pi {
|
|
@@ -261,7 +261,7 @@ h6._3zOGW {
|
|
|
261
261
|
height: 38px;
|
|
262
262
|
}
|
|
263
263
|
._1DlZ4{
|
|
264
|
-
|
|
264
|
+
width: 220px;
|
|
265
265
|
margin-right: 20px;
|
|
266
266
|
margin-bottom: 10px;
|
|
267
267
|
height: 38px;
|
|
@@ -294,6 +294,7 @@ h6._3zOGW {
|
|
|
294
294
|
._2PMoX {
|
|
295
295
|
height: auto;
|
|
296
296
|
width: auto;
|
|
297
|
+
max-width: 315px;
|
|
297
298
|
}
|
|
298
299
|
|
|
299
300
|
._2asi- ._muT01 ._35BzZ {
|
package/dist/index.js
CHANGED
|
@@ -77,15 +77,20 @@ var remove = function remove(id) {
|
|
|
77
77
|
var getStudents = function getStudents(classId) {
|
|
78
78
|
return marioCore.api.get(CLASS_URL + "/" + classId + "/students");
|
|
79
79
|
};
|
|
80
|
-
var getAllStudents = function getAllStudents(searchString) {
|
|
80
|
+
var getAllStudents = function getAllStudents(searchString, userId) {
|
|
81
81
|
return marioCore.api.get(STUDENT_URL + "/allstudents", {
|
|
82
82
|
params: {
|
|
83
|
-
searchString: searchString
|
|
83
|
+
searchString: searchString,
|
|
84
|
+
userId: userId
|
|
84
85
|
}
|
|
85
86
|
});
|
|
86
87
|
};
|
|
87
|
-
var getAllTeachers = function getAllTeachers() {
|
|
88
|
-
return marioCore.api.get(TEACHER_URL
|
|
88
|
+
var getAllTeachers = function getAllTeachers(studentUserId) {
|
|
89
|
+
return marioCore.api.get(TEACHER_URL, {
|
|
90
|
+
params: {
|
|
91
|
+
studentUserId: studentUserId
|
|
92
|
+
}
|
|
93
|
+
});
|
|
89
94
|
};
|
|
90
95
|
|
|
91
96
|
var StudentSelector = function StudentSelector(_ref) {
|
|
@@ -19061,8 +19066,12 @@ var getStudentByGender = function getStudentByGender(filter) {
|
|
|
19061
19066
|
params: filter
|
|
19062
19067
|
});
|
|
19063
19068
|
};
|
|
19064
|
-
var getGrades = function getGrades() {
|
|
19065
|
-
return marioCore.api.get(REPORT_URL + "/grade-levels"
|
|
19069
|
+
var getGrades = function getGrades(studentUserId) {
|
|
19070
|
+
return marioCore.api.get(REPORT_URL + "/grade-levels", {
|
|
19071
|
+
params: {
|
|
19072
|
+
studentUserId: studentUserId
|
|
19073
|
+
}
|
|
19074
|
+
});
|
|
19066
19075
|
};
|
|
19067
19076
|
|
|
19068
19077
|
var LegalGenderType;
|
|
@@ -19095,7 +19104,7 @@ var INITIAL_ACTIVITY_FRIENDS = {
|
|
|
19095
19104
|
var LEARNING_STRATEGY_INIT = {
|
|
19096
19105
|
learningStrategies: []
|
|
19097
19106
|
};
|
|
19098
|
-
var GRAGE_DEFAULT = ["K", "G", 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12];
|
|
19107
|
+
var GRAGE_DEFAULT = ["K", "G", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12"];
|
|
19099
19108
|
|
|
19100
19109
|
var TITLE$s = "Dashboard";
|
|
19101
19110
|
|
|
@@ -19187,6 +19196,14 @@ var useDashboard = function useDashboard() {
|
|
|
19187
19196
|
topSkill = _useState19[0],
|
|
19188
19197
|
setTopSkill = _useState19[1];
|
|
19189
19198
|
|
|
19199
|
+
var _useState20 = React.useState(""),
|
|
19200
|
+
teacherUserId = _useState20[0],
|
|
19201
|
+
setTeacherUserId = _useState20[1];
|
|
19202
|
+
|
|
19203
|
+
var _useState21 = React.useState(""),
|
|
19204
|
+
studentUserId = _useState21[0],
|
|
19205
|
+
setStudentUserId = _useState21[1];
|
|
19206
|
+
|
|
19190
19207
|
var callApi = React.useCallback(function (apiCaller, setData, defaultData, type) {
|
|
19191
19208
|
try {
|
|
19192
19209
|
var _temp2 = _catch(function () {
|
|
@@ -19237,7 +19254,7 @@ var useDashboard = function useDashboard() {
|
|
|
19237
19254
|
return hTime;
|
|
19238
19255
|
};
|
|
19239
19256
|
|
|
19240
|
-
var
|
|
19257
|
+
var callApiByStudentUserId = function callApiByStudentUserId(apiCaller, setData, studentUserId, defaultData) {
|
|
19241
19258
|
try {
|
|
19242
19259
|
var _temp5 = function _temp5() {
|
|
19243
19260
|
dispatch(marioCore.setLoading(false));
|
|
@@ -19246,7 +19263,7 @@ var useDashboard = function useDashboard() {
|
|
|
19246
19263
|
dispatch(marioCore.setLoading(true));
|
|
19247
19264
|
|
|
19248
19265
|
var _temp6 = _catch(function () {
|
|
19249
|
-
return Promise.resolve(apiCaller()).then(function (res) {
|
|
19266
|
+
return Promise.resolve(apiCaller(studentUserId)).then(function (res) {
|
|
19250
19267
|
res && setData(res.data);
|
|
19251
19268
|
});
|
|
19252
19269
|
}, function (err) {
|
|
@@ -19285,8 +19302,8 @@ var useDashboard = function useDashboard() {
|
|
|
19285
19302
|
getData();
|
|
19286
19303
|
}, []);
|
|
19287
19304
|
React.useEffect(function () {
|
|
19288
|
-
|
|
19289
|
-
}, []);
|
|
19305
|
+
callApiByStudentUserId(getGrades, setGrades, studentUserId, []);
|
|
19306
|
+
}, [studentUserId]);
|
|
19290
19307
|
return {
|
|
19291
19308
|
setFilter: setFilter,
|
|
19292
19309
|
filter: filter,
|
|
@@ -19311,7 +19328,11 @@ var useDashboard = function useDashboard() {
|
|
|
19311
19328
|
setTeacherId: setTeacherId,
|
|
19312
19329
|
studentId: studentId,
|
|
19313
19330
|
setStudentId: setStudentId,
|
|
19314
|
-
onFilter: onFilter
|
|
19331
|
+
onFilter: onFilter,
|
|
19332
|
+
studentUserId: studentUserId,
|
|
19333
|
+
setStudentUserId: setStudentUserId,
|
|
19334
|
+
teacherUserId: teacherUserId,
|
|
19335
|
+
setTeacherUserId: setTeacherUserId
|
|
19315
19336
|
};
|
|
19316
19337
|
};
|
|
19317
19338
|
|
|
@@ -19410,7 +19431,10 @@ var activityCircleItems = function activityCircleItems(_ref2) {
|
|
|
19410
19431
|
}];
|
|
19411
19432
|
};
|
|
19412
19433
|
var gradeOptions = function gradeOptions(grades) {
|
|
19413
|
-
|
|
19434
|
+
var result = GRAGE_DEFAULT.filter(function (val) {
|
|
19435
|
+
return grades.indexOf(val) != -1;
|
|
19436
|
+
});
|
|
19437
|
+
return result.map(function (grade, index) {
|
|
19414
19438
|
return {
|
|
19415
19439
|
label: grade,
|
|
19416
19440
|
value: index
|
|
@@ -19673,6 +19697,26 @@ var optionsChartGrade = function optionsChartGrade(maxDatas, colorCharts) {
|
|
|
19673
19697
|
colors: ["#4B92CE"]
|
|
19674
19698
|
}
|
|
19675
19699
|
},
|
|
19700
|
+
states: {
|
|
19701
|
+
normal: {
|
|
19702
|
+
filter: {
|
|
19703
|
+
type: "none",
|
|
19704
|
+
value: 0
|
|
19705
|
+
}
|
|
19706
|
+
},
|
|
19707
|
+
hover: {
|
|
19708
|
+
filter: {
|
|
19709
|
+
type: "none",
|
|
19710
|
+
value: 0
|
|
19711
|
+
}
|
|
19712
|
+
},
|
|
19713
|
+
active: {
|
|
19714
|
+
filter: {
|
|
19715
|
+
type: "none",
|
|
19716
|
+
value: 0
|
|
19717
|
+
}
|
|
19718
|
+
}
|
|
19719
|
+
},
|
|
19676
19720
|
legend: {
|
|
19677
19721
|
show: false
|
|
19678
19722
|
},
|
|
@@ -19697,20 +19741,22 @@ var optionsChartGrade = function optionsChartGrade(maxDatas, colorCharts) {
|
|
|
19697
19741
|
axisTicks: {
|
|
19698
19742
|
show: false
|
|
19699
19743
|
}
|
|
19744
|
+
},
|
|
19745
|
+
tooltip: {
|
|
19746
|
+
x: {
|
|
19747
|
+
formatter: function formatter(value) {
|
|
19748
|
+
return "Grade " + value;
|
|
19749
|
+
}
|
|
19750
|
+
},
|
|
19751
|
+
y: {
|
|
19752
|
+
formatter: function formatter(value) {
|
|
19753
|
+
return value.toFixed(0);
|
|
19754
|
+
}
|
|
19755
|
+
}
|
|
19700
19756
|
}
|
|
19701
19757
|
};
|
|
19702
19758
|
};
|
|
19703
|
-
var
|
|
19704
|
-
var letters = '0123456789ABCDEF'.split('');
|
|
19705
|
-
var color = '#';
|
|
19706
|
-
|
|
19707
|
-
for (var i = 0; i < 6; i++) {
|
|
19708
|
-
color += letters[Math.floor(Math.random() * 16)];
|
|
19709
|
-
}
|
|
19710
|
-
|
|
19711
|
-
return color;
|
|
19712
|
-
});
|
|
19713
|
-
var studentBySpecialNeedOptions = function studentBySpecialNeedOptions(seriesValue) {
|
|
19759
|
+
var studentBySpecialNeedOptions = function studentBySpecialNeedOptions(seriesValue, colors) {
|
|
19714
19760
|
return {
|
|
19715
19761
|
legend: {
|
|
19716
19762
|
show: false
|
|
@@ -19740,7 +19786,7 @@ var studentBySpecialNeedOptions = function studentBySpecialNeedOptions(seriesVal
|
|
|
19740
19786
|
}
|
|
19741
19787
|
}
|
|
19742
19788
|
},
|
|
19743
|
-
colors:
|
|
19789
|
+
colors: colors,
|
|
19744
19790
|
dataLabels: {
|
|
19745
19791
|
enabled: false
|
|
19746
19792
|
},
|
|
@@ -19829,6 +19875,35 @@ var colorCharts = function colorCharts(series) {
|
|
|
19829
19875
|
}
|
|
19830
19876
|
});
|
|
19831
19877
|
};
|
|
19878
|
+
var colorChartsSpecialNeedOptions = function colorChartsSpecialNeedOptions(series) {
|
|
19879
|
+
return series[0].data.map(function (i) {
|
|
19880
|
+
switch (i) {
|
|
19881
|
+
case 1:
|
|
19882
|
+
return "#40D2CC";
|
|
19883
|
+
|
|
19884
|
+
case 2:
|
|
19885
|
+
return "#0D9994";
|
|
19886
|
+
|
|
19887
|
+
case 3:
|
|
19888
|
+
return "#78B6E2";
|
|
19889
|
+
|
|
19890
|
+
case 4:
|
|
19891
|
+
return "#1D74C5";
|
|
19892
|
+
|
|
19893
|
+
case 5:
|
|
19894
|
+
return "#FFB04F";
|
|
19895
|
+
|
|
19896
|
+
case 6:
|
|
19897
|
+
return "#DD7B00";
|
|
19898
|
+
|
|
19899
|
+
case 7:
|
|
19900
|
+
return "#CE4A49";
|
|
19901
|
+
|
|
19902
|
+
default:
|
|
19903
|
+
return "#850000";
|
|
19904
|
+
}
|
|
19905
|
+
});
|
|
19906
|
+
};
|
|
19832
19907
|
|
|
19833
19908
|
var ReadinessToLearn = function ReadinessToLearn(_ref) {
|
|
19834
19909
|
var data = _ref.data;
|
|
@@ -19965,7 +20040,7 @@ var CustomBarChart = function CustomBarChart(_ref) {
|
|
|
19965
20040
|
offsetX: 20,
|
|
19966
20041
|
markers: {
|
|
19967
20042
|
width: 12,
|
|
19968
|
-
radius:
|
|
20043
|
+
radius: 3
|
|
19969
20044
|
}
|
|
19970
20045
|
},
|
|
19971
20046
|
stroke: {
|
|
@@ -19974,7 +20049,7 @@ var CustomBarChart = function CustomBarChart(_ref) {
|
|
|
19974
20049
|
markers: {
|
|
19975
20050
|
size: 5
|
|
19976
20051
|
},
|
|
19977
|
-
colors: ["#40D2CC", "#78B6E2", "#FFB04F", "#
|
|
20052
|
+
colors: ["#40D2CC", "#78B6E2", "#FFB04F", "#CE4A49", "#1CB7B1", "#4B92CE", "#F09422", "#A23333", "#0D9994", "#1D74C5", "#DD7B00"],
|
|
19978
20053
|
xaxis: {
|
|
19979
20054
|
categories: chatMonth
|
|
19980
20055
|
},
|
|
@@ -19986,7 +20061,7 @@ var CustomBarChart = function CustomBarChart(_ref) {
|
|
|
19986
20061
|
offsetX: -20,
|
|
19987
20062
|
show: true,
|
|
19988
20063
|
formatter: function formatter(val) {
|
|
19989
|
-
return chartName === "Safety" ? val + "%" : "" + (val === null || val === void 0 ? void 0 : val.toFixed(
|
|
20064
|
+
return chartName === "Safety" ? val + "%" : "" + (val === null || val === void 0 ? void 0 : val.toFixed(2));
|
|
19990
20065
|
}
|
|
19991
20066
|
}
|
|
19992
20067
|
}
|
|
@@ -20075,7 +20150,7 @@ var StudentByGrade = function StudentByGrade(_ref) {
|
|
|
20075
20150
|
var data = _ref.data;
|
|
20076
20151
|
var newData = GRAGE_DEFAULT.map(function (i) {
|
|
20077
20152
|
return data.find(function (j) {
|
|
20078
|
-
return i ===
|
|
20153
|
+
return i === j.grade.toString();
|
|
20079
20154
|
}) || {
|
|
20080
20155
|
grade: i.toString(),
|
|
20081
20156
|
quantity: 0
|
|
@@ -20090,10 +20165,12 @@ var StudentByGrade = function StudentByGrade(_ref) {
|
|
|
20090
20165
|
type: "bar",
|
|
20091
20166
|
width: "100%",
|
|
20092
20167
|
height: 450
|
|
20093
|
-
}) : React__default.createElement("
|
|
20168
|
+
}) : React__default.createElement("div", {
|
|
20169
|
+
className: "d-flex justify-content-center align-items-center"
|
|
20170
|
+
}, React__default.createElement("img", {
|
|
20094
20171
|
className: "" + styles$1["image-no-data"],
|
|
20095
20172
|
src: "images/grade.png"
|
|
20096
|
-
}));
|
|
20173
|
+
})));
|
|
20097
20174
|
};
|
|
20098
20175
|
|
|
20099
20176
|
var labelNames = ["Male", "Female"];
|
|
@@ -20169,7 +20246,7 @@ var StudentWithSpecialNeeds = function StudentWithSpecialNeeds(_ref) {
|
|
|
20169
20246
|
}, series[0].data.some(function (i) {
|
|
20170
20247
|
return i;
|
|
20171
20248
|
}) ? React__default.createElement(ReactApexChart, {
|
|
20172
|
-
options: studentBySpecialNeedOptions(series[0]),
|
|
20249
|
+
options: studentBySpecialNeedOptions(series[0], colorChartsSpecialNeedOptions(series)),
|
|
20173
20250
|
series: series,
|
|
20174
20251
|
type: "bar",
|
|
20175
20252
|
width: "100%",
|
|
@@ -20347,7 +20424,8 @@ var CircleChart = function CircleChart(_ref) {
|
|
|
20347
20424
|
|
|
20348
20425
|
var TeacherItemSelector = function TeacherItemSelector(_ref) {
|
|
20349
20426
|
var defaultValue = _ref.defaultValue,
|
|
20350
|
-
onChange = _ref.onChange
|
|
20427
|
+
onChange = _ref.onChange,
|
|
20428
|
+
studentUserId = _ref.studentUserId;
|
|
20351
20429
|
|
|
20352
20430
|
var _useState = React.useState([]),
|
|
20353
20431
|
options = _useState[0],
|
|
@@ -20356,11 +20434,12 @@ var TeacherItemSelector = function TeacherItemSelector(_ref) {
|
|
|
20356
20434
|
var getData = React.useCallback(function () {
|
|
20357
20435
|
try {
|
|
20358
20436
|
var _temp2 = _catch(function () {
|
|
20359
|
-
return Promise.resolve(getAllTeachers()).then(function (res) {
|
|
20437
|
+
return Promise.resolve(getAllTeachers(studentUserId)).then(function (res) {
|
|
20360
20438
|
setOptions(res.data.map(function (item) {
|
|
20361
20439
|
return {
|
|
20362
20440
|
value: item.teacherId,
|
|
20363
|
-
label: item.name + " (" + item.email + ")"
|
|
20441
|
+
label: item.name + " (" + item.email + ")",
|
|
20442
|
+
teacherUserId: item.userId
|
|
20364
20443
|
};
|
|
20365
20444
|
}));
|
|
20366
20445
|
});
|
|
@@ -20374,10 +20453,10 @@ var TeacherItemSelector = function TeacherItemSelector(_ref) {
|
|
|
20374
20453
|
} catch (e) {
|
|
20375
20454
|
return Promise.reject(e);
|
|
20376
20455
|
}
|
|
20377
|
-
}, []);
|
|
20456
|
+
}, [studentUserId]);
|
|
20378
20457
|
React.useEffect(function () {
|
|
20379
20458
|
getData();
|
|
20380
|
-
}, []);
|
|
20459
|
+
}, [studentUserId]);
|
|
20381
20460
|
var value = defaultValue && options.filter(function (option) {
|
|
20382
20461
|
return option.value === defaultValue;
|
|
20383
20462
|
}) || null;
|
|
@@ -20451,7 +20530,8 @@ var StudentItemSelector = function StudentItemSelector(_ref) {
|
|
|
20451
20530
|
var value = _ref.value,
|
|
20452
20531
|
onChange = _ref.onChange,
|
|
20453
20532
|
externalStudentIds = _ref.externalStudentIds,
|
|
20454
|
-
studentDefault = _ref.studentDefault
|
|
20533
|
+
studentDefault = _ref.studentDefault,
|
|
20534
|
+
teacherUserId = _ref.teacherUserId;
|
|
20455
20535
|
var dispatch = reactRedux.useDispatch();
|
|
20456
20536
|
|
|
20457
20537
|
var _useState = React.useState([]),
|
|
@@ -20478,7 +20558,7 @@ var StudentItemSelector = function StudentItemSelector(_ref) {
|
|
|
20478
20558
|
var _temp5 = _catch(function () {
|
|
20479
20559
|
var _temp = function () {
|
|
20480
20560
|
if (!value) {
|
|
20481
|
-
return Promise.resolve(getAllStudents(searchString)).then(function (res) {
|
|
20561
|
+
return Promise.resolve(getAllStudents(searchString, teacherUserId)).then(function (res) {
|
|
20482
20562
|
setStudents(res.data);
|
|
20483
20563
|
});
|
|
20484
20564
|
}
|
|
@@ -20559,7 +20639,11 @@ var Dashboard = function Dashboard() {
|
|
|
20559
20639
|
setTeacherId = _useDashboard.setTeacherId,
|
|
20560
20640
|
studentId = _useDashboard.studentId,
|
|
20561
20641
|
setStudentId = _useDashboard.setStudentId,
|
|
20562
|
-
onFilter = _useDashboard.onFilter
|
|
20642
|
+
onFilter = _useDashboard.onFilter,
|
|
20643
|
+
studentUserId = _useDashboard.studentUserId,
|
|
20644
|
+
setStudentUserId = _useDashboard.setStudentUserId,
|
|
20645
|
+
teacherUserId = _useDashboard.teacherUserId,
|
|
20646
|
+
setTeacherUserId = _useDashboard.setTeacherUserId;
|
|
20563
20647
|
|
|
20564
20648
|
var user = reactRedux.useSelector(function (state) {
|
|
20565
20649
|
return state.common.user;
|
|
@@ -20571,9 +20655,9 @@ var Dashboard = function Dashboard() {
|
|
|
20571
20655
|
|
|
20572
20656
|
var questionOneToOne = ["Well-being", "Growth", "Relations", "Productivity", "Academic", "Self-Efficacy", "Happiness", "Energy", "Focus"];
|
|
20573
20657
|
var questionClassReflection = ["Focus", "Energy", "Happiness", "Stress", "Productivity"];
|
|
20574
|
-
var questionConferences = ["Organization", "Self-Awareness", "Self-Directed Learning", "Self-Management", "Self-
|
|
20658
|
+
var questionConferences = ["Organization", "Self-Awareness", "Self-Directed Learning", "Self-Management", "Self-Advocacy", "Goal Progress"];
|
|
20575
20659
|
var listChartLeft = [{
|
|
20576
|
-
label: "
|
|
20660
|
+
label: "Learning strategies",
|
|
20577
20661
|
children: React__default.createElement(TopLearningStrategy, {
|
|
20578
20662
|
data: topLearningStrategies
|
|
20579
20663
|
})
|
|
@@ -20730,8 +20814,13 @@ var Dashboard = function Dashboard() {
|
|
|
20730
20814
|
setFilter(_extends({}, filter, {
|
|
20731
20815
|
teacherId: option ? option.value : undefined
|
|
20732
20816
|
}));
|
|
20817
|
+
setTeacherUserId(option.teacherUserId);
|
|
20733
20818
|
} else {
|
|
20734
20819
|
setTeacherId(0);
|
|
20820
|
+
setFilter(_extends({}, filter, {
|
|
20821
|
+
teacherId: undefined
|
|
20822
|
+
}));
|
|
20823
|
+
setTeacherUserId("");
|
|
20735
20824
|
}
|
|
20736
20825
|
};
|
|
20737
20826
|
|
|
@@ -20745,6 +20834,7 @@ var Dashboard = function Dashboard() {
|
|
|
20745
20834
|
|
|
20746
20835
|
var handleFilterStudent = function handleFilterStudent(option) {
|
|
20747
20836
|
if (option != null) {
|
|
20837
|
+
setStudentUserId(option.id);
|
|
20748
20838
|
setTeacherId(0);
|
|
20749
20839
|
setStudentId(option.value);
|
|
20750
20840
|
setStudentDefault(option);
|
|
@@ -20759,6 +20849,7 @@ var Dashboard = function Dashboard() {
|
|
|
20759
20849
|
}
|
|
20760
20850
|
|
|
20761
20851
|
setStudentId(0);
|
|
20852
|
+
setStudentUserId("");
|
|
20762
20853
|
setStudentDefault(undefined);
|
|
20763
20854
|
setFilter(_extends({}, filter, {
|
|
20764
20855
|
gender: [LegalGenderType.Male, LegalGenderType.Female],
|
|
@@ -20819,42 +20910,40 @@ var Dashboard = function Dashboard() {
|
|
|
20819
20910
|
},
|
|
20820
20911
|
value: handleFormatDate(filter.endDate),
|
|
20821
20912
|
min: handleFormatDate(filter.startDate)
|
|
20822
|
-
}))
|
|
20823
|
-
className: "" + styles$1["
|
|
20824
|
-
}, React__default.createElement("div", {
|
|
20825
|
-
className: "" + styles$1["bock-filter-wrap"]
|
|
20826
|
-
}, React__default.createElement("div", {
|
|
20827
|
-
className: "" + styles$1["form-filter-right"]
|
|
20913
|
+
})), React__default.createElement("div", {
|
|
20914
|
+
className: "" + styles$1["form-filter-left"]
|
|
20828
20915
|
}, React__default.createElement(TeacherItemSelector, {
|
|
20829
20916
|
onChange: handleFilterTeacher,
|
|
20830
|
-
defaultValue: teacherId
|
|
20917
|
+
defaultValue: teacherId,
|
|
20918
|
+
studentUserId: studentUserId
|
|
20831
20919
|
})), React__default.createElement("div", {
|
|
20832
|
-
className: "" + styles$1["form-filter-
|
|
20920
|
+
className: "" + styles$1["form-filter-left"]
|
|
20833
20921
|
}, React__default.createElement(StudentItemSelector, {
|
|
20834
20922
|
onChange: handleFilterStudent,
|
|
20835
20923
|
value: studentId,
|
|
20836
|
-
studentDefault: studentDefault
|
|
20924
|
+
studentDefault: studentDefault,
|
|
20925
|
+
teacherUserId: teacherUserId
|
|
20837
20926
|
})), React__default.createElement("div", {
|
|
20838
|
-
className: "" + styles$1["form-filter-
|
|
20927
|
+
className: "" + styles$1["form-filter-left"]
|
|
20839
20928
|
}, React__default.createElement(InputSelector, {
|
|
20840
20929
|
options: genderOptions,
|
|
20841
20930
|
onChange: handleFilterGender,
|
|
20842
20931
|
placeholder: "Select Gender"
|
|
20843
20932
|
})), React__default.createElement("div", {
|
|
20844
|
-
className: "" + styles$1["form-filter-
|
|
20933
|
+
className: "" + styles$1["form-filter-left"]
|
|
20845
20934
|
}, React__default.createElement(InputSelector, {
|
|
20846
20935
|
options: gradeOptions(grades),
|
|
20847
20936
|
onChange: handleFilterGrades,
|
|
20848
20937
|
placeholder: "Select Grade",
|
|
20849
20938
|
isMultiSelect: true
|
|
20850
20939
|
})), React__default.createElement("div", {
|
|
20851
|
-
className: "" + styles$1["form-filter-
|
|
20940
|
+
className: "" + styles$1["form-filter-left"]
|
|
20852
20941
|
}, React__default.createElement(InputSelector, {
|
|
20853
20942
|
options: mtssOptions,
|
|
20854
20943
|
onChange: handleFilterMtss,
|
|
20855
20944
|
placeholder: "Select MTSS"
|
|
20856
|
-
}))
|
|
20857
|
-
className: "" + styles$1["form-filter-
|
|
20945
|
+
})), React__default.createElement("div", {
|
|
20946
|
+
className: "" + styles$1["form-filter-left"]
|
|
20858
20947
|
}, React__default.createElement(SubmitButton, {
|
|
20859
20948
|
text: "Filter",
|
|
20860
20949
|
onClick: onFilter,
|