catchup-library-web 2.2.21 → 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 +252 -210
- package/dist/index.mjs +252 -210
- package/package.json +1 -1
- package/src/utilization/ManagementUtilization.ts +355 -293
|
@@ -3,89 +3,106 @@ import i18n from "../language/i18n";
|
|
|
3
3
|
export const retrieveBrandDTOByUserProfileOptionList = (userProfile: any) => {
|
|
4
4
|
const brandDTOOptionList = [];
|
|
5
5
|
if (userProfile) {
|
|
6
|
-
|
|
7
|
-
const
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
(
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
6
|
+
if (userProfile.branchDTOList) {
|
|
7
|
+
for (const branchDTO of userProfile.branchDTOList) {
|
|
8
|
+
const currentBrand =
|
|
9
|
+
branchDTO.gradeDTO.seasonDTO.institutionDTO.campusDTO.brandDTO;
|
|
10
|
+
if (
|
|
11
|
+
brandDTOOptionList.findIndex(
|
|
12
|
+
(brandDTOOption) => brandDTOOption.value === currentBrand.id
|
|
13
|
+
) === -1
|
|
14
|
+
) {
|
|
15
|
+
brandDTOOptionList.push({
|
|
16
|
+
value: currentBrand.id,
|
|
17
|
+
fullValue: currentBrand,
|
|
18
|
+
text: currentBrand.name,
|
|
19
|
+
});
|
|
20
|
+
}
|
|
19
21
|
}
|
|
20
22
|
}
|
|
21
|
-
|
|
22
|
-
const
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
23
|
+
if (userProfile.gradeDTOList) {
|
|
24
|
+
for (const gradeDTO of userProfile.gradeDTOList) {
|
|
25
|
+
const currentBrand =
|
|
26
|
+
gradeDTO.seasonDTO.institutionDTO.campusDTO.brandDTO;
|
|
27
|
+
if (
|
|
28
|
+
brandDTOOptionList.findIndex(
|
|
29
|
+
(brandDTOOption) => brandDTOOption.value === currentBrand.id
|
|
30
|
+
) === -1
|
|
31
|
+
) {
|
|
32
|
+
brandDTOOptionList.push({
|
|
33
|
+
value: currentBrand.id,
|
|
34
|
+
fullValue: currentBrand,
|
|
35
|
+
text: currentBrand.name,
|
|
36
|
+
});
|
|
37
|
+
}
|
|
33
38
|
}
|
|
34
39
|
}
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
40
|
+
|
|
41
|
+
if (userProfile.seasonDTOList) {
|
|
42
|
+
for (const seasonDTO of userProfile.seasonDTOList) {
|
|
43
|
+
const currentBrand = seasonDTO.institutionDTO.campusDTO.brandDTO;
|
|
44
|
+
if (
|
|
45
|
+
brandDTOOptionList.findIndex(
|
|
46
|
+
(brandDTOOption) => brandDTOOption.value === currentBrand.id
|
|
47
|
+
) === -1
|
|
48
|
+
) {
|
|
49
|
+
brandDTOOptionList.push({
|
|
50
|
+
value: currentBrand.id,
|
|
51
|
+
fullValue: currentBrand,
|
|
52
|
+
text: currentBrand.name,
|
|
53
|
+
});
|
|
54
|
+
}
|
|
47
55
|
}
|
|
48
56
|
}
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
57
|
+
|
|
58
|
+
if (userProfile.institutionDTOList) {
|
|
59
|
+
for (const institutionDTO of userProfile.institutionDTOList) {
|
|
60
|
+
const currentBrand = institutionDTO.campusDTO.brandDTO;
|
|
61
|
+
if (
|
|
62
|
+
brandDTOOptionList.findIndex(
|
|
63
|
+
(brandDTOOption) => brandDTOOption.value === currentBrand.id
|
|
64
|
+
) === -1
|
|
65
|
+
) {
|
|
66
|
+
brandDTOOptionList.push({
|
|
67
|
+
value: currentBrand.id,
|
|
68
|
+
fullValue: currentBrand,
|
|
69
|
+
text: currentBrand.name,
|
|
70
|
+
});
|
|
71
|
+
}
|
|
61
72
|
}
|
|
62
73
|
}
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
74
|
+
|
|
75
|
+
if (userProfile.campusDTOList) {
|
|
76
|
+
for (const campusDTO of userProfile.campusDTOList) {
|
|
77
|
+
const currentBrand = campusDTO.brandDTO;
|
|
78
|
+
if (
|
|
79
|
+
brandDTOOptionList.findIndex(
|
|
80
|
+
(brandDTOOption) => brandDTOOption.value === currentBrand.id
|
|
81
|
+
) === -1
|
|
82
|
+
) {
|
|
83
|
+
brandDTOOptionList.push({
|
|
84
|
+
value: currentBrand.id,
|
|
85
|
+
fullValue: currentBrand,
|
|
86
|
+
text: currentBrand.name,
|
|
87
|
+
});
|
|
88
|
+
}
|
|
75
89
|
}
|
|
76
90
|
}
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
91
|
+
|
|
92
|
+
if (userProfile.brandDTOList) {
|
|
93
|
+
for (const brandDTO of userProfile.brandDTOList) {
|
|
94
|
+
const currentBrand = brandDTO;
|
|
95
|
+
if (
|
|
96
|
+
brandDTOOptionList.findIndex(
|
|
97
|
+
(brandDTOOption) => brandDTOOption.value === currentBrand.id
|
|
98
|
+
) === -1
|
|
99
|
+
) {
|
|
100
|
+
brandDTOOptionList.push({
|
|
101
|
+
value: currentBrand.id,
|
|
102
|
+
fullValue: currentBrand,
|
|
103
|
+
text: currentBrand.name,
|
|
104
|
+
});
|
|
105
|
+
}
|
|
89
106
|
}
|
|
90
107
|
}
|
|
91
108
|
}
|
|
@@ -151,82 +168,97 @@ export const retrieveCampusDTOByUserProfileOptionList = (
|
|
|
151
168
|
const campusDTOOptionList = [];
|
|
152
169
|
if (userProfile) {
|
|
153
170
|
if (selectedBrandId) {
|
|
154
|
-
|
|
155
|
-
const
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
(
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
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
|
+
}
|
|
168
187
|
}
|
|
169
188
|
}
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
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
|
+
}
|
|
183
205
|
}
|
|
184
206
|
}
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
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
|
+
}
|
|
198
223
|
}
|
|
199
224
|
}
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
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
|
+
}
|
|
213
241
|
}
|
|
214
242
|
}
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
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
|
+
}
|
|
228
259
|
}
|
|
229
260
|
}
|
|
261
|
+
|
|
230
262
|
return campusDTOOptionList;
|
|
231
263
|
}
|
|
232
264
|
}
|
|
@@ -242,76 +274,88 @@ export const retrieveInstitutionDTOByUserProfileOptionList = (
|
|
|
242
274
|
const institutionDTOOptionList = [];
|
|
243
275
|
if (userProfile) {
|
|
244
276
|
if (selectedCampusId) {
|
|
245
|
-
|
|
246
|
-
const
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
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
|
+
}
|
|
261
296
|
}
|
|
262
297
|
}
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
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
|
+
}
|
|
279
317
|
}
|
|
280
318
|
}
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
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
|
+
}
|
|
297
338
|
}
|
|
298
339
|
}
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
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
|
+
}
|
|
315
359
|
}
|
|
316
360
|
}
|
|
317
361
|
}
|
|
@@ -327,55 +371,66 @@ export const retrieveSeasonDTOByUserProfileOptionList = (
|
|
|
327
371
|
const seasonDTOOptionList = [];
|
|
328
372
|
if (userProfile) {
|
|
329
373
|
if (selectedInstitutionId) {
|
|
330
|
-
|
|
331
|
-
const
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
(
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
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
|
+
}
|
|
345
392
|
}
|
|
346
393
|
}
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
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
|
+
}
|
|
362
413
|
}
|
|
363
414
|
}
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
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
|
+
}
|
|
379
434
|
}
|
|
380
435
|
}
|
|
381
436
|
}
|
|
@@ -391,38 +446,43 @@ export const retrieveGradeDTOByUserProfileOptionList = (
|
|
|
391
446
|
const gradeDTOOptionList = [];
|
|
392
447
|
if (userProfile) {
|
|
393
448
|
if (selectedSeasonId) {
|
|
394
|
-
|
|
395
|
-
const
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
(
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
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
|
+
}
|
|
409
466
|
}
|
|
410
467
|
}
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
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
|
+
}
|
|
426
486
|
}
|
|
427
487
|
}
|
|
428
488
|
}
|
|
@@ -438,21 +498,23 @@ export const retrieveBranchDTOByUserProfileOptionList = (
|
|
|
438
498
|
const branchDTOOptionList = [];
|
|
439
499
|
if (userProfile) {
|
|
440
500
|
if (selectedGradeId) {
|
|
441
|
-
|
|
442
|
-
const
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
(
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
.
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
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
|
+
}
|
|
456
518
|
}
|
|
457
519
|
}
|
|
458
520
|
}
|