@7365admin1/module-hygiene 4.2.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 +6 -0
- package/dist/index.d.ts +6 -74
- package/dist/index.js +279 -877
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +296 -897
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -395,75 +395,6 @@ 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 = {
|
|
400
|
-
_id?: ObjectId;
|
|
401
|
-
site: string | ObjectId;
|
|
402
|
-
supply: string | ObjectId;
|
|
403
|
-
supplyName: string;
|
|
404
|
-
qty: number;
|
|
405
|
-
remarks?: string;
|
|
406
|
-
createdBy: string | ObjectId;
|
|
407
|
-
createdByName: string;
|
|
408
|
-
status?: (typeof allowedRequestItemStatus)[number];
|
|
409
|
-
createdAt?: string;
|
|
410
|
-
updatedAt?: string;
|
|
411
|
-
deletedAt?: string;
|
|
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">[];
|
|
417
|
-
};
|
|
418
|
-
type TRequestItemGetQuery = {
|
|
419
|
-
page?: number;
|
|
420
|
-
limit?: number;
|
|
421
|
-
search?: string;
|
|
422
|
-
} & Pick<TRequestItem, "site">;
|
|
423
|
-
type TRequestItemGetById = Pick<TRequestItem, "_id" | "site" | "supply" | "supplyName" | "qty" | "status"> & {
|
|
424
|
-
unitOfMeasurement?: string;
|
|
425
|
-
};
|
|
426
|
-
declare const requestItemSchema: Joi.ObjectSchema<any>;
|
|
427
|
-
declare function MRequestItem(value: TRequestItemCreate): {
|
|
428
|
-
site: string | ObjectId;
|
|
429
|
-
supply: string | ObjectId;
|
|
430
|
-
supplyName: string;
|
|
431
|
-
qty: number;
|
|
432
|
-
remarks: string;
|
|
433
|
-
createdBy: string | ObjectId;
|
|
434
|
-
createdByName: string;
|
|
435
|
-
status: string;
|
|
436
|
-
createdAt: string;
|
|
437
|
-
updatedAt: string;
|
|
438
|
-
deletedAt: string;
|
|
439
|
-
};
|
|
440
|
-
|
|
441
|
-
declare function useRequestItemRepository(): {
|
|
442
|
-
createIndex: () => Promise<void>;
|
|
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>;
|
|
449
|
-
};
|
|
450
|
-
|
|
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>;
|
|
456
|
-
};
|
|
457
|
-
|
|
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>;
|
|
465
|
-
};
|
|
466
|
-
|
|
467
398
|
declare const allowedCheckOutItemStatus: string[];
|
|
468
399
|
type TCheckOutItem = {
|
|
469
400
|
_id?: ObjectId;
|
|
@@ -471,7 +402,7 @@ type TCheckOutItem = {
|
|
|
471
402
|
supply: string | ObjectId;
|
|
472
403
|
supplyName: string;
|
|
473
404
|
qty: number;
|
|
474
|
-
attachment?: string;
|
|
405
|
+
attachment?: string[];
|
|
475
406
|
createdBy: string | ObjectId;
|
|
476
407
|
createdByName: string;
|
|
477
408
|
status?: (typeof allowedCheckOutItemStatus)[number];
|
|
@@ -481,8 +412,8 @@ type TCheckOutItem = {
|
|
|
481
412
|
};
|
|
482
413
|
type TCheckOutItemCreate = Pick<TCheckOutItem, "site" | "supply" | "supplyName" | "qty" | "attachment" | "createdBy" | "createdByName">;
|
|
483
414
|
type TCheckOutItemCreateService = Pick<TCheckOutItem, "site" | "supply" | "qty" | "attachment" | "createdBy">;
|
|
484
|
-
type TCheckOutItemCreateByBatchService = Pick<TCheckOutItem, "site" | "createdBy"> & {
|
|
485
|
-
items: Pick<TCheckOutItem, "supply" | "qty"
|
|
415
|
+
type TCheckOutItemCreateByBatchService = Pick<TCheckOutItem, "site" | "attachment" | "createdBy"> & {
|
|
416
|
+
items: Pick<TCheckOutItem, "supply" | "qty">[];
|
|
486
417
|
};
|
|
487
418
|
type TCheckOutItemGetQuery = {
|
|
488
419
|
page?: number;
|
|
@@ -498,7 +429,7 @@ declare function MCheckOutItem(value: TCheckOutItemCreate): {
|
|
|
498
429
|
supply: string | ObjectId;
|
|
499
430
|
supplyName: string;
|
|
500
431
|
qty: number;
|
|
501
|
-
attachment: string;
|
|
432
|
+
attachment: string[];
|
|
502
433
|
createdBy: string | ObjectId;
|
|
503
434
|
createdByName: string;
|
|
504
435
|
status: string;
|
|
@@ -513,6 +444,7 @@ declare function useCheckOutItemRepository(): {
|
|
|
513
444
|
createCheckOutItem: (value: TCheckOutItemCreate, session?: ClientSession) => Promise<ObjectId>;
|
|
514
445
|
getCheckOutItems: ({ page, limit, search, site, }: TCheckOutItemGetQuery) => Promise<{}>;
|
|
515
446
|
getCheckOutItemById: (_id: string | ObjectId, session?: ClientSession) => Promise<TCheckOutItemGetById>;
|
|
447
|
+
completeCheckOutItem: (_id: string | ObjectId, session?: ClientSession) => Promise<number>;
|
|
516
448
|
};
|
|
517
449
|
|
|
518
450
|
declare function useCheckOutItemService(): {
|
|
@@ -604,4 +536,4 @@ declare function useScheduleTaskController(): {
|
|
|
604
536
|
updateScheduleTask: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
605
537
|
};
|
|
606
538
|
|
|
607
|
-
export { MArea, MAreaChecklist, MCheckOutItem, MParentChecklist,
|
|
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 };
|