catchup-library-web 1.21.20 → 1.21.21
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 +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +5 -4
- package/dist/index.mjs +5 -4
- package/package.json +1 -1
- package/src/utilization/CategoryUtilization.ts +12 -5
package/dist/index.d.mts
CHANGED
|
@@ -627,7 +627,7 @@ declare const retrieveCategoryVersionCodeOptionList: () => {
|
|
|
627
627
|
type: string;
|
|
628
628
|
availableLevelList: number[];
|
|
629
629
|
}[];
|
|
630
|
-
declare const filterCategoryVersionCodeOptionList: (categoryVersionCodeOptionList: any,
|
|
630
|
+
declare const filterCategoryVersionCodeOptionList: (categoryVersionCodeOptionList: any, coterieTypeOrTypes: string | string[], level: any) => any;
|
|
631
631
|
declare const filterCategoryVersionCodeOptionListByGradeDTO: (categoryVersionCodeOptionList: any, coterieType: string, gradeDTO: any) => any;
|
|
632
632
|
declare const filterCategoryVersionCodeOptionListByInstitutionDTO: (categoryVersionCodeOptionList: any, coterieType: string, institutionDTO: any) => any;
|
|
633
633
|
declare const constructCategoryTreeFromParentCode: (categorySet: any[]) => any[];
|
package/dist/index.d.ts
CHANGED
|
@@ -627,7 +627,7 @@ declare const retrieveCategoryVersionCodeOptionList: () => {
|
|
|
627
627
|
type: string;
|
|
628
628
|
availableLevelList: number[];
|
|
629
629
|
}[];
|
|
630
|
-
declare const filterCategoryVersionCodeOptionList: (categoryVersionCodeOptionList: any,
|
|
630
|
+
declare const filterCategoryVersionCodeOptionList: (categoryVersionCodeOptionList: any, coterieTypeOrTypes: string | string[], level: any) => any;
|
|
631
631
|
declare const filterCategoryVersionCodeOptionListByGradeDTO: (categoryVersionCodeOptionList: any, coterieType: string, gradeDTO: any) => any;
|
|
632
632
|
declare const filterCategoryVersionCodeOptionListByInstitutionDTO: (categoryVersionCodeOptionList: any, coterieType: string, institutionDTO: any) => any;
|
|
633
633
|
declare const constructCategoryTreeFromParentCode: (categorySet: any[]) => any[];
|
package/dist/index.js
CHANGED
|
@@ -9604,13 +9604,14 @@ var retrieveCategoryVersionCodeOptionList = () => {
|
|
|
9604
9604
|
}
|
|
9605
9605
|
];
|
|
9606
9606
|
};
|
|
9607
|
-
var filterCategoryVersionCodeOptionList = (categoryVersionCodeOptionList,
|
|
9608
|
-
|
|
9607
|
+
var filterCategoryVersionCodeOptionList = (categoryVersionCodeOptionList, coterieTypeOrTypes, level) => {
|
|
9608
|
+
const coterieTypes = Array.isArray(coterieTypeOrTypes) ? coterieTypeOrTypes : [coterieTypeOrTypes];
|
|
9609
|
+
if (coterieTypes.some((type) => type === "DEFAULT_OPTION")) return [];
|
|
9609
9610
|
if (level && level === "DEFAULT_OPTION") return [];
|
|
9610
9611
|
let currentCategoryVersionCodeOptionList = categoryVersionCodeOptionList;
|
|
9611
|
-
if (
|
|
9612
|
+
if (!coterieTypes.includes("MANAGEMENT")) {
|
|
9612
9613
|
currentCategoryVersionCodeOptionList = currentCategoryVersionCodeOptionList.filter(
|
|
9613
|
-
(categoryVersionCode) => categoryVersionCode.type
|
|
9614
|
+
(categoryVersionCode) => coterieTypes.includes(categoryVersionCode.type)
|
|
9614
9615
|
);
|
|
9615
9616
|
}
|
|
9616
9617
|
if (level) {
|
package/dist/index.mjs
CHANGED
|
@@ -9381,13 +9381,14 @@ var retrieveCategoryVersionCodeOptionList = () => {
|
|
|
9381
9381
|
}
|
|
9382
9382
|
];
|
|
9383
9383
|
};
|
|
9384
|
-
var filterCategoryVersionCodeOptionList = (categoryVersionCodeOptionList,
|
|
9385
|
-
|
|
9384
|
+
var filterCategoryVersionCodeOptionList = (categoryVersionCodeOptionList, coterieTypeOrTypes, level) => {
|
|
9385
|
+
const coterieTypes = Array.isArray(coterieTypeOrTypes) ? coterieTypeOrTypes : [coterieTypeOrTypes];
|
|
9386
|
+
if (coterieTypes.some((type) => type === "DEFAULT_OPTION")) return [];
|
|
9386
9387
|
if (level && level === "DEFAULT_OPTION") return [];
|
|
9387
9388
|
let currentCategoryVersionCodeOptionList = categoryVersionCodeOptionList;
|
|
9388
|
-
if (
|
|
9389
|
+
if (!coterieTypes.includes("MANAGEMENT")) {
|
|
9389
9390
|
currentCategoryVersionCodeOptionList = currentCategoryVersionCodeOptionList.filter(
|
|
9390
|
-
(categoryVersionCode) => categoryVersionCode.type
|
|
9391
|
+
(categoryVersionCode) => coterieTypes.includes(categoryVersionCode.type)
|
|
9391
9392
|
);
|
|
9392
9393
|
}
|
|
9393
9394
|
if (level) {
|
package/package.json
CHANGED
|
@@ -236,18 +236,25 @@ export const retrieveCategoryVersionCodeOptionList = () => {
|
|
|
236
236
|
|
|
237
237
|
export const filterCategoryVersionCodeOptionList = (
|
|
238
238
|
categoryVersionCodeOptionList: any,
|
|
239
|
-
|
|
239
|
+
coterieTypeOrTypes: string | string[],
|
|
240
240
|
level: any
|
|
241
241
|
) => {
|
|
242
|
-
|
|
242
|
+
const coterieTypes = Array.isArray(coterieTypeOrTypes)
|
|
243
|
+
? coterieTypeOrTypes
|
|
244
|
+
: [coterieTypeOrTypes];
|
|
245
|
+
|
|
246
|
+
if (coterieTypes.some((type) => type === "DEFAULT_OPTION")) return [];
|
|
243
247
|
if (level && level === "DEFAULT_OPTION") return [];
|
|
248
|
+
|
|
244
249
|
let currentCategoryVersionCodeOptionList = categoryVersionCodeOptionList;
|
|
245
|
-
|
|
250
|
+
|
|
251
|
+
if (!coterieTypes.includes("MANAGEMENT")) {
|
|
246
252
|
currentCategoryVersionCodeOptionList =
|
|
247
|
-
currentCategoryVersionCodeOptionList.filter(
|
|
248
|
-
(categoryVersionCode
|
|
253
|
+
currentCategoryVersionCodeOptionList.filter((categoryVersionCode: any) =>
|
|
254
|
+
coterieTypes.includes(categoryVersionCode.type)
|
|
249
255
|
);
|
|
250
256
|
}
|
|
257
|
+
|
|
251
258
|
if (level) {
|
|
252
259
|
currentCategoryVersionCodeOptionList =
|
|
253
260
|
currentCategoryVersionCodeOptionList.filter((categoryVersionCode: any) =>
|