catchup-library-web 2.2.26 → 2.2.28
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.d.mts +6 -2
- package/dist/index.d.ts +6 -2
- package/dist/index.js +19 -42
- package/dist/index.mjs +19 -42
- package/package.json +1 -1
- package/src/utilization/ManagementUtilization.ts +27 -52
package/dist/index.d.mts
CHANGED
|
@@ -886,11 +886,15 @@ declare const retrieveUserAuthorityGeneralOptionList: () => {
|
|
|
886
886
|
text: string;
|
|
887
887
|
value: string;
|
|
888
888
|
}[];
|
|
889
|
-
declare const filterGradeLevelOptionList: (
|
|
889
|
+
declare const filterGradeLevelOptionList: (level: any, institutionType: any) => {
|
|
890
890
|
value: number;
|
|
891
891
|
text: string;
|
|
892
892
|
}[];
|
|
893
|
-
declare const filterCoterieTypeOptionList: (
|
|
893
|
+
declare const filterCoterieTypeOptionList: (coterieType: any, institutionType: any) => {
|
|
894
|
+
text: string;
|
|
895
|
+
value: string;
|
|
896
|
+
includes: string[];
|
|
897
|
+
}[];
|
|
894
898
|
declare const filterCoterieTypeByDistinctOptionList: (distinctCoterieTypeOptionList: any[]) => {
|
|
895
899
|
text: string;
|
|
896
900
|
value: string;
|
package/dist/index.d.ts
CHANGED
|
@@ -886,11 +886,15 @@ declare const retrieveUserAuthorityGeneralOptionList: () => {
|
|
|
886
886
|
text: string;
|
|
887
887
|
value: string;
|
|
888
888
|
}[];
|
|
889
|
-
declare const filterGradeLevelOptionList: (
|
|
889
|
+
declare const filterGradeLevelOptionList: (level: any, institutionType: any) => {
|
|
890
890
|
value: number;
|
|
891
891
|
text: string;
|
|
892
892
|
}[];
|
|
893
|
-
declare const filterCoterieTypeOptionList: (
|
|
893
|
+
declare const filterCoterieTypeOptionList: (coterieType: any, institutionType: any) => {
|
|
894
|
+
text: string;
|
|
895
|
+
value: string;
|
|
896
|
+
includes: string[];
|
|
897
|
+
}[];
|
|
894
898
|
declare const filterCoterieTypeByDistinctOptionList: (distinctCoterieTypeOptionList: any[]) => {
|
|
895
899
|
text: string;
|
|
896
900
|
value: string;
|
package/dist/index.js
CHANGED
|
@@ -8897,31 +8897,30 @@ var retrieveUserAuthorityGeneralOptionList = () => {
|
|
|
8897
8897
|
{ text: i18n_default.t("completion_assignment"), value: "ETUDE" }
|
|
8898
8898
|
];
|
|
8899
8899
|
};
|
|
8900
|
-
var filterGradeLevelOptionList = (
|
|
8901
|
-
if (
|
|
8900
|
+
var filterGradeLevelOptionList = (level, institutionType) => {
|
|
8901
|
+
if (level) {
|
|
8902
8902
|
return retrieveGradeLevelOptionList().filter(
|
|
8903
|
-
(gradeLevel) => parseFloat(gradeLevel.value) ===
|
|
8903
|
+
(gradeLevel) => parseFloat(gradeLevel.value) === level
|
|
8904
8904
|
);
|
|
8905
8905
|
}
|
|
8906
|
-
if (
|
|
8907
|
-
|
|
8908
|
-
if (type === "WEST_PRIMARY") {
|
|
8906
|
+
if (institutionType) {
|
|
8907
|
+
if (institutionType === "WEST_PRIMARY") {
|
|
8909
8908
|
return retrieveGradeLevelOptionList().filter(
|
|
8910
8909
|
(gradeLevel) => parseFloat(gradeLevel.value) <= 8
|
|
8911
8910
|
);
|
|
8912
|
-
} else if (
|
|
8911
|
+
} else if (institutionType === "EAST_PRIMARY") {
|
|
8913
8912
|
return retrieveGradeLevelOptionList().filter(
|
|
8914
8913
|
(gradeLevel) => parseFloat(gradeLevel.value) <= 4
|
|
8915
8914
|
);
|
|
8916
|
-
} else if (
|
|
8915
|
+
} else if (institutionType === "EAST_SECONDARY") {
|
|
8917
8916
|
return retrieveGradeLevelOptionList().filter(
|
|
8918
8917
|
(gradeLevel) => parseFloat(gradeLevel.value) > 4 && parseFloat(gradeLevel.value) <= 8
|
|
8919
8918
|
);
|
|
8920
|
-
} else if (
|
|
8919
|
+
} else if (institutionType === "HIGH_SCHOOL") {
|
|
8921
8920
|
return retrieveGradeLevelOptionList().filter(
|
|
8922
8921
|
(gradeLevel) => parseFloat(gradeLevel.value) > 8
|
|
8923
8922
|
);
|
|
8924
|
-
} else if (
|
|
8923
|
+
} else if (institutionType === "COLLEGE" || institutionType === "PRIVATE_TRAINING" || institutionType === "PRIVATE_LESSON" || institutionType === "COURSE") {
|
|
8925
8924
|
return retrieveGradeLevelOptionList();
|
|
8926
8925
|
} else {
|
|
8927
8926
|
return [];
|
|
@@ -8929,42 +8928,20 @@ var filterGradeLevelOptionList = (institutionDTO, gradeDTO) => {
|
|
|
8929
8928
|
}
|
|
8930
8929
|
return retrieveGradeLevelOptionList();
|
|
8931
8930
|
};
|
|
8932
|
-
var filterCoterieTypeOptionList = (
|
|
8933
|
-
if (
|
|
8934
|
-
|
|
8935
|
-
(a, b) => a.text.localeCompare(b.text)
|
|
8936
|
-
);
|
|
8937
|
-
}
|
|
8938
|
-
if (userProfile.role === "STAFF" || userProfile.role === "CONTENT_CREATOR") {
|
|
8939
|
-
if (userProfile.coterieType === "MANAGEMENT") {
|
|
8940
|
-
if (userProfileInstitution) {
|
|
8941
|
-
return retrieveCoterieTypeOptionList().filter(
|
|
8942
|
-
(coterieTypeOption) => coterieTypeOption.includes.includes(userProfileInstitution.type)
|
|
8943
|
-
).sort((a, b) => a.text.localeCompare(b.text));
|
|
8944
|
-
} else {
|
|
8945
|
-
return retrieveCoterieTypeOptionList().sort(
|
|
8946
|
-
(a, b) => a.text.localeCompare(b.text)
|
|
8947
|
-
);
|
|
8948
|
-
}
|
|
8949
|
-
} else {
|
|
8931
|
+
var filterCoterieTypeOptionList = (coterieType, institutionType) => {
|
|
8932
|
+
if (coterieType === "MANAGEMENT") {
|
|
8933
|
+
if (institutionType) {
|
|
8950
8934
|
return retrieveCoterieTypeOptionList().filter(
|
|
8951
|
-
(coterieTypeOption) => coterieTypeOption.
|
|
8935
|
+
(coterieTypeOption) => coterieTypeOption.includes.includes(institutionType)
|
|
8952
8936
|
).sort((a, b) => a.text.localeCompare(b.text));
|
|
8953
|
-
}
|
|
8954
|
-
|
|
8955
|
-
|
|
8956
|
-
const coterieTypeOptionList = retrieveCoterieTypeOptionList();
|
|
8957
|
-
userProfile.coterieTypeList.forEach((coterieType) => {
|
|
8958
|
-
const foundCoterieTypeOption = coterieTypeOptionList.find(
|
|
8959
|
-
(coterieTypeOption) => coterieTypeOption.value === coterieType
|
|
8937
|
+
} else {
|
|
8938
|
+
return retrieveCoterieTypeOptionList().sort(
|
|
8939
|
+
(a, b) => a.text.localeCompare(b.text)
|
|
8960
8940
|
);
|
|
8961
|
-
|
|
8962
|
-
|
|
8963
|
-
|
|
8964
|
-
});
|
|
8965
|
-
return individualCoterieTypeOptionList;
|
|
8941
|
+
}
|
|
8942
|
+
} else {
|
|
8943
|
+
return retrieveCoterieTypeOptionList().filter((coterieTypeOption) => coterieTypeOption.value === coterieType).sort((a, b) => a.text.localeCompare(b.text));
|
|
8966
8944
|
}
|
|
8967
|
-
return [];
|
|
8968
8945
|
};
|
|
8969
8946
|
var filterCoterieTypeByDistinctOptionList = (distinctCoterieTypeOptionList) => {
|
|
8970
8947
|
const coterieTypeOptionList = retrieveCoterieTypeOptionList();
|
package/dist/index.mjs
CHANGED
|
@@ -8672,31 +8672,30 @@ var retrieveUserAuthorityGeneralOptionList = () => {
|
|
|
8672
8672
|
{ text: i18n_default.t("completion_assignment"), value: "ETUDE" }
|
|
8673
8673
|
];
|
|
8674
8674
|
};
|
|
8675
|
-
var filterGradeLevelOptionList = (
|
|
8676
|
-
if (
|
|
8675
|
+
var filterGradeLevelOptionList = (level, institutionType) => {
|
|
8676
|
+
if (level) {
|
|
8677
8677
|
return retrieveGradeLevelOptionList().filter(
|
|
8678
|
-
(gradeLevel) => parseFloat(gradeLevel.value) ===
|
|
8678
|
+
(gradeLevel) => parseFloat(gradeLevel.value) === level
|
|
8679
8679
|
);
|
|
8680
8680
|
}
|
|
8681
|
-
if (
|
|
8682
|
-
|
|
8683
|
-
if (type === "WEST_PRIMARY") {
|
|
8681
|
+
if (institutionType) {
|
|
8682
|
+
if (institutionType === "WEST_PRIMARY") {
|
|
8684
8683
|
return retrieveGradeLevelOptionList().filter(
|
|
8685
8684
|
(gradeLevel) => parseFloat(gradeLevel.value) <= 8
|
|
8686
8685
|
);
|
|
8687
|
-
} else if (
|
|
8686
|
+
} else if (institutionType === "EAST_PRIMARY") {
|
|
8688
8687
|
return retrieveGradeLevelOptionList().filter(
|
|
8689
8688
|
(gradeLevel) => parseFloat(gradeLevel.value) <= 4
|
|
8690
8689
|
);
|
|
8691
|
-
} else if (
|
|
8690
|
+
} else if (institutionType === "EAST_SECONDARY") {
|
|
8692
8691
|
return retrieveGradeLevelOptionList().filter(
|
|
8693
8692
|
(gradeLevel) => parseFloat(gradeLevel.value) > 4 && parseFloat(gradeLevel.value) <= 8
|
|
8694
8693
|
);
|
|
8695
|
-
} else if (
|
|
8694
|
+
} else if (institutionType === "HIGH_SCHOOL") {
|
|
8696
8695
|
return retrieveGradeLevelOptionList().filter(
|
|
8697
8696
|
(gradeLevel) => parseFloat(gradeLevel.value) > 8
|
|
8698
8697
|
);
|
|
8699
|
-
} else if (
|
|
8698
|
+
} else if (institutionType === "COLLEGE" || institutionType === "PRIVATE_TRAINING" || institutionType === "PRIVATE_LESSON" || institutionType === "COURSE") {
|
|
8700
8699
|
return retrieveGradeLevelOptionList();
|
|
8701
8700
|
} else {
|
|
8702
8701
|
return [];
|
|
@@ -8704,42 +8703,20 @@ var filterGradeLevelOptionList = (institutionDTO, gradeDTO) => {
|
|
|
8704
8703
|
}
|
|
8705
8704
|
return retrieveGradeLevelOptionList();
|
|
8706
8705
|
};
|
|
8707
|
-
var filterCoterieTypeOptionList = (
|
|
8708
|
-
if (
|
|
8709
|
-
|
|
8710
|
-
(a, b) => a.text.localeCompare(b.text)
|
|
8711
|
-
);
|
|
8712
|
-
}
|
|
8713
|
-
if (userProfile.role === "STAFF" || userProfile.role === "CONTENT_CREATOR") {
|
|
8714
|
-
if (userProfile.coterieType === "MANAGEMENT") {
|
|
8715
|
-
if (userProfileInstitution) {
|
|
8716
|
-
return retrieveCoterieTypeOptionList().filter(
|
|
8717
|
-
(coterieTypeOption) => coterieTypeOption.includes.includes(userProfileInstitution.type)
|
|
8718
|
-
).sort((a, b) => a.text.localeCompare(b.text));
|
|
8719
|
-
} else {
|
|
8720
|
-
return retrieveCoterieTypeOptionList().sort(
|
|
8721
|
-
(a, b) => a.text.localeCompare(b.text)
|
|
8722
|
-
);
|
|
8723
|
-
}
|
|
8724
|
-
} else {
|
|
8706
|
+
var filterCoterieTypeOptionList = (coterieType, institutionType) => {
|
|
8707
|
+
if (coterieType === "MANAGEMENT") {
|
|
8708
|
+
if (institutionType) {
|
|
8725
8709
|
return retrieveCoterieTypeOptionList().filter(
|
|
8726
|
-
(coterieTypeOption) => coterieTypeOption.
|
|
8710
|
+
(coterieTypeOption) => coterieTypeOption.includes.includes(institutionType)
|
|
8727
8711
|
).sort((a, b) => a.text.localeCompare(b.text));
|
|
8728
|
-
}
|
|
8729
|
-
|
|
8730
|
-
|
|
8731
|
-
const coterieTypeOptionList = retrieveCoterieTypeOptionList();
|
|
8732
|
-
userProfile.coterieTypeList.forEach((coterieType) => {
|
|
8733
|
-
const foundCoterieTypeOption = coterieTypeOptionList.find(
|
|
8734
|
-
(coterieTypeOption) => coterieTypeOption.value === coterieType
|
|
8712
|
+
} else {
|
|
8713
|
+
return retrieveCoterieTypeOptionList().sort(
|
|
8714
|
+
(a, b) => a.text.localeCompare(b.text)
|
|
8735
8715
|
);
|
|
8736
|
-
|
|
8737
|
-
|
|
8738
|
-
|
|
8739
|
-
});
|
|
8740
|
-
return individualCoterieTypeOptionList;
|
|
8716
|
+
}
|
|
8717
|
+
} else {
|
|
8718
|
+
return retrieveCoterieTypeOptionList().filter((coterieTypeOption) => coterieTypeOption.value === coterieType).sort((a, b) => a.text.localeCompare(b.text));
|
|
8741
8719
|
}
|
|
8742
|
-
return [];
|
|
8743
8720
|
};
|
|
8744
8721
|
var filterCoterieTypeByDistinctOptionList = (distinctCoterieTypeOptionList) => {
|
|
8745
8722
|
const coterieTypeOptionList = retrieveCoterieTypeOptionList();
|
package/package.json
CHANGED
|
@@ -1150,38 +1150,37 @@ export const retrieveUserAuthorityGeneralOptionList = () => {
|
|
|
1150
1150
|
};
|
|
1151
1151
|
|
|
1152
1152
|
export const filterGradeLevelOptionList = (
|
|
1153
|
-
|
|
1154
|
-
|
|
1153
|
+
level: any,
|
|
1154
|
+
institutionType: any
|
|
1155
1155
|
) => {
|
|
1156
|
-
if (
|
|
1156
|
+
if (level) {
|
|
1157
1157
|
return retrieveGradeLevelOptionList().filter(
|
|
1158
|
-
(gradeLevel: any) => parseFloat(gradeLevel.value) ===
|
|
1158
|
+
(gradeLevel: any) => parseFloat(gradeLevel.value) === level
|
|
1159
1159
|
);
|
|
1160
1160
|
}
|
|
1161
|
-
if (
|
|
1162
|
-
|
|
1163
|
-
if (type === "WEST_PRIMARY") {
|
|
1161
|
+
if (institutionType) {
|
|
1162
|
+
if (institutionType === "WEST_PRIMARY") {
|
|
1164
1163
|
return retrieveGradeLevelOptionList().filter(
|
|
1165
1164
|
(gradeLevel: any) => parseFloat(gradeLevel.value) <= 8
|
|
1166
1165
|
);
|
|
1167
|
-
} else if (
|
|
1166
|
+
} else if (institutionType === "EAST_PRIMARY") {
|
|
1168
1167
|
return retrieveGradeLevelOptionList().filter(
|
|
1169
1168
|
(gradeLevel: any) => parseFloat(gradeLevel.value) <= 4
|
|
1170
1169
|
);
|
|
1171
|
-
} else if (
|
|
1170
|
+
} else if (institutionType === "EAST_SECONDARY") {
|
|
1172
1171
|
return retrieveGradeLevelOptionList().filter(
|
|
1173
1172
|
(gradeLevel: any) =>
|
|
1174
1173
|
parseFloat(gradeLevel.value) > 4 && parseFloat(gradeLevel.value) <= 8
|
|
1175
1174
|
);
|
|
1176
|
-
} else if (
|
|
1175
|
+
} else if (institutionType === "HIGH_SCHOOL") {
|
|
1177
1176
|
return retrieveGradeLevelOptionList().filter(
|
|
1178
1177
|
(gradeLevel: any) => parseFloat(gradeLevel.value) > 8
|
|
1179
1178
|
);
|
|
1180
1179
|
} else if (
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1180
|
+
institutionType === "COLLEGE" ||
|
|
1181
|
+
institutionType === "PRIVATE_TRAINING" ||
|
|
1182
|
+
institutionType === "PRIVATE_LESSON" ||
|
|
1183
|
+
institutionType === "COURSE"
|
|
1185
1184
|
) {
|
|
1186
1185
|
return retrieveGradeLevelOptionList();
|
|
1187
1186
|
} else {
|
|
@@ -1192,50 +1191,26 @@ export const filterGradeLevelOptionList = (
|
|
|
1192
1191
|
};
|
|
1193
1192
|
|
|
1194
1193
|
export const filterCoterieTypeOptionList = (
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
userProfileInstitution: any
|
|
1194
|
+
coterieType: any,
|
|
1195
|
+
institutionType: any
|
|
1198
1196
|
) => {
|
|
1199
|
-
if (
|
|
1200
|
-
|
|
1201
|
-
a.text.localeCompare(b.text)
|
|
1202
|
-
);
|
|
1203
|
-
}
|
|
1204
|
-
if (userProfile.role === "STAFF" || userProfile.role === "CONTENT_CREATOR") {
|
|
1205
|
-
if (userProfile.coterieType === "MANAGEMENT") {
|
|
1206
|
-
if (userProfileInstitution) {
|
|
1207
|
-
return retrieveCoterieTypeOptionList()
|
|
1208
|
-
.filter((coterieTypeOption) =>
|
|
1209
|
-
coterieTypeOption.includes.includes(userProfileInstitution.type)
|
|
1210
|
-
)
|
|
1211
|
-
.sort((a, b) => a.text.localeCompare(b.text));
|
|
1212
|
-
} else {
|
|
1213
|
-
return retrieveCoterieTypeOptionList().sort((a, b) =>
|
|
1214
|
-
a.text.localeCompare(b.text)
|
|
1215
|
-
);
|
|
1216
|
-
}
|
|
1217
|
-
} else {
|
|
1197
|
+
if (coterieType === "MANAGEMENT") {
|
|
1198
|
+
if (institutionType) {
|
|
1218
1199
|
return retrieveCoterieTypeOptionList()
|
|
1219
|
-
.filter(
|
|
1220
|
-
(
|
|
1221
|
-
coterieTypeOption.value === userProfile.coterieType
|
|
1200
|
+
.filter((coterieTypeOption) =>
|
|
1201
|
+
coterieTypeOption.includes.includes(institutionType)
|
|
1222
1202
|
)
|
|
1223
1203
|
.sort((a, b) => a.text.localeCompare(b.text));
|
|
1224
|
-
}
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
const coterieTypeOptionList = retrieveCoterieTypeOptionList();
|
|
1228
|
-
userProfile.coterieTypeList.forEach((coterieType: any) => {
|
|
1229
|
-
const foundCoterieTypeOption = coterieTypeOptionList.find(
|
|
1230
|
-
(coterieTypeOption) => coterieTypeOption.value === coterieType
|
|
1204
|
+
} else {
|
|
1205
|
+
return retrieveCoterieTypeOptionList().sort((a, b) =>
|
|
1206
|
+
a.text.localeCompare(b.text)
|
|
1231
1207
|
);
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
1208
|
+
}
|
|
1209
|
+
} else {
|
|
1210
|
+
return retrieveCoterieTypeOptionList()
|
|
1211
|
+
.filter((coterieTypeOption) => coterieTypeOption.value === coterieType)
|
|
1212
|
+
.sort((a, b) => a.text.localeCompare(b.text));
|
|
1237
1213
|
}
|
|
1238
|
-
return [];
|
|
1239
1214
|
};
|
|
1240
1215
|
|
|
1241
1216
|
export const filterCoterieTypeByDistinctOptionList = (
|