@7365admin1/module-hygiene 4.21.0 → 4.23.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,17 @@
1
1
  # @7365admin1/module-hygiene
2
2
 
3
+ ## 4.23.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 5119980: Update module hygiene package
8
+
9
+ ## 4.22.0
10
+
11
+ ### Minor Changes
12
+
13
+ - Update package version
14
+
3
15
  ## 4.21.0
4
16
 
5
17
  ### Minor Changes
package/dist/index.d.ts CHANGED
@@ -1,8 +1,8 @@
1
1
  import * as mongodb from 'mongodb';
2
2
  import { ObjectId, ClientSession } from 'mongodb';
3
+ import { TAppServiceType, AppServiceType } from '@7365admin1/core';
3
4
  import { Request, Response, NextFunction } from 'express';
4
5
  import Joi from 'joi';
5
- import { TAppServiceType, AppServiceType } from '@7365admin1/core';
6
6
  import * as bson from 'bson';
7
7
 
8
8
  declare const allowedTypes: string[];
@@ -10,19 +10,41 @@ declare const allowedStatus: string[];
10
10
  declare const allowedPeriods: string[];
11
11
 
12
12
  declare function useHygieneDashboardRepository(): {
13
- getHygieneDashboard: ({ site, feedbackPeriod, commonAreaPeriod, toiletAreaPeriod, scheduleTaskPeriod, supplyPeriod, requestItemPeriod, }: {
13
+ getHygieneDashboard: ({ site, serviceType, period, }: {
14
+ site: string | ObjectId;
15
+ serviceType: TAppServiceType;
16
+ period?: string | undefined;
17
+ }) => Promise<{}>;
18
+ getWeeklyActivity: ({ site, serviceType, }: {
14
19
  site: string | ObjectId;
15
- feedbackPeriod?: string | undefined;
16
- commonAreaPeriod?: string | undefined;
17
- toiletAreaPeriod?: string | undefined;
18
- scheduleTaskPeriod?: string | undefined;
19
- supplyPeriod?: string | undefined;
20
- requestItemPeriod?: string | undefined;
20
+ serviceType: TAppServiceType;
21
+ }) => Promise<{}>;
22
+ getTodayTaskSchedule: ({ site, serviceType, page, limit, }: {
23
+ site: string | ObjectId;
24
+ serviceType: TAppServiceType;
25
+ page?: number | undefined;
26
+ limit?: number | undefined;
27
+ }) => Promise<{}>;
28
+ getStaffAttendance: ({ site, serviceType, page, limit, }: {
29
+ site: string | ObjectId;
30
+ serviceType: TAppServiceType;
31
+ page?: number | undefined;
32
+ limit?: number | undefined;
33
+ }) => Promise<{}>;
34
+ getRecentFeedbacks: ({ site, serviceType, page, limit, }: {
35
+ site: string | ObjectId;
36
+ serviceType: TAppServiceType;
37
+ page?: number | undefined;
38
+ limit?: number | undefined;
21
39
  }) => Promise<{}>;
22
40
  };
23
41
 
24
42
  declare function useHygieneDashboardController(): {
25
43
  getHygieneDashboard: (req: Request, res: Response, next: NextFunction) => Promise<void>;
44
+ getWeeklyActivity: (req: Request, res: Response, next: NextFunction) => Promise<void>;
45
+ getTodayTaskSchedule: (req: Request, res: Response, next: NextFunction) => Promise<void>;
46
+ getStaffAttendance: (req: Request, res: Response, next: NextFunction) => Promise<void>;
47
+ getRecentFeedbacks: (req: Request, res: Response, next: NextFunction) => Promise<void>;
26
48
  };
27
49
 
28
50
  type TAreaUnits = {
@@ -387,19 +409,20 @@ type TSupply = {
387
409
  name: string;
388
410
  unitOfMeasurement: string;
389
411
  qty: number;
412
+ attachment?: string;
390
413
  status?: "active" | "deleted";
391
414
  createdAt?: string;
392
415
  updatedAt?: string;
393
416
  deletedAt?: string;
394
417
  };
395
- type TSupplyCreate = Pick<TSupply, "site" | "serviceType" | "name" | "unitOfMeasurement">;
418
+ type TSupplyCreate = Pick<TSupply, "site" | "serviceType" | "name" | "unitOfMeasurement" | "attachment">;
396
419
  type TSupplyGetQuery = {
397
420
  page?: number;
398
421
  limit?: number;
399
422
  search?: string;
400
423
  } & Pick<TSupply, "site" | "serviceType">;
401
- type TSupplyGetById = Pick<TSupply, "_id" | "name" | "unitOfMeasurement" | "qty">;
402
- type TSupplyUpdate = Partial<Pick<TSupply, "name" | "unitOfMeasurement" | "qty">>;
424
+ type TSupplyGetById = Pick<TSupply, "_id" | "name" | "unitOfMeasurement" | "qty" | "attachment">;
425
+ type TSupplyUpdate = Partial<Pick<TSupply, "name" | "unitOfMeasurement" | "qty" | "attachment">>;
403
426
  declare const supplySchema: Joi.ObjectSchema<any>;
404
427
  declare function MSupply(value: TSupplyCreate): {
405
428
  site: string | ObjectId;
@@ -407,6 +430,7 @@ declare function MSupply(value: TSupplyCreate): {
407
430
  name: string;
408
431
  unitOfMeasurement: string;
409
432
  qty: number;
433
+ attachment: string | undefined;
410
434
  status: string;
411
435
  createdAt: string;
412
436
  updatedAt: string;