catchup-library-web 2.2.21 → 2.2.22

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
@@ -7921,76 +7921,88 @@ var retrieveCurrencyTypeOptionList = () => {
7921
7921
  var retrieveBrandDTOByUserProfileOptionList = (userProfile) => {
7922
7922
  const brandDTOOptionList = [];
7923
7923
  if (userProfile) {
7924
- for (const branchDTO of userProfile.branchDTOList) {
7925
- const currentBrand = branchDTO.gradeDTO.seasonDTO.institutionDTO.campusDTO.brandDTO;
7926
- if (brandDTOOptionList.findIndex(
7927
- (brandDTOOption) => brandDTOOption.value === currentBrand.id
7928
- ) === -1) {
7929
- brandDTOOptionList.push({
7930
- value: currentBrand.id,
7931
- fullValue: currentBrand,
7932
- text: currentBrand.name
7933
- });
7924
+ if (userProfile.branchDTOList) {
7925
+ for (const branchDTO of userProfile.branchDTOList) {
7926
+ const currentBrand = branchDTO.gradeDTO.seasonDTO.institutionDTO.campusDTO.brandDTO;
7927
+ if (brandDTOOptionList.findIndex(
7928
+ (brandDTOOption) => brandDTOOption.value === currentBrand.id
7929
+ ) === -1) {
7930
+ brandDTOOptionList.push({
7931
+ value: currentBrand.id,
7932
+ fullValue: currentBrand,
7933
+ text: currentBrand.name
7934
+ });
7935
+ }
7934
7936
  }
7935
7937
  }
7936
- for (const gradeDTO of userProfile.gradeDTOList) {
7937
- const currentBrand = gradeDTO.seasonDTO.institutionDTO.campusDTO.brandDTO;
7938
- if (brandDTOOptionList.findIndex(
7939
- (brandDTOOption) => brandDTOOption.value === currentBrand.id
7940
- ) === -1) {
7941
- brandDTOOptionList.push({
7942
- value: currentBrand.id,
7943
- fullValue: currentBrand,
7944
- text: currentBrand.name
7945
- });
7938
+ if (userProfile.gradeDTOList) {
7939
+ for (const gradeDTO of userProfile.gradeDTOList) {
7940
+ const currentBrand = gradeDTO.seasonDTO.institutionDTO.campusDTO.brandDTO;
7941
+ if (brandDTOOptionList.findIndex(
7942
+ (brandDTOOption) => brandDTOOption.value === currentBrand.id
7943
+ ) === -1) {
7944
+ brandDTOOptionList.push({
7945
+ value: currentBrand.id,
7946
+ fullValue: currentBrand,
7947
+ text: currentBrand.name
7948
+ });
7949
+ }
7946
7950
  }
7947
7951
  }
7948
- for (const seasonDTO of userProfile.seasonDTOList) {
7949
- const currentBrand = seasonDTO.institutionDTO.campusDTO.brandDTO;
7950
- if (brandDTOOptionList.findIndex(
7951
- (brandDTOOption) => brandDTOOption.value === currentBrand.id
7952
- ) === -1) {
7953
- brandDTOOptionList.push({
7954
- value: currentBrand.id,
7955
- fullValue: currentBrand,
7956
- text: currentBrand.name
7957
- });
7952
+ if (userProfile.seasonDTOList) {
7953
+ for (const seasonDTO of userProfile.seasonDTOList) {
7954
+ const currentBrand = seasonDTO.institutionDTO.campusDTO.brandDTO;
7955
+ if (brandDTOOptionList.findIndex(
7956
+ (brandDTOOption) => brandDTOOption.value === currentBrand.id
7957
+ ) === -1) {
7958
+ brandDTOOptionList.push({
7959
+ value: currentBrand.id,
7960
+ fullValue: currentBrand,
7961
+ text: currentBrand.name
7962
+ });
7963
+ }
7958
7964
  }
7959
7965
  }
7960
- for (const institutionDTO of userProfile.institutionDTOList) {
7961
- const currentBrand = institutionDTO.campusDTO.brandDTO;
7962
- if (brandDTOOptionList.findIndex(
7963
- (brandDTOOption) => brandDTOOption.value === currentBrand.id
7964
- ) === -1) {
7965
- brandDTOOptionList.push({
7966
- value: currentBrand.id,
7967
- fullValue: currentBrand,
7968
- text: currentBrand.name
7969
- });
7966
+ if (userProfile.institutionDTOList) {
7967
+ for (const institutionDTO of userProfile.institutionDTOList) {
7968
+ const currentBrand = institutionDTO.campusDTO.brandDTO;
7969
+ if (brandDTOOptionList.findIndex(
7970
+ (brandDTOOption) => brandDTOOption.value === currentBrand.id
7971
+ ) === -1) {
7972
+ brandDTOOptionList.push({
7973
+ value: currentBrand.id,
7974
+ fullValue: currentBrand,
7975
+ text: currentBrand.name
7976
+ });
7977
+ }
7970
7978
  }
7971
7979
  }
7972
- for (const campusDTO of userProfile.campusDTOList) {
7973
- const currentBrand = campusDTO.brandDTO;
7974
- if (brandDTOOptionList.findIndex(
7975
- (brandDTOOption) => brandDTOOption.value === currentBrand.id
7976
- ) === -1) {
7977
- brandDTOOptionList.push({
7978
- value: currentBrand.id,
7979
- fullValue: currentBrand,
7980
- text: currentBrand.name
7981
- });
7980
+ if (userProfile.campusDTOList) {
7981
+ for (const campusDTO of userProfile.campusDTOList) {
7982
+ const currentBrand = campusDTO.brandDTO;
7983
+ if (brandDTOOptionList.findIndex(
7984
+ (brandDTOOption) => brandDTOOption.value === currentBrand.id
7985
+ ) === -1) {
7986
+ brandDTOOptionList.push({
7987
+ value: currentBrand.id,
7988
+ fullValue: currentBrand,
7989
+ text: currentBrand.name
7990
+ });
7991
+ }
7982
7992
  }
7983
7993
  }
7984
- for (const brandDTO of userProfile.brandDTOList) {
7985
- const currentBrand = brandDTO;
7986
- if (brandDTOOptionList.findIndex(
7987
- (brandDTOOption) => brandDTOOption.value === currentBrand.id
7988
- ) === -1) {
7989
- brandDTOOptionList.push({
7990
- value: currentBrand.id,
7991
- fullValue: currentBrand,
7992
- text: currentBrand.name
7993
- });
7994
+ if (userProfile.brandDTOList) {
7995
+ for (const brandDTO of userProfile.brandDTOList) {
7996
+ const currentBrand = brandDTO;
7997
+ if (brandDTOOptionList.findIndex(
7998
+ (brandDTOOption) => brandDTOOption.value === currentBrand.id
7999
+ ) === -1) {
8000
+ brandDTOOptionList.push({
8001
+ value: currentBrand.id,
8002
+ fullValue: currentBrand,
8003
+ text: currentBrand.name
8004
+ });
8005
+ }
7994
8006
  }
7995
8007
  }
7996
8008
  }
package/dist/index.mjs CHANGED
@@ -7698,76 +7698,88 @@ var retrieveCurrencyTypeOptionList = () => {
7698
7698
  var retrieveBrandDTOByUserProfileOptionList = (userProfile) => {
7699
7699
  const brandDTOOptionList = [];
7700
7700
  if (userProfile) {
7701
- for (const branchDTO of userProfile.branchDTOList) {
7702
- const currentBrand = branchDTO.gradeDTO.seasonDTO.institutionDTO.campusDTO.brandDTO;
7703
- if (brandDTOOptionList.findIndex(
7704
- (brandDTOOption) => brandDTOOption.value === currentBrand.id
7705
- ) === -1) {
7706
- brandDTOOptionList.push({
7707
- value: currentBrand.id,
7708
- fullValue: currentBrand,
7709
- text: currentBrand.name
7710
- });
7701
+ if (userProfile.branchDTOList) {
7702
+ for (const branchDTO of userProfile.branchDTOList) {
7703
+ const currentBrand = branchDTO.gradeDTO.seasonDTO.institutionDTO.campusDTO.brandDTO;
7704
+ if (brandDTOOptionList.findIndex(
7705
+ (brandDTOOption) => brandDTOOption.value === currentBrand.id
7706
+ ) === -1) {
7707
+ brandDTOOptionList.push({
7708
+ value: currentBrand.id,
7709
+ fullValue: currentBrand,
7710
+ text: currentBrand.name
7711
+ });
7712
+ }
7711
7713
  }
7712
7714
  }
7713
- for (const gradeDTO of userProfile.gradeDTOList) {
7714
- const currentBrand = gradeDTO.seasonDTO.institutionDTO.campusDTO.brandDTO;
7715
- if (brandDTOOptionList.findIndex(
7716
- (brandDTOOption) => brandDTOOption.value === currentBrand.id
7717
- ) === -1) {
7718
- brandDTOOptionList.push({
7719
- value: currentBrand.id,
7720
- fullValue: currentBrand,
7721
- text: currentBrand.name
7722
- });
7715
+ if (userProfile.gradeDTOList) {
7716
+ for (const gradeDTO of userProfile.gradeDTOList) {
7717
+ const currentBrand = gradeDTO.seasonDTO.institutionDTO.campusDTO.brandDTO;
7718
+ if (brandDTOOptionList.findIndex(
7719
+ (brandDTOOption) => brandDTOOption.value === currentBrand.id
7720
+ ) === -1) {
7721
+ brandDTOOptionList.push({
7722
+ value: currentBrand.id,
7723
+ fullValue: currentBrand,
7724
+ text: currentBrand.name
7725
+ });
7726
+ }
7723
7727
  }
7724
7728
  }
7725
- for (const seasonDTO of userProfile.seasonDTOList) {
7726
- const currentBrand = seasonDTO.institutionDTO.campusDTO.brandDTO;
7727
- if (brandDTOOptionList.findIndex(
7728
- (brandDTOOption) => brandDTOOption.value === currentBrand.id
7729
- ) === -1) {
7730
- brandDTOOptionList.push({
7731
- value: currentBrand.id,
7732
- fullValue: currentBrand,
7733
- text: currentBrand.name
7734
- });
7729
+ if (userProfile.seasonDTOList) {
7730
+ for (const seasonDTO of userProfile.seasonDTOList) {
7731
+ const currentBrand = seasonDTO.institutionDTO.campusDTO.brandDTO;
7732
+ if (brandDTOOptionList.findIndex(
7733
+ (brandDTOOption) => brandDTOOption.value === currentBrand.id
7734
+ ) === -1) {
7735
+ brandDTOOptionList.push({
7736
+ value: currentBrand.id,
7737
+ fullValue: currentBrand,
7738
+ text: currentBrand.name
7739
+ });
7740
+ }
7735
7741
  }
7736
7742
  }
7737
- for (const institutionDTO of userProfile.institutionDTOList) {
7738
- const currentBrand = institutionDTO.campusDTO.brandDTO;
7739
- if (brandDTOOptionList.findIndex(
7740
- (brandDTOOption) => brandDTOOption.value === currentBrand.id
7741
- ) === -1) {
7742
- brandDTOOptionList.push({
7743
- value: currentBrand.id,
7744
- fullValue: currentBrand,
7745
- text: currentBrand.name
7746
- });
7743
+ if (userProfile.institutionDTOList) {
7744
+ for (const institutionDTO of userProfile.institutionDTOList) {
7745
+ const currentBrand = institutionDTO.campusDTO.brandDTO;
7746
+ if (brandDTOOptionList.findIndex(
7747
+ (brandDTOOption) => brandDTOOption.value === currentBrand.id
7748
+ ) === -1) {
7749
+ brandDTOOptionList.push({
7750
+ value: currentBrand.id,
7751
+ fullValue: currentBrand,
7752
+ text: currentBrand.name
7753
+ });
7754
+ }
7747
7755
  }
7748
7756
  }
7749
- for (const campusDTO of userProfile.campusDTOList) {
7750
- const currentBrand = campusDTO.brandDTO;
7751
- if (brandDTOOptionList.findIndex(
7752
- (brandDTOOption) => brandDTOOption.value === currentBrand.id
7753
- ) === -1) {
7754
- brandDTOOptionList.push({
7755
- value: currentBrand.id,
7756
- fullValue: currentBrand,
7757
- text: currentBrand.name
7758
- });
7757
+ if (userProfile.campusDTOList) {
7758
+ for (const campusDTO of userProfile.campusDTOList) {
7759
+ const currentBrand = campusDTO.brandDTO;
7760
+ if (brandDTOOptionList.findIndex(
7761
+ (brandDTOOption) => brandDTOOption.value === currentBrand.id
7762
+ ) === -1) {
7763
+ brandDTOOptionList.push({
7764
+ value: currentBrand.id,
7765
+ fullValue: currentBrand,
7766
+ text: currentBrand.name
7767
+ });
7768
+ }
7759
7769
  }
7760
7770
  }
7761
- for (const brandDTO of userProfile.brandDTOList) {
7762
- const currentBrand = brandDTO;
7763
- if (brandDTOOptionList.findIndex(
7764
- (brandDTOOption) => brandDTOOption.value === currentBrand.id
7765
- ) === -1) {
7766
- brandDTOOptionList.push({
7767
- value: currentBrand.id,
7768
- fullValue: currentBrand,
7769
- text: currentBrand.name
7770
- });
7771
+ if (userProfile.brandDTOList) {
7772
+ for (const brandDTO of userProfile.brandDTOList) {
7773
+ const currentBrand = brandDTO;
7774
+ if (brandDTOOptionList.findIndex(
7775
+ (brandDTOOption) => brandDTOOption.value === currentBrand.id
7776
+ ) === -1) {
7777
+ brandDTOOptionList.push({
7778
+ value: currentBrand.id,
7779
+ fullValue: currentBrand,
7780
+ text: currentBrand.name
7781
+ });
7782
+ }
7771
7783
  }
7772
7784
  }
7773
7785
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "catchup-library-web",
3
- "version": "2.2.21",
3
+ "version": "2.2.22",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {
@@ -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
- for (const branchDTO of userProfile.branchDTOList) {
7
- const currentBrand =
8
- branchDTO.gradeDTO.seasonDTO.institutionDTO.campusDTO.brandDTO;
9
- if (
10
- brandDTOOptionList.findIndex(
11
- (brandDTOOption) => brandDTOOption.value === currentBrand.id
12
- ) === -1
13
- ) {
14
- brandDTOOptionList.push({
15
- value: currentBrand.id,
16
- fullValue: currentBrand,
17
- text: currentBrand.name,
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
- for (const gradeDTO of userProfile.gradeDTOList) {
22
- const currentBrand = gradeDTO.seasonDTO.institutionDTO.campusDTO.brandDTO;
23
- if (
24
- brandDTOOptionList.findIndex(
25
- (brandDTOOption) => brandDTOOption.value === currentBrand.id
26
- ) === -1
27
- ) {
28
- brandDTOOptionList.push({
29
- value: currentBrand.id,
30
- fullValue: currentBrand,
31
- text: currentBrand.name,
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
- for (const seasonDTO of userProfile.seasonDTOList) {
36
- const currentBrand = seasonDTO.institutionDTO.campusDTO.brandDTO;
37
- if (
38
- brandDTOOptionList.findIndex(
39
- (brandDTOOption) => brandDTOOption.value === currentBrand.id
40
- ) === -1
41
- ) {
42
- brandDTOOptionList.push({
43
- value: currentBrand.id,
44
- fullValue: currentBrand,
45
- text: currentBrand.name,
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
- for (const institutionDTO of userProfile.institutionDTOList) {
50
- const currentBrand = institutionDTO.campusDTO.brandDTO;
51
- if (
52
- brandDTOOptionList.findIndex(
53
- (brandDTOOption) => brandDTOOption.value === currentBrand.id
54
- ) === -1
55
- ) {
56
- brandDTOOptionList.push({
57
- value: currentBrand.id,
58
- fullValue: currentBrand,
59
- text: currentBrand.name,
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
- for (const campusDTO of userProfile.campusDTOList) {
64
- const currentBrand = campusDTO.brandDTO;
65
- if (
66
- brandDTOOptionList.findIndex(
67
- (brandDTOOption) => brandDTOOption.value === currentBrand.id
68
- ) === -1
69
- ) {
70
- brandDTOOptionList.push({
71
- value: currentBrand.id,
72
- fullValue: currentBrand,
73
- text: currentBrand.name,
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
- for (const brandDTO of userProfile.brandDTOList) {
78
- const currentBrand = brandDTO;
79
- if (
80
- brandDTOOptionList.findIndex(
81
- (brandDTOOption) => brandDTOOption.value === currentBrand.id
82
- ) === -1
83
- ) {
84
- brandDTOOptionList.push({
85
- value: currentBrand.id,
86
- fullValue: currentBrand,
87
- text: currentBrand.name,
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
  }