@eeplatform/basic-edu 1.5.2 → 1.6.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 CHANGED
@@ -1,5 +1,11 @@
1
1
  # @eeplatform/basic-edu
2
2
 
3
+ ## 1.6.0
4
+
5
+ ### Minor Changes
6
+
7
+ - cd0cdf3: Section management initial release
8
+
3
9
  ## 1.5.2
4
10
 
5
11
  ### Patch Changes
package/dist/index.d.ts CHANGED
@@ -847,6 +847,7 @@ declare function useLearnerRepo(): {
847
847
  getById: (_id: string | ObjectId, status?: string) => Promise<TLearner | null>;
848
848
  getByGradeLevel: (value: {
849
849
  school: string | ObjectId;
850
+ schoolYear?: string;
850
851
  gradeLevel: string;
851
852
  status?: string;
852
853
  limit?: number;
@@ -1012,4 +1013,304 @@ declare function useSectionStudentRepo(): {
1012
1013
  add: (value: TSectionStudent, session?: ClientSession) => Promise<bson.ObjectId>;
1013
1014
  };
1014
1015
 
1015
- export { MAsset, MCurriculum, MCurriculumSubject, MGradeLevel, MLearner, MPlantilla, MStockCard, TAddress, TAddressInformation, TAsset, TBasicEduCount, TCurriculum, TCurriculumSubject, TDivision, TGradeLevel, TLearner, TLearnerInfo, TLearningModality, TParentGuardianInfo, TPersonContact, TPlantilla, TRegion, TReturningLearnerInfo, TSchool, TSection, TSectionPreset, TSectionStudent, TSeniorHighInformation, TStockCard, allowedSectionStudentStatuses, modelBasicEduCount, modelDivision, modelRegion, modelSchool, modelSection, modelSectionPreset, modelSectionStudent, schemaAsset, schemaAssetUpdateOption, schemaBasicEduCount, schemaCurriculum, schemaCurriculumSubject, schemaCurriculumSubjectAdd, schemaDivision, schemaDivisionUpdate, schemaEnrollment, schemaGenerateSections, schemaGradeLevel, schemaPlantilla, schemaRegion, schemaSchool, schemaSchoolUpdate, schemaSection, schemaSectionPreset, schemaSectionStudent, schemaStockCard, schemaUpdateStatus, useAssetController, useAssetRepo, useBasicEduCountRepo, useCurriculumController, useCurriculumRepo, useCurriculumSubjectController, useCurriculumSubjectRepo, useCurriculumSubjectService, useDivisionController, useDivisionRepo, useDivisionService, useEnrollmentController, useEnrollmentRepo, useEnrollmentService, useGradeLevelController, useGradeLevelRepo, useLearnerController, useLearnerRepo, usePlantillaController, usePlantillaRepo, usePlantillaService, useRegionController, useRegionRepo, useSchoolController, useSchoolRepo, useSchoolService, useSectionController, useSectionPresetController, useSectionPresetRepo, useSectionRepo, useSectionStudentRepo, useStockCardController, useStockCardRepository, useStockCardService };
1016
+ type TSectionSubject = {
1017
+ _id?: ObjectId;
1018
+ school: ObjectId | string;
1019
+ schoolName?: string;
1020
+ section: ObjectId | string;
1021
+ sectionName: string;
1022
+ gradeLevel: string;
1023
+ educationLevel: string;
1024
+ schoolYear: string;
1025
+ subjectCode: string;
1026
+ subjectName: string;
1027
+ teacher?: ObjectId | string;
1028
+ teacherName?: string;
1029
+ classroom?: string;
1030
+ classroomName?: string;
1031
+ daysOfWeek: string[];
1032
+ schedule?: string;
1033
+ sessionDuration?: number;
1034
+ sessionFrequency?: number;
1035
+ status?: string;
1036
+ createdAt?: string | Date;
1037
+ updatedAt?: string | Date;
1038
+ deletedAt?: string | Date;
1039
+ };
1040
+ declare const schemaSectionSubject: Joi.ObjectSchema<any>;
1041
+ declare const schemaSectionSubjectSetup: Joi.ObjectSchema<any>;
1042
+ declare function modelSectionSubject(value: TSectionSubject): TSectionSubject;
1043
+
1044
+ declare function useSectionSubjectRepo(): {
1045
+ createIndexes: () => Promise<void>;
1046
+ add: (value: TSectionSubject, session?: ClientSession) => Promise<ObjectId>;
1047
+ getAll: ({ search, page, limit, sort, status, school, section, teacher, schoolYear, gradeLevel, subjectCode, }?: {
1048
+ search?: string | undefined;
1049
+ page?: number | undefined;
1050
+ limit?: number | undefined;
1051
+ sort?: {} | undefined;
1052
+ status?: string | undefined;
1053
+ school?: string | undefined;
1054
+ section?: string | undefined;
1055
+ teacher?: string | undefined;
1056
+ schoolYear?: string | undefined;
1057
+ gradeLevel?: string | undefined;
1058
+ subjectCode?: string | undefined;
1059
+ }) => Promise<Record<string, any> | {
1060
+ items: any[];
1061
+ pages: number;
1062
+ pageRange: string;
1063
+ }>;
1064
+ getById: (_id: string | ObjectId) => Promise<TSectionSubject>;
1065
+ getBySection: (section: string | ObjectId) => Promise<TSectionSubject[]>;
1066
+ getByTeacher: (teacher: string | ObjectId) => Promise<TSectionSubject[]>;
1067
+ getBySchool: (school: string | ObjectId) => Promise<TSectionSubject[]>;
1068
+ updateFieldById: ({ _id, field, value }?: {
1069
+ _id: string | ObjectId;
1070
+ field: string;
1071
+ value: string;
1072
+ }, session?: ClientSession) => Promise<string>;
1073
+ setupById: (_id: string | ObjectId, value: Pick<TSectionSubject, "teacher" | "teacherName" | "schedule" | "daysOfWeek">, session?: ClientSession) => Promise<string>;
1074
+ deleteById: (_id: string | ObjectId) => Promise<string>;
1075
+ };
1076
+
1077
+ declare function useSectionSubjectService(): {
1078
+ add: (value: TSectionSubject) => Promise<string>;
1079
+ };
1080
+
1081
+ declare function useSectionSubjectController(): {
1082
+ add: (req: Request, res: Response, next: NextFunction) => Promise<void>;
1083
+ getAll: (req: Request, res: Response, next: NextFunction) => Promise<void>;
1084
+ getById: (req: Request, res: Response, next: NextFunction) => Promise<void>;
1085
+ getBySection: (req: Request, res: Response, next: NextFunction) => Promise<void>;
1086
+ getByTeacher: (req: Request, res: Response, next: NextFunction) => Promise<void>;
1087
+ getBySchool: (req: Request, res: Response, next: NextFunction) => Promise<void>;
1088
+ updateField: (req: Request, res: Response, next: NextFunction) => Promise<void>;
1089
+ setupById: (req: Request, res: Response, next: NextFunction) => Promise<void>;
1090
+ deleteById: (req: Request, res: Response, next: NextFunction) => Promise<void>;
1091
+ };
1092
+
1093
+ type TBuilding = {
1094
+ _id?: ObjectId;
1095
+ school: ObjectId;
1096
+ serial?: string;
1097
+ name: string;
1098
+ levels: number;
1099
+ createdAt?: Date | string;
1100
+ updatedAt?: Date | string;
1101
+ deletedAt?: Date | string;
1102
+ status?: string;
1103
+ };
1104
+ declare const schemaBuilding: Joi.ObjectSchema<any>;
1105
+ type TBuildingUnit = {
1106
+ _id?: ObjectId;
1107
+ school: ObjectId | string;
1108
+ name?: string;
1109
+ building: ObjectId | string;
1110
+ buildingName?: string;
1111
+ level: number;
1112
+ category: string;
1113
+ type: string;
1114
+ seating_capacity: number;
1115
+ standing_capacity: number;
1116
+ description?: string;
1117
+ unit_of_measurement: string;
1118
+ area: number;
1119
+ status: string;
1120
+ createdAt?: Date | string;
1121
+ updatedAt?: Date | string;
1122
+ deletedAt?: Date | string;
1123
+ };
1124
+ declare const schemaBuildingUnit: Joi.ObjectSchema<any>;
1125
+ declare const schemaUpdateOptions: Joi.ObjectSchema<any>;
1126
+ declare function MBuilding(value: TBuilding): {
1127
+ _id: ObjectId | undefined;
1128
+ school: ObjectId;
1129
+ serial: string;
1130
+ name: string;
1131
+ levels: number;
1132
+ status: string;
1133
+ createdAt: string | Date;
1134
+ updatedAt: string | Date;
1135
+ deletedAt: string | Date;
1136
+ };
1137
+ declare function MBuildingUnit(value: TBuildingUnit): {
1138
+ _id: ObjectId | undefined;
1139
+ school: ObjectId;
1140
+ name: string;
1141
+ building: ObjectId;
1142
+ buildingName: string;
1143
+ level: number;
1144
+ category: string;
1145
+ type: string;
1146
+ seating_capacity: number;
1147
+ standing_capacity: number;
1148
+ description: string;
1149
+ unit_of_measurement: string;
1150
+ area: number;
1151
+ status: string;
1152
+ createdAt: string | Date;
1153
+ updatedAt: string | Date;
1154
+ deletedAt: string | Date;
1155
+ };
1156
+
1157
+ declare function useBuildingRepo(): {
1158
+ createIndexes: () => Promise<void>;
1159
+ add: (value: TBuilding, session?: ClientSession) => Promise<ObjectId>;
1160
+ getAll: ({ search, page, limit, sort, school, status, }?: {
1161
+ search?: string | undefined;
1162
+ page?: number | undefined;
1163
+ limit?: number | undefined;
1164
+ sort?: {} | undefined;
1165
+ school?: string | undefined;
1166
+ status?: string | undefined;
1167
+ }) => Promise<Record<string, any> | {
1168
+ items: any[];
1169
+ pages: number;
1170
+ pageRange: string;
1171
+ }>;
1172
+ getById: (_id: string | ObjectId) => Promise<TBuilding | null>;
1173
+ updateById: (_id: ObjectId | string, value: {
1174
+ name: string;
1175
+ serial: string;
1176
+ levels: number;
1177
+ }, session?: ClientSession) => Promise<mongodb.UpdateResult<bson.Document>>;
1178
+ deleteById: (_id: string | ObjectId, session?: ClientSession) => Promise<mongodb.UpdateResult<bson.Document>>;
1179
+ };
1180
+
1181
+ declare function useBuildingService(): {
1182
+ updateById: (id: string, data: {
1183
+ name: string;
1184
+ levels: number;
1185
+ serial: string;
1186
+ }) => Promise<mongodb.UpdateResult<bson.Document>>;
1187
+ deleteById: (id: string) => Promise<string>;
1188
+ };
1189
+
1190
+ declare function useBuildingController(): {
1191
+ createBuilding: (req: Request, res: Response, next: NextFunction) => Promise<void>;
1192
+ getAll: (req: Request, res: Response, next: NextFunction) => Promise<void>;
1193
+ getById: (req: Request, res: Response, next: NextFunction) => Promise<void>;
1194
+ updateById: (req: Request, res: Response, next: NextFunction) => Promise<void>;
1195
+ deleteById: (req: Request, res: Response, next: NextFunction) => Promise<void>;
1196
+ };
1197
+
1198
+ declare function useBuildingUnitRepo(): {
1199
+ createIndexes: () => Promise<void>;
1200
+ add: (value: TBuildingUnit, session?: ClientSession) => Promise<ObjectId>;
1201
+ getAll: ({ search, page, limit, sort, school, building, status, }?: {
1202
+ search?: string | undefined;
1203
+ page?: number | undefined;
1204
+ limit?: number | undefined;
1205
+ sort?: {} | undefined;
1206
+ school?: string | undefined;
1207
+ building?: string | undefined;
1208
+ status?: string | undefined;
1209
+ }) => Promise<Record<string, any> | {
1210
+ items: any[];
1211
+ pages: number;
1212
+ pageRange: string;
1213
+ }>;
1214
+ getById: (_id: string | ObjectId) => Promise<TBuildingUnit>;
1215
+ getByBuildingLevel: (building: string | ObjectId, level: number) => Promise<TBuildingUnit | null>;
1216
+ updateById: (_id: string | ObjectId, value: {
1217
+ name?: string;
1218
+ building?: string;
1219
+ level?: number;
1220
+ category?: string;
1221
+ type?: string;
1222
+ seating_capacity?: number;
1223
+ standing_capacity?: number;
1224
+ area?: number;
1225
+ }, session?: ClientSession) => Promise<mongodb.UpdateResult<bson.Document>>;
1226
+ getByBuilding: (building: string | ObjectId) => Promise<TBuildingUnit | null>;
1227
+ deleteById: (_id: string | ObjectId, session?: ClientSession) => Promise<string>;
1228
+ updateByBuildingId: (building: string | ObjectId, value: Partial<Pick<TBuildingUnit, "buildingName">>, session?: ClientSession) => Promise<mongodb.UpdateResult<bson.Document>>;
1229
+ };
1230
+
1231
+ declare function useBuildingUnitService(): {
1232
+ add: (value: {
1233
+ building: TBuildingUnit;
1234
+ qty: number;
1235
+ }) => Promise<string>;
1236
+ };
1237
+
1238
+ declare function useBuildingUnitController(): {
1239
+ add: (req: Request, res: Response, next: NextFunction) => Promise<void>;
1240
+ getAll: (req: Request, res: Response, next: NextFunction) => Promise<void>;
1241
+ getById: (req: Request, res: Response, next: NextFunction) => Promise<void>;
1242
+ updateById: (req: Request, res: Response, next: NextFunction) => Promise<void>;
1243
+ deleteById: (req: Request, res: Response, next: NextFunction) => Promise<void>;
1244
+ };
1245
+
1246
+ type TPersonnel = {
1247
+ _id?: ObjectId;
1248
+ school: string | ObjectId;
1249
+ schoolName?: string;
1250
+ firstName: string;
1251
+ lastName: string;
1252
+ middleName?: string;
1253
+ suffix?: string;
1254
+ title?: string;
1255
+ classification: string;
1256
+ status?: string;
1257
+ createdAt?: string | Date;
1258
+ updatedAt?: string | Date;
1259
+ deletedAt?: string | Date;
1260
+ };
1261
+ declare const schemaPersonnel: Joi.ObjectSchema<any>;
1262
+ declare function MPersonnel(value: TPersonnel): {
1263
+ _id: ObjectId | undefined;
1264
+ school: string | ObjectId;
1265
+ schoolName: string;
1266
+ firstName: string;
1267
+ lastName: string;
1268
+ middleName: string;
1269
+ suffix: string;
1270
+ title: string;
1271
+ classification: string;
1272
+ status: string;
1273
+ createdAt: string | Date;
1274
+ updatedAt: string | Date;
1275
+ deletedAt: string | Date;
1276
+ };
1277
+
1278
+ declare function usePersonnelRepo(): {
1279
+ createIndexes: () => Promise<void>;
1280
+ add: (value: TPersonnel, session?: ClientSession) => Promise<string>;
1281
+ updateById: (_id: ObjectId | string, value: {
1282
+ firstName?: string;
1283
+ lastName?: string;
1284
+ middleName?: string;
1285
+ classification?: string;
1286
+ status?: string;
1287
+ }, session?: ClientSession) => Promise<mongodb.UpdateResult<bson.Document>>;
1288
+ getAll: ({ school, search, page, limit, sort, status, }?: {
1289
+ school?: string | undefined;
1290
+ search?: string | undefined;
1291
+ page?: number | undefined;
1292
+ limit?: number | undefined;
1293
+ sort?: {} | undefined;
1294
+ status?: string | undefined;
1295
+ }) => Promise<Record<string, any> | {
1296
+ items: any[];
1297
+ pages: number;
1298
+ pageRange: string;
1299
+ }>;
1300
+ getById: (_id: string | ObjectId) => Promise<TPersonnel | null>;
1301
+ deleteById: (_id: string | ObjectId, session?: ClientSession) => Promise<mongodb.UpdateResult<bson.Document>>;
1302
+ getByClassification: (classification: string) => Promise<TPersonnel[]>;
1303
+ delCachedData: () => void;
1304
+ };
1305
+
1306
+ declare function usePersonnelController(): {
1307
+ add: (req: Request, res: Response, next: NextFunction) => Promise<void>;
1308
+ updateById: (req: Request, res: Response, next: NextFunction) => Promise<void>;
1309
+ getAll: (req: Request, res: Response, next: NextFunction) => Promise<void>;
1310
+ getAllBySchool: (req: Request, res: Response, next: NextFunction) => Promise<void>;
1311
+ getById: (req: Request, res: Response, next: NextFunction) => Promise<void>;
1312
+ deleteById: (req: Request, res: Response, next: NextFunction) => Promise<void>;
1313
+ getByClassification: (req: Request, res: Response, next: NextFunction) => Promise<void>;
1314
+ };
1315
+
1316
+ export { MAsset, MBuilding, MBuildingUnit, MCurriculum, MCurriculumSubject, MGradeLevel, MLearner, MPersonnel, MPlantilla, MStockCard, TAddress, TAddressInformation, TAsset, TBasicEduCount, TBuilding, TBuildingUnit, TCurriculum, TCurriculumSubject, TDivision, TGradeLevel, TLearner, TLearnerInfo, TLearningModality, TParentGuardianInfo, TPersonContact, TPersonnel, TPlantilla, TRegion, TReturningLearnerInfo, TSchool, TSection, TSectionPreset, TSectionStudent, TSectionSubject, TSeniorHighInformation, TStockCard, allowedSectionStudentStatuses, modelBasicEduCount, modelDivision, modelRegion, modelSchool, modelSection, modelSectionPreset, modelSectionStudent, modelSectionSubject, schemaAsset, schemaAssetUpdateOption, schemaBasicEduCount, schemaBuilding, schemaBuildingUnit, schemaCurriculum, schemaCurriculumSubject, schemaCurriculumSubjectAdd, schemaDivision, schemaDivisionUpdate, schemaEnrollment, schemaGenerateSections, schemaGradeLevel, schemaPersonnel, schemaPlantilla, schemaRegion, schemaSchool, schemaSchoolUpdate, schemaSection, schemaSectionPreset, schemaSectionStudent, schemaSectionSubject, schemaSectionSubjectSetup, schemaStockCard, schemaUpdateOptions, schemaUpdateStatus, useAssetController, useAssetRepo, useBasicEduCountRepo, useBuildingController, useBuildingRepo, useBuildingService, useBuildingUnitController, useBuildingUnitRepo, useBuildingUnitService, useCurriculumController, useCurriculumRepo, useCurriculumSubjectController, useCurriculumSubjectRepo, useCurriculumSubjectService, useDivisionController, useDivisionRepo, useDivisionService, useEnrollmentController, useEnrollmentRepo, useEnrollmentService, useGradeLevelController, useGradeLevelRepo, useLearnerController, useLearnerRepo, usePersonnelController, usePersonnelRepo, usePlantillaController, usePlantillaRepo, usePlantillaService, useRegionController, useRegionRepo, useSchoolController, useSchoolRepo, useSchoolService, useSectionController, useSectionPresetController, useSectionPresetRepo, useSectionRepo, useSectionStudentRepo, useSectionSubjectController, useSectionSubjectRepo, useSectionSubjectService, useStockCardController, useStockCardRepository, useStockCardService };