catchup-library-web 2.2.22 → 2.2.23
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/index.js +180 -150
- package/dist/index.mjs +180 -150
- package/package.json +1 -1
- package/src/utilization/ManagementUtilization.ts +265 -220
|
@@ -168,82 +168,97 @@ export const retrieveCampusDTOByUserProfileOptionList = (
|
|
|
168
168
|
const campusDTOOptionList = [];
|
|
169
169
|
if (userProfile) {
|
|
170
170
|
if (selectedBrandId) {
|
|
171
|
-
|
|
172
|
-
const
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
(
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
171
|
+
if (userProfile.branchDTOList) {
|
|
172
|
+
for (const branchDTO of userProfile.branchDTOList) {
|
|
173
|
+
const currentCampus =
|
|
174
|
+
branchDTO.gradeDTO.seasonDTO.institutionDTO.campusDTO;
|
|
175
|
+
if (
|
|
176
|
+
campusDTOOptionList.findIndex(
|
|
177
|
+
(campusDTOOption) => campusDTOOption.value === currentCampus.id
|
|
178
|
+
) === -1 &&
|
|
179
|
+
currentCampus.brandDTO.id === parseFloat(selectedBrandId)
|
|
180
|
+
) {
|
|
181
|
+
campusDTOOptionList.push({
|
|
182
|
+
value: currentCampus.id,
|
|
183
|
+
fullValue: currentCampus,
|
|
184
|
+
text: currentCampus.name,
|
|
185
|
+
});
|
|
186
|
+
}
|
|
185
187
|
}
|
|
186
188
|
}
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
189
|
+
|
|
190
|
+
if (userProfile.gradeDTOList) {
|
|
191
|
+
for (const gradeDTO of userProfile.gradeDTOList) {
|
|
192
|
+
const currentCampus = gradeDTO.seasonDTO.institutionDTO.campusDTO;
|
|
193
|
+
if (
|
|
194
|
+
campusDTOOptionList.findIndex(
|
|
195
|
+
(campusDTOOption) => campusDTOOption.value === currentCampus.id
|
|
196
|
+
) === -1 &&
|
|
197
|
+
currentCampus.brandDTO.id === parseFloat(selectedBrandId)
|
|
198
|
+
) {
|
|
199
|
+
campusDTOOptionList.push({
|
|
200
|
+
value: currentCampus.id,
|
|
201
|
+
fullValue: currentCampus,
|
|
202
|
+
text: currentCampus.name,
|
|
203
|
+
});
|
|
204
|
+
}
|
|
200
205
|
}
|
|
201
206
|
}
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
207
|
+
|
|
208
|
+
if (userProfile.seasonDTOList) {
|
|
209
|
+
for (const seasonDTO of userProfile.seasonDTOList) {
|
|
210
|
+
const currentCampus = seasonDTO.institutionDTO.campusDTO;
|
|
211
|
+
if (
|
|
212
|
+
campusDTOOptionList.findIndex(
|
|
213
|
+
(campusDTOOption) => campusDTOOption.value === currentCampus.id
|
|
214
|
+
) === -1 &&
|
|
215
|
+
currentCampus.brandDTO.id === parseFloat(selectedBrandId)
|
|
216
|
+
) {
|
|
217
|
+
campusDTOOptionList.push({
|
|
218
|
+
value: currentCampus.id,
|
|
219
|
+
fullValue: currentCampus,
|
|
220
|
+
text: currentCampus.name,
|
|
221
|
+
});
|
|
222
|
+
}
|
|
215
223
|
}
|
|
216
224
|
}
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
225
|
+
|
|
226
|
+
if (userProfile.institutionDTOList) {
|
|
227
|
+
for (const institutionDTO of userProfile.institutionDTOList) {
|
|
228
|
+
const currentCampus = institutionDTO.campusDTO;
|
|
229
|
+
if (
|
|
230
|
+
campusDTOOptionList.findIndex(
|
|
231
|
+
(campusDTOOption) => campusDTOOption.value === currentCampus.id
|
|
232
|
+
) === -1 &&
|
|
233
|
+
currentCampus.brandDTO.id === parseFloat(selectedBrandId)
|
|
234
|
+
) {
|
|
235
|
+
campusDTOOptionList.push({
|
|
236
|
+
value: currentCampus.id,
|
|
237
|
+
fullValue: currentCampus,
|
|
238
|
+
text: currentCampus.name,
|
|
239
|
+
});
|
|
240
|
+
}
|
|
230
241
|
}
|
|
231
242
|
}
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
243
|
+
|
|
244
|
+
if (userProfile.campusDTOList) {
|
|
245
|
+
for (const campusDTO of userProfile.campusDTOList) {
|
|
246
|
+
const currentCampus = campusDTO;
|
|
247
|
+
if (
|
|
248
|
+
campusDTOOptionList.findIndex(
|
|
249
|
+
(campusDTOOption) => campusDTOOption.value === currentCampus.id
|
|
250
|
+
) === -1 &&
|
|
251
|
+
currentCampus.brandDTO.id === parseFloat(selectedBrandId)
|
|
252
|
+
) {
|
|
253
|
+
campusDTOOptionList.push({
|
|
254
|
+
value: currentCampus.id,
|
|
255
|
+
fullValue: currentCampus,
|
|
256
|
+
text: currentCampus.name,
|
|
257
|
+
});
|
|
258
|
+
}
|
|
245
259
|
}
|
|
246
260
|
}
|
|
261
|
+
|
|
247
262
|
return campusDTOOptionList;
|
|
248
263
|
}
|
|
249
264
|
}
|
|
@@ -259,76 +274,88 @@ export const retrieveInstitutionDTOByUserProfileOptionList = (
|
|
|
259
274
|
const institutionDTOOptionList = [];
|
|
260
275
|
if (userProfile) {
|
|
261
276
|
if (selectedCampusId) {
|
|
262
|
-
|
|
263
|
-
const
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
277
|
+
if (userProfile.branchDTOList) {
|
|
278
|
+
for (const branchDTO of userProfile.branchDTOList) {
|
|
279
|
+
const currentInstitution =
|
|
280
|
+
branchDTO.gradeDTO.seasonDTO.institutionDTO;
|
|
281
|
+
if (
|
|
282
|
+
institutionDTOOptionList.findIndex(
|
|
283
|
+
(institutionDTOOption) =>
|
|
284
|
+
institutionDTOOption.value === currentInstitution.id
|
|
285
|
+
) === -1 &&
|
|
286
|
+
currentInstitution.campusDTO.brandDTO.id ===
|
|
287
|
+
parseFloat(selectedBrandId) &&
|
|
288
|
+
currentInstitution.campusDTO.id === parseFloat(selectedCampusId)
|
|
289
|
+
) {
|
|
290
|
+
institutionDTOOptionList.push({
|
|
291
|
+
value: currentInstitution.id,
|
|
292
|
+
fullValue: currentInstitution,
|
|
293
|
+
text: currentInstitution.name,
|
|
294
|
+
});
|
|
295
|
+
}
|
|
278
296
|
}
|
|
279
297
|
}
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
298
|
+
|
|
299
|
+
if (userProfile.gradeDTOList) {
|
|
300
|
+
for (const gradeDTO of userProfile.gradeDTOList) {
|
|
301
|
+
const currentInstitution = gradeDTO.seasonDTO.institutionDTO;
|
|
302
|
+
if (
|
|
303
|
+
institutionDTOOptionList.findIndex(
|
|
304
|
+
(institutionDTOOption) =>
|
|
305
|
+
institutionDTOOption.value === currentInstitution.id
|
|
306
|
+
) === -1 &&
|
|
307
|
+
currentInstitution.campusDTO.brandDTO.id ===
|
|
308
|
+
parseFloat(selectedBrandId) &&
|
|
309
|
+
currentInstitution.campusDTO.id === parseFloat(selectedCampusId)
|
|
310
|
+
) {
|
|
311
|
+
institutionDTOOptionList.push({
|
|
312
|
+
value: currentInstitution.id,
|
|
313
|
+
fullValue: currentInstitution,
|
|
314
|
+
text: currentInstitution.name,
|
|
315
|
+
});
|
|
316
|
+
}
|
|
296
317
|
}
|
|
297
318
|
}
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
319
|
+
|
|
320
|
+
if (userProfile.seasonDTOList) {
|
|
321
|
+
for (const seasonDTO of userProfile.seasonDTOList) {
|
|
322
|
+
const currentInstitution = seasonDTO.institutionDTO;
|
|
323
|
+
if (
|
|
324
|
+
institutionDTOOptionList.findIndex(
|
|
325
|
+
(institutionDTOOption) =>
|
|
326
|
+
institutionDTOOption.value === currentInstitution.id
|
|
327
|
+
) === -1 &&
|
|
328
|
+
currentInstitution.campusDTO.brandDTO.id ===
|
|
329
|
+
parseFloat(selectedBrandId) &&
|
|
330
|
+
currentInstitution.campusDTO.id === parseFloat(selectedCampusId)
|
|
331
|
+
) {
|
|
332
|
+
institutionDTOOptionList.push({
|
|
333
|
+
value: currentInstitution.id,
|
|
334
|
+
fullValue: currentInstitution,
|
|
335
|
+
text: currentInstitution.name,
|
|
336
|
+
});
|
|
337
|
+
}
|
|
314
338
|
}
|
|
315
339
|
}
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
340
|
+
|
|
341
|
+
if (userProfile.institutionDTOList) {
|
|
342
|
+
for (const institutionDTO of userProfile.institutionDTOList) {
|
|
343
|
+
const currentInstitution = institutionDTO;
|
|
344
|
+
if (
|
|
345
|
+
institutionDTOOptionList.findIndex(
|
|
346
|
+
(institutionDTOOption) =>
|
|
347
|
+
institutionDTOOption.value === currentInstitution.id
|
|
348
|
+
) === -1 &&
|
|
349
|
+
currentInstitution.campusDTO.brandDTO.id ===
|
|
350
|
+
parseFloat(selectedBrandId) &&
|
|
351
|
+
currentInstitution.campusDTO.id === parseFloat(selectedCampusId)
|
|
352
|
+
) {
|
|
353
|
+
institutionDTOOptionList.push({
|
|
354
|
+
value: currentInstitution.id,
|
|
355
|
+
fullValue: currentInstitution,
|
|
356
|
+
text: currentInstitution.name,
|
|
357
|
+
});
|
|
358
|
+
}
|
|
332
359
|
}
|
|
333
360
|
}
|
|
334
361
|
}
|
|
@@ -344,55 +371,66 @@ export const retrieveSeasonDTOByUserProfileOptionList = (
|
|
|
344
371
|
const seasonDTOOptionList = [];
|
|
345
372
|
if (userProfile) {
|
|
346
373
|
if (selectedInstitutionId) {
|
|
347
|
-
|
|
348
|
-
const
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
(
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
374
|
+
if (userProfile.branchDTOList) {
|
|
375
|
+
for (const branchDTO of userProfile.branchDTOList) {
|
|
376
|
+
const currentSeason = branchDTO.gradeDTO.seasonDTO;
|
|
377
|
+
if (
|
|
378
|
+
seasonDTOOptionList.findIndex(
|
|
379
|
+
(seasonDTOOption) => seasonDTOOption.value === currentSeason.id
|
|
380
|
+
) === -1 &&
|
|
381
|
+
currentSeason.institutionDTO.campusDTO.brandDTO.id ===
|
|
382
|
+
parseFloat(selectedBrandId) &&
|
|
383
|
+
currentSeason.institutionDTO.id ===
|
|
384
|
+
parseFloat(selectedInstitutionId)
|
|
385
|
+
) {
|
|
386
|
+
seasonDTOOptionList.push({
|
|
387
|
+
value: currentSeason.id,
|
|
388
|
+
fullValue: currentSeason,
|
|
389
|
+
text: currentSeason.name,
|
|
390
|
+
});
|
|
391
|
+
}
|
|
362
392
|
}
|
|
363
393
|
}
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
394
|
+
|
|
395
|
+
if (userProfile.gradeDTOList) {
|
|
396
|
+
for (const gradeDTO of userProfile.gradeDTOList) {
|
|
397
|
+
const currentSeason = gradeDTO.seasonDTO;
|
|
398
|
+
if (
|
|
399
|
+
seasonDTOOptionList.findIndex(
|
|
400
|
+
(seasonDTOOption) => seasonDTOOption.value === currentSeason.id
|
|
401
|
+
) === -1 &&
|
|
402
|
+
currentSeason.institutionDTO.campusDTO.brandDTO.id ===
|
|
403
|
+
parseFloat(selectedBrandId) &&
|
|
404
|
+
currentSeason.institutionDTO.id ===
|
|
405
|
+
parseFloat(selectedInstitutionId)
|
|
406
|
+
) {
|
|
407
|
+
seasonDTOOptionList.push({
|
|
408
|
+
value: currentSeason.id,
|
|
409
|
+
fullValue: currentSeason,
|
|
410
|
+
text: currentSeason.name,
|
|
411
|
+
});
|
|
412
|
+
}
|
|
379
413
|
}
|
|
380
414
|
}
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
415
|
+
|
|
416
|
+
if (userProfile.seasonDTOList) {
|
|
417
|
+
for (const seasonDTO of userProfile.seasonDTOList) {
|
|
418
|
+
const currentSeason = seasonDTO;
|
|
419
|
+
if (
|
|
420
|
+
seasonDTOOptionList.findIndex(
|
|
421
|
+
(seasonDTOOption) => seasonDTOOption.value === currentSeason.id
|
|
422
|
+
) === -1 &&
|
|
423
|
+
currentSeason.institutionDTO.campusDTO.brandDTO.id ===
|
|
424
|
+
parseFloat(selectedBrandId) &&
|
|
425
|
+
currentSeason.institutionDTO.id ===
|
|
426
|
+
parseFloat(selectedInstitutionId)
|
|
427
|
+
) {
|
|
428
|
+
seasonDTOOptionList.push({
|
|
429
|
+
value: currentSeason.id,
|
|
430
|
+
fullValue: currentSeason,
|
|
431
|
+
text: currentSeason.name,
|
|
432
|
+
});
|
|
433
|
+
}
|
|
396
434
|
}
|
|
397
435
|
}
|
|
398
436
|
}
|
|
@@ -408,38 +446,43 @@ export const retrieveGradeDTOByUserProfileOptionList = (
|
|
|
408
446
|
const gradeDTOOptionList = [];
|
|
409
447
|
if (userProfile) {
|
|
410
448
|
if (selectedSeasonId) {
|
|
411
|
-
|
|
412
|
-
const
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
(
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
449
|
+
if (userProfile.branchDTOList) {
|
|
450
|
+
for (const branchDTO of userProfile.branchDTOList) {
|
|
451
|
+
const currentGrade = branchDTO.gradeDTO;
|
|
452
|
+
if (
|
|
453
|
+
gradeDTOOptionList.findIndex(
|
|
454
|
+
(gradeDTOOption) => gradeDTOOption.value === currentGrade.id
|
|
455
|
+
) === -1 &&
|
|
456
|
+
currentGrade.seasonDTO.institutionDTO.campusDTO.brandDTO.id ===
|
|
457
|
+
parseFloat(selectedBrandId) &&
|
|
458
|
+
currentGrade.seasonDTO.id === parseFloat(selectedSeasonId)
|
|
459
|
+
) {
|
|
460
|
+
gradeDTOOptionList.push({
|
|
461
|
+
value: currentGrade.id,
|
|
462
|
+
fullValue: currentGrade,
|
|
463
|
+
text: currentGrade.name,
|
|
464
|
+
});
|
|
465
|
+
}
|
|
426
466
|
}
|
|
427
467
|
}
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
468
|
+
|
|
469
|
+
if (userProfile.gradeDTOList) {
|
|
470
|
+
for (const gradeDTO of userProfile.gradeDTOList) {
|
|
471
|
+
const currentGrade = gradeDTO;
|
|
472
|
+
if (
|
|
473
|
+
gradeDTOOptionList.findIndex(
|
|
474
|
+
(gradeDTOOption) => gradeDTOOption.value === currentGrade.id
|
|
475
|
+
) === -1 &&
|
|
476
|
+
currentGrade.seasonDTO.institutionDTO.campusDTO.brandDTO.id ===
|
|
477
|
+
parseFloat(selectedBrandId) &&
|
|
478
|
+
currentGrade.seasonDTO.id === parseFloat(selectedSeasonId)
|
|
479
|
+
) {
|
|
480
|
+
gradeDTOOptionList.push({
|
|
481
|
+
value: currentGrade.id,
|
|
482
|
+
fullValue: currentGrade,
|
|
483
|
+
text: currentGrade.name,
|
|
484
|
+
});
|
|
485
|
+
}
|
|
443
486
|
}
|
|
444
487
|
}
|
|
445
488
|
}
|
|
@@ -455,21 +498,23 @@ export const retrieveBranchDTOByUserProfileOptionList = (
|
|
|
455
498
|
const branchDTOOptionList = [];
|
|
456
499
|
if (userProfile) {
|
|
457
500
|
if (selectedGradeId) {
|
|
458
|
-
|
|
459
|
-
const
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
(
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
.
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
501
|
+
if (userProfile.branchDTOList) {
|
|
502
|
+
for (const branchDTO of userProfile.branchDTOList) {
|
|
503
|
+
const currentBranch = branchDTO;
|
|
504
|
+
if (
|
|
505
|
+
branchDTOOptionList.findIndex(
|
|
506
|
+
(branchDTOOption) => branchDTOOption.value === currentBranch.id
|
|
507
|
+
) === -1 &&
|
|
508
|
+
currentBranch.gradeDTO.seasonDTO.institutionDTO.campusDTO.brandDTO
|
|
509
|
+
.id === parseFloat(selectedBrandId) &&
|
|
510
|
+
currentBranch.gradeDTO.id === parseFloat(selectedGradeId)
|
|
511
|
+
) {
|
|
512
|
+
branchDTOOptionList.push({
|
|
513
|
+
value: currentBranch.id,
|
|
514
|
+
fullValue: currentBranch,
|
|
515
|
+
text: currentBranch.name,
|
|
516
|
+
});
|
|
517
|
+
}
|
|
473
518
|
}
|
|
474
519
|
}
|
|
475
520
|
}
|