@itutoring/itutoring_application_js_api 1.0.24 → 1.0.25
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.
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import TeacherProfile from "../objects/TeacherProfile";
|
|
1
2
|
import APIController from "./../apiController";
|
|
2
3
|
import Teacher from "./../objects/Teacher";
|
|
3
4
|
|
|
@@ -37,12 +38,12 @@ class TeacherManager
|
|
|
37
38
|
static async GetAllTeachers()
|
|
38
39
|
{
|
|
39
40
|
var teachers = await APIController.Get(this.#MODULE, this.#GET_ALL_TEACHERS);
|
|
40
|
-
|
|
41
|
+
|
|
41
42
|
var teachersArray = JSON.parse(teachers);
|
|
42
43
|
|
|
43
44
|
var teachersClasses = [];
|
|
44
45
|
|
|
45
|
-
for (const[key, value] of Object.entries(teachersArray))
|
|
46
|
+
for (const [key, value] of Object.entries(teachersArray))
|
|
46
47
|
{
|
|
47
48
|
var teacher = new Teacher;
|
|
48
49
|
|
|
@@ -53,6 +54,13 @@ class TeacherManager
|
|
|
53
54
|
teacher.TeachedLessons = value['TeachedLessons'];
|
|
54
55
|
teacher.Admin = APIController.IntToBool(value['Admin']);
|
|
55
56
|
|
|
57
|
+
var teacherProfile = new TeacherProfile();
|
|
58
|
+
teacherProfile.Bio = value['Profile']['Bio'];
|
|
59
|
+
teacherProfile.Name = value['Profile']['Name'];
|
|
60
|
+
teacherProfile.PhotoPath = value['Profile']['PhotoPath'];
|
|
61
|
+
|
|
62
|
+
teacher.TeacherProfile = teacherProfile;
|
|
63
|
+
|
|
56
64
|
teachersClasses[teacher.ID] = teacher;
|
|
57
65
|
}
|
|
58
66
|
|
package/modules/TeacherPortal.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import TeacherProfile from "../objects/TeacherProfile";
|
|
1
2
|
import APIController from "./../apiController";
|
|
2
3
|
import Reservation from "./../objects/Reservation";
|
|
3
4
|
import Teacher from "./../objects/Teacher";
|
|
@@ -135,6 +136,13 @@ class TeacherPortal
|
|
|
135
136
|
teacher.Admin = teacherArray['Admin'];
|
|
136
137
|
teacher.BitmojiURL = decodeURIComponent(teacherArray['BitmojiURL']);
|
|
137
138
|
|
|
139
|
+
var teacherProfile = new TeacherProfile();
|
|
140
|
+
teacherProfile.Bio = teacherArray['Profile']['Bio'];
|
|
141
|
+
teacherProfile.Name = teacherArray['Profile']['Name'];
|
|
142
|
+
teacherProfile.PhotoPath = teacherArray['Profile']['PhotoPath'];
|
|
143
|
+
|
|
144
|
+
teacher.TeacherProfile = teacherProfile;
|
|
145
|
+
|
|
138
146
|
return teacher;
|
|
139
147
|
}
|
|
140
148
|
|