@itutoring/itutoring_application_js_api 1.11.0 → 1.11.2
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/.idea/iTutoring_Application_API-js.iml +11 -11
- package/.idea/modules.xml +7 -7
- package/.idea/vcs.xml +5 -5
- package/CookiesManager.js +47 -47
- package/LICENSE +21 -21
- package/README.md +6 -6
- package/apiController.js +436 -436
- package/cache.js +31 -31
- package/index.d.ts +116 -116
- package/index.js +114 -114
- package/modules/AiAssist.js +31 -31
- package/modules/Authentication.js +86 -86
- package/modules/Cart.js +83 -81
- package/modules/Checkout.js +60 -50
- package/modules/CustomerAuth.js +57 -57
- package/modules/CustomerLessonManager.js +29 -29
- package/modules/CustomerPortal.js +31 -31
- package/modules/FAQ.js +39 -39
- package/modules/GoogleReviews.js +36 -36
- package/modules/Inventory.js +51 -51
- package/modules/LectorDatabase.js +185 -185
- package/modules/LectorsCalendar.js +67 -67
- package/modules/LessonInventory.js +47 -47
- package/modules/MarketplaceController.js +86 -86
- package/modules/Models.js +380 -380
- package/modules/Payments.js +75 -75
- package/modules/Pricing.js +70 -70
- package/modules/ReservationSystem.js +48 -48
- package/modules/Reviews.js +53 -53
- package/modules/SubjectManager.js +139 -139
- package/modules/TableExplorer.js +246 -246
- package/modules/TeacherAuth.js +57 -57
- package/modules/TeacherProfileModule.js +299 -299
- package/modules/TeacherProfiles.js +60 -60
- package/modules/Version.js +24 -24
- package/modules/WebController.js +37 -37
- package/objects/AttendanceEvent.js +39 -39
- package/objects/AuthUser.js +24 -24
- package/objects/Course.js +38 -38
- package/objects/CourseReservation.js +22 -22
- package/objects/Customer.js +20 -20
- package/objects/Enums.js +62 -62
- package/objects/Event.js +125 -125
- package/objects/Reservation.js +42 -42
- package/objects/Subject.js +24 -24
- package/objects/Teacher.js +18 -18
- package/objects/TeacherProfile.js +17 -17
- package/objects/Webinar.js +25 -25
- package/objects/billingInfo.js +29 -29
- package/package.json +1 -1
- package/toolkit/Toolkit.jsx +51 -51
package/modules/Models.js
CHANGED
|
@@ -1,381 +1,381 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Copyright (C) 2024 iTutoring s.r.o.
|
|
3
|
-
* All rights reserved.
|
|
4
|
-
*
|
|
5
|
-
|
|
6
|
-
*
|
|
7
|
-
*/
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
import APIController from "../apiController";
|
|
11
|
-
|
|
12
|
-
class Models
|
|
13
|
-
{
|
|
14
|
-
static #MODULE = 'Models';
|
|
15
|
-
|
|
16
|
-
static #SET_EVENT = 'SetEvent';
|
|
17
|
-
static #GET_EVENT = 'GetEvent';
|
|
18
|
-
static #DELETE_EVENT = 'DeleteEvent';
|
|
19
|
-
static #SET_INQUIRY = 'SetInquiry';
|
|
20
|
-
static #GET_INQUIRY = 'GetInquiry';
|
|
21
|
-
static #DELETE_INQUIRY = 'DeleteInquiry';
|
|
22
|
-
static #SET_INQUIRY_FLAG = 'SetInquiryFlag';
|
|
23
|
-
static #UNSET_INQUIRY_FLAG = 'UnsetInquiryFlag';
|
|
24
|
-
static #SET_OFFER = 'SetOffer';
|
|
25
|
-
static #GET_OFFER = 'GetOffer';
|
|
26
|
-
static #DELETE_OFFER = 'DeleteOffer';
|
|
27
|
-
static #SET_CUSTOMER = 'SetCustomer';
|
|
28
|
-
static #GET_CUSTOMER = 'GetCustomer';
|
|
29
|
-
static #DELETE_CUSTOMER = 'DeleteCustomer';
|
|
30
|
-
static #SET_STUDENT = 'SetStudent';
|
|
31
|
-
static #GET_STUDENT = 'GetStudent';
|
|
32
|
-
static #DELETE_STUDENT = 'DeleteStudent';
|
|
33
|
-
static #SET_LECTURE = 'SetLecture';
|
|
34
|
-
static #GET_LECTURE = 'GetLecture';
|
|
35
|
-
static #DELETE_LECTURE = 'DeleteLecture';
|
|
36
|
-
static #SET_LECTURE_ATTENDANCE = 'SetLectureAttendance';
|
|
37
|
-
static #GET_LECTURE_ATTENDANCE = 'GetLectureAttendance';
|
|
38
|
-
static #DELETE_LECTURE_ATTENDANCE = 'DeleteLectureAttendance';
|
|
39
|
-
static #GET_OFFERS_FOR_INQUIRY = 'GetOffersForInquiry';
|
|
40
|
-
static #GET_STUDENTS_FOR_CUSTOMER = 'GetStudentsForCustomer';
|
|
41
|
-
static #GET_LECTURES_FOR_EVENT = 'GetLecturesForEvent';
|
|
42
|
-
static #GET_ATTENDANCE_FOR_LECTURE = 'GetAttendanceForLecture';
|
|
43
|
-
static #GET_PLANNED_LECTURE_COUNT = 'GetPlannedLectureCount';
|
|
44
|
-
static #CREATE_EVENT_FROM_INQUIRY = 'CreateEventFromInquiry';
|
|
45
|
-
static #GET_FIRST_PLANNED_LECTURE = 'GetFirstPlannedLecture';
|
|
46
|
-
static #MARK_INQUIRY_ALL_INFO_SET = 'MarkInquiryAllInfoSet';
|
|
47
|
-
static #SET_LECTOR = 'SetLector';
|
|
48
|
-
static #GET_LECTOR = 'GetLector';
|
|
49
|
-
static #DELETE_LECTOR = 'DeleteLector';
|
|
50
|
-
static #GET_LECTOR_CALENDAR = 'GetLectorCalendar';
|
|
51
|
-
static #GET_LECTORS_FOR_INQUIRY = 'GetLectorsForInquiry';
|
|
52
|
-
static #GENERATE_LECTURE_REPORT = 'GenerateLectureReport';
|
|
53
|
-
static #GET_LECTURE_REPORT = 'GetLectureReport';
|
|
54
|
-
|
|
55
|
-
static async getLectureReport(id)
|
|
56
|
-
{
|
|
57
|
-
var data = await APIController.Get(this.#MODULE, this.#GET_LECTURE_REPORT, {
|
|
58
|
-
'id': id,
|
|
59
|
-
});
|
|
60
|
-
return data;
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
static async generateLectureReport(lectureId, topic, report, review, hw)
|
|
64
|
-
{
|
|
65
|
-
return await APIController.Post(this.#MODULE, this.#GENERATE_LECTURE_REPORT, {
|
|
66
|
-
'lectureId': lectureId,
|
|
67
|
-
'topic': topic,
|
|
68
|
-
'report': report,
|
|
69
|
-
'review': review,
|
|
70
|
-
'hw': hw,
|
|
71
|
-
});
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
static async getLectorsForInquiry(inquiryId)
|
|
75
|
-
{
|
|
76
|
-
var data = await APIController.Get(this.#MODULE, this.#GET_LECTORS_FOR_INQUIRY, {
|
|
77
|
-
'inquiryId': inquiryId,
|
|
78
|
-
});
|
|
79
|
-
|
|
80
|
-
return data;
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
static async getLectorCalendar(lectorId, day, month, year, length)
|
|
85
|
-
{
|
|
86
|
-
var data = await APIController.Get(this.#MODULE, this.#GET_LECTOR_CALENDAR, {
|
|
87
|
-
'id': lectorId,
|
|
88
|
-
'day': day,
|
|
89
|
-
'month': month,
|
|
90
|
-
'year': year,
|
|
91
|
-
'length': length,
|
|
92
|
-
});
|
|
93
|
-
|
|
94
|
-
return data;
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
static async setLector(lector)
|
|
98
|
-
{
|
|
99
|
-
return await APIController.Post(this.#MODULE, this.#SET_LECTOR, {
|
|
100
|
-
'model': JSON.stringify(lector),
|
|
101
|
-
});
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
static async getLector(id)
|
|
105
|
-
{
|
|
106
|
-
var data = await APIController.Get(this.#MODULE, this.#GET_LECTOR, {
|
|
107
|
-
'id': id,
|
|
108
|
-
});
|
|
109
|
-
|
|
110
|
-
return data;
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
static async deleteLector(id, toTrash = true, archiveOnly = false)
|
|
114
|
-
{
|
|
115
|
-
await APIController.Post(this.#MODULE, this.#DELETE_LECTOR, {
|
|
116
|
-
'id': id,
|
|
117
|
-
'toTrash': toTrash,
|
|
118
|
-
'archiveOnly': archiveOnly,
|
|
119
|
-
});
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
static async markInquiryAllInfoSet(inquiryId)
|
|
123
|
-
{
|
|
124
|
-
await APIController.Post(this.#MODULE, this.#MARK_INQUIRY_ALL_INFO_SET, {
|
|
125
|
-
'id': inquiryId,
|
|
126
|
-
});
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
static async getFirstPlannedLecture(eventId, includeToday)
|
|
130
|
-
{
|
|
131
|
-
var data = await APIController.Get(this.#MODULE, this.#GET_FIRST_PLANNED_LECTURE, {
|
|
132
|
-
'eventId': eventId,
|
|
133
|
-
'includeToday': includeToday,
|
|
134
|
-
});
|
|
135
|
-
|
|
136
|
-
return data;
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
static async createEventFromInquiry(inquiryId)
|
|
140
|
-
{
|
|
141
|
-
return await APIController.Post(this.#MODULE, this.#CREATE_EVENT_FROM_INQUIRY, {
|
|
142
|
-
'inquiryId': inquiryId,
|
|
143
|
-
});
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
static async getPlannedLectureCount(customerId, lessonType, lessonLength)
|
|
147
|
-
{
|
|
148
|
-
var data = await APIController.Get(this.#MODULE, this.#GET_PLANNED_LECTURE_COUNT, {
|
|
149
|
-
'customerId': customerId,
|
|
150
|
-
'lessonType': lessonType,
|
|
151
|
-
'lessonLength': lessonLength,
|
|
152
|
-
}
|
|
153
|
-
);
|
|
154
|
-
|
|
155
|
-
return data;
|
|
156
|
-
}
|
|
157
|
-
|
|
158
|
-
static async setInquiryFlag(id, flag)
|
|
159
|
-
{
|
|
160
|
-
await APIController.Post(this.#MODULE, this.#SET_INQUIRY_FLAG, {
|
|
161
|
-
'id': id,
|
|
162
|
-
'flag': flag,
|
|
163
|
-
});
|
|
164
|
-
}
|
|
165
|
-
|
|
166
|
-
static async unsetInquiryFlag(id, flag)
|
|
167
|
-
{
|
|
168
|
-
await APIController.Post(this.#MODULE, this.#UNSET_INQUIRY_FLAG, {
|
|
169
|
-
'id': id,
|
|
170
|
-
'flag': flag,
|
|
171
|
-
});
|
|
172
|
-
}
|
|
173
|
-
|
|
174
|
-
static async setEvent(event)
|
|
175
|
-
{
|
|
176
|
-
return await APIController.Post(this.#MODULE, this.#SET_EVENT, {
|
|
177
|
-
'model': JSON.stringify(event),
|
|
178
|
-
});
|
|
179
|
-
}
|
|
180
|
-
|
|
181
|
-
static async getEvent(id)
|
|
182
|
-
{
|
|
183
|
-
var data = await APIController.Get(this.#MODULE, this.#GET_EVENT, {
|
|
184
|
-
'id': id,
|
|
185
|
-
});
|
|
186
|
-
|
|
187
|
-
return data;
|
|
188
|
-
}
|
|
189
|
-
|
|
190
|
-
static async deleteEvent(id, toTrash = true)
|
|
191
|
-
{
|
|
192
|
-
await APIController.Post(this.#MODULE, this.#DELETE_EVENT, {
|
|
193
|
-
'id': id,
|
|
194
|
-
'toTrash': toTrash,
|
|
195
|
-
});
|
|
196
|
-
}
|
|
197
|
-
|
|
198
|
-
static async setInquiry(inquiry)
|
|
199
|
-
{
|
|
200
|
-
return await APIController.Post(this.#MODULE, this.#SET_INQUIRY, {
|
|
201
|
-
'model': JSON.stringify(inquiry),
|
|
202
|
-
});
|
|
203
|
-
}
|
|
204
|
-
|
|
205
|
-
static async getInquiry(id)
|
|
206
|
-
{
|
|
207
|
-
var data = await APIController.Get(this.#MODULE, this.#GET_INQUIRY, {
|
|
208
|
-
'id': id,
|
|
209
|
-
});
|
|
210
|
-
|
|
211
|
-
return data;
|
|
212
|
-
}
|
|
213
|
-
|
|
214
|
-
static async deleteInquiry(id, toTrash = true)
|
|
215
|
-
{
|
|
216
|
-
await APIController.Post(this.#MODULE, this.#DELETE_INQUIRY, {
|
|
217
|
-
'id': id,
|
|
218
|
-
'toTrash': toTrash,
|
|
219
|
-
});
|
|
220
|
-
}
|
|
221
|
-
|
|
222
|
-
static async setOffer(offer)
|
|
223
|
-
{
|
|
224
|
-
return await APIController.Post(this.#MODULE, this.#SET_OFFER, {
|
|
225
|
-
'model': JSON.stringify(offer),
|
|
226
|
-
});
|
|
227
|
-
}
|
|
228
|
-
|
|
229
|
-
static async getOffer(id)
|
|
230
|
-
{
|
|
231
|
-
var data = await APIController.Get(this.#MODULE, this.#GET_OFFER, {
|
|
232
|
-
'id': id,
|
|
233
|
-
});
|
|
234
|
-
|
|
235
|
-
return data;
|
|
236
|
-
}
|
|
237
|
-
|
|
238
|
-
static async deleteOffer(id, toTrash = true)
|
|
239
|
-
{
|
|
240
|
-
await APIController.Post(this.#MODULE, this.#DELETE_OFFER, {
|
|
241
|
-
'id': id,
|
|
242
|
-
'toTrash': toTrash,
|
|
243
|
-
});
|
|
244
|
-
}
|
|
245
|
-
|
|
246
|
-
static async setCustomer(customer)
|
|
247
|
-
{
|
|
248
|
-
return await APIController.Post(this.#MODULE, this.#SET_CUSTOMER, {
|
|
249
|
-
'model': JSON.stringify(customer),
|
|
250
|
-
});
|
|
251
|
-
}
|
|
252
|
-
|
|
253
|
-
static async getCustomer(id)
|
|
254
|
-
{
|
|
255
|
-
var data = await APIController.Get(this.#MODULE, this.#GET_CUSTOMER, {
|
|
256
|
-
'id': id,
|
|
257
|
-
});
|
|
258
|
-
|
|
259
|
-
return data;
|
|
260
|
-
}
|
|
261
|
-
|
|
262
|
-
static async deleteCustomer(id, toTrash = true)
|
|
263
|
-
{
|
|
264
|
-
await APIController.Post(this.#MODULE, this.#DELETE_CUSTOMER, {
|
|
265
|
-
'id': id,
|
|
266
|
-
'toTrash': toTrash,
|
|
267
|
-
});
|
|
268
|
-
}
|
|
269
|
-
|
|
270
|
-
static async setStudent(student)
|
|
271
|
-
{
|
|
272
|
-
return await APIController.Post(this.#MODULE, this.#SET_STUDENT, {
|
|
273
|
-
'model': JSON.stringify(student),
|
|
274
|
-
});
|
|
275
|
-
}
|
|
276
|
-
|
|
277
|
-
static async getStudent(id)
|
|
278
|
-
{
|
|
279
|
-
var data = await APIController.Get(this.#MODULE, this.#GET_STUDENT, {
|
|
280
|
-
'id': id,
|
|
281
|
-
});
|
|
282
|
-
|
|
283
|
-
return data;
|
|
284
|
-
}
|
|
285
|
-
|
|
286
|
-
static async deleteStudent(id, toTrash = true)
|
|
287
|
-
{
|
|
288
|
-
await APIController.Post(this.#MODULE, this.#DELETE_STUDENT, {
|
|
289
|
-
'id': id,
|
|
290
|
-
'toTrash': toTrash,
|
|
291
|
-
});
|
|
292
|
-
}
|
|
293
|
-
|
|
294
|
-
static async setLecture(lecture, draft = false)
|
|
295
|
-
{
|
|
296
|
-
return await APIController.Post(this.#MODULE, this.#SET_LECTURE, {
|
|
297
|
-
'model': JSON.stringify(lecture),
|
|
298
|
-
'draft': draft,
|
|
299
|
-
});
|
|
300
|
-
}
|
|
301
|
-
|
|
302
|
-
static async getLecture(id)
|
|
303
|
-
{
|
|
304
|
-
var data = await APIController.Get(this.#MODULE, this.#GET_LECTURE, {
|
|
305
|
-
'id': id,
|
|
306
|
-
});
|
|
307
|
-
|
|
308
|
-
return data;
|
|
309
|
-
}
|
|
310
|
-
|
|
311
|
-
static async deleteLecture(id, toTrash = true, draft = false)
|
|
312
|
-
{
|
|
313
|
-
await APIController.Post(this.#MODULE, this.#DELETE_LECTURE, {
|
|
314
|
-
'id': id,
|
|
315
|
-
'toTrash': toTrash,
|
|
316
|
-
'draft': draft,
|
|
317
|
-
});
|
|
318
|
-
}
|
|
319
|
-
|
|
320
|
-
static async setLectureAttendance(attendance)
|
|
321
|
-
{
|
|
322
|
-
return await APIController.Post(this.#MODULE, this.#SET_LECTURE_ATTENDANCE, {
|
|
323
|
-
'model': JSON.stringify(attendance),
|
|
324
|
-
});
|
|
325
|
-
}
|
|
326
|
-
|
|
327
|
-
static async getLectureAttendance(id)
|
|
328
|
-
{
|
|
329
|
-
var data = await APIController.Get(this.#MODULE, this.#GET_LECTURE_ATTENDANCE, {
|
|
330
|
-
'id': id,
|
|
331
|
-
});
|
|
332
|
-
|
|
333
|
-
return data;
|
|
334
|
-
}
|
|
335
|
-
|
|
336
|
-
static async deleteLectureAttendance(id, toTrash = true)
|
|
337
|
-
{
|
|
338
|
-
await APIController.Post(this.#MODULE, this.#DELETE_LECTURE_ATTENDANCE, {
|
|
339
|
-
'id': id,
|
|
340
|
-
'toTrash': toTrash,
|
|
341
|
-
});
|
|
342
|
-
}
|
|
343
|
-
|
|
344
|
-
static async getOffersForInquiry(inquiryId)
|
|
345
|
-
{
|
|
346
|
-
var data = await APIController.Get(this.#MODULE, this.#GET_OFFERS_FOR_INQUIRY, {
|
|
347
|
-
'inquiryId': inquiryId,
|
|
348
|
-
});
|
|
349
|
-
|
|
350
|
-
return data;
|
|
351
|
-
}
|
|
352
|
-
|
|
353
|
-
static async getStudentsForCustomer(customerId)
|
|
354
|
-
{
|
|
355
|
-
var data = await APIController.Get(this.#MODULE, this.#GET_STUDENTS_FOR_CUSTOMER, {
|
|
356
|
-
'customerId': customerId,
|
|
357
|
-
});
|
|
358
|
-
|
|
359
|
-
return data;
|
|
360
|
-
}
|
|
361
|
-
|
|
362
|
-
static async getLecturesForEvent(eventId)
|
|
363
|
-
{
|
|
364
|
-
var data = await APIController.Get(this.#MODULE, this.#GET_LECTURES_FOR_EVENT, {
|
|
365
|
-
'eventId': eventId,
|
|
366
|
-
});
|
|
367
|
-
|
|
368
|
-
return data;
|
|
369
|
-
}
|
|
370
|
-
|
|
371
|
-
static async getAttendanceForLecture(lectureId)
|
|
372
|
-
{
|
|
373
|
-
var data = await APIController.Get(this.#MODULE, this.#GET_ATTENDANCE_FOR_LECTURE, {
|
|
374
|
-
'lectureId': lectureId,
|
|
375
|
-
});
|
|
376
|
-
|
|
377
|
-
return data;
|
|
378
|
-
}
|
|
379
|
-
}
|
|
380
|
-
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (C) 2024 iTutoring s.r.o.
|
|
3
|
+
* All rights reserved.
|
|
4
|
+
*
|
|
5
|
+
|
|
6
|
+
*
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
import APIController from "../apiController";
|
|
11
|
+
|
|
12
|
+
class Models
|
|
13
|
+
{
|
|
14
|
+
static #MODULE = 'Models';
|
|
15
|
+
|
|
16
|
+
static #SET_EVENT = 'SetEvent';
|
|
17
|
+
static #GET_EVENT = 'GetEvent';
|
|
18
|
+
static #DELETE_EVENT = 'DeleteEvent';
|
|
19
|
+
static #SET_INQUIRY = 'SetInquiry';
|
|
20
|
+
static #GET_INQUIRY = 'GetInquiry';
|
|
21
|
+
static #DELETE_INQUIRY = 'DeleteInquiry';
|
|
22
|
+
static #SET_INQUIRY_FLAG = 'SetInquiryFlag';
|
|
23
|
+
static #UNSET_INQUIRY_FLAG = 'UnsetInquiryFlag';
|
|
24
|
+
static #SET_OFFER = 'SetOffer';
|
|
25
|
+
static #GET_OFFER = 'GetOffer';
|
|
26
|
+
static #DELETE_OFFER = 'DeleteOffer';
|
|
27
|
+
static #SET_CUSTOMER = 'SetCustomer';
|
|
28
|
+
static #GET_CUSTOMER = 'GetCustomer';
|
|
29
|
+
static #DELETE_CUSTOMER = 'DeleteCustomer';
|
|
30
|
+
static #SET_STUDENT = 'SetStudent';
|
|
31
|
+
static #GET_STUDENT = 'GetStudent';
|
|
32
|
+
static #DELETE_STUDENT = 'DeleteStudent';
|
|
33
|
+
static #SET_LECTURE = 'SetLecture';
|
|
34
|
+
static #GET_LECTURE = 'GetLecture';
|
|
35
|
+
static #DELETE_LECTURE = 'DeleteLecture';
|
|
36
|
+
static #SET_LECTURE_ATTENDANCE = 'SetLectureAttendance';
|
|
37
|
+
static #GET_LECTURE_ATTENDANCE = 'GetLectureAttendance';
|
|
38
|
+
static #DELETE_LECTURE_ATTENDANCE = 'DeleteLectureAttendance';
|
|
39
|
+
static #GET_OFFERS_FOR_INQUIRY = 'GetOffersForInquiry';
|
|
40
|
+
static #GET_STUDENTS_FOR_CUSTOMER = 'GetStudentsForCustomer';
|
|
41
|
+
static #GET_LECTURES_FOR_EVENT = 'GetLecturesForEvent';
|
|
42
|
+
static #GET_ATTENDANCE_FOR_LECTURE = 'GetAttendanceForLecture';
|
|
43
|
+
static #GET_PLANNED_LECTURE_COUNT = 'GetPlannedLectureCount';
|
|
44
|
+
static #CREATE_EVENT_FROM_INQUIRY = 'CreateEventFromInquiry';
|
|
45
|
+
static #GET_FIRST_PLANNED_LECTURE = 'GetFirstPlannedLecture';
|
|
46
|
+
static #MARK_INQUIRY_ALL_INFO_SET = 'MarkInquiryAllInfoSet';
|
|
47
|
+
static #SET_LECTOR = 'SetLector';
|
|
48
|
+
static #GET_LECTOR = 'GetLector';
|
|
49
|
+
static #DELETE_LECTOR = 'DeleteLector';
|
|
50
|
+
static #GET_LECTOR_CALENDAR = 'GetLectorCalendar';
|
|
51
|
+
static #GET_LECTORS_FOR_INQUIRY = 'GetLectorsForInquiry';
|
|
52
|
+
static #GENERATE_LECTURE_REPORT = 'GenerateLectureReport';
|
|
53
|
+
static #GET_LECTURE_REPORT = 'GetLectureReport';
|
|
54
|
+
|
|
55
|
+
static async getLectureReport(id)
|
|
56
|
+
{
|
|
57
|
+
var data = await APIController.Get(this.#MODULE, this.#GET_LECTURE_REPORT, {
|
|
58
|
+
'id': id,
|
|
59
|
+
});
|
|
60
|
+
return data;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
static async generateLectureReport(lectureId, topic, report, review, hw)
|
|
64
|
+
{
|
|
65
|
+
return await APIController.Post(this.#MODULE, this.#GENERATE_LECTURE_REPORT, {
|
|
66
|
+
'lectureId': lectureId,
|
|
67
|
+
'topic': topic,
|
|
68
|
+
'report': report,
|
|
69
|
+
'review': review,
|
|
70
|
+
'hw': hw,
|
|
71
|
+
});
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
static async getLectorsForInquiry(inquiryId)
|
|
75
|
+
{
|
|
76
|
+
var data = await APIController.Get(this.#MODULE, this.#GET_LECTORS_FOR_INQUIRY, {
|
|
77
|
+
'inquiryId': inquiryId,
|
|
78
|
+
});
|
|
79
|
+
|
|
80
|
+
return data;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
|
|
84
|
+
static async getLectorCalendar(lectorId, day, month, year, length)
|
|
85
|
+
{
|
|
86
|
+
var data = await APIController.Get(this.#MODULE, this.#GET_LECTOR_CALENDAR, {
|
|
87
|
+
'id': lectorId,
|
|
88
|
+
'day': day,
|
|
89
|
+
'month': month,
|
|
90
|
+
'year': year,
|
|
91
|
+
'length': length,
|
|
92
|
+
});
|
|
93
|
+
|
|
94
|
+
return data;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
static async setLector(lector)
|
|
98
|
+
{
|
|
99
|
+
return await APIController.Post(this.#MODULE, this.#SET_LECTOR, {
|
|
100
|
+
'model': JSON.stringify(lector),
|
|
101
|
+
});
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
static async getLector(id)
|
|
105
|
+
{
|
|
106
|
+
var data = await APIController.Get(this.#MODULE, this.#GET_LECTOR, {
|
|
107
|
+
'id': id,
|
|
108
|
+
});
|
|
109
|
+
|
|
110
|
+
return data;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
static async deleteLector(id, toTrash = true, archiveOnly = false)
|
|
114
|
+
{
|
|
115
|
+
await APIController.Post(this.#MODULE, this.#DELETE_LECTOR, {
|
|
116
|
+
'id': id,
|
|
117
|
+
'toTrash': toTrash,
|
|
118
|
+
'archiveOnly': archiveOnly,
|
|
119
|
+
});
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
static async markInquiryAllInfoSet(inquiryId)
|
|
123
|
+
{
|
|
124
|
+
await APIController.Post(this.#MODULE, this.#MARK_INQUIRY_ALL_INFO_SET, {
|
|
125
|
+
'id': inquiryId,
|
|
126
|
+
});
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
static async getFirstPlannedLecture(eventId, includeToday)
|
|
130
|
+
{
|
|
131
|
+
var data = await APIController.Get(this.#MODULE, this.#GET_FIRST_PLANNED_LECTURE, {
|
|
132
|
+
'eventId': eventId,
|
|
133
|
+
'includeToday': includeToday,
|
|
134
|
+
});
|
|
135
|
+
|
|
136
|
+
return data;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
static async createEventFromInquiry(inquiryId)
|
|
140
|
+
{
|
|
141
|
+
return await APIController.Post(this.#MODULE, this.#CREATE_EVENT_FROM_INQUIRY, {
|
|
142
|
+
'inquiryId': inquiryId,
|
|
143
|
+
});
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
static async getPlannedLectureCount(customerId, lessonType, lessonLength)
|
|
147
|
+
{
|
|
148
|
+
var data = await APIController.Get(this.#MODULE, this.#GET_PLANNED_LECTURE_COUNT, {
|
|
149
|
+
'customerId': customerId,
|
|
150
|
+
'lessonType': lessonType,
|
|
151
|
+
'lessonLength': lessonLength,
|
|
152
|
+
}
|
|
153
|
+
);
|
|
154
|
+
|
|
155
|
+
return data;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
static async setInquiryFlag(id, flag)
|
|
159
|
+
{
|
|
160
|
+
await APIController.Post(this.#MODULE, this.#SET_INQUIRY_FLAG, {
|
|
161
|
+
'id': id,
|
|
162
|
+
'flag': flag,
|
|
163
|
+
});
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
static async unsetInquiryFlag(id, flag)
|
|
167
|
+
{
|
|
168
|
+
await APIController.Post(this.#MODULE, this.#UNSET_INQUIRY_FLAG, {
|
|
169
|
+
'id': id,
|
|
170
|
+
'flag': flag,
|
|
171
|
+
});
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
static async setEvent(event)
|
|
175
|
+
{
|
|
176
|
+
return await APIController.Post(this.#MODULE, this.#SET_EVENT, {
|
|
177
|
+
'model': JSON.stringify(event),
|
|
178
|
+
});
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
static async getEvent(id)
|
|
182
|
+
{
|
|
183
|
+
var data = await APIController.Get(this.#MODULE, this.#GET_EVENT, {
|
|
184
|
+
'id': id,
|
|
185
|
+
});
|
|
186
|
+
|
|
187
|
+
return data;
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
static async deleteEvent(id, toTrash = true)
|
|
191
|
+
{
|
|
192
|
+
await APIController.Post(this.#MODULE, this.#DELETE_EVENT, {
|
|
193
|
+
'id': id,
|
|
194
|
+
'toTrash': toTrash,
|
|
195
|
+
});
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
static async setInquiry(inquiry)
|
|
199
|
+
{
|
|
200
|
+
return await APIController.Post(this.#MODULE, this.#SET_INQUIRY, {
|
|
201
|
+
'model': JSON.stringify(inquiry),
|
|
202
|
+
});
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
static async getInquiry(id)
|
|
206
|
+
{
|
|
207
|
+
var data = await APIController.Get(this.#MODULE, this.#GET_INQUIRY, {
|
|
208
|
+
'id': id,
|
|
209
|
+
});
|
|
210
|
+
|
|
211
|
+
return data;
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
static async deleteInquiry(id, toTrash = true)
|
|
215
|
+
{
|
|
216
|
+
await APIController.Post(this.#MODULE, this.#DELETE_INQUIRY, {
|
|
217
|
+
'id': id,
|
|
218
|
+
'toTrash': toTrash,
|
|
219
|
+
});
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
static async setOffer(offer)
|
|
223
|
+
{
|
|
224
|
+
return await APIController.Post(this.#MODULE, this.#SET_OFFER, {
|
|
225
|
+
'model': JSON.stringify(offer),
|
|
226
|
+
});
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
static async getOffer(id)
|
|
230
|
+
{
|
|
231
|
+
var data = await APIController.Get(this.#MODULE, this.#GET_OFFER, {
|
|
232
|
+
'id': id,
|
|
233
|
+
});
|
|
234
|
+
|
|
235
|
+
return data;
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
static async deleteOffer(id, toTrash = true)
|
|
239
|
+
{
|
|
240
|
+
await APIController.Post(this.#MODULE, this.#DELETE_OFFER, {
|
|
241
|
+
'id': id,
|
|
242
|
+
'toTrash': toTrash,
|
|
243
|
+
});
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
static async setCustomer(customer)
|
|
247
|
+
{
|
|
248
|
+
return await APIController.Post(this.#MODULE, this.#SET_CUSTOMER, {
|
|
249
|
+
'model': JSON.stringify(customer),
|
|
250
|
+
});
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
static async getCustomer(id)
|
|
254
|
+
{
|
|
255
|
+
var data = await APIController.Get(this.#MODULE, this.#GET_CUSTOMER, {
|
|
256
|
+
'id': id,
|
|
257
|
+
});
|
|
258
|
+
|
|
259
|
+
return data;
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
static async deleteCustomer(id, toTrash = true)
|
|
263
|
+
{
|
|
264
|
+
await APIController.Post(this.#MODULE, this.#DELETE_CUSTOMER, {
|
|
265
|
+
'id': id,
|
|
266
|
+
'toTrash': toTrash,
|
|
267
|
+
});
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
static async setStudent(student)
|
|
271
|
+
{
|
|
272
|
+
return await APIController.Post(this.#MODULE, this.#SET_STUDENT, {
|
|
273
|
+
'model': JSON.stringify(student),
|
|
274
|
+
});
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
static async getStudent(id)
|
|
278
|
+
{
|
|
279
|
+
var data = await APIController.Get(this.#MODULE, this.#GET_STUDENT, {
|
|
280
|
+
'id': id,
|
|
281
|
+
});
|
|
282
|
+
|
|
283
|
+
return data;
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
static async deleteStudent(id, toTrash = true)
|
|
287
|
+
{
|
|
288
|
+
await APIController.Post(this.#MODULE, this.#DELETE_STUDENT, {
|
|
289
|
+
'id': id,
|
|
290
|
+
'toTrash': toTrash,
|
|
291
|
+
});
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
static async setLecture(lecture, draft = false)
|
|
295
|
+
{
|
|
296
|
+
return await APIController.Post(this.#MODULE, this.#SET_LECTURE, {
|
|
297
|
+
'model': JSON.stringify(lecture),
|
|
298
|
+
'draft': draft,
|
|
299
|
+
});
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
static async getLecture(id)
|
|
303
|
+
{
|
|
304
|
+
var data = await APIController.Get(this.#MODULE, this.#GET_LECTURE, {
|
|
305
|
+
'id': id,
|
|
306
|
+
});
|
|
307
|
+
|
|
308
|
+
return data;
|
|
309
|
+
}
|
|
310
|
+
|
|
311
|
+
static async deleteLecture(id, toTrash = true, draft = false)
|
|
312
|
+
{
|
|
313
|
+
await APIController.Post(this.#MODULE, this.#DELETE_LECTURE, {
|
|
314
|
+
'id': id,
|
|
315
|
+
'toTrash': toTrash,
|
|
316
|
+
'draft': draft,
|
|
317
|
+
});
|
|
318
|
+
}
|
|
319
|
+
|
|
320
|
+
static async setLectureAttendance(attendance)
|
|
321
|
+
{
|
|
322
|
+
return await APIController.Post(this.#MODULE, this.#SET_LECTURE_ATTENDANCE, {
|
|
323
|
+
'model': JSON.stringify(attendance),
|
|
324
|
+
});
|
|
325
|
+
}
|
|
326
|
+
|
|
327
|
+
static async getLectureAttendance(id)
|
|
328
|
+
{
|
|
329
|
+
var data = await APIController.Get(this.#MODULE, this.#GET_LECTURE_ATTENDANCE, {
|
|
330
|
+
'id': id,
|
|
331
|
+
});
|
|
332
|
+
|
|
333
|
+
return data;
|
|
334
|
+
}
|
|
335
|
+
|
|
336
|
+
static async deleteLectureAttendance(id, toTrash = true)
|
|
337
|
+
{
|
|
338
|
+
await APIController.Post(this.#MODULE, this.#DELETE_LECTURE_ATTENDANCE, {
|
|
339
|
+
'id': id,
|
|
340
|
+
'toTrash': toTrash,
|
|
341
|
+
});
|
|
342
|
+
}
|
|
343
|
+
|
|
344
|
+
static async getOffersForInquiry(inquiryId)
|
|
345
|
+
{
|
|
346
|
+
var data = await APIController.Get(this.#MODULE, this.#GET_OFFERS_FOR_INQUIRY, {
|
|
347
|
+
'inquiryId': inquiryId,
|
|
348
|
+
});
|
|
349
|
+
|
|
350
|
+
return data;
|
|
351
|
+
}
|
|
352
|
+
|
|
353
|
+
static async getStudentsForCustomer(customerId)
|
|
354
|
+
{
|
|
355
|
+
var data = await APIController.Get(this.#MODULE, this.#GET_STUDENTS_FOR_CUSTOMER, {
|
|
356
|
+
'customerId': customerId,
|
|
357
|
+
});
|
|
358
|
+
|
|
359
|
+
return data;
|
|
360
|
+
}
|
|
361
|
+
|
|
362
|
+
static async getLecturesForEvent(eventId)
|
|
363
|
+
{
|
|
364
|
+
var data = await APIController.Get(this.#MODULE, this.#GET_LECTURES_FOR_EVENT, {
|
|
365
|
+
'eventId': eventId,
|
|
366
|
+
});
|
|
367
|
+
|
|
368
|
+
return data;
|
|
369
|
+
}
|
|
370
|
+
|
|
371
|
+
static async getAttendanceForLecture(lectureId)
|
|
372
|
+
{
|
|
373
|
+
var data = await APIController.Get(this.#MODULE, this.#GET_ATTENDANCE_FOR_LECTURE, {
|
|
374
|
+
'lectureId': lectureId,
|
|
375
|
+
});
|
|
376
|
+
|
|
377
|
+
return data;
|
|
378
|
+
}
|
|
379
|
+
}
|
|
380
|
+
|
|
381
381
|
export default Models;
|