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 CHANGED
@@ -8057,64 +8057,74 @@ var retrieveCampusDTOByUserProfileOptionList = (userProfile, selectedBrandId) =>
8057
8057
  const campusDTOOptionList = [];
8058
8058
  if (userProfile) {
8059
8059
  if (selectedBrandId) {
8060
- for (const branchDTO of userProfile.branchDTOList) {
8061
- const currentCampus = branchDTO.gradeDTO.seasonDTO.institutionDTO.campusDTO;
8062
- if (campusDTOOptionList.findIndex(
8063
- (campusDTOOption) => campusDTOOption.value === currentCampus.id
8064
- ) === -1 && currentCampus.brandDTO.id === parseFloat(selectedBrandId)) {
8065
- campusDTOOptionList.push({
8066
- value: currentCampus.id,
8067
- fullValue: currentCampus,
8068
- text: currentCampus.name
8069
- });
8060
+ if (userProfile.branchDTOList) {
8061
+ for (const branchDTO of userProfile.branchDTOList) {
8062
+ const currentCampus = branchDTO.gradeDTO.seasonDTO.institutionDTO.campusDTO;
8063
+ if (campusDTOOptionList.findIndex(
8064
+ (campusDTOOption) => campusDTOOption.value === currentCampus.id
8065
+ ) === -1 && currentCampus.brandDTO.id === parseFloat(selectedBrandId)) {
8066
+ campusDTOOptionList.push({
8067
+ value: currentCampus.id,
8068
+ fullValue: currentCampus,
8069
+ text: currentCampus.name
8070
+ });
8071
+ }
8070
8072
  }
8071
8073
  }
8072
- for (const gradeDTO of userProfile.gradeDTOList) {
8073
- const currentCampus = gradeDTO.seasonDTO.institutionDTO.campusDTO;
8074
- if (campusDTOOptionList.findIndex(
8075
- (campusDTOOption) => campusDTOOption.value === currentCampus.id
8076
- ) === -1 && currentCampus.brandDTO.id === parseFloat(selectedBrandId)) {
8077
- campusDTOOptionList.push({
8078
- value: currentCampus.id,
8079
- fullValue: currentCampus,
8080
- text: currentCampus.name
8081
- });
8074
+ if (userProfile.gradeDTOList) {
8075
+ for (const gradeDTO of userProfile.gradeDTOList) {
8076
+ const currentCampus = gradeDTO.seasonDTO.institutionDTO.campusDTO;
8077
+ if (campusDTOOptionList.findIndex(
8078
+ (campusDTOOption) => campusDTOOption.value === currentCampus.id
8079
+ ) === -1 && currentCampus.brandDTO.id === parseFloat(selectedBrandId)) {
8080
+ campusDTOOptionList.push({
8081
+ value: currentCampus.id,
8082
+ fullValue: currentCampus,
8083
+ text: currentCampus.name
8084
+ });
8085
+ }
8082
8086
  }
8083
8087
  }
8084
- for (const seasonDTO of userProfile.seasonDTOList) {
8085
- const currentCampus = seasonDTO.institutionDTO.campusDTO;
8086
- if (campusDTOOptionList.findIndex(
8087
- (campusDTOOption) => campusDTOOption.value === currentCampus.id
8088
- ) === -1 && currentCampus.brandDTO.id === parseFloat(selectedBrandId)) {
8089
- campusDTOOptionList.push({
8090
- value: currentCampus.id,
8091
- fullValue: currentCampus,
8092
- text: currentCampus.name
8093
- });
8088
+ if (userProfile.seasonDTOList) {
8089
+ for (const seasonDTO of userProfile.seasonDTOList) {
8090
+ const currentCampus = seasonDTO.institutionDTO.campusDTO;
8091
+ if (campusDTOOptionList.findIndex(
8092
+ (campusDTOOption) => campusDTOOption.value === currentCampus.id
8093
+ ) === -1 && currentCampus.brandDTO.id === parseFloat(selectedBrandId)) {
8094
+ campusDTOOptionList.push({
8095
+ value: currentCampus.id,
8096
+ fullValue: currentCampus,
8097
+ text: currentCampus.name
8098
+ });
8099
+ }
8094
8100
  }
8095
8101
  }
8096
- for (const institutionDTO of userProfile.institutionDTOList) {
8097
- const currentCampus = institutionDTO.campusDTO;
8098
- if (campusDTOOptionList.findIndex(
8099
- (campusDTOOption) => campusDTOOption.value === currentCampus.id
8100
- ) === -1 && currentCampus.brandDTO.id === parseFloat(selectedBrandId)) {
8101
- campusDTOOptionList.push({
8102
- value: currentCampus.id,
8103
- fullValue: currentCampus,
8104
- text: currentCampus.name
8105
- });
8102
+ if (userProfile.institutionDTOList) {
8103
+ for (const institutionDTO of userProfile.institutionDTOList) {
8104
+ const currentCampus = institutionDTO.campusDTO;
8105
+ if (campusDTOOptionList.findIndex(
8106
+ (campusDTOOption) => campusDTOOption.value === currentCampus.id
8107
+ ) === -1 && currentCampus.brandDTO.id === parseFloat(selectedBrandId)) {
8108
+ campusDTOOptionList.push({
8109
+ value: currentCampus.id,
8110
+ fullValue: currentCampus,
8111
+ text: currentCampus.name
8112
+ });
8113
+ }
8106
8114
  }
8107
8115
  }
8108
- for (const campusDTO of userProfile.campusDTOList) {
8109
- const currentCampus = campusDTO;
8110
- if (campusDTOOptionList.findIndex(
8111
- (campusDTOOption) => campusDTOOption.value === currentCampus.id
8112
- ) === -1 && currentCampus.brandDTO.id === parseFloat(selectedBrandId)) {
8113
- campusDTOOptionList.push({
8114
- value: currentCampus.id,
8115
- fullValue: currentCampus,
8116
- text: currentCampus.name
8117
- });
8116
+ if (userProfile.campusDTOList) {
8117
+ for (const campusDTO of userProfile.campusDTOList) {
8118
+ const currentCampus = campusDTO;
8119
+ if (campusDTOOptionList.findIndex(
8120
+ (campusDTOOption) => campusDTOOption.value === currentCampus.id
8121
+ ) === -1 && currentCampus.brandDTO.id === parseFloat(selectedBrandId)) {
8122
+ campusDTOOptionList.push({
8123
+ value: currentCampus.id,
8124
+ fullValue: currentCampus,
8125
+ text: currentCampus.name
8126
+ });
8127
+ }
8118
8128
  }
8119
8129
  }
8120
8130
  return campusDTOOptionList;
@@ -8126,52 +8136,60 @@ var retrieveInstitutionDTOByUserProfileOptionList = (userProfile, selectedBrandI
8126
8136
  const institutionDTOOptionList = [];
8127
8137
  if (userProfile) {
8128
8138
  if (selectedCampusId) {
8129
- for (const branchDTO of userProfile.branchDTOList) {
8130
- const currentInstitution = branchDTO.gradeDTO.seasonDTO.institutionDTO;
8131
- if (institutionDTOOptionList.findIndex(
8132
- (institutionDTOOption) => institutionDTOOption.value === currentInstitution.id
8133
- ) === -1 && currentInstitution.campusDTO.brandDTO.id === parseFloat(selectedBrandId) && currentInstitution.campusDTO.id === parseFloat(selectedCampusId)) {
8134
- institutionDTOOptionList.push({
8135
- value: currentInstitution.id,
8136
- fullValue: currentInstitution,
8137
- text: currentInstitution.name
8138
- });
8139
+ if (userProfile.branchDTOList) {
8140
+ for (const branchDTO of userProfile.branchDTOList) {
8141
+ const currentInstitution = branchDTO.gradeDTO.seasonDTO.institutionDTO;
8142
+ if (institutionDTOOptionList.findIndex(
8143
+ (institutionDTOOption) => institutionDTOOption.value === currentInstitution.id
8144
+ ) === -1 && currentInstitution.campusDTO.brandDTO.id === parseFloat(selectedBrandId) && currentInstitution.campusDTO.id === parseFloat(selectedCampusId)) {
8145
+ institutionDTOOptionList.push({
8146
+ value: currentInstitution.id,
8147
+ fullValue: currentInstitution,
8148
+ text: currentInstitution.name
8149
+ });
8150
+ }
8139
8151
  }
8140
8152
  }
8141
- for (const gradeDTO of userProfile.gradeDTOList) {
8142
- const currentInstitution = gradeDTO.seasonDTO.institutionDTO;
8143
- if (institutionDTOOptionList.findIndex(
8144
- (institutionDTOOption) => institutionDTOOption.value === currentInstitution.id
8145
- ) === -1 && currentInstitution.campusDTO.brandDTO.id === parseFloat(selectedBrandId) && currentInstitution.campusDTO.id === parseFloat(selectedCampusId)) {
8146
- institutionDTOOptionList.push({
8147
- value: currentInstitution.id,
8148
- fullValue: currentInstitution,
8149
- text: currentInstitution.name
8150
- });
8153
+ if (userProfile.gradeDTOList) {
8154
+ for (const gradeDTO of userProfile.gradeDTOList) {
8155
+ const currentInstitution = gradeDTO.seasonDTO.institutionDTO;
8156
+ if (institutionDTOOptionList.findIndex(
8157
+ (institutionDTOOption) => institutionDTOOption.value === currentInstitution.id
8158
+ ) === -1 && currentInstitution.campusDTO.brandDTO.id === parseFloat(selectedBrandId) && currentInstitution.campusDTO.id === parseFloat(selectedCampusId)) {
8159
+ institutionDTOOptionList.push({
8160
+ value: currentInstitution.id,
8161
+ fullValue: currentInstitution,
8162
+ text: currentInstitution.name
8163
+ });
8164
+ }
8151
8165
  }
8152
8166
  }
8153
- for (const seasonDTO of userProfile.seasonDTOList) {
8154
- const currentInstitution = seasonDTO.institutionDTO;
8155
- if (institutionDTOOptionList.findIndex(
8156
- (institutionDTOOption) => institutionDTOOption.value === currentInstitution.id
8157
- ) === -1 && currentInstitution.campusDTO.brandDTO.id === parseFloat(selectedBrandId) && currentInstitution.campusDTO.id === parseFloat(selectedCampusId)) {
8158
- institutionDTOOptionList.push({
8159
- value: currentInstitution.id,
8160
- fullValue: currentInstitution,
8161
- text: currentInstitution.name
8162
- });
8167
+ if (userProfile.seasonDTOList) {
8168
+ for (const seasonDTO of userProfile.seasonDTOList) {
8169
+ const currentInstitution = seasonDTO.institutionDTO;
8170
+ if (institutionDTOOptionList.findIndex(
8171
+ (institutionDTOOption) => institutionDTOOption.value === currentInstitution.id
8172
+ ) === -1 && currentInstitution.campusDTO.brandDTO.id === parseFloat(selectedBrandId) && currentInstitution.campusDTO.id === parseFloat(selectedCampusId)) {
8173
+ institutionDTOOptionList.push({
8174
+ value: currentInstitution.id,
8175
+ fullValue: currentInstitution,
8176
+ text: currentInstitution.name
8177
+ });
8178
+ }
8163
8179
  }
8164
8180
  }
8165
- for (const institutionDTO of userProfile.institutionDTOList) {
8166
- const currentInstitution = institutionDTO;
8167
- if (institutionDTOOptionList.findIndex(
8168
- (institutionDTOOption) => institutionDTOOption.value === currentInstitution.id
8169
- ) === -1 && currentInstitution.campusDTO.brandDTO.id === parseFloat(selectedBrandId) && currentInstitution.campusDTO.id === parseFloat(selectedCampusId)) {
8170
- institutionDTOOptionList.push({
8171
- value: currentInstitution.id,
8172
- fullValue: currentInstitution,
8173
- text: currentInstitution.name
8174
- });
8181
+ if (userProfile.institutionDTOList) {
8182
+ for (const institutionDTO of userProfile.institutionDTOList) {
8183
+ const currentInstitution = institutionDTO;
8184
+ if (institutionDTOOptionList.findIndex(
8185
+ (institutionDTOOption) => institutionDTOOption.value === currentInstitution.id
8186
+ ) === -1 && currentInstitution.campusDTO.brandDTO.id === parseFloat(selectedBrandId) && currentInstitution.campusDTO.id === parseFloat(selectedCampusId)) {
8187
+ institutionDTOOptionList.push({
8188
+ value: currentInstitution.id,
8189
+ fullValue: currentInstitution,
8190
+ text: currentInstitution.name
8191
+ });
8192
+ }
8175
8193
  }
8176
8194
  }
8177
8195
  }
@@ -8182,40 +8200,46 @@ var retrieveSeasonDTOByUserProfileOptionList = (userProfile, selectedBrandId, se
8182
8200
  const seasonDTOOptionList = [];
8183
8201
  if (userProfile) {
8184
8202
  if (selectedInstitutionId) {
8185
- for (const branchDTO of userProfile.branchDTOList) {
8186
- const currentSeason = branchDTO.gradeDTO.seasonDTO;
8187
- if (seasonDTOOptionList.findIndex(
8188
- (seasonDTOOption) => seasonDTOOption.value === currentSeason.id
8189
- ) === -1 && currentSeason.institutionDTO.campusDTO.brandDTO.id === parseFloat(selectedBrandId) && currentSeason.institutionDTO.id === parseFloat(selectedInstitutionId)) {
8190
- seasonDTOOptionList.push({
8191
- value: currentSeason.id,
8192
- fullValue: currentSeason,
8193
- text: currentSeason.name
8194
- });
8203
+ if (userProfile.branchDTOList) {
8204
+ for (const branchDTO of userProfile.branchDTOList) {
8205
+ const currentSeason = branchDTO.gradeDTO.seasonDTO;
8206
+ if (seasonDTOOptionList.findIndex(
8207
+ (seasonDTOOption) => seasonDTOOption.value === currentSeason.id
8208
+ ) === -1 && currentSeason.institutionDTO.campusDTO.brandDTO.id === parseFloat(selectedBrandId) && currentSeason.institutionDTO.id === parseFloat(selectedInstitutionId)) {
8209
+ seasonDTOOptionList.push({
8210
+ value: currentSeason.id,
8211
+ fullValue: currentSeason,
8212
+ text: currentSeason.name
8213
+ });
8214
+ }
8195
8215
  }
8196
8216
  }
8197
- for (const gradeDTO of userProfile.gradeDTOList) {
8198
- const currentSeason = gradeDTO.seasonDTO;
8199
- if (seasonDTOOptionList.findIndex(
8200
- (seasonDTOOption) => seasonDTOOption.value === currentSeason.id
8201
- ) === -1 && currentSeason.institutionDTO.campusDTO.brandDTO.id === parseFloat(selectedBrandId) && currentSeason.institutionDTO.id === parseFloat(selectedInstitutionId)) {
8202
- seasonDTOOptionList.push({
8203
- value: currentSeason.id,
8204
- fullValue: currentSeason,
8205
- text: currentSeason.name
8206
- });
8217
+ if (userProfile.gradeDTOList) {
8218
+ for (const gradeDTO of userProfile.gradeDTOList) {
8219
+ const currentSeason = gradeDTO.seasonDTO;
8220
+ if (seasonDTOOptionList.findIndex(
8221
+ (seasonDTOOption) => seasonDTOOption.value === currentSeason.id
8222
+ ) === -1 && currentSeason.institutionDTO.campusDTO.brandDTO.id === parseFloat(selectedBrandId) && currentSeason.institutionDTO.id === parseFloat(selectedInstitutionId)) {
8223
+ seasonDTOOptionList.push({
8224
+ value: currentSeason.id,
8225
+ fullValue: currentSeason,
8226
+ text: currentSeason.name
8227
+ });
8228
+ }
8207
8229
  }
8208
8230
  }
8209
- for (const seasonDTO of userProfile.seasonDTOList) {
8210
- const currentSeason = seasonDTO;
8211
- if (seasonDTOOptionList.findIndex(
8212
- (seasonDTOOption) => seasonDTOOption.value === currentSeason.id
8213
- ) === -1 && currentSeason.institutionDTO.campusDTO.brandDTO.id === parseFloat(selectedBrandId) && currentSeason.institutionDTO.id === parseFloat(selectedInstitutionId)) {
8214
- seasonDTOOptionList.push({
8215
- value: currentSeason.id,
8216
- fullValue: currentSeason,
8217
- text: currentSeason.name
8218
- });
8231
+ if (userProfile.seasonDTOList) {
8232
+ for (const seasonDTO of userProfile.seasonDTOList) {
8233
+ const currentSeason = seasonDTO;
8234
+ if (seasonDTOOptionList.findIndex(
8235
+ (seasonDTOOption) => seasonDTOOption.value === currentSeason.id
8236
+ ) === -1 && currentSeason.institutionDTO.campusDTO.brandDTO.id === parseFloat(selectedBrandId) && currentSeason.institutionDTO.id === parseFloat(selectedInstitutionId)) {
8237
+ seasonDTOOptionList.push({
8238
+ value: currentSeason.id,
8239
+ fullValue: currentSeason,
8240
+ text: currentSeason.name
8241
+ });
8242
+ }
8219
8243
  }
8220
8244
  }
8221
8245
  }
@@ -8226,28 +8250,32 @@ var retrieveGradeDTOByUserProfileOptionList = (userProfile, selectedBrandId, sel
8226
8250
  const gradeDTOOptionList = [];
8227
8251
  if (userProfile) {
8228
8252
  if (selectedSeasonId) {
8229
- for (const branchDTO of userProfile.branchDTOList) {
8230
- const currentGrade = branchDTO.gradeDTO;
8231
- if (gradeDTOOptionList.findIndex(
8232
- (gradeDTOOption) => gradeDTOOption.value === currentGrade.id
8233
- ) === -1 && currentGrade.seasonDTO.institutionDTO.campusDTO.brandDTO.id === parseFloat(selectedBrandId) && currentGrade.seasonDTO.id === parseFloat(selectedSeasonId)) {
8234
- gradeDTOOptionList.push({
8235
- value: currentGrade.id,
8236
- fullValue: currentGrade,
8237
- text: currentGrade.name
8238
- });
8253
+ if (userProfile.branchDTOList) {
8254
+ for (const branchDTO of userProfile.branchDTOList) {
8255
+ const currentGrade = branchDTO.gradeDTO;
8256
+ if (gradeDTOOptionList.findIndex(
8257
+ (gradeDTOOption) => gradeDTOOption.value === currentGrade.id
8258
+ ) === -1 && currentGrade.seasonDTO.institutionDTO.campusDTO.brandDTO.id === parseFloat(selectedBrandId) && currentGrade.seasonDTO.id === parseFloat(selectedSeasonId)) {
8259
+ gradeDTOOptionList.push({
8260
+ value: currentGrade.id,
8261
+ fullValue: currentGrade,
8262
+ text: currentGrade.name
8263
+ });
8264
+ }
8239
8265
  }
8240
8266
  }
8241
- for (const gradeDTO of userProfile.gradeDTOList) {
8242
- const currentGrade = gradeDTO;
8243
- if (gradeDTOOptionList.findIndex(
8244
- (gradeDTOOption) => gradeDTOOption.value === currentGrade.id
8245
- ) === -1 && currentGrade.seasonDTO.institutionDTO.campusDTO.brandDTO.id === parseFloat(selectedBrandId) && currentGrade.seasonDTO.id === parseFloat(selectedSeasonId)) {
8246
- gradeDTOOptionList.push({
8247
- value: currentGrade.id,
8248
- fullValue: currentGrade,
8249
- text: currentGrade.name
8250
- });
8267
+ if (userProfile.gradeDTOList) {
8268
+ for (const gradeDTO of userProfile.gradeDTOList) {
8269
+ const currentGrade = gradeDTO;
8270
+ if (gradeDTOOptionList.findIndex(
8271
+ (gradeDTOOption) => gradeDTOOption.value === currentGrade.id
8272
+ ) === -1 && currentGrade.seasonDTO.institutionDTO.campusDTO.brandDTO.id === parseFloat(selectedBrandId) && currentGrade.seasonDTO.id === parseFloat(selectedSeasonId)) {
8273
+ gradeDTOOptionList.push({
8274
+ value: currentGrade.id,
8275
+ fullValue: currentGrade,
8276
+ text: currentGrade.name
8277
+ });
8278
+ }
8251
8279
  }
8252
8280
  }
8253
8281
  }
@@ -8258,16 +8286,18 @@ var retrieveBranchDTOByUserProfileOptionList = (userProfile, selectedBrandId, se
8258
8286
  const branchDTOOptionList = [];
8259
8287
  if (userProfile) {
8260
8288
  if (selectedGradeId) {
8261
- for (const branchDTO of userProfile.branchDTOList) {
8262
- const currentBranch = branchDTO;
8263
- if (branchDTOOptionList.findIndex(
8264
- (branchDTOOption) => branchDTOOption.value === currentBranch.id
8265
- ) === -1 && currentBranch.gradeDTO.seasonDTO.institutionDTO.campusDTO.brandDTO.id === parseFloat(selectedBrandId) && currentBranch.gradeDTO.id === parseFloat(selectedGradeId)) {
8266
- branchDTOOptionList.push({
8267
- value: currentBranch.id,
8268
- fullValue: currentBranch,
8269
- text: currentBranch.name
8270
- });
8289
+ if (userProfile.branchDTOList) {
8290
+ for (const branchDTO of userProfile.branchDTOList) {
8291
+ const currentBranch = branchDTO;
8292
+ if (branchDTOOptionList.findIndex(
8293
+ (branchDTOOption) => branchDTOOption.value === currentBranch.id
8294
+ ) === -1 && currentBranch.gradeDTO.seasonDTO.institutionDTO.campusDTO.brandDTO.id === parseFloat(selectedBrandId) && currentBranch.gradeDTO.id === parseFloat(selectedGradeId)) {
8295
+ branchDTOOptionList.push({
8296
+ value: currentBranch.id,
8297
+ fullValue: currentBranch,
8298
+ text: currentBranch.name
8299
+ });
8300
+ }
8271
8301
  }
8272
8302
  }
8273
8303
  }