@itutoring/itutoring_application_js_api 1.6.31 → 1.6.33

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/apiController.js CHANGED
@@ -173,18 +173,18 @@ class APIController
173
173
  {
174
174
  if (request.readyState === 4)
175
175
  {
176
- APIController.LastCall = {
177
- "type": "GET",
178
- "module": module,
179
- "method": method,
180
- "data": data,
181
- }
182
-
183
176
  var response = APIController.ResolveResponse(request);
184
177
  if (useCache)
185
178
  {
186
179
  APICache.Cache(module + method + cacheSuffix, response);
187
180
  }
181
+ if (response['conf_request'] !== undefined)
182
+ APIController.LastCall = {
183
+ "type": "GET",
184
+ "module": module,
185
+ "method": method,
186
+ "data": data,
187
+ }
188
188
 
189
189
  resolve(response);
190
190
  }
@@ -239,19 +239,20 @@ class APIController
239
239
  {
240
240
  if (request.readyState === 4)
241
241
  {
242
- APIController.LastCall = {
243
- "type": "POST",
244
- "module": module,
245
- "method": method,
246
- "data": data,
247
- }
248
-
249
242
  var response = APIController.ResolveResponse(request);
250
243
  if (useCache)
251
244
  {
252
245
  APICache.Cache(module + method, response);
253
246
  }
254
247
 
248
+ if (response['conf_request'] !== undefined)
249
+ APIController.LastCall = {
250
+ "type": "POST",
251
+ "module": module,
252
+ "method": method,
253
+ "data": data,
254
+ }
255
+
255
256
  resolve(response);
256
257
  }
257
258
  }
package/modules/Models.js CHANGED
@@ -40,6 +40,19 @@ class Models
40
40
  static #GET_STUDENTS_FOR_CUSTOMER = 'GetStudentsForCustomer';
41
41
  static #GET_LECTURES_FOR_EVENT = 'GetLecturesForEvent';
42
42
  static #GET_ATTENDANCE_FOR_LECTURE = 'GetAttendanceForLecture';
43
+ static #GET_PLANNED_LECTURE_COUNT = 'GetPlannedLectureCount';
44
+
45
+ static async getPlannedLectureCount(customerId, lessonType, lessonLength)
46
+ {
47
+ var data = await APIController.Get(this.#MODULE, this.#GET_PLANNED_LECTURE_COUNT, {
48
+ 'customerId': customerId,
49
+ 'lessonType': lessonType,
50
+ 'lessonLength': lessonLength,
51
+ }
52
+ );
53
+
54
+ return data;
55
+ }
43
56
 
44
57
  static async setInquiryFlag(id, flag)
45
58
  {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@itutoring/itutoring_application_js_api",
3
- "version": "1.6.31",
3
+ "version": "1.6.33",
4
4
  "description": "Javascript API for iTutoring Application",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",