@7365admin1/module-hygiene 4.4.0 → 4.6.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 +49 -5
- package/dist/index.js +1261 -723
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1102 -568
- package/dist/index.mjs.map +1 -1
- package/package.json +6 -3
package/CHANGELOG.md
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -86,6 +86,7 @@ declare function useAreaService(): {
|
|
|
86
86
|
}) => Promise<{
|
|
87
87
|
message: string;
|
|
88
88
|
}>;
|
|
89
|
+
exportAreas: (site: string | ObjectId) => Promise<Buffer>;
|
|
89
90
|
};
|
|
90
91
|
|
|
91
92
|
interface MulterRequest extends Request {
|
|
@@ -104,6 +105,7 @@ declare function useAreaController(): {
|
|
|
104
105
|
updateArea: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
105
106
|
deleteArea: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
106
107
|
importArea: (req: MulterRequest, res: Response, next: NextFunction) => Promise<Response<any, Record<string, any>> | undefined>;
|
|
108
|
+
exportAreas: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
107
109
|
};
|
|
108
110
|
|
|
109
111
|
type TUnit = {
|
|
@@ -141,6 +143,7 @@ declare function useUnitService(): {
|
|
|
141
143
|
}>;
|
|
142
144
|
updateUnit: (_id: string | ObjectId, value: TUnitUpdate) => Promise<number>;
|
|
143
145
|
deleteUnit: (_id: string | ObjectId) => Promise<number>;
|
|
146
|
+
exportUnits: (site: string | ObjectId) => Promise<Buffer>;
|
|
144
147
|
};
|
|
145
148
|
|
|
146
149
|
declare function useUnitRepository(): {
|
|
@@ -159,6 +162,7 @@ declare function useUnitController(): {
|
|
|
159
162
|
updateUnit: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
160
163
|
deleteUnit: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
161
164
|
importUnit: (req: MulterRequest, res: Response, next: NextFunction) => Promise<Response<any, Record<string, any>> | undefined>;
|
|
165
|
+
exportUnits: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
162
166
|
};
|
|
163
167
|
|
|
164
168
|
type TParentChecklist = {
|
|
@@ -217,6 +221,8 @@ type TAreaChecklist = {
|
|
|
217
221
|
type TAreaChecklistUnits = {
|
|
218
222
|
unit: string | ObjectId;
|
|
219
223
|
name: string;
|
|
224
|
+
approve?: boolean;
|
|
225
|
+
reject?: boolean;
|
|
220
226
|
status?: (typeof allowedChecklistStatus)[number];
|
|
221
227
|
remarks?: string;
|
|
222
228
|
completedBy?: string | ObjectId;
|
|
@@ -236,7 +242,7 @@ type TCleaningScheduleAreaGetQuery = {
|
|
|
236
242
|
status?: (typeof allowedStatus)[number] | "all";
|
|
237
243
|
} & Pick<TCleaningScheduleArea, "schedule">;
|
|
238
244
|
type TAreaChecklistUpdate = Pick<TCleaningScheduleArea, "checklist">;
|
|
239
|
-
type TAreaChecklistUnitsUpdate = Pick<TAreaChecklistUnits, "remarks" | "completedBy">;
|
|
245
|
+
type TAreaChecklistUnitsUpdate = Pick<TAreaChecklistUnits, "approve" | "reject" | "remarks" | "completedBy">;
|
|
240
246
|
declare const areaChecklistSchema: Joi.ObjectSchema<any>;
|
|
241
247
|
declare function MAreaChecklist(value: TCleaningScheduleArea): {
|
|
242
248
|
schedule: string | ObjectId;
|
|
@@ -253,7 +259,36 @@ declare function MAreaChecklist(value: TCleaningScheduleArea): {
|
|
|
253
259
|
|
|
254
260
|
declare function useAreaChecklistService(): {
|
|
255
261
|
createAreaChecklist: (value: TAreaChecklistBatchCreate) => Promise<ObjectId[]>;
|
|
256
|
-
|
|
262
|
+
updateAreaChecklistUnits: (_id: string | ObjectId, set: number, unitId: string | ObjectId, value: TAreaChecklistUnitsUpdate) => Promise<void>;
|
|
263
|
+
};
|
|
264
|
+
|
|
265
|
+
interface AreaUnit {
|
|
266
|
+
unit?: string;
|
|
267
|
+
name?: string;
|
|
268
|
+
}
|
|
269
|
+
interface Area {
|
|
270
|
+
_id?: string;
|
|
271
|
+
name?: string;
|
|
272
|
+
type?: string;
|
|
273
|
+
set?: number;
|
|
274
|
+
units?: AreaUnit[];
|
|
275
|
+
status?: string;
|
|
276
|
+
createdAt?: string | Date;
|
|
277
|
+
updatedAt?: string | Date;
|
|
278
|
+
}
|
|
279
|
+
declare function useAreaExportService(): {
|
|
280
|
+
generateAreaExcel: (areas: Area[]) => Promise<Buffer>;
|
|
281
|
+
};
|
|
282
|
+
|
|
283
|
+
interface Unit {
|
|
284
|
+
_id?: string;
|
|
285
|
+
name?: string;
|
|
286
|
+
status?: string;
|
|
287
|
+
createdAt?: string | Date;
|
|
288
|
+
updatedAt?: string | Date;
|
|
289
|
+
}
|
|
290
|
+
declare function useUnitExportService(): {
|
|
291
|
+
generateUnitExcel: (units: Unit[]) => Promise<Buffer>;
|
|
257
292
|
};
|
|
258
293
|
|
|
259
294
|
declare function useAreaChecklistRepo(): {
|
|
@@ -281,7 +316,7 @@ declare function useAreaChecklistRepo(): {
|
|
|
281
316
|
getAreaChecklistByAreaAndSchedule: (schedule: string | ObjectId, area: string | ObjectId, session?: ClientSession) => Promise<mongodb.WithId<bson.Document>>;
|
|
282
317
|
updateAreaChecklist: (_id: string | ObjectId, value: TAreaChecklistUpdate, session?: ClientSession) => Promise<number>;
|
|
283
318
|
updateAreaChecklistStatus: (_id: string | ObjectId, status: (typeof allowedStatus)[number], session?: ClientSession) => Promise<number>;
|
|
284
|
-
|
|
319
|
+
updateAreaChecklistUnits: (_id: string | ObjectId, set: number, unitId: string | ObjectId, value: TAreaChecklistUnitsUpdate, session?: ClientSession) => Promise<number>;
|
|
285
320
|
getMaxSetNumberForArea: (areaId: string | ObjectId, session?: ClientSession) => Promise<any>;
|
|
286
321
|
};
|
|
287
322
|
|
|
@@ -291,7 +326,7 @@ declare function useAreaChecklistController(): {
|
|
|
291
326
|
getAreaChecklistHistory: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
292
327
|
getAreaChecklistHistoryDetails: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
293
328
|
getAreaChecklistUnits: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
294
|
-
|
|
329
|
+
updateAreaChecklistUnits: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
295
330
|
};
|
|
296
331
|
|
|
297
332
|
type TSupply = {
|
|
@@ -536,4 +571,13 @@ declare function useScheduleTaskController(): {
|
|
|
536
571
|
updateScheduleTask: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
537
572
|
};
|
|
538
573
|
|
|
539
|
-
|
|
574
|
+
declare function useQRService(): {
|
|
575
|
+
generateQRImage: (qrUrl: string) => Promise<Buffer>;
|
|
576
|
+
generateQRPDF: (qrUrl: string, title?: string) => Promise<Buffer>;
|
|
577
|
+
};
|
|
578
|
+
|
|
579
|
+
declare function useQRController(): {
|
|
580
|
+
generateQR: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
581
|
+
};
|
|
582
|
+
|
|
583
|
+
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, useAreaExportService, useAreaRepo, useAreaService, useCheckOutItemController, useCheckOutItemRepository, useCheckOutItemService, useHygieneDashboardController, useHygieneDashboardRepository, useParentChecklistController, useParentChecklistRepo, useQRController, useQRService, useScheduleTaskController, useScheduleTaskRepository, useScheduleTaskService, useStockController, useStockRepository, useStockService, useSupplyController, useSupplyRepository, useUnitController, useUnitExportService, useUnitRepository, useUnitService };
|