@7365admin1/module-hygiene 4.1.0 → 4.3.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.3.0
4
+
5
+ ### Minor Changes
6
+
7
+ - Update Hygiene Check Out Item Module
8
+
9
+ ## 4.2.0
10
+
11
+ ### Minor Changes
12
+
13
+ - Hygiene Check Out Item - Initial Release
14
+
3
15
  ## 4.1.0
4
16
 
5
17
  ### Minor Changes
package/dist/index.d.ts CHANGED
@@ -387,7 +387,7 @@ declare function useStockRepository(): {
387
387
  };
388
388
 
389
389
  declare function useStockService(): {
390
- createStock: (value: TStockCreateService, out?: boolean) => Promise<bson.ObjectId>;
390
+ createStock: (value: TStockCreateService, out?: boolean, session?: ClientSession) => Promise<bson.ObjectId>;
391
391
  };
392
392
 
393
393
  declare function useStockController(): {
@@ -395,41 +395,41 @@ declare function useStockController(): {
395
395
  getStocksBySupplyId: (req: Request, res: Response, next: NextFunction) => Promise<void>;
396
396
  };
397
397
 
398
- declare const allowedRequestItemStatus: string[];
399
- type TRequestItem = {
398
+ declare const allowedCheckOutItemStatus: string[];
399
+ type TCheckOutItem = {
400
400
  _id?: ObjectId;
401
401
  site: string | ObjectId;
402
402
  supply: string | ObjectId;
403
403
  supplyName: string;
404
404
  qty: number;
405
- remarks?: string;
405
+ attachment?: string[];
406
406
  createdBy: string | ObjectId;
407
407
  createdByName: string;
408
- status?: (typeof allowedRequestItemStatus)[number];
408
+ status?: (typeof allowedCheckOutItemStatus)[number];
409
409
  createdAt?: string;
410
410
  updatedAt?: string;
411
411
  deletedAt?: string;
412
412
  };
413
- type TRequestItemCreate = Pick<TRequestItem, "site" | "supply" | "supplyName" | "qty" | "createdBy" | "createdByName">;
414
- type TRequestItemCreateService = Pick<TRequestItem, "site" | "supply" | "qty" | "createdBy">;
415
- type TRequestItemCreateByBatchService = Pick<TRequestItem, "site" | "createdBy"> & {
416
- items: Pick<TRequestItem, "supply" | "qty">[];
413
+ type TCheckOutItemCreate = Pick<TCheckOutItem, "site" | "supply" | "supplyName" | "qty" | "attachment" | "createdBy" | "createdByName">;
414
+ type TCheckOutItemCreateService = Pick<TCheckOutItem, "site" | "supply" | "qty" | "attachment" | "createdBy">;
415
+ type TCheckOutItemCreateByBatchService = Pick<TCheckOutItem, "site" | "attachment" | "createdBy"> & {
416
+ items: Pick<TCheckOutItem, "supply" | "qty">[];
417
417
  };
418
- type TRequestItemGetQuery = {
418
+ type TCheckOutItemGetQuery = {
419
419
  page?: number;
420
420
  limit?: number;
421
421
  search?: string;
422
- } & Pick<TRequestItem, "site">;
423
- type TRequestItemGetById = Pick<TRequestItem, "_id" | "site" | "supply" | "supplyName" | "qty" | "status"> & {
422
+ } & Pick<TCheckOutItem, "site">;
423
+ type TCheckOutItemGetById = Pick<TCheckOutItem, "_id" | "site" | "supply" | "supplyName" | "qty" | "status"> & {
424
424
  unitOfMeasurement?: string;
425
425
  };
426
- declare const requestItemSchema: Joi.ObjectSchema<any>;
427
- declare function MRequestItem(value: TRequestItemCreate): {
426
+ declare const checkOutItemSchema: Joi.ObjectSchema<any>;
427
+ declare function MCheckOutItem(value: TCheckOutItemCreate): {
428
428
  site: string | ObjectId;
429
429
  supply: string | ObjectId;
430
430
  supplyName: string;
431
431
  qty: number;
432
- remarks: string;
432
+ attachment: string[];
433
433
  createdBy: string | ObjectId;
434
434
  createdByName: string;
435
435
  status: string;
@@ -438,30 +438,25 @@ declare function MRequestItem(value: TRequestItemCreate): {
438
438
  deletedAt: string;
439
439
  };
440
440
 
441
- declare function useRequestItemRepository(): {
441
+ declare function useCheckOutItemRepository(): {
442
442
  createIndex: () => Promise<void>;
443
443
  createTextIndex: () => Promise<void>;
444
- createRequestItem: (value: TRequestItemCreate, session?: ClientSession) => Promise<ObjectId>;
445
- getRequestItems: ({ page, limit, search, site, }: TRequestItemGetQuery) => Promise<{}>;
446
- getRequestItemById: (_id: string | ObjectId, session?: ClientSession) => Promise<TRequestItemGetById>;
447
- approveRequestItem: (_id: string | ObjectId, remarks?: string, session?: ClientSession) => Promise<number>;
448
- disapproveRequestItem: (_id: string | ObjectId, remarks?: string, session?: ClientSession) => Promise<number>;
444
+ createCheckOutItem: (value: TCheckOutItemCreate, session?: ClientSession) => Promise<ObjectId>;
445
+ getCheckOutItems: ({ page, limit, search, site, }: TCheckOutItemGetQuery) => Promise<{}>;
446
+ getCheckOutItemById: (_id: string | ObjectId, session?: ClientSession) => Promise<TCheckOutItemGetById>;
447
+ completeCheckOutItem: (_id: string | ObjectId, session?: ClientSession) => Promise<number>;
449
448
  };
450
449
 
451
- declare function useRequestItemService(): {
452
- createRequestItem: (value: TRequestItemCreateService) => Promise<bson.ObjectId>;
453
- createRequestItemByBatch: (value: TRequestItemCreateByBatchService) => Promise<bson.ObjectId[]>;
454
- approveRequestItem: (id: string, remarks?: string) => Promise<bson.ObjectId>;
455
- disapproveRequestItem: (id: string, remarks?: string) => Promise<number>;
450
+ declare function useCheckOutItemService(): {
451
+ createCheckOutItem: (value: TCheckOutItemCreateService) => Promise<bson.ObjectId>;
452
+ createCheckOutItemByBatch: (value: TCheckOutItemCreateByBatchService) => Promise<bson.ObjectId[]>;
456
453
  };
457
454
 
458
- declare function useRequestItemController(): {
459
- createRequestItem: (req: Request, res: Response, next: NextFunction) => Promise<void>;
460
- createRequestItemByBatch: (req: Request, res: Response, next: NextFunction) => Promise<void>;
461
- getRequestItems: (req: Request, res: Response, next: NextFunction) => Promise<void>;
462
- getRequestItemById: (req: Request, res: Response, next: NextFunction) => Promise<void>;
463
- approveRequestItem: (req: Request, res: Response, next: NextFunction) => Promise<void>;
464
- disapproveRequestItem: (req: Request, res: Response, next: NextFunction) => Promise<void>;
455
+ declare function useCheckOutItemController(): {
456
+ createCheckOutItem: (req: Request, res: Response, next: NextFunction) => Promise<void>;
457
+ createCheckOutItemByBatch: (req: Request, res: Response, next: NextFunction) => Promise<void>;
458
+ getCheckOutItems: (req: Request, res: Response, next: NextFunction) => Promise<void>;
459
+ getCheckOutItemById: (req: Request, res: Response, next: NextFunction) => Promise<void>;
465
460
  };
466
461
 
467
462
  type TScheduleTask = {
@@ -541,4 +536,4 @@ declare function useScheduleTaskController(): {
541
536
  updateScheduleTask: (req: Request, res: Response, next: NextFunction) => Promise<void>;
542
537
  };
543
538
 
544
- export { MArea, MAreaChecklist, MParentChecklist, MRequestItem, MScheduleTask, MStock, MSupply, MUnit, TArea, TAreaChecklist, TAreaChecklistBatchCreate, TAreaChecklistCreate, TAreaChecklistUnits, TAreaChecklistUnitsUpdate, TAreaChecklistUpdate, TAreaCreate, TAreaGetQuery, TAreaUnits, TAreaUpdate, TAreaUpdateChecklist, TCleaningScheduleArea, TCleaningScheduleAreaGetQuery, TGetStocksQuery, TParentChecklist, TParentChecklistGetQuery, TRequestItem, TRequestItemCreate, TRequestItemCreateByBatchService, TRequestItemCreateService, TRequestItemGetById, TRequestItemGetQuery, TScheduleTask, TScheduleTaskCreate, TScheduleTaskGetById, TScheduleTaskGetQuery, TScheduleTaskUpdate, TStock, TStockCreate, TStockCreateService, TSupply, TSupplyCreate, TSupplyGetById, TSupplyGetQuery, TSupplyUpdate, TUnit, TUnitCreate, TUnitGetQuery, TUnitUpdate, allowedChecklistStatus, allowedPeriods, allowedRequestItemStatus, allowedStatus, allowedTypes, areaChecklistSchema, areaSchema, parentChecklistSchema, requestItemSchema, scheduleTaskSchema, stockSchema, supplySchema, unitSchema, useAreaChecklistController, useAreaChecklistRepo, useAreaChecklistService, useAreaController, useAreaRepo, useAreaService, useHygieneDashboardController, useHygieneDashboardRepository, useParentChecklistController, useParentChecklistRepo, useRequestItemController, useRequestItemRepository, useRequestItemService, useScheduleTaskController, useScheduleTaskRepository, useScheduleTaskService, useStockController, useStockRepository, useStockService, useSupplyController, useSupplyRepository, useUnitController, useUnitRepository, useUnitService };
539
+ export { MArea, MAreaChecklist, MCheckOutItem, MParentChecklist, MScheduleTask, MStock, MSupply, MUnit, TArea, TAreaChecklist, TAreaChecklistBatchCreate, TAreaChecklistCreate, TAreaChecklistUnits, TAreaChecklistUnitsUpdate, TAreaChecklistUpdate, TAreaCreate, TAreaGetQuery, TAreaUnits, TAreaUpdate, TAreaUpdateChecklist, TCheckOutItem, TCheckOutItemCreate, TCheckOutItemCreateByBatchService, TCheckOutItemCreateService, TCheckOutItemGetById, TCheckOutItemGetQuery, TCleaningScheduleArea, TCleaningScheduleAreaGetQuery, TGetStocksQuery, TParentChecklist, TParentChecklistGetQuery, TScheduleTask, TScheduleTaskCreate, TScheduleTaskGetById, TScheduleTaskGetQuery, TScheduleTaskUpdate, TStock, TStockCreate, TStockCreateService, TSupply, TSupplyCreate, TSupplyGetById, TSupplyGetQuery, TSupplyUpdate, TUnit, TUnitCreate, TUnitGetQuery, TUnitUpdate, allowedCheckOutItemStatus, allowedChecklistStatus, allowedPeriods, allowedStatus, allowedTypes, areaChecklistSchema, areaSchema, checkOutItemSchema, parentChecklistSchema, scheduleTaskSchema, stockSchema, supplySchema, unitSchema, useAreaChecklistController, useAreaChecklistRepo, useAreaChecklistService, useAreaController, useAreaRepo, useAreaService, useCheckOutItemController, useCheckOutItemRepository, useCheckOutItemService, useHygieneDashboardController, useHygieneDashboardRepository, useParentChecklistController, useParentChecklistRepo, useScheduleTaskController, useScheduleTaskRepository, useScheduleTaskService, useStockController, useStockRepository, useStockService, useSupplyController, useSupplyRepository, useUnitController, useUnitRepository, useUnitService };