@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 +12 -0
- package/dist/index.d.ts +29 -34
- package/dist/index.js +194 -254
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +188 -248
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
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
|
|
399
|
-
type
|
|
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
|
-
|
|
405
|
+
attachment?: string[];
|
|
406
406
|
createdBy: string | ObjectId;
|
|
407
407
|
createdByName: string;
|
|
408
|
-
status?: (typeof
|
|
408
|
+
status?: (typeof allowedCheckOutItemStatus)[number];
|
|
409
409
|
createdAt?: string;
|
|
410
410
|
updatedAt?: string;
|
|
411
411
|
deletedAt?: string;
|
|
412
412
|
};
|
|
413
|
-
type
|
|
414
|
-
type
|
|
415
|
-
type
|
|
416
|
-
items: Pick<
|
|
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
|
|
418
|
+
type TCheckOutItemGetQuery = {
|
|
419
419
|
page?: number;
|
|
420
420
|
limit?: number;
|
|
421
421
|
search?: string;
|
|
422
|
-
} & Pick<
|
|
423
|
-
type
|
|
422
|
+
} & Pick<TCheckOutItem, "site">;
|
|
423
|
+
type TCheckOutItemGetById = Pick<TCheckOutItem, "_id" | "site" | "supply" | "supplyName" | "qty" | "status"> & {
|
|
424
424
|
unitOfMeasurement?: string;
|
|
425
425
|
};
|
|
426
|
-
declare const
|
|
427
|
-
declare function
|
|
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
|
-
|
|
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
|
|
441
|
+
declare function useCheckOutItemRepository(): {
|
|
442
442
|
createIndex: () => Promise<void>;
|
|
443
443
|
createTextIndex: () => Promise<void>;
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
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
|
|
452
|
-
|
|
453
|
-
|
|
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
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
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,
|
|
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 };
|