@eeplatform/basic-edu 1.6.0 → 1.8.0
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/CHANGELOG.md +12 -0
- package/CONVENTION.md +632 -0
- package/SCHOOL_MGMT.md +600 -0
- package/dist/index.d.ts +262 -16
- package/dist/index.js +3248 -963
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +3260 -960
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -78,13 +78,17 @@ declare function useCurriculumController(): {
|
|
|
78
78
|
removeFromPilotWhitelist: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
79
79
|
};
|
|
80
80
|
|
|
81
|
-
type
|
|
81
|
+
type TSubject = {
|
|
82
82
|
_id?: ObjectId;
|
|
83
|
+
school?: ObjectId;
|
|
84
|
+
schoolName?: string;
|
|
83
85
|
curriculum: ObjectId | string;
|
|
84
86
|
curriculumName: string;
|
|
85
87
|
effectiveSchoolYear?: number[];
|
|
86
88
|
educationLevel: string;
|
|
87
89
|
gradeLevel: string;
|
|
90
|
+
program?: string | ObjectId;
|
|
91
|
+
programName?: string;
|
|
88
92
|
subjectCode: string;
|
|
89
93
|
subjectName: string;
|
|
90
94
|
subjectType: string;
|
|
@@ -99,15 +103,19 @@ type TCurriculumSubject = {
|
|
|
99
103
|
updatedBy?: string;
|
|
100
104
|
deletedBy?: string;
|
|
101
105
|
};
|
|
102
|
-
declare const
|
|
103
|
-
declare const
|
|
104
|
-
declare function
|
|
106
|
+
declare const schemaSubject: Joi.ObjectSchema<any>;
|
|
107
|
+
declare const schemaSubjectAdd: Joi.ObjectSchema<any>;
|
|
108
|
+
declare function modelSubject(value: TSubject): {
|
|
105
109
|
_id: ObjectId | undefined;
|
|
110
|
+
school: ObjectId | undefined;
|
|
111
|
+
schoolName: string;
|
|
106
112
|
curriculum: ObjectId;
|
|
107
113
|
curriculumName: string;
|
|
108
114
|
effectiveSchoolYear: number[];
|
|
109
115
|
educationLevel: string;
|
|
110
116
|
gradeLevel: string;
|
|
117
|
+
program: string | ObjectId | undefined;
|
|
118
|
+
programName: string;
|
|
111
119
|
subjectCode: string;
|
|
112
120
|
subjectName: string;
|
|
113
121
|
subjectType: string;
|
|
@@ -123,9 +131,9 @@ declare function MCurriculumSubject(value: TCurriculumSubject): {
|
|
|
123
131
|
deletedBy: string;
|
|
124
132
|
};
|
|
125
133
|
|
|
126
|
-
declare function
|
|
134
|
+
declare function useSubjectRepo(): {
|
|
127
135
|
createIndexes: () => Promise<void>;
|
|
128
|
-
add: (value:
|
|
136
|
+
add: (value: TSubject, session?: ClientSession) => Promise<ObjectId>;
|
|
129
137
|
getAll: ({ search, page, limit, sort, status, curriculum, educationLevel, gradeLevel, schoolYear, }?: {
|
|
130
138
|
search?: string;
|
|
131
139
|
page?: number;
|
|
@@ -141,14 +149,15 @@ declare function useCurriculumSubjectRepo(): {
|
|
|
141
149
|
pages: number;
|
|
142
150
|
pageRange: string;
|
|
143
151
|
}>;
|
|
144
|
-
getById: (_id: string | ObjectId) => Promise<bson.Document |
|
|
145
|
-
getByCurriculum: (curriculumId: string | ObjectId) => Promise<
|
|
146
|
-
updateById: (_id: ObjectId | string, value: Partial<
|
|
152
|
+
getById: (_id: string | ObjectId) => Promise<bson.Document | TSubject>;
|
|
153
|
+
getByCurriculum: (curriculumId: string | ObjectId) => Promise<TSubject[] | mongodb.WithId<bson.Document>[]>;
|
|
154
|
+
updateById: (_id: ObjectId | string, value: Partial<TSubject>, session?: ClientSession) => Promise<mongodb.UpdateResult<bson.Document>>;
|
|
147
155
|
deleteById: (_id: string | ObjectId, session?: ClientSession) => Promise<mongodb.UpdateResult<bson.Document>>;
|
|
148
156
|
deleteByCurriculum: (curriculumId: string | ObjectId, session?: ClientSession) => Promise<mongodb.UpdateResult<bson.Document>>;
|
|
157
|
+
getAsOptions: () => Promise<{}>;
|
|
149
158
|
};
|
|
150
159
|
|
|
151
|
-
declare function
|
|
160
|
+
declare function useSubjectController(): {
|
|
152
161
|
add: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
153
162
|
addMany: (value: {
|
|
154
163
|
curriculum: string;
|
|
@@ -169,9 +178,10 @@ declare function useCurriculumSubjectController(): {
|
|
|
169
178
|
updateById: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
170
179
|
deleteById: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
171
180
|
deleteByCurriculum: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
181
|
+
getAsOptions: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
172
182
|
};
|
|
173
183
|
|
|
174
|
-
declare function
|
|
184
|
+
declare function useSubjectService(): {
|
|
175
185
|
addMany: (value: {
|
|
176
186
|
curriculum: string;
|
|
177
187
|
curriculumName: string;
|
|
@@ -996,9 +1006,15 @@ declare function useSectionController(): {
|
|
|
996
1006
|
|
|
997
1007
|
type TSectionStudent = {
|
|
998
1008
|
_id?: ObjectId;
|
|
1009
|
+
lrn: string;
|
|
1010
|
+
school: ObjectId | string;
|
|
1011
|
+
schoolName?: string;
|
|
999
1012
|
section: ObjectId | string;
|
|
1000
1013
|
student: string;
|
|
1001
1014
|
studentName: string;
|
|
1015
|
+
gradeLevel?: string;
|
|
1016
|
+
educationLevel?: string;
|
|
1017
|
+
schoolYear?: string;
|
|
1002
1018
|
status?: string;
|
|
1003
1019
|
assignedAt?: Date | string;
|
|
1004
1020
|
updatedAt?: Date | string;
|
|
@@ -1010,13 +1026,29 @@ declare function modelSectionStudent(value: TSectionStudent): TSectionStudent;
|
|
|
1010
1026
|
declare function useSectionStudentRepo(): {
|
|
1011
1027
|
createIndexes: () => Promise<void>;
|
|
1012
1028
|
delCachedData: () => void;
|
|
1013
|
-
add: (value: TSectionStudent, session?: ClientSession) => Promise<
|
|
1029
|
+
add: (value: TSectionStudent, session?: ClientSession) => Promise<ObjectId>;
|
|
1030
|
+
getAll: ({ page, limit, search, school, status, gradeLevel, section, schoolYear, }?: {
|
|
1031
|
+
page?: number;
|
|
1032
|
+
limit?: number;
|
|
1033
|
+
search?: string;
|
|
1034
|
+
school?: string | ObjectId;
|
|
1035
|
+
status?: string;
|
|
1036
|
+
gradeLevel?: string;
|
|
1037
|
+
section?: string | ObjectId;
|
|
1038
|
+
schoolYear?: string;
|
|
1039
|
+
}) => Promise<{}>;
|
|
1040
|
+
};
|
|
1041
|
+
|
|
1042
|
+
declare function useSectionStudentController(): {
|
|
1043
|
+
add: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
1044
|
+
getAll: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
1014
1045
|
};
|
|
1015
1046
|
|
|
1016
1047
|
type TSectionSubject = {
|
|
1017
1048
|
_id?: ObjectId;
|
|
1018
1049
|
school: ObjectId | string;
|
|
1019
1050
|
schoolName?: string;
|
|
1051
|
+
curriculum: ObjectId | string;
|
|
1020
1052
|
section: ObjectId | string;
|
|
1021
1053
|
sectionName: string;
|
|
1022
1054
|
gradeLevel: string;
|
|
@@ -1026,7 +1058,7 @@ type TSectionSubject = {
|
|
|
1026
1058
|
subjectName: string;
|
|
1027
1059
|
teacher?: ObjectId | string;
|
|
1028
1060
|
teacherName?: string;
|
|
1029
|
-
classroom?: string;
|
|
1061
|
+
classroom?: string | ObjectId;
|
|
1030
1062
|
classroomName?: string;
|
|
1031
1063
|
daysOfWeek: string[];
|
|
1032
1064
|
schedule?: string;
|
|
@@ -1070,7 +1102,7 @@ declare function useSectionSubjectRepo(): {
|
|
|
1070
1102
|
field: string;
|
|
1071
1103
|
value: string;
|
|
1072
1104
|
}, session?: ClientSession) => Promise<string>;
|
|
1073
|
-
setupById: (_id: string | ObjectId, value: Pick<TSectionSubject, "teacher" | "teacherName" | "schedule" | "daysOfWeek">, session?: ClientSession) => Promise<string>;
|
|
1105
|
+
setupById: (_id: string | ObjectId, value: Pick<TSectionSubject, "teacher" | "teacherName" | "schedule" | "daysOfWeek" | "classroom" | "classroomName">, session?: ClientSession) => Promise<string>;
|
|
1074
1106
|
deleteById: (_id: string | ObjectId) => Promise<string>;
|
|
1075
1107
|
};
|
|
1076
1108
|
|
|
@@ -1198,13 +1230,14 @@ declare function useBuildingController(): {
|
|
|
1198
1230
|
declare function useBuildingUnitRepo(): {
|
|
1199
1231
|
createIndexes: () => Promise<void>;
|
|
1200
1232
|
add: (value: TBuildingUnit, session?: ClientSession) => Promise<ObjectId>;
|
|
1201
|
-
getAll: ({ search, page, limit, sort, school, building, status, }?: {
|
|
1233
|
+
getAll: ({ search, page, limit, sort, school, building, type, status, }?: {
|
|
1202
1234
|
search?: string | undefined;
|
|
1203
1235
|
page?: number | undefined;
|
|
1204
1236
|
limit?: number | undefined;
|
|
1205
1237
|
sort?: {} | undefined;
|
|
1206
1238
|
school?: string | undefined;
|
|
1207
1239
|
building?: string | undefined;
|
|
1240
|
+
type?: string | undefined;
|
|
1208
1241
|
status?: string | undefined;
|
|
1209
1242
|
}) => Promise<Record<string, any> | {
|
|
1210
1243
|
items: any[];
|
|
@@ -1226,6 +1259,7 @@ declare function useBuildingUnitRepo(): {
|
|
|
1226
1259
|
getByBuilding: (building: string | ObjectId) => Promise<TBuildingUnit | null>;
|
|
1227
1260
|
deleteById: (_id: string | ObjectId, session?: ClientSession) => Promise<string>;
|
|
1228
1261
|
updateByBuildingId: (building: string | ObjectId, value: Partial<Pick<TBuildingUnit, "buildingName">>, session?: ClientSession) => Promise<mongodb.UpdateResult<bson.Document>>;
|
|
1262
|
+
countByBuilding: (building: string | ObjectId, level?: number) => Promise<number>;
|
|
1229
1263
|
};
|
|
1230
1264
|
|
|
1231
1265
|
declare function useBuildingUnitService(): {
|
|
@@ -1233,6 +1267,7 @@ declare function useBuildingUnitService(): {
|
|
|
1233
1267
|
building: TBuildingUnit;
|
|
1234
1268
|
qty: number;
|
|
1235
1269
|
}) => Promise<string>;
|
|
1270
|
+
deleteById: (id: string) => Promise<string>;
|
|
1236
1271
|
};
|
|
1237
1272
|
|
|
1238
1273
|
declare function useBuildingUnitController(): {
|
|
@@ -1253,6 +1288,8 @@ type TPersonnel = {
|
|
|
1253
1288
|
suffix?: string;
|
|
1254
1289
|
title?: string;
|
|
1255
1290
|
classification: string;
|
|
1291
|
+
specializations?: string[];
|
|
1292
|
+
gradeLevels?: string[];
|
|
1256
1293
|
status?: string;
|
|
1257
1294
|
createdAt?: string | Date;
|
|
1258
1295
|
updatedAt?: string | Date;
|
|
@@ -1269,6 +1306,8 @@ declare function MPersonnel(value: TPersonnel): {
|
|
|
1269
1306
|
suffix: string;
|
|
1270
1307
|
title: string;
|
|
1271
1308
|
classification: string;
|
|
1309
|
+
specializations: string[];
|
|
1310
|
+
gradeLevels: string[];
|
|
1272
1311
|
status: string;
|
|
1273
1312
|
createdAt: string | Date;
|
|
1274
1313
|
updatedAt: string | Date;
|
|
@@ -1282,6 +1321,8 @@ declare function usePersonnelRepo(): {
|
|
|
1282
1321
|
firstName?: string;
|
|
1283
1322
|
lastName?: string;
|
|
1284
1323
|
middleName?: string;
|
|
1324
|
+
gradeLevels?: string[];
|
|
1325
|
+
specializations?: string[];
|
|
1285
1326
|
classification?: string;
|
|
1286
1327
|
status?: string;
|
|
1287
1328
|
}, session?: ClientSession) => Promise<mongodb.UpdateResult<bson.Document>>;
|
|
@@ -1313,4 +1354,209 @@ declare function usePersonnelController(): {
|
|
|
1313
1354
|
getByClassification: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
1314
1355
|
};
|
|
1315
1356
|
|
|
1316
|
-
|
|
1357
|
+
type TTeachingLoad = {
|
|
1358
|
+
_id?: ObjectId;
|
|
1359
|
+
school: string | ObjectId;
|
|
1360
|
+
schoolName?: string;
|
|
1361
|
+
schoolYear: string;
|
|
1362
|
+
teacher: string | ObjectId;
|
|
1363
|
+
teacherName?: string;
|
|
1364
|
+
status: string;
|
|
1365
|
+
createdAt?: string | Date;
|
|
1366
|
+
updatedAt?: string | Date;
|
|
1367
|
+
deletedAt?: string | Date;
|
|
1368
|
+
};
|
|
1369
|
+
declare const schemaTeachingLoad: Joi.ObjectSchema<any>;
|
|
1370
|
+
declare function modelTeachingLoad(value: TTeachingLoad): {
|
|
1371
|
+
_id: ObjectId | undefined;
|
|
1372
|
+
school: string | ObjectId;
|
|
1373
|
+
schoolName: string;
|
|
1374
|
+
schoolYear: string;
|
|
1375
|
+
teacher: string | ObjectId;
|
|
1376
|
+
teacherName: string;
|
|
1377
|
+
status: string;
|
|
1378
|
+
createdAt: string | Date;
|
|
1379
|
+
updatedAt: string | Date;
|
|
1380
|
+
deletedAt: string | Date;
|
|
1381
|
+
};
|
|
1382
|
+
|
|
1383
|
+
declare function useTeachingLoadRepo(): {
|
|
1384
|
+
createIndexes: () => Promise<void>;
|
|
1385
|
+
add: (value: TTeachingLoad, session?: ClientSession) => Promise<string>;
|
|
1386
|
+
updateById: (_id: ObjectId | string, value: {
|
|
1387
|
+
schoolYear?: string;
|
|
1388
|
+
teacher?: string | ObjectId;
|
|
1389
|
+
teacherName?: string;
|
|
1390
|
+
status?: string;
|
|
1391
|
+
}, session?: ClientSession) => Promise<mongodb.UpdateResult<bson.Document>>;
|
|
1392
|
+
getAll: ({ school, teacher, schoolYear, page, limit, sort, status, }?: {
|
|
1393
|
+
school?: string | undefined;
|
|
1394
|
+
teacher?: string | undefined;
|
|
1395
|
+
schoolYear?: string | undefined;
|
|
1396
|
+
page?: number | undefined;
|
|
1397
|
+
limit?: number | undefined;
|
|
1398
|
+
sort?: {} | undefined;
|
|
1399
|
+
status?: string | undefined;
|
|
1400
|
+
}) => Promise<Record<string, any> | {
|
|
1401
|
+
items: any[];
|
|
1402
|
+
pages: number;
|
|
1403
|
+
pageRange: string;
|
|
1404
|
+
}>;
|
|
1405
|
+
getById: (_id: string | ObjectId) => Promise<TTeachingLoad | null>;
|
|
1406
|
+
deleteById: (_id: string | ObjectId, session?: ClientSession) => Promise<mongodb.UpdateResult<bson.Document>>;
|
|
1407
|
+
getByTeacher: (teacher: string | ObjectId, schoolYear?: string) => Promise<TTeachingLoad[]>;
|
|
1408
|
+
delCachedData: () => void;
|
|
1409
|
+
};
|
|
1410
|
+
|
|
1411
|
+
declare function useTeachingLoadController(): {
|
|
1412
|
+
add: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
1413
|
+
updateById: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
1414
|
+
getAll: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
1415
|
+
getBySchool: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
1416
|
+
getById: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
1417
|
+
deleteById: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
1418
|
+
getByTeacher: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
1419
|
+
};
|
|
1420
|
+
|
|
1421
|
+
type TTeachingLoadSlot = {
|
|
1422
|
+
_id?: ObjectId;
|
|
1423
|
+
teachingLoad: string | ObjectId;
|
|
1424
|
+
day: string;
|
|
1425
|
+
startTime: string;
|
|
1426
|
+
endTime: string;
|
|
1427
|
+
gradeLevel: string;
|
|
1428
|
+
subject: string | ObjectId;
|
|
1429
|
+
subjectName?: string;
|
|
1430
|
+
subjectCode?: string;
|
|
1431
|
+
section: string | ObjectId;
|
|
1432
|
+
sectionName?: string;
|
|
1433
|
+
duration: number;
|
|
1434
|
+
status?: string;
|
|
1435
|
+
createdAt?: string | Date;
|
|
1436
|
+
updatedAt?: string | Date;
|
|
1437
|
+
deletedAt?: string | Date;
|
|
1438
|
+
};
|
|
1439
|
+
declare const schemaTeachingLoadSlot: Joi.ObjectSchema<any>;
|
|
1440
|
+
declare function modelTeachingLoadSlot(value: TTeachingLoadSlot): {
|
|
1441
|
+
_id: ObjectId | undefined;
|
|
1442
|
+
teachingLoad: string | ObjectId;
|
|
1443
|
+
day: string;
|
|
1444
|
+
gradeLevel: string;
|
|
1445
|
+
startTime: string;
|
|
1446
|
+
endTime: string;
|
|
1447
|
+
subject: string | ObjectId;
|
|
1448
|
+
subjectName: string;
|
|
1449
|
+
subjectCode: string;
|
|
1450
|
+
section: string | ObjectId;
|
|
1451
|
+
sectionName: string;
|
|
1452
|
+
duration: number;
|
|
1453
|
+
status: string;
|
|
1454
|
+
createdAt: string | Date;
|
|
1455
|
+
updatedAt: string | Date;
|
|
1456
|
+
deletedAt: string | Date;
|
|
1457
|
+
};
|
|
1458
|
+
|
|
1459
|
+
declare function useTeachingLoadSlotRepo(): {
|
|
1460
|
+
createIndexes: () => Promise<void>;
|
|
1461
|
+
add: (value: TTeachingLoadSlot, session?: ClientSession) => Promise<string>;
|
|
1462
|
+
updateById: (_id: ObjectId | string, value: {
|
|
1463
|
+
day?: string;
|
|
1464
|
+
startTime?: string;
|
|
1465
|
+
endTime?: string;
|
|
1466
|
+
subject?: string | ObjectId;
|
|
1467
|
+
subjectName?: string;
|
|
1468
|
+
section?: string | ObjectId;
|
|
1469
|
+
sectionName?: string;
|
|
1470
|
+
duration?: number;
|
|
1471
|
+
status?: string;
|
|
1472
|
+
}, session?: ClientSession) => Promise<mongodb.UpdateResult<bson.Document>>;
|
|
1473
|
+
getAll: ({ teachingLoad, subject, section, day, page, limit, sort, status, teacher, school, }?: {
|
|
1474
|
+
teachingLoad?: string | undefined;
|
|
1475
|
+
subject?: string | undefined;
|
|
1476
|
+
section?: string | undefined;
|
|
1477
|
+
day?: string | undefined;
|
|
1478
|
+
page?: number | undefined;
|
|
1479
|
+
limit?: number | undefined;
|
|
1480
|
+
sort?: {} | undefined;
|
|
1481
|
+
status?: string | undefined;
|
|
1482
|
+
teacher?: string | undefined;
|
|
1483
|
+
school?: string | undefined;
|
|
1484
|
+
}) => Promise<{
|
|
1485
|
+
items: any[];
|
|
1486
|
+
pages: number;
|
|
1487
|
+
pageRange: string;
|
|
1488
|
+
} | {
|
|
1489
|
+
item: any;
|
|
1490
|
+
pages: string;
|
|
1491
|
+
pageRange: string;
|
|
1492
|
+
}>;
|
|
1493
|
+
getById: (_id: string | ObjectId) => Promise<TTeachingLoadSlot | null>;
|
|
1494
|
+
deleteById: (_id: string | ObjectId, session?: ClientSession) => Promise<mongodb.UpdateResult<bson.Document>>;
|
|
1495
|
+
delCachedData: () => void;
|
|
1496
|
+
};
|
|
1497
|
+
|
|
1498
|
+
declare function useTeachingLoadSlotController(): {
|
|
1499
|
+
add: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
1500
|
+
updateById: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
1501
|
+
getAllByTeachingLoad: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
1502
|
+
getById: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
1503
|
+
deleteById: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
1504
|
+
getByTeachingLoad: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
1505
|
+
getByTeacher: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
1506
|
+
};
|
|
1507
|
+
|
|
1508
|
+
type TProgram = {
|
|
1509
|
+
_id?: ObjectId;
|
|
1510
|
+
school: ObjectId;
|
|
1511
|
+
schoolName?: string;
|
|
1512
|
+
name: string;
|
|
1513
|
+
code: string;
|
|
1514
|
+
gradeLevels?: string[];
|
|
1515
|
+
description?: string;
|
|
1516
|
+
status: string;
|
|
1517
|
+
createdAt?: string | Date;
|
|
1518
|
+
updatedAt?: string | Date;
|
|
1519
|
+
deletedAt?: string | Date;
|
|
1520
|
+
};
|
|
1521
|
+
declare const schemaProgram: Joi.ObjectSchema<any>;
|
|
1522
|
+
declare const schemaProgramUpdate: Joi.ObjectSchema<any>;
|
|
1523
|
+
declare function modelProgram(value: TProgram): TProgram;
|
|
1524
|
+
|
|
1525
|
+
declare function useProgramRepo(): {
|
|
1526
|
+
createIndexes: () => Promise<void>;
|
|
1527
|
+
add: (value: TProgram, session?: ClientSession) => Promise<ObjectId>;
|
|
1528
|
+
getAll: ({ search, page, limit, sort, status, school, isDefault, }?: {
|
|
1529
|
+
search?: string;
|
|
1530
|
+
page?: number;
|
|
1531
|
+
limit?: number;
|
|
1532
|
+
sort?: Record<string, any>;
|
|
1533
|
+
status?: string;
|
|
1534
|
+
school?: string;
|
|
1535
|
+
isDefault?: boolean;
|
|
1536
|
+
}) => Promise<Record<string, any> | {
|
|
1537
|
+
items: any[];
|
|
1538
|
+
pages: number;
|
|
1539
|
+
pageRange: string;
|
|
1540
|
+
}>;
|
|
1541
|
+
getById: (_id: string | ObjectId) => Promise<TProgram>;
|
|
1542
|
+
getByCode: (code: string, school: string | ObjectId) => Promise<TProgram>;
|
|
1543
|
+
updateFieldById: ({ _id, field, value }?: {
|
|
1544
|
+
_id: string | ObjectId;
|
|
1545
|
+
field: string;
|
|
1546
|
+
value: string | Array<string> | boolean;
|
|
1547
|
+
}, session?: ClientSession) => Promise<string>;
|
|
1548
|
+
deleteById: (_id: string | ObjectId) => Promise<string>;
|
|
1549
|
+
updateById: (_id: string | ObjectId, value: Pick<TProgram, "name" | "code" | "description">) => Promise<string>;
|
|
1550
|
+
};
|
|
1551
|
+
|
|
1552
|
+
declare function useProgramController(): {
|
|
1553
|
+
add: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
1554
|
+
getAll: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
1555
|
+
getById: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
1556
|
+
getByCode: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
1557
|
+
updateField: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
1558
|
+
deleteById: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
1559
|
+
updateById: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
1560
|
+
};
|
|
1561
|
+
|
|
1562
|
+
export { MAsset, MBuilding, MBuildingUnit, MCurriculum, MGradeLevel, MLearner, MPersonnel, MPlantilla, MStockCard, TAddress, TAddressInformation, TAsset, TBasicEduCount, TBuilding, TBuildingUnit, TCurriculum, TDivision, TGradeLevel, TLearner, TLearnerInfo, TLearningModality, TParentGuardianInfo, TPersonContact, TPersonnel, TPlantilla, TProgram, TRegion, TReturningLearnerInfo, TSchool, TSection, TSectionPreset, TSectionStudent, TSectionSubject, TSeniorHighInformation, TStockCard, TSubject, TTeachingLoad, TTeachingLoadSlot, allowedSectionStudentStatuses, modelBasicEduCount, modelDivision, modelProgram, modelRegion, modelSchool, modelSection, modelSectionPreset, modelSectionStudent, modelSectionSubject, modelSubject, modelTeachingLoad, modelTeachingLoadSlot, schemaAsset, schemaAssetUpdateOption, schemaBasicEduCount, schemaBuilding, schemaBuildingUnit, schemaCurriculum, schemaDivision, schemaDivisionUpdate, schemaEnrollment, schemaGenerateSections, schemaGradeLevel, schemaPersonnel, schemaPlantilla, schemaProgram, schemaProgramUpdate, schemaRegion, schemaSchool, schemaSchoolUpdate, schemaSection, schemaSectionPreset, schemaSectionStudent, schemaSectionSubject, schemaSectionSubjectSetup, schemaStockCard, schemaSubject, schemaSubjectAdd, schemaTeachingLoad, schemaTeachingLoadSlot, schemaUpdateOptions, schemaUpdateStatus, useAssetController, useAssetRepo, useBasicEduCountRepo, useBuildingController, useBuildingRepo, useBuildingService, useBuildingUnitController, useBuildingUnitRepo, useBuildingUnitService, useCurriculumController, useCurriculumRepo, useDivisionController, useDivisionRepo, useDivisionService, useEnrollmentController, useEnrollmentRepo, useEnrollmentService, useGradeLevelController, useGradeLevelRepo, useLearnerController, useLearnerRepo, usePersonnelController, usePersonnelRepo, usePlantillaController, usePlantillaRepo, usePlantillaService, useProgramController, useProgramRepo, useRegionController, useRegionRepo, useSchoolController, useSchoolRepo, useSchoolService, useSectionController, useSectionPresetController, useSectionPresetRepo, useSectionRepo, useSectionStudentController, useSectionStudentRepo, useSectionSubjectController, useSectionSubjectRepo, useSectionSubjectService, useStockCardController, useStockCardRepository, useStockCardService, useSubjectController, useSubjectRepo, useSubjectService, useTeachingLoadController, useTeachingLoadRepo, useTeachingLoadSlotController, useTeachingLoadSlotRepo };
|