catchup-library-web 2.7.3 → 2.7.5
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 +25 -12
- package/dist/index.mjs +25 -12
- package/package.json +1 -1
- package/src/components/buttons/DeleteButton.tsx +4 -1
- package/src/utilization/ManagementUtilization.ts +70 -60
package/dist/index.js
CHANGED
|
@@ -883,6 +883,9 @@ var DeleteButton = ({
|
|
|
883
883
|
currentWidthClassName = "w-32";
|
|
884
884
|
currentHeightClassName = "h-12";
|
|
885
885
|
currentLoadingSize = 18;
|
|
886
|
+
} else if (size === "unlimited") {
|
|
887
|
+
currentLoadingSize = 14;
|
|
888
|
+
currentHeightClassName = "h-8";
|
|
886
889
|
}
|
|
887
890
|
return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
888
891
|
"button",
|
|
@@ -903,7 +906,7 @@ var DeleteButton = ({
|
|
|
903
906
|
primaryColor: "#55777f",
|
|
904
907
|
secondaryColor: "#55777f"
|
|
905
908
|
}
|
|
906
|
-
) : /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "flex flex-row justify-center items-center gap-x-2", children: [
|
|
909
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "flex flex-row justify-center items-center gap-x-2 px-4", children: [
|
|
907
910
|
iconPosition === "left" ? /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
908
911
|
BaseImage_default,
|
|
909
912
|
{
|
|
@@ -8440,14 +8443,18 @@ var retrieveCampusDTOOptionList = (campusDTOList) => {
|
|
|
8440
8443
|
value: campusDTO.id,
|
|
8441
8444
|
text: `${campusDTO.name} (${campusDTO.brandDTO.name})`,
|
|
8442
8445
|
fullValue: campusDTO
|
|
8443
|
-
})).sort(
|
|
8446
|
+
})).sort(
|
|
8447
|
+
(a, b) => a.text.localeCompare(b.text, void 0, { numeric: true })
|
|
8448
|
+
);
|
|
8444
8449
|
};
|
|
8445
8450
|
var retrieveInstitutionDTOOptionList = (institutionDTOList) => {
|
|
8446
8451
|
return institutionDTOList.map((institutionDTO) => ({
|
|
8447
8452
|
value: institutionDTO.id,
|
|
8448
8453
|
text: `${institutionDTO.name} (${institutionDTO.campusDTO.name} - ${institutionDTO.campusDTO.brandDTO.name})`,
|
|
8449
8454
|
fullValue: institutionDTO
|
|
8450
|
-
})).sort(
|
|
8455
|
+
})).sort(
|
|
8456
|
+
(a, b) => a.text.localeCompare(b.text, void 0, { numeric: true })
|
|
8457
|
+
);
|
|
8451
8458
|
};
|
|
8452
8459
|
var retrieveSeasonDTOOptionList = (seasonDTOList) => {
|
|
8453
8460
|
return seasonDTOList.map((seasonDTO) => ({
|
|
@@ -8455,7 +8462,9 @@ var retrieveSeasonDTOOptionList = (seasonDTOList) => {
|
|
|
8455
8462
|
text: `${seasonDTO.name} (${seasonDTO.institutionDTO.name})`,
|
|
8456
8463
|
fullValue: seasonDTO
|
|
8457
8464
|
// text: `${seasonDTO.name} (${seasonDTO.institutionDTO.name} - ${seasonDTO.institutionDTO.campusDTO.name}/${seasonDTO.institutionDTO.campusDTO.brandDTO.name})`,
|
|
8458
|
-
})).sort(
|
|
8465
|
+
})).sort(
|
|
8466
|
+
(a, b) => a.text.localeCompare(b.text, void 0, { numeric: true })
|
|
8467
|
+
);
|
|
8459
8468
|
};
|
|
8460
8469
|
var retrieveGradeDTOOptionList = (gradeDTOList) => {
|
|
8461
8470
|
return gradeDTOList.map((gradeDTO) => ({
|
|
@@ -8463,7 +8472,9 @@ var retrieveGradeDTOOptionList = (gradeDTOList) => {
|
|
|
8463
8472
|
text: `${gradeDTO.name} (${gradeDTO.seasonDTO.name} - ${gradeDTO.seasonDTO.institutionDTO.name})`,
|
|
8464
8473
|
fullValue: gradeDTO
|
|
8465
8474
|
// text: `${gradeDTO.name} (${gradeDTO.seasonDTO.name} ${gradeDTO.seasonDTO.institutionDTO.name} - ${gradeDTO.seasonDTO.institutionDTO.campusDTO.name}/${gradeDTO.seasonDTO.institutionDTO.campusDTO.brandDTO.name})`,
|
|
8466
|
-
})).sort(
|
|
8475
|
+
})).sort(
|
|
8476
|
+
(a, b) => a.text.localeCompare(b.text, void 0, { numeric: true })
|
|
8477
|
+
);
|
|
8467
8478
|
};
|
|
8468
8479
|
var retrieveBranchDTOOptionList = (branchDTOList) => {
|
|
8469
8480
|
return branchDTOList.map((branchDTO) => ({
|
|
@@ -8471,7 +8482,9 @@ var retrieveBranchDTOOptionList = (branchDTOList) => {
|
|
|
8471
8482
|
text: `${branchDTO.name} (${branchDTO.gradeDTO.name} - ${branchDTO.gradeDTO.seasonDTO.name}/${branchDTO.gradeDTO.seasonDTO.institutionDTO.name})`,
|
|
8472
8483
|
fullValue: branchDTO
|
|
8473
8484
|
// text: `${branchDTO.name} (${branchDTO.gradeDTO.name} - ${branchDTO.gradeDTO.seasonDTO.name}/${branchDTO.gradeDTO.seasonDTO.institutionDTO.name}/${branchDTO.gradeDTO.seasonDTO.institutionDTO.campusDTO.name}/${branchDTO.gradeDTO.seasonDTO.institutionDTO.campusDTO.brandDTO.name})`,
|
|
8474
|
-
})).sort(
|
|
8485
|
+
})).sort(
|
|
8486
|
+
(a, b) => a.text.localeCompare(b.text, void 0, { numeric: true })
|
|
8487
|
+
);
|
|
8475
8488
|
};
|
|
8476
8489
|
var retrieveCampusDTOByUserProfileOptionList = (userProfile, selectedBrandId) => {
|
|
8477
8490
|
const campusDTOOptionList = [];
|
|
@@ -8893,21 +8906,21 @@ var retrieveProvinceNameOptionList = () => {
|
|
|
8893
8906
|
return [
|
|
8894
8907
|
{ parent: "TURKEY", value: "ADANA", text: "Adana", code: "01" },
|
|
8895
8908
|
// { parent: "TURKEY", value: "ADIYAMAN", text: "Adıyaman", code: "02" },
|
|
8896
|
-
|
|
8909
|
+
{ parent: "TURKEY", value: "AFYON", text: "Afyon", code: "03" },
|
|
8897
8910
|
// { parent: "TURKEY", value: "AGRI", text: "Ağrı", code: "04" },
|
|
8898
8911
|
// { parent: "TURKEY", value: "AMASYA", text: "Amasya", code: "05" },
|
|
8899
8912
|
{ parent: "TURKEY", value: "ANKARA", text: "Ankara", code: "06" },
|
|
8900
8913
|
{ parent: "TURKEY", value: "ANTALYA", text: "Antalya", code: "07" },
|
|
8901
8914
|
// { parent: "TURKEY", value: "ARTVIN", text: "Artvin", code: "08" },
|
|
8902
|
-
|
|
8903
|
-
|
|
8915
|
+
{ parent: "TURKEY", value: "AYDIN", text: "Ayd\u0131n", code: "09" },
|
|
8916
|
+
{ parent: "TURKEY", value: "BALIKESIR", text: "Bal\u0131kesir", code: "10" },
|
|
8904
8917
|
// { parent: "TURKEY", value: "BILECIK", text: "Bilecik", code: "11" },
|
|
8905
8918
|
// { parent: "TURKEY", value: "BINGOL", text: "Bingöl", code: "12" },
|
|
8906
8919
|
// { parent: "TURKEY", value: "BITLIS", text: "Bitlis", code: "13" },
|
|
8907
8920
|
// { parent: "TURKEY", value: "BOLU", text: "Bolu", code: "14" },
|
|
8908
8921
|
// { parent: "TURKEY", value: "BURDUR", text: "Burdur", code: "15" },
|
|
8909
8922
|
{ parent: "TURKEY", value: "BURSA", text: "Bursa", code: "16" },
|
|
8910
|
-
|
|
8923
|
+
{ parent: "TURKEY", value: "CANAKKALE", text: "\xC7anakkale", code: "17" },
|
|
8911
8924
|
// { parent: "TURKEY", value: "CANKIRI", text: "Çankırı", code: "18" },
|
|
8912
8925
|
{ parent: "TURKEY", value: "CORUM", text: "\xC7orum", code: "19" },
|
|
8913
8926
|
{ parent: "TURKEY", value: "DENIZLI", text: "Denizli", code: "20" },
|
|
@@ -8929,7 +8942,7 @@ var retrieveProvinceNameOptionList = () => {
|
|
|
8929
8942
|
// { parent: "TURKEY", value: "KARS", text: "Kars", code: "36" },
|
|
8930
8943
|
// { parent: "TURKEY", value: "KASTAMONU", text: "Kastamonu", code: "37" },
|
|
8931
8944
|
{ parent: "TURKEY", value: "KAYSERI", text: "Kayseri", code: "38" },
|
|
8932
|
-
|
|
8945
|
+
{ parent: "TURKEY", value: "KIRKLARELI", text: "K\u0131rklareli", code: "39" },
|
|
8933
8946
|
// { parent: "TURKEY", value: "KIRSEHIR", text: "Kırşehir", code: "40" },
|
|
8934
8947
|
{ parent: "TURKEY", value: "KOCAELI", text: "Kocaeli", code: "41" },
|
|
8935
8948
|
// { parent: "TURKEY", value: "KONYA", text: "Konya", code: "42" },
|
|
@@ -8975,7 +8988,7 @@ var retrieveProvinceNameOptionList = () => {
|
|
|
8975
8988
|
// { parent: "TURKEY", value: "YALOVA", text: "Yalova", code: "77" },
|
|
8976
8989
|
// { parent: "TURKEY", value: "KARABUK", text: "Karabük", code: "78" },
|
|
8977
8990
|
// { parent: "TURKEY", value: "KILIS", text: "Kilis", code: "79" },
|
|
8978
|
-
|
|
8991
|
+
{ parent: "TURKEY", value: "OSMANIYE", text: "Osmaniye", code: "80" },
|
|
8979
8992
|
{ parent: "TURKEY", value: "DUZCE", text: "D\xFCzce", code: "81" }
|
|
8980
8993
|
];
|
|
8981
8994
|
};
|
package/dist/index.mjs
CHANGED
|
@@ -643,6 +643,9 @@ var DeleteButton = ({
|
|
|
643
643
|
currentWidthClassName = "w-32";
|
|
644
644
|
currentHeightClassName = "h-12";
|
|
645
645
|
currentLoadingSize = 18;
|
|
646
|
+
} else if (size === "unlimited") {
|
|
647
|
+
currentLoadingSize = 14;
|
|
648
|
+
currentHeightClassName = "h-8";
|
|
646
649
|
}
|
|
647
650
|
return /* @__PURE__ */ jsx9(
|
|
648
651
|
"button",
|
|
@@ -663,7 +666,7 @@ var DeleteButton = ({
|
|
|
663
666
|
primaryColor: "#55777f",
|
|
664
667
|
secondaryColor: "#55777f"
|
|
665
668
|
}
|
|
666
|
-
) : /* @__PURE__ */ jsxs6("div", { className: "flex flex-row justify-center items-center gap-x-2", children: [
|
|
669
|
+
) : /* @__PURE__ */ jsxs6("div", { className: "flex flex-row justify-center items-center gap-x-2 px-4", children: [
|
|
667
670
|
iconPosition === "left" ? /* @__PURE__ */ jsx9(
|
|
668
671
|
BaseImage_default,
|
|
669
672
|
{
|
|
@@ -8200,14 +8203,18 @@ var retrieveCampusDTOOptionList = (campusDTOList) => {
|
|
|
8200
8203
|
value: campusDTO.id,
|
|
8201
8204
|
text: `${campusDTO.name} (${campusDTO.brandDTO.name})`,
|
|
8202
8205
|
fullValue: campusDTO
|
|
8203
|
-
})).sort(
|
|
8206
|
+
})).sort(
|
|
8207
|
+
(a, b) => a.text.localeCompare(b.text, void 0, { numeric: true })
|
|
8208
|
+
);
|
|
8204
8209
|
};
|
|
8205
8210
|
var retrieveInstitutionDTOOptionList = (institutionDTOList) => {
|
|
8206
8211
|
return institutionDTOList.map((institutionDTO) => ({
|
|
8207
8212
|
value: institutionDTO.id,
|
|
8208
8213
|
text: `${institutionDTO.name} (${institutionDTO.campusDTO.name} - ${institutionDTO.campusDTO.brandDTO.name})`,
|
|
8209
8214
|
fullValue: institutionDTO
|
|
8210
|
-
})).sort(
|
|
8215
|
+
})).sort(
|
|
8216
|
+
(a, b) => a.text.localeCompare(b.text, void 0, { numeric: true })
|
|
8217
|
+
);
|
|
8211
8218
|
};
|
|
8212
8219
|
var retrieveSeasonDTOOptionList = (seasonDTOList) => {
|
|
8213
8220
|
return seasonDTOList.map((seasonDTO) => ({
|
|
@@ -8215,7 +8222,9 @@ var retrieveSeasonDTOOptionList = (seasonDTOList) => {
|
|
|
8215
8222
|
text: `${seasonDTO.name} (${seasonDTO.institutionDTO.name})`,
|
|
8216
8223
|
fullValue: seasonDTO
|
|
8217
8224
|
// text: `${seasonDTO.name} (${seasonDTO.institutionDTO.name} - ${seasonDTO.institutionDTO.campusDTO.name}/${seasonDTO.institutionDTO.campusDTO.brandDTO.name})`,
|
|
8218
|
-
})).sort(
|
|
8225
|
+
})).sort(
|
|
8226
|
+
(a, b) => a.text.localeCompare(b.text, void 0, { numeric: true })
|
|
8227
|
+
);
|
|
8219
8228
|
};
|
|
8220
8229
|
var retrieveGradeDTOOptionList = (gradeDTOList) => {
|
|
8221
8230
|
return gradeDTOList.map((gradeDTO) => ({
|
|
@@ -8223,7 +8232,9 @@ var retrieveGradeDTOOptionList = (gradeDTOList) => {
|
|
|
8223
8232
|
text: `${gradeDTO.name} (${gradeDTO.seasonDTO.name} - ${gradeDTO.seasonDTO.institutionDTO.name})`,
|
|
8224
8233
|
fullValue: gradeDTO
|
|
8225
8234
|
// text: `${gradeDTO.name} (${gradeDTO.seasonDTO.name} ${gradeDTO.seasonDTO.institutionDTO.name} - ${gradeDTO.seasonDTO.institutionDTO.campusDTO.name}/${gradeDTO.seasonDTO.institutionDTO.campusDTO.brandDTO.name})`,
|
|
8226
|
-
})).sort(
|
|
8235
|
+
})).sort(
|
|
8236
|
+
(a, b) => a.text.localeCompare(b.text, void 0, { numeric: true })
|
|
8237
|
+
);
|
|
8227
8238
|
};
|
|
8228
8239
|
var retrieveBranchDTOOptionList = (branchDTOList) => {
|
|
8229
8240
|
return branchDTOList.map((branchDTO) => ({
|
|
@@ -8231,7 +8242,9 @@ var retrieveBranchDTOOptionList = (branchDTOList) => {
|
|
|
8231
8242
|
text: `${branchDTO.name} (${branchDTO.gradeDTO.name} - ${branchDTO.gradeDTO.seasonDTO.name}/${branchDTO.gradeDTO.seasonDTO.institutionDTO.name})`,
|
|
8232
8243
|
fullValue: branchDTO
|
|
8233
8244
|
// text: `${branchDTO.name} (${branchDTO.gradeDTO.name} - ${branchDTO.gradeDTO.seasonDTO.name}/${branchDTO.gradeDTO.seasonDTO.institutionDTO.name}/${branchDTO.gradeDTO.seasonDTO.institutionDTO.campusDTO.name}/${branchDTO.gradeDTO.seasonDTO.institutionDTO.campusDTO.brandDTO.name})`,
|
|
8234
|
-
})).sort(
|
|
8245
|
+
})).sort(
|
|
8246
|
+
(a, b) => a.text.localeCompare(b.text, void 0, { numeric: true })
|
|
8247
|
+
);
|
|
8235
8248
|
};
|
|
8236
8249
|
var retrieveCampusDTOByUserProfileOptionList = (userProfile, selectedBrandId) => {
|
|
8237
8250
|
const campusDTOOptionList = [];
|
|
@@ -8653,21 +8666,21 @@ var retrieveProvinceNameOptionList = () => {
|
|
|
8653
8666
|
return [
|
|
8654
8667
|
{ parent: "TURKEY", value: "ADANA", text: "Adana", code: "01" },
|
|
8655
8668
|
// { parent: "TURKEY", value: "ADIYAMAN", text: "Adıyaman", code: "02" },
|
|
8656
|
-
|
|
8669
|
+
{ parent: "TURKEY", value: "AFYON", text: "Afyon", code: "03" },
|
|
8657
8670
|
// { parent: "TURKEY", value: "AGRI", text: "Ağrı", code: "04" },
|
|
8658
8671
|
// { parent: "TURKEY", value: "AMASYA", text: "Amasya", code: "05" },
|
|
8659
8672
|
{ parent: "TURKEY", value: "ANKARA", text: "Ankara", code: "06" },
|
|
8660
8673
|
{ parent: "TURKEY", value: "ANTALYA", text: "Antalya", code: "07" },
|
|
8661
8674
|
// { parent: "TURKEY", value: "ARTVIN", text: "Artvin", code: "08" },
|
|
8662
|
-
|
|
8663
|
-
|
|
8675
|
+
{ parent: "TURKEY", value: "AYDIN", text: "Ayd\u0131n", code: "09" },
|
|
8676
|
+
{ parent: "TURKEY", value: "BALIKESIR", text: "Bal\u0131kesir", code: "10" },
|
|
8664
8677
|
// { parent: "TURKEY", value: "BILECIK", text: "Bilecik", code: "11" },
|
|
8665
8678
|
// { parent: "TURKEY", value: "BINGOL", text: "Bingöl", code: "12" },
|
|
8666
8679
|
// { parent: "TURKEY", value: "BITLIS", text: "Bitlis", code: "13" },
|
|
8667
8680
|
// { parent: "TURKEY", value: "BOLU", text: "Bolu", code: "14" },
|
|
8668
8681
|
// { parent: "TURKEY", value: "BURDUR", text: "Burdur", code: "15" },
|
|
8669
8682
|
{ parent: "TURKEY", value: "BURSA", text: "Bursa", code: "16" },
|
|
8670
|
-
|
|
8683
|
+
{ parent: "TURKEY", value: "CANAKKALE", text: "\xC7anakkale", code: "17" },
|
|
8671
8684
|
// { parent: "TURKEY", value: "CANKIRI", text: "Çankırı", code: "18" },
|
|
8672
8685
|
{ parent: "TURKEY", value: "CORUM", text: "\xC7orum", code: "19" },
|
|
8673
8686
|
{ parent: "TURKEY", value: "DENIZLI", text: "Denizli", code: "20" },
|
|
@@ -8689,7 +8702,7 @@ var retrieveProvinceNameOptionList = () => {
|
|
|
8689
8702
|
// { parent: "TURKEY", value: "KARS", text: "Kars", code: "36" },
|
|
8690
8703
|
// { parent: "TURKEY", value: "KASTAMONU", text: "Kastamonu", code: "37" },
|
|
8691
8704
|
{ parent: "TURKEY", value: "KAYSERI", text: "Kayseri", code: "38" },
|
|
8692
|
-
|
|
8705
|
+
{ parent: "TURKEY", value: "KIRKLARELI", text: "K\u0131rklareli", code: "39" },
|
|
8693
8706
|
// { parent: "TURKEY", value: "KIRSEHIR", text: "Kırşehir", code: "40" },
|
|
8694
8707
|
{ parent: "TURKEY", value: "KOCAELI", text: "Kocaeli", code: "41" },
|
|
8695
8708
|
// { parent: "TURKEY", value: "KONYA", text: "Konya", code: "42" },
|
|
@@ -8735,7 +8748,7 @@ var retrieveProvinceNameOptionList = () => {
|
|
|
8735
8748
|
// { parent: "TURKEY", value: "YALOVA", text: "Yalova", code: "77" },
|
|
8736
8749
|
// { parent: "TURKEY", value: "KARABUK", text: "Karabük", code: "78" },
|
|
8737
8750
|
// { parent: "TURKEY", value: "KILIS", text: "Kilis", code: "79" },
|
|
8738
|
-
|
|
8751
|
+
{ parent: "TURKEY", value: "OSMANIYE", text: "Osmaniye", code: "80" },
|
|
8739
8752
|
{ parent: "TURKEY", value: "DUZCE", text: "D\xFCzce", code: "81" }
|
|
8740
8753
|
];
|
|
8741
8754
|
};
|
package/package.json
CHANGED
|
@@ -39,6 +39,9 @@ const DeleteButton = ({
|
|
|
39
39
|
currentWidthClassName = "w-32";
|
|
40
40
|
currentHeightClassName = "h-12";
|
|
41
41
|
currentLoadingSize = 18;
|
|
42
|
+
} else if (size === "unlimited") {
|
|
43
|
+
currentLoadingSize = 14;
|
|
44
|
+
currentHeightClassName = "h-8";
|
|
42
45
|
}
|
|
43
46
|
|
|
44
47
|
return (
|
|
@@ -66,7 +69,7 @@ const DeleteButton = ({
|
|
|
66
69
|
secondaryColor="#55777f"
|
|
67
70
|
/>
|
|
68
71
|
) : (
|
|
69
|
-
<div className="flex flex-row justify-center items-center gap-x-2">
|
|
72
|
+
<div className="flex flex-row justify-center items-center gap-x-2 px-4">
|
|
70
73
|
{iconPosition === "left" ? (
|
|
71
74
|
<BaseImage
|
|
72
75
|
src={`${
|
|
@@ -9,7 +9,7 @@ export const retrieveBrandDTOByUserProfileOptionList = (userProfile: any) => {
|
|
|
9
9
|
branchDTO.gradeDTO.seasonDTO.institutionDTO.campusDTO.brandDTO;
|
|
10
10
|
if (
|
|
11
11
|
brandDTOOptionList.findIndex(
|
|
12
|
-
(brandDTOOption) => brandDTOOption.value === currentBrand.id
|
|
12
|
+
(brandDTOOption) => brandDTOOption.value === currentBrand.id,
|
|
13
13
|
) === -1
|
|
14
14
|
) {
|
|
15
15
|
brandDTOOptionList.push({
|
|
@@ -26,7 +26,7 @@ export const retrieveBrandDTOByUserProfileOptionList = (userProfile: any) => {
|
|
|
26
26
|
gradeDTO.seasonDTO.institutionDTO.campusDTO.brandDTO;
|
|
27
27
|
if (
|
|
28
28
|
brandDTOOptionList.findIndex(
|
|
29
|
-
(brandDTOOption) => brandDTOOption.value === currentBrand.id
|
|
29
|
+
(brandDTOOption) => brandDTOOption.value === currentBrand.id,
|
|
30
30
|
) === -1
|
|
31
31
|
) {
|
|
32
32
|
brandDTOOptionList.push({
|
|
@@ -43,7 +43,7 @@ export const retrieveBrandDTOByUserProfileOptionList = (userProfile: any) => {
|
|
|
43
43
|
const currentBrand = seasonDTO.institutionDTO.campusDTO.brandDTO;
|
|
44
44
|
if (
|
|
45
45
|
brandDTOOptionList.findIndex(
|
|
46
|
-
(brandDTOOption) => brandDTOOption.value === currentBrand.id
|
|
46
|
+
(brandDTOOption) => brandDTOOption.value === currentBrand.id,
|
|
47
47
|
) === -1
|
|
48
48
|
) {
|
|
49
49
|
brandDTOOptionList.push({
|
|
@@ -60,7 +60,7 @@ export const retrieveBrandDTOByUserProfileOptionList = (userProfile: any) => {
|
|
|
60
60
|
const currentBrand = institutionDTO.campusDTO.brandDTO;
|
|
61
61
|
if (
|
|
62
62
|
brandDTOOptionList.findIndex(
|
|
63
|
-
(brandDTOOption) => brandDTOOption.value === currentBrand.id
|
|
63
|
+
(brandDTOOption) => brandDTOOption.value === currentBrand.id,
|
|
64
64
|
) === -1
|
|
65
65
|
) {
|
|
66
66
|
brandDTOOptionList.push({
|
|
@@ -77,7 +77,7 @@ export const retrieveBrandDTOByUserProfileOptionList = (userProfile: any) => {
|
|
|
77
77
|
const currentBrand = campusDTO.brandDTO;
|
|
78
78
|
if (
|
|
79
79
|
brandDTOOptionList.findIndex(
|
|
80
|
-
(brandDTOOption) => brandDTOOption.value === currentBrand.id
|
|
80
|
+
(brandDTOOption) => brandDTOOption.value === currentBrand.id,
|
|
81
81
|
) === -1
|
|
82
82
|
) {
|
|
83
83
|
brandDTOOptionList.push({
|
|
@@ -94,7 +94,7 @@ export const retrieveBrandDTOByUserProfileOptionList = (userProfile: any) => {
|
|
|
94
94
|
const currentBrand = brandDTO;
|
|
95
95
|
if (
|
|
96
96
|
brandDTOOptionList.findIndex(
|
|
97
|
-
(brandDTOOption) => brandDTOOption.value === currentBrand.id
|
|
97
|
+
(brandDTOOption) => brandDTOOption.value === currentBrand.id,
|
|
98
98
|
) === -1
|
|
99
99
|
) {
|
|
100
100
|
brandDTOOptionList.push({
|
|
@@ -125,7 +125,9 @@ export const retrieveCampusDTOOptionList = (campusDTOList: any) => {
|
|
|
125
125
|
text: `${campusDTO.name} (${campusDTO.brandDTO.name})`,
|
|
126
126
|
fullValue: campusDTO,
|
|
127
127
|
}))
|
|
128
|
-
.sort((a: any, b: any) =>
|
|
128
|
+
.sort((a: any, b: any) =>
|
|
129
|
+
a.text.localeCompare(b.text, undefined, { numeric: true }),
|
|
130
|
+
);
|
|
129
131
|
};
|
|
130
132
|
|
|
131
133
|
export const retrieveInstitutionDTOOptionList = (institutionDTOList: any) => {
|
|
@@ -135,7 +137,9 @@ export const retrieveInstitutionDTOOptionList = (institutionDTOList: any) => {
|
|
|
135
137
|
text: `${institutionDTO.name} (${institutionDTO.campusDTO.name} - ${institutionDTO.campusDTO.brandDTO.name})`,
|
|
136
138
|
fullValue: institutionDTO,
|
|
137
139
|
}))
|
|
138
|
-
.sort((a: any, b: any) =>
|
|
140
|
+
.sort((a: any, b: any) =>
|
|
141
|
+
a.text.localeCompare(b.text, undefined, { numeric: true }),
|
|
142
|
+
);
|
|
139
143
|
};
|
|
140
144
|
|
|
141
145
|
export const retrieveSeasonDTOOptionList = (seasonDTOList: any) => {
|
|
@@ -146,7 +150,9 @@ export const retrieveSeasonDTOOptionList = (seasonDTOList: any) => {
|
|
|
146
150
|
fullValue: seasonDTO,
|
|
147
151
|
// text: `${seasonDTO.name} (${seasonDTO.institutionDTO.name} - ${seasonDTO.institutionDTO.campusDTO.name}/${seasonDTO.institutionDTO.campusDTO.brandDTO.name})`,
|
|
148
152
|
}))
|
|
149
|
-
.sort((a: any, b: any) =>
|
|
153
|
+
.sort((a: any, b: any) =>
|
|
154
|
+
a.text.localeCompare(b.text, undefined, { numeric: true }),
|
|
155
|
+
);
|
|
150
156
|
};
|
|
151
157
|
|
|
152
158
|
export const retrieveGradeDTOOptionList = (gradeDTOList: any) => {
|
|
@@ -157,7 +163,9 @@ export const retrieveGradeDTOOptionList = (gradeDTOList: any) => {
|
|
|
157
163
|
fullValue: gradeDTO,
|
|
158
164
|
// text: `${gradeDTO.name} (${gradeDTO.seasonDTO.name} ${gradeDTO.seasonDTO.institutionDTO.name} - ${gradeDTO.seasonDTO.institutionDTO.campusDTO.name}/${gradeDTO.seasonDTO.institutionDTO.campusDTO.brandDTO.name})`,
|
|
159
165
|
}))
|
|
160
|
-
.sort((a: any, b: any) =>
|
|
166
|
+
.sort((a: any, b: any) =>
|
|
167
|
+
a.text.localeCompare(b.text, undefined, { numeric: true }),
|
|
168
|
+
);
|
|
161
169
|
};
|
|
162
170
|
|
|
163
171
|
export const retrieveBranchDTOOptionList = (branchDTOList: any) => {
|
|
@@ -168,12 +176,14 @@ export const retrieveBranchDTOOptionList = (branchDTOList: any) => {
|
|
|
168
176
|
fullValue: branchDTO,
|
|
169
177
|
// text: `${branchDTO.name} (${branchDTO.gradeDTO.name} - ${branchDTO.gradeDTO.seasonDTO.name}/${branchDTO.gradeDTO.seasonDTO.institutionDTO.name}/${branchDTO.gradeDTO.seasonDTO.institutionDTO.campusDTO.name}/${branchDTO.gradeDTO.seasonDTO.institutionDTO.campusDTO.brandDTO.name})`,
|
|
170
178
|
}))
|
|
171
|
-
.sort((a: any, b: any) =>
|
|
179
|
+
.sort((a: any, b: any) =>
|
|
180
|
+
a.text.localeCompare(b.text, undefined, { numeric: true }),
|
|
181
|
+
);
|
|
172
182
|
};
|
|
173
183
|
|
|
174
184
|
export const retrieveCampusDTOByUserProfileOptionList = (
|
|
175
185
|
userProfile: any,
|
|
176
|
-
selectedBrandId: any
|
|
186
|
+
selectedBrandId: any,
|
|
177
187
|
) => {
|
|
178
188
|
const campusDTOOptionList = [];
|
|
179
189
|
if (userProfile) {
|
|
@@ -184,7 +194,7 @@ export const retrieveCampusDTOByUserProfileOptionList = (
|
|
|
184
194
|
branchDTO.gradeDTO.seasonDTO.institutionDTO.campusDTO;
|
|
185
195
|
if (
|
|
186
196
|
campusDTOOptionList.findIndex(
|
|
187
|
-
(campusDTOOption) => campusDTOOption.value === currentCampus.id
|
|
197
|
+
(campusDTOOption) => campusDTOOption.value === currentCampus.id,
|
|
188
198
|
) === -1 &&
|
|
189
199
|
currentCampus.brandDTO.id === parseFloat(selectedBrandId)
|
|
190
200
|
) {
|
|
@@ -202,7 +212,7 @@ export const retrieveCampusDTOByUserProfileOptionList = (
|
|
|
202
212
|
const currentCampus = gradeDTO.seasonDTO.institutionDTO.campusDTO;
|
|
203
213
|
if (
|
|
204
214
|
campusDTOOptionList.findIndex(
|
|
205
|
-
(campusDTOOption) => campusDTOOption.value === currentCampus.id
|
|
215
|
+
(campusDTOOption) => campusDTOOption.value === currentCampus.id,
|
|
206
216
|
) === -1 &&
|
|
207
217
|
currentCampus.brandDTO.id === parseFloat(selectedBrandId)
|
|
208
218
|
) {
|
|
@@ -220,7 +230,7 @@ export const retrieveCampusDTOByUserProfileOptionList = (
|
|
|
220
230
|
const currentCampus = seasonDTO.institutionDTO.campusDTO;
|
|
221
231
|
if (
|
|
222
232
|
campusDTOOptionList.findIndex(
|
|
223
|
-
(campusDTOOption) => campusDTOOption.value === currentCampus.id
|
|
233
|
+
(campusDTOOption) => campusDTOOption.value === currentCampus.id,
|
|
224
234
|
) === -1 &&
|
|
225
235
|
currentCampus.brandDTO.id === parseFloat(selectedBrandId)
|
|
226
236
|
) {
|
|
@@ -238,7 +248,7 @@ export const retrieveCampusDTOByUserProfileOptionList = (
|
|
|
238
248
|
const currentCampus = institutionDTO.campusDTO;
|
|
239
249
|
if (
|
|
240
250
|
campusDTOOptionList.findIndex(
|
|
241
|
-
(campusDTOOption) => campusDTOOption.value === currentCampus.id
|
|
251
|
+
(campusDTOOption) => campusDTOOption.value === currentCampus.id,
|
|
242
252
|
) === -1 &&
|
|
243
253
|
currentCampus.brandDTO.id === parseFloat(selectedBrandId)
|
|
244
254
|
) {
|
|
@@ -256,7 +266,7 @@ export const retrieveCampusDTOByUserProfileOptionList = (
|
|
|
256
266
|
const currentCampus = campusDTO;
|
|
257
267
|
if (
|
|
258
268
|
campusDTOOptionList.findIndex(
|
|
259
|
-
(campusDTOOption) => campusDTOOption.value === currentCampus.id
|
|
269
|
+
(campusDTOOption) => campusDTOOption.value === currentCampus.id,
|
|
260
270
|
) === -1 &&
|
|
261
271
|
currentCampus.brandDTO.id === parseFloat(selectedBrandId)
|
|
262
272
|
) {
|
|
@@ -279,7 +289,7 @@ export const retrieveCampusDTOByUserProfileOptionList = (
|
|
|
279
289
|
export const retrieveInstitutionDTOByUserProfileOptionList = (
|
|
280
290
|
userProfile: any,
|
|
281
291
|
selectedBrandId: any,
|
|
282
|
-
selectedCampusId: any
|
|
292
|
+
selectedCampusId: any,
|
|
283
293
|
) => {
|
|
284
294
|
const institutionDTOOptionList = [];
|
|
285
295
|
if (userProfile) {
|
|
@@ -291,7 +301,7 @@ export const retrieveInstitutionDTOByUserProfileOptionList = (
|
|
|
291
301
|
if (
|
|
292
302
|
institutionDTOOptionList.findIndex(
|
|
293
303
|
(institutionDTOOption) =>
|
|
294
|
-
institutionDTOOption.value === currentInstitution.id
|
|
304
|
+
institutionDTOOption.value === currentInstitution.id,
|
|
295
305
|
) === -1 &&
|
|
296
306
|
currentInstitution.campusDTO.brandDTO.id ===
|
|
297
307
|
parseFloat(selectedBrandId) &&
|
|
@@ -312,7 +322,7 @@ export const retrieveInstitutionDTOByUserProfileOptionList = (
|
|
|
312
322
|
if (
|
|
313
323
|
institutionDTOOptionList.findIndex(
|
|
314
324
|
(institutionDTOOption) =>
|
|
315
|
-
institutionDTOOption.value === currentInstitution.id
|
|
325
|
+
institutionDTOOption.value === currentInstitution.id,
|
|
316
326
|
) === -1 &&
|
|
317
327
|
currentInstitution.campusDTO.brandDTO.id ===
|
|
318
328
|
parseFloat(selectedBrandId) &&
|
|
@@ -333,7 +343,7 @@ export const retrieveInstitutionDTOByUserProfileOptionList = (
|
|
|
333
343
|
if (
|
|
334
344
|
institutionDTOOptionList.findIndex(
|
|
335
345
|
(institutionDTOOption) =>
|
|
336
|
-
institutionDTOOption.value === currentInstitution.id
|
|
346
|
+
institutionDTOOption.value === currentInstitution.id,
|
|
337
347
|
) === -1 &&
|
|
338
348
|
currentInstitution.campusDTO.brandDTO.id ===
|
|
339
349
|
parseFloat(selectedBrandId) &&
|
|
@@ -354,7 +364,7 @@ export const retrieveInstitutionDTOByUserProfileOptionList = (
|
|
|
354
364
|
if (
|
|
355
365
|
institutionDTOOptionList.findIndex(
|
|
356
366
|
(institutionDTOOption) =>
|
|
357
|
-
institutionDTOOption.value === currentInstitution.id
|
|
367
|
+
institutionDTOOption.value === currentInstitution.id,
|
|
358
368
|
) === -1 &&
|
|
359
369
|
currentInstitution.campusDTO.brandDTO.id ===
|
|
360
370
|
parseFloat(selectedBrandId) &&
|
|
@@ -376,7 +386,7 @@ export const retrieveInstitutionDTOByUserProfileOptionList = (
|
|
|
376
386
|
export const retrieveSeasonDTOByUserProfileOptionList = (
|
|
377
387
|
userProfile: any,
|
|
378
388
|
selectedBrandId: any,
|
|
379
|
-
selectedInstitutionId: any
|
|
389
|
+
selectedInstitutionId: any,
|
|
380
390
|
) => {
|
|
381
391
|
const seasonDTOOptionList = [];
|
|
382
392
|
if (userProfile) {
|
|
@@ -386,7 +396,7 @@ export const retrieveSeasonDTOByUserProfileOptionList = (
|
|
|
386
396
|
const currentSeason = branchDTO.gradeDTO.seasonDTO;
|
|
387
397
|
if (
|
|
388
398
|
seasonDTOOptionList.findIndex(
|
|
389
|
-
(seasonDTOOption) => seasonDTOOption.value === currentSeason.id
|
|
399
|
+
(seasonDTOOption) => seasonDTOOption.value === currentSeason.id,
|
|
390
400
|
) === -1 &&
|
|
391
401
|
currentSeason.institutionDTO.campusDTO.brandDTO.id ===
|
|
392
402
|
parseFloat(selectedBrandId) &&
|
|
@@ -407,7 +417,7 @@ export const retrieveSeasonDTOByUserProfileOptionList = (
|
|
|
407
417
|
const currentSeason = gradeDTO.seasonDTO;
|
|
408
418
|
if (
|
|
409
419
|
seasonDTOOptionList.findIndex(
|
|
410
|
-
(seasonDTOOption) => seasonDTOOption.value === currentSeason.id
|
|
420
|
+
(seasonDTOOption) => seasonDTOOption.value === currentSeason.id,
|
|
411
421
|
) === -1 &&
|
|
412
422
|
currentSeason.institutionDTO.campusDTO.brandDTO.id ===
|
|
413
423
|
parseFloat(selectedBrandId) &&
|
|
@@ -428,7 +438,7 @@ export const retrieveSeasonDTOByUserProfileOptionList = (
|
|
|
428
438
|
const currentSeason = seasonDTO;
|
|
429
439
|
if (
|
|
430
440
|
seasonDTOOptionList.findIndex(
|
|
431
|
-
(seasonDTOOption) => seasonDTOOption.value === currentSeason.id
|
|
441
|
+
(seasonDTOOption) => seasonDTOOption.value === currentSeason.id,
|
|
432
442
|
) === -1 &&
|
|
433
443
|
currentSeason.institutionDTO.campusDTO.brandDTO.id ===
|
|
434
444
|
parseFloat(selectedBrandId) &&
|
|
@@ -451,7 +461,7 @@ export const retrieveSeasonDTOByUserProfileOptionList = (
|
|
|
451
461
|
export const retrieveGradeDTOByUserProfileOptionList = (
|
|
452
462
|
userProfile: any,
|
|
453
463
|
selectedBrandId: any,
|
|
454
|
-
selectedSeasonId: any
|
|
464
|
+
selectedSeasonId: any,
|
|
455
465
|
) => {
|
|
456
466
|
const gradeDTOOptionList = [];
|
|
457
467
|
if (userProfile) {
|
|
@@ -461,7 +471,7 @@ export const retrieveGradeDTOByUserProfileOptionList = (
|
|
|
461
471
|
const currentGrade = branchDTO.gradeDTO;
|
|
462
472
|
if (
|
|
463
473
|
gradeDTOOptionList.findIndex(
|
|
464
|
-
(gradeDTOOption) => gradeDTOOption.value === currentGrade.id
|
|
474
|
+
(gradeDTOOption) => gradeDTOOption.value === currentGrade.id,
|
|
465
475
|
) === -1 &&
|
|
466
476
|
currentGrade.seasonDTO.institutionDTO.campusDTO.brandDTO.id ===
|
|
467
477
|
parseFloat(selectedBrandId) &&
|
|
@@ -481,7 +491,7 @@ export const retrieveGradeDTOByUserProfileOptionList = (
|
|
|
481
491
|
const currentGrade = gradeDTO;
|
|
482
492
|
if (
|
|
483
493
|
gradeDTOOptionList.findIndex(
|
|
484
|
-
(gradeDTOOption) => gradeDTOOption.value === currentGrade.id
|
|
494
|
+
(gradeDTOOption) => gradeDTOOption.value === currentGrade.id,
|
|
485
495
|
) === -1 &&
|
|
486
496
|
currentGrade.seasonDTO.institutionDTO.campusDTO.brandDTO.id ===
|
|
487
497
|
parseFloat(selectedBrandId) &&
|
|
@@ -503,7 +513,7 @@ export const retrieveGradeDTOByUserProfileOptionList = (
|
|
|
503
513
|
export const retrieveBranchDTOByUserProfileOptionList = (
|
|
504
514
|
userProfile: any,
|
|
505
515
|
selectedBrandId: any,
|
|
506
|
-
selectedGradeId: any
|
|
516
|
+
selectedGradeId: any,
|
|
507
517
|
) => {
|
|
508
518
|
const branchDTOOptionList = [];
|
|
509
519
|
if (userProfile) {
|
|
@@ -513,7 +523,7 @@ export const retrieveBranchDTOByUserProfileOptionList = (
|
|
|
513
523
|
const currentBranch = branchDTO;
|
|
514
524
|
if (
|
|
515
525
|
branchDTOOptionList.findIndex(
|
|
516
|
-
(branchDTOOption) => branchDTOOption.value === currentBranch.id
|
|
526
|
+
(branchDTOOption) => branchDTOOption.value === currentBranch.id,
|
|
517
527
|
) === -1 &&
|
|
518
528
|
currentBranch.gradeDTO.seasonDTO.institutionDTO.campusDTO.brandDTO
|
|
519
529
|
.id === parseFloat(selectedBrandId) &&
|
|
@@ -533,7 +543,7 @@ export const retrieveBranchDTOByUserProfileOptionList = (
|
|
|
533
543
|
};
|
|
534
544
|
|
|
535
545
|
export const retrieveExternalRegistrationDTOOptionList = (
|
|
536
|
-
externalRegistrationDTOList: any
|
|
546
|
+
externalRegistrationDTOList: any,
|
|
537
547
|
) => {
|
|
538
548
|
return externalRegistrationDTOList.map((externalRegistrationDTO: any) => ({
|
|
539
549
|
value: externalRegistrationDTO.id,
|
|
@@ -600,14 +610,14 @@ export const retrieveUserRoleOptionList = () => {
|
|
|
600
610
|
|
|
601
611
|
export const filterUserRoleOptionList = (
|
|
602
612
|
accountType: any,
|
|
603
|
-
userProfileRole: any
|
|
613
|
+
userProfileRole: any,
|
|
604
614
|
) => {
|
|
605
615
|
if (accountType === "GENIXO") {
|
|
606
616
|
return retrieveUserRoleOptionList().filter(
|
|
607
617
|
(userRoleOption) =>
|
|
608
618
|
userRoleOption.value === "STAFF" ||
|
|
609
619
|
userRoleOption.value === "LEARNER" ||
|
|
610
|
-
userRoleOption.value === "CONTENT_CREATOR"
|
|
620
|
+
userRoleOption.value === "CONTENT_CREATOR",
|
|
611
621
|
);
|
|
612
622
|
} else {
|
|
613
623
|
if (userProfileRole === "STAFF") {
|
|
@@ -615,11 +625,11 @@ export const filterUserRoleOptionList = (
|
|
|
615
625
|
(userRoleOption) =>
|
|
616
626
|
userRoleOption.value === "STAFF" ||
|
|
617
627
|
userRoleOption.value === "LEARNER" ||
|
|
618
|
-
userRoleOption.value === "CONTENT_CREATOR"
|
|
628
|
+
userRoleOption.value === "CONTENT_CREATOR",
|
|
619
629
|
);
|
|
620
630
|
} else if (userProfileRole === "INDIVIDUAL") {
|
|
621
631
|
return retrieveUserRoleOptionList().filter(
|
|
622
|
-
(userRoleOption) => userRoleOption.value === "LEARNER"
|
|
632
|
+
(userRoleOption) => userRoleOption.value === "LEARNER",
|
|
623
633
|
);
|
|
624
634
|
}
|
|
625
635
|
}
|
|
@@ -721,21 +731,21 @@ export const retrieveProvinceNameOptionList = () => {
|
|
|
721
731
|
return [
|
|
722
732
|
{ parent: "TURKEY", value: "ADANA", text: "Adana", code: "01" },
|
|
723
733
|
// { parent: "TURKEY", value: "ADIYAMAN", text: "Adıyaman", code: "02" },
|
|
724
|
-
|
|
734
|
+
{ parent: "TURKEY", value: "AFYON", text: "Afyon", code: "03" },
|
|
725
735
|
// { parent: "TURKEY", value: "AGRI", text: "Ağrı", code: "04" },
|
|
726
736
|
// { parent: "TURKEY", value: "AMASYA", text: "Amasya", code: "05" },
|
|
727
737
|
{ parent: "TURKEY", value: "ANKARA", text: "Ankara", code: "06" },
|
|
728
738
|
{ parent: "TURKEY", value: "ANTALYA", text: "Antalya", code: "07" },
|
|
729
739
|
// { parent: "TURKEY", value: "ARTVIN", text: "Artvin", code: "08" },
|
|
730
|
-
|
|
731
|
-
|
|
740
|
+
{ parent: "TURKEY", value: "AYDIN", text: "Aydın", code: "09" },
|
|
741
|
+
{ parent: "TURKEY", value: "BALIKESIR", text: "Balıkesir", code: "10" },
|
|
732
742
|
// { parent: "TURKEY", value: "BILECIK", text: "Bilecik", code: "11" },
|
|
733
743
|
// { parent: "TURKEY", value: "BINGOL", text: "Bingöl", code: "12" },
|
|
734
744
|
// { parent: "TURKEY", value: "BITLIS", text: "Bitlis", code: "13" },
|
|
735
745
|
// { parent: "TURKEY", value: "BOLU", text: "Bolu", code: "14" },
|
|
736
746
|
// { parent: "TURKEY", value: "BURDUR", text: "Burdur", code: "15" },
|
|
737
747
|
{ parent: "TURKEY", value: "BURSA", text: "Bursa", code: "16" },
|
|
738
|
-
|
|
748
|
+
{ parent: "TURKEY", value: "CANAKKALE", text: "Çanakkale", code: "17" },
|
|
739
749
|
// { parent: "TURKEY", value: "CANKIRI", text: "Çankırı", code: "18" },
|
|
740
750
|
{ parent: "TURKEY", value: "CORUM", text: "Çorum", code: "19" },
|
|
741
751
|
{ parent: "TURKEY", value: "DENIZLI", text: "Denizli", code: "20" },
|
|
@@ -757,7 +767,7 @@ export const retrieveProvinceNameOptionList = () => {
|
|
|
757
767
|
// { parent: "TURKEY", value: "KARS", text: "Kars", code: "36" },
|
|
758
768
|
// { parent: "TURKEY", value: "KASTAMONU", text: "Kastamonu", code: "37" },
|
|
759
769
|
{ parent: "TURKEY", value: "KAYSERI", text: "Kayseri", code: "38" },
|
|
760
|
-
|
|
770
|
+
{ parent: "TURKEY", value: "KIRKLARELI", text: "Kırklareli", code: "39" },
|
|
761
771
|
// { parent: "TURKEY", value: "KIRSEHIR", text: "Kırşehir", code: "40" },
|
|
762
772
|
{ parent: "TURKEY", value: "KOCAELI", text: "Kocaeli", code: "41" },
|
|
763
773
|
// { parent: "TURKEY", value: "KONYA", text: "Konya", code: "42" },
|
|
@@ -803,7 +813,7 @@ export const retrieveProvinceNameOptionList = () => {
|
|
|
803
813
|
// { parent: "TURKEY", value: "YALOVA", text: "Yalova", code: "77" },
|
|
804
814
|
// { parent: "TURKEY", value: "KARABUK", text: "Karabük", code: "78" },
|
|
805
815
|
// { parent: "TURKEY", value: "KILIS", text: "Kilis", code: "79" },
|
|
806
|
-
|
|
816
|
+
{ parent: "TURKEY", value: "OSMANIYE", text: "Osmaniye", code: "80" },
|
|
807
817
|
{ parent: "TURKEY", value: "DUZCE", text: "Düzce", code: "81" },
|
|
808
818
|
];
|
|
809
819
|
};
|
|
@@ -932,14 +942,14 @@ export const retrieveGradeLevelOptionList = () => {
|
|
|
932
942
|
|
|
933
943
|
export const constructUserProfileQueryParams = (
|
|
934
944
|
userProfile: any,
|
|
935
|
-
userProfileBrand: any
|
|
945
|
+
userProfileBrand: any,
|
|
936
946
|
) => {
|
|
937
947
|
let queryParams: any;
|
|
938
948
|
if (userProfile.branchDTOList.length > 0) {
|
|
939
949
|
queryParams = {
|
|
940
950
|
...queryParams,
|
|
941
951
|
branchIdList: userProfile.branchDTOList.map(
|
|
942
|
-
(branchDTO: any) => branchDTO.id
|
|
952
|
+
(branchDTO: any) => branchDTO.id,
|
|
943
953
|
),
|
|
944
954
|
};
|
|
945
955
|
} else if (userProfile.gradeDTOList.length > 0) {
|
|
@@ -951,21 +961,21 @@ export const constructUserProfileQueryParams = (
|
|
|
951
961
|
queryParams = {
|
|
952
962
|
...queryParams,
|
|
953
963
|
seasonIdList: userProfile.seasonDTOList.map(
|
|
954
|
-
(seasonDTO: any) => seasonDTO.id
|
|
964
|
+
(seasonDTO: any) => seasonDTO.id,
|
|
955
965
|
),
|
|
956
966
|
};
|
|
957
967
|
} else if (userProfile.institutionDTOList.length > 0) {
|
|
958
968
|
queryParams = {
|
|
959
969
|
...queryParams,
|
|
960
970
|
institutionIdList: userProfile.institutionDTOList.map(
|
|
961
|
-
(institutionDTO: any) => institutionDTO.id
|
|
971
|
+
(institutionDTO: any) => institutionDTO.id,
|
|
962
972
|
),
|
|
963
973
|
};
|
|
964
974
|
} else if (userProfile.campusDTOList.length > 0) {
|
|
965
975
|
queryParams = {
|
|
966
976
|
...queryParams,
|
|
967
977
|
campusIdList: userProfile.campusDTOList.map(
|
|
968
|
-
(campusDTO: any) => campusDTO.id
|
|
978
|
+
(campusDTO: any) => campusDTO.id,
|
|
969
979
|
),
|
|
970
980
|
};
|
|
971
981
|
} else if (userProfile.brandDTOList.length > 0) {
|
|
@@ -1161,30 +1171,30 @@ export const retrieveUserAuthorityGeneralOptionList = () => {
|
|
|
1161
1171
|
|
|
1162
1172
|
export const filterGradeLevelOptionList = (
|
|
1163
1173
|
level: any,
|
|
1164
|
-
institutionType: any
|
|
1174
|
+
institutionType: any,
|
|
1165
1175
|
) => {
|
|
1166
1176
|
if (level) {
|
|
1167
1177
|
return retrieveGradeLevelOptionList().filter(
|
|
1168
|
-
(gradeLevel: any) => parseFloat(gradeLevel.value) === level
|
|
1178
|
+
(gradeLevel: any) => parseFloat(gradeLevel.value) === level,
|
|
1169
1179
|
);
|
|
1170
1180
|
}
|
|
1171
1181
|
if (institutionType) {
|
|
1172
1182
|
if (institutionType === "WEST_PRIMARY") {
|
|
1173
1183
|
return retrieveGradeLevelOptionList().filter(
|
|
1174
|
-
(gradeLevel: any) => parseFloat(gradeLevel.value) <= 8
|
|
1184
|
+
(gradeLevel: any) => parseFloat(gradeLevel.value) <= 8,
|
|
1175
1185
|
);
|
|
1176
1186
|
} else if (institutionType === "EAST_PRIMARY") {
|
|
1177
1187
|
return retrieveGradeLevelOptionList().filter(
|
|
1178
|
-
(gradeLevel: any) => parseFloat(gradeLevel.value) <= 4
|
|
1188
|
+
(gradeLevel: any) => parseFloat(gradeLevel.value) <= 4,
|
|
1179
1189
|
);
|
|
1180
1190
|
} else if (institutionType === "EAST_SECONDARY") {
|
|
1181
1191
|
return retrieveGradeLevelOptionList().filter(
|
|
1182
1192
|
(gradeLevel: any) =>
|
|
1183
|
-
parseFloat(gradeLevel.value) > 4 && parseFloat(gradeLevel.value) <= 8
|
|
1193
|
+
parseFloat(gradeLevel.value) > 4 && parseFloat(gradeLevel.value) <= 8,
|
|
1184
1194
|
);
|
|
1185
1195
|
} else if (institutionType === "HIGH_SCHOOL") {
|
|
1186
1196
|
return retrieveGradeLevelOptionList().filter(
|
|
1187
|
-
(gradeLevel: any) => parseFloat(gradeLevel.value) > 8
|
|
1197
|
+
(gradeLevel: any) => parseFloat(gradeLevel.value) > 8,
|
|
1188
1198
|
);
|
|
1189
1199
|
} else if (
|
|
1190
1200
|
institutionType === "COLLEGE" ||
|
|
@@ -1202,18 +1212,18 @@ export const filterGradeLevelOptionList = (
|
|
|
1202
1212
|
|
|
1203
1213
|
export const filterCoterieTypeOptionList = (
|
|
1204
1214
|
coterieType: any,
|
|
1205
|
-
institutionType: any
|
|
1215
|
+
institutionType: any,
|
|
1206
1216
|
) => {
|
|
1207
1217
|
if (coterieType === "MANAGEMENT") {
|
|
1208
1218
|
if (institutionType) {
|
|
1209
1219
|
return retrieveCoterieTypeOptionList()
|
|
1210
1220
|
.filter((coterieTypeOption) =>
|
|
1211
|
-
coterieTypeOption.includes.includes(institutionType)
|
|
1221
|
+
coterieTypeOption.includes.includes(institutionType),
|
|
1212
1222
|
)
|
|
1213
1223
|
.sort((a, b) => a.text.localeCompare(b.text));
|
|
1214
1224
|
} else {
|
|
1215
1225
|
return retrieveCoterieTypeOptionList().sort((a, b) =>
|
|
1216
|
-
a.text.localeCompare(b.text)
|
|
1226
|
+
a.text.localeCompare(b.text),
|
|
1217
1227
|
);
|
|
1218
1228
|
}
|
|
1219
1229
|
} else {
|
|
@@ -1224,21 +1234,21 @@ export const filterCoterieTypeOptionList = (
|
|
|
1224
1234
|
};
|
|
1225
1235
|
|
|
1226
1236
|
export const filterCoterieTypeByDistinctOptionList = (
|
|
1227
|
-
distinctCoterieTypeOptionList: any[]
|
|
1237
|
+
distinctCoterieTypeOptionList: any[],
|
|
1228
1238
|
) => {
|
|
1229
1239
|
const coterieTypeOptionList = retrieveCoterieTypeOptionList();
|
|
1230
1240
|
const filteredCoterieTypeOptionList = coterieTypeOptionList.filter((item) =>
|
|
1231
|
-
distinctCoterieTypeOptionList.includes(item.value)
|
|
1241
|
+
distinctCoterieTypeOptionList.includes(item.value),
|
|
1232
1242
|
);
|
|
1233
1243
|
return filteredCoterieTypeOptionList.sort((a, b) =>
|
|
1234
|
-
a.text.localeCompare(b.text)
|
|
1244
|
+
a.text.localeCompare(b.text),
|
|
1235
1245
|
);
|
|
1236
1246
|
};
|
|
1237
1247
|
|
|
1238
1248
|
export const findAISettingsFromCurrentProfile = (
|
|
1239
1249
|
userProfileBrand: any,
|
|
1240
1250
|
userProfileCampus: any,
|
|
1241
|
-
userProfileInstitution: any
|
|
1251
|
+
userProfileInstitution: any,
|
|
1242
1252
|
) => {
|
|
1243
1253
|
if (userProfileInstitution) {
|
|
1244
1254
|
const { institutionSettingsDTO } = userProfileInstitution;
|