@eeplatform/core 1.4.4 → 1.4.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/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @eeplatform/core
2
2
 
3
+ ## 1.4.5
4
+
5
+ ### Patch Changes
6
+
7
+ - 8be695c: School Mgmt - Implement add school and bulk school upload
8
+
3
9
  ## 1.4.4
4
10
 
5
11
  ### Patch Changes
package/dist/index.d.ts CHANGED
@@ -2364,16 +2364,17 @@ type TSchool = {
2364
2364
  _id?: ObjectId;
2365
2365
  id: string;
2366
2366
  name: string;
2367
- country: string;
2368
- address: string;
2369
- continuedAddress: string;
2370
- city: string;
2371
- province: string;
2372
- postalCode: string;
2373
- courses: Array<string>;
2374
- principalName: string;
2375
- principalEmail: string;
2376
- principalNumber: string;
2367
+ country?: string;
2368
+ address?: string;
2369
+ continuedAddress?: string;
2370
+ city?: string;
2371
+ province?: string;
2372
+ district?: string;
2373
+ postalCode?: string;
2374
+ courses?: Array<string>;
2375
+ principalName?: string;
2376
+ principalEmail?: string;
2377
+ principalNumber?: string;
2377
2378
  region: string | ObjectId;
2378
2379
  regionName?: string;
2379
2380
  division: string | ObjectId;
@@ -2411,6 +2412,17 @@ declare function useSchoolRepo(): {
2411
2412
  declare function useSchoolService(): {
2412
2413
  register: (value: TSchool) => Promise<string>;
2413
2414
  approve: (id: string) => Promise<string>;
2415
+ add: (value: TSchool) => Promise<string>;
2416
+ addBulk: (file: Express.Multer.File, region: string, division: string) => Promise<{
2417
+ message: string;
2418
+ details: {
2419
+ successful: number;
2420
+ failed: number;
2421
+ total: number;
2422
+ totalSizeMB: number;
2423
+ errors: string[];
2424
+ };
2425
+ }>;
2414
2426
  };
2415
2427
 
2416
2428
  declare function useSchoolController(): {
@@ -2420,6 +2432,7 @@ declare function useSchoolController(): {
2420
2432
  updateStatusById: (req: Request, res: Response, next: NextFunction) => Promise<void>;
2421
2433
  registerSchool: (req: Request, res: Response, next: NextFunction) => Promise<void>;
2422
2434
  approveSchool: (req: Request, res: Response, next: NextFunction) => Promise<void>;
2435
+ addBulk: (req: Request, res: Response, next: NextFunction) => Promise<void>;
2423
2436
  };
2424
2437
 
2425
2438
  type TBuilding = {
@@ -2679,20 +2692,28 @@ type TPlantilla = {
2679
2692
  _id?: ObjectId;
2680
2693
  itemNumber: string;
2681
2694
  positionTitle: string;
2682
- officeAssignmentType: string;
2683
- officeAssignment: string;
2684
- status: string;
2685
- employeeId?: ObjectId;
2686
- createdAt: Date | string;
2695
+ positionCategory: string;
2696
+ salaryGrade: number;
2697
+ step?: number;
2698
+ region?: ObjectId | string;
2699
+ regionName?: string;
2700
+ division?: ObjectId | string;
2701
+ divisionName?: string;
2702
+ incumbent?: string;
2703
+ employee?: string | ObjectId;
2704
+ annualSalary?: number;
2705
+ monthlySalary?: number;
2706
+ status?: string;
2707
+ createdAt?: Date | string;
2687
2708
  updatedAt?: Date | string;
2688
2709
  deletedAt?: Date | string;
2689
2710
  };
2690
- declare const schemaPlantilla: Joi.ObjectSchema<any>;
2711
+ declare const schemaPlantilla: Joi.ObjectSchema<TPlantilla>;
2691
2712
  declare function MPlantilla(data: Partial<TPlantilla>): TPlantilla;
2692
2713
 
2693
2714
  declare function usePlantillaRepo(): {
2694
2715
  createIndexes: () => Promise<void>;
2695
- add: (value: TPlantilla, session?: ClientSession) => Promise<ObjectId>;
2716
+ add: (value: TPlantilla, session?: ClientSession, clearCache?: boolean) => Promise<ObjectId>;
2696
2717
  getAll: ({ search, page, limit, sort, org, status, }?: {
2697
2718
  search?: string | undefined;
2698
2719
  page?: number | undefined;
@@ -2702,8 +2723,9 @@ declare function usePlantillaRepo(): {
2702
2723
  status?: string | undefined;
2703
2724
  }) => Promise<Record<string, any>>;
2704
2725
  getById: (_id: string | ObjectId) => Promise<TPlantilla | null>;
2705
- updateById: (_id: ObjectId | string, value: Partial<Pick<TPlantilla, "employeeId" | "status" | "positionTitle" | "updatedAt">>, session?: ClientSession) => Promise<mongodb.UpdateResult<bson.Document>>;
2726
+ updateById: (_id: ObjectId | string, value: Partial<Pick<TPlantilla, "status" | "positionTitle" | "updatedAt">>, session?: ClientSession) => Promise<mongodb.UpdateResult<bson.Document>>;
2706
2727
  deleteById: (_id: string | ObjectId, session?: ClientSession) => Promise<mongodb.UpdateResult<bson.Document>>;
2728
+ delCachedData: () => void;
2707
2729
  };
2708
2730
 
2709
2731
  declare function usePlantillaController(): {
@@ -2712,6 +2734,7 @@ declare function usePlantillaController(): {
2712
2734
  getPlantillaById: (req: Request, res: Response, next: NextFunction) => Promise<void>;
2713
2735
  updatePlantilla: (req: Request, res: Response, next: NextFunction) => Promise<void>;
2714
2736
  deletePlantilla: (req: Request, res: Response, next: NextFunction) => Promise<void>;
2737
+ bulkAddPlantillas: (req: Request, res: Response, next: NextFunction) => Promise<void>;
2715
2738
  };
2716
2739
 
2717
2740
  declare const MONGO_URI: string;