@7365admin1/module-hygiene 4.17.0 → 4.18.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 +32 -42
- package/dist/index.js +47 -43
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +43 -38
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
package/dist/index.mjs
CHANGED
|
@@ -1,15 +1,4 @@
|
|
|
1
1
|
// src/models/hygiene-base.model.ts
|
|
2
|
-
var ServiceType = /* @__PURE__ */ ((ServiceType2) => {
|
|
3
|
-
ServiceType2["REAL_ESTATE_DEVELOPER"] = "real_estate_developer";
|
|
4
|
-
ServiceType2["PROPERTY_MANAGEMENT_AGENCY"] = "property_management_agency";
|
|
5
|
-
ServiceType2["SECURITY_AGENCY"] = "security_agency";
|
|
6
|
-
ServiceType2["CLEANING_SERVICES"] = "cleaning_services";
|
|
7
|
-
ServiceType2["MECHANICAL_ELECTRICAL_SERVICES"] = "mechanical_electrical_services";
|
|
8
|
-
ServiceType2["LANDSCAPING_SERVICES"] = "landscaping_services";
|
|
9
|
-
ServiceType2["PEST_CONTROL_SERVICES"] = "pest_control_services";
|
|
10
|
-
ServiceType2["POOL_MAINTENANCE_SERVICES"] = "pool_maintenance_services";
|
|
11
|
-
return ServiceType2;
|
|
12
|
-
})(ServiceType || {});
|
|
13
2
|
var allowedTypes = ["common", "toilet"];
|
|
14
3
|
var allowedStatus = [
|
|
15
4
|
"open",
|
|
@@ -556,9 +545,10 @@ function useHygieneDashboardController() {
|
|
|
556
545
|
import Joi2 from "joi";
|
|
557
546
|
import { ObjectId as ObjectId2 } from "mongodb";
|
|
558
547
|
import { BadRequestError as BadRequestError3, logger as logger3 } from "@7365admin1/node-server-utils";
|
|
548
|
+
import { AppServiceType } from "@7365admin1/core";
|
|
559
549
|
var areaSchema = Joi2.object({
|
|
560
550
|
site: Joi2.string().hex().required(),
|
|
561
|
-
serviceType: Joi2.string().valid(...Object.values(
|
|
551
|
+
serviceType: Joi2.string().valid(...Object.values(AppServiceType)).required(),
|
|
562
552
|
name: Joi2.string().required(),
|
|
563
553
|
type: Joi2.string().valid(...allowedTypes).required(),
|
|
564
554
|
set: Joi2.number().min(0).optional(),
|
|
@@ -1083,9 +1073,10 @@ import {
|
|
|
1083
1073
|
import Joi3 from "joi";
|
|
1084
1074
|
import { ObjectId as ObjectId4 } from "mongodb";
|
|
1085
1075
|
import { BadRequestError as BadRequestError5, logger as logger6 } from "@7365admin1/node-server-utils";
|
|
1076
|
+
import { AppServiceType as AppServiceType2 } from "@7365admin1/core";
|
|
1086
1077
|
var unitSchema = Joi3.object({
|
|
1087
1078
|
site: Joi3.string().hex().required(),
|
|
1088
|
-
serviceType: Joi3.string().valid(...Object.values(
|
|
1079
|
+
serviceType: Joi3.string().valid(...Object.values(AppServiceType2)).required(),
|
|
1089
1080
|
name: Joi3.string().required()
|
|
1090
1081
|
});
|
|
1091
1082
|
function MUnit(value) {
|
|
@@ -1506,6 +1497,7 @@ function useAreaService() {
|
|
|
1506
1497
|
// src/controllers/hygiene-area.controller.ts
|
|
1507
1498
|
import Joi4 from "joi";
|
|
1508
1499
|
import { BadRequestError as BadRequestError8, logger as logger9 } from "@7365admin1/node-server-utils";
|
|
1500
|
+
import { AppServiceType as AppServiceType3 } from "@7365admin1/core";
|
|
1509
1501
|
|
|
1510
1502
|
// src/utils/convert-excel.util.ts
|
|
1511
1503
|
import { Readable } from "stream";
|
|
@@ -1570,7 +1562,7 @@ function useAreaController() {
|
|
|
1570
1562
|
search: Joi4.string().optional().allow("", null),
|
|
1571
1563
|
type: Joi4.string().valid("all", ...allowedTypes).optional().allow("", null),
|
|
1572
1564
|
site: Joi4.string().hex().required(),
|
|
1573
|
-
serviceType: Joi4.string().valid(...Object.values(
|
|
1565
|
+
serviceType: Joi4.string().valid(...Object.values(AppServiceType3)).required()
|
|
1574
1566
|
});
|
|
1575
1567
|
const { error } = validation.validate(query);
|
|
1576
1568
|
if (error) {
|
|
@@ -1679,7 +1671,7 @@ function useAreaController() {
|
|
|
1679
1671
|
const query = { ...req.query, ...req.params };
|
|
1680
1672
|
const validation = Joi4.object({
|
|
1681
1673
|
site: Joi4.string().hex().required(),
|
|
1682
|
-
serviceType: Joi4.string().valid(...Object.values(
|
|
1674
|
+
serviceType: Joi4.string().valid(...Object.values(AppServiceType3)).required()
|
|
1683
1675
|
});
|
|
1684
1676
|
const { error, value } = validation.validate(query);
|
|
1685
1677
|
if (error) {
|
|
@@ -1702,7 +1694,7 @@ function useAreaController() {
|
|
|
1702
1694
|
const query = { ...req.query, ...req.params };
|
|
1703
1695
|
const validation = Joi4.object({
|
|
1704
1696
|
site: Joi4.string().hex().required(),
|
|
1705
|
-
serviceType: Joi4.string().valid(...Object.values(
|
|
1697
|
+
serviceType: Joi4.string().valid(...Object.values(AppServiceType3)).required()
|
|
1706
1698
|
});
|
|
1707
1699
|
const { error, value } = validation.validate(query);
|
|
1708
1700
|
if (error) {
|
|
@@ -1985,6 +1977,7 @@ function useUnitService() {
|
|
|
1985
1977
|
// src/controllers/hygiene-unit.controller.ts
|
|
1986
1978
|
import Joi5 from "joi";
|
|
1987
1979
|
import { BadRequestError as BadRequestError10, logger as logger12 } from "@7365admin1/node-server-utils";
|
|
1980
|
+
import { AppServiceType as AppServiceType4 } from "@7365admin1/core";
|
|
1988
1981
|
function useUnitController() {
|
|
1989
1982
|
const { createUnit: _createUnit, getUnits: _getUnits } = useUnitRepository();
|
|
1990
1983
|
const {
|
|
@@ -2018,7 +2011,7 @@ function useUnitController() {
|
|
|
2018
2011
|
limit: Joi5.number().min(1).optional().allow("", null),
|
|
2019
2012
|
search: Joi5.string().optional().allow("", null),
|
|
2020
2013
|
site: Joi5.string().hex().required(),
|
|
2021
|
-
serviceType: Joi5.string().valid(...Object.values(
|
|
2014
|
+
serviceType: Joi5.string().valid(...Object.values(AppServiceType4)).required()
|
|
2022
2015
|
});
|
|
2023
2016
|
const { error } = validation.validate(query);
|
|
2024
2017
|
if (error) {
|
|
@@ -2099,7 +2092,7 @@ function useUnitController() {
|
|
|
2099
2092
|
const query = { ...req.query, ...req.params };
|
|
2100
2093
|
const validation = Joi5.object({
|
|
2101
2094
|
site: Joi5.string().hex().required(),
|
|
2102
|
-
serviceType: Joi5.string().valid(...Object.values(
|
|
2095
|
+
serviceType: Joi5.string().valid(...Object.values(AppServiceType4)).required()
|
|
2103
2096
|
});
|
|
2104
2097
|
const { error, value } = validation.validate(query);
|
|
2105
2098
|
if (error) {
|
|
@@ -2122,7 +2115,7 @@ function useUnitController() {
|
|
|
2122
2115
|
const query = { ...req.query, ...req.params };
|
|
2123
2116
|
const validation = Joi5.object({
|
|
2124
2117
|
site: Joi5.string().hex().required(),
|
|
2125
|
-
serviceType: Joi5.string().valid(...Object.values(
|
|
2118
|
+
serviceType: Joi5.string().valid(...Object.values(AppServiceType4)).required()
|
|
2126
2119
|
});
|
|
2127
2120
|
const { error, value } = validation.validate(query);
|
|
2128
2121
|
if (error) {
|
|
@@ -2168,10 +2161,11 @@ function useUnitController() {
|
|
|
2168
2161
|
import Joi6 from "joi";
|
|
2169
2162
|
import { ObjectId as ObjectId6 } from "mongodb";
|
|
2170
2163
|
import { BadRequestError as BadRequestError11, logger as logger13 } from "@7365admin1/node-server-utils";
|
|
2164
|
+
import { AppServiceType as AppServiceType5 } from "@7365admin1/core";
|
|
2171
2165
|
var parentChecklistSchema = Joi6.object({
|
|
2172
2166
|
createdAt: Joi6.alternatives().try(Joi6.date(), Joi6.string()).optional().allow("", null),
|
|
2173
2167
|
site: Joi6.string().hex().required(),
|
|
2174
|
-
serviceType: Joi6.string().valid(...Object.values(
|
|
2168
|
+
serviceType: Joi6.string().valid(...Object.values(AppServiceType5)).required()
|
|
2175
2169
|
});
|
|
2176
2170
|
function MParentChecklist(value) {
|
|
2177
2171
|
const { error } = parentChecklistSchema.validate(value);
|
|
@@ -2206,6 +2200,7 @@ import {
|
|
|
2206
2200
|
makeCacheKey as makeCacheKey4,
|
|
2207
2201
|
BadRequestError as BadRequestError12
|
|
2208
2202
|
} from "@7365admin1/node-server-utils";
|
|
2203
|
+
import { AppServiceType as AppServiceType6 } from "@7365admin1/core";
|
|
2209
2204
|
function useParentChecklistRepo() {
|
|
2210
2205
|
const db = useAtlas5.getDb();
|
|
2211
2206
|
if (!db) {
|
|
@@ -2237,7 +2232,7 @@ function useParentChecklistRepo() {
|
|
|
2237
2232
|
startOfDay.setUTCHours(0, 0, 0, 0);
|
|
2238
2233
|
const endOfDay = new Date(currentDate);
|
|
2239
2234
|
endOfDay.setUTCHours(23, 59, 59, 999);
|
|
2240
|
-
const allServiceTypes = Object.values(
|
|
2235
|
+
const allServiceTypes = Object.values(AppServiceType6);
|
|
2241
2236
|
const dateStr = currentDate.toISOString().split("T")[0];
|
|
2242
2237
|
if (value.site) {
|
|
2243
2238
|
let siteObjectId;
|
|
@@ -2642,6 +2637,7 @@ function useParentChecklistRepo() {
|
|
|
2642
2637
|
// src/controllers/hygiene-parent-checklist.controller.ts
|
|
2643
2638
|
import Joi7 from "joi";
|
|
2644
2639
|
import { BadRequestError as BadRequestError13, logger as logger15 } from "@7365admin1/node-server-utils";
|
|
2640
|
+
import { AppServiceType as AppServiceType7 } from "@7365admin1/core";
|
|
2645
2641
|
function useParentChecklistController() {
|
|
2646
2642
|
const {
|
|
2647
2643
|
createParentChecklist: _createParentChecklist,
|
|
@@ -2652,7 +2648,7 @@ function useParentChecklistController() {
|
|
|
2652
2648
|
const validation = Joi7.object({
|
|
2653
2649
|
createdAt: Joi7.alternatives().try(Joi7.date(), Joi7.string()).optional().allow("", null),
|
|
2654
2650
|
site: Joi7.string().hex().required(),
|
|
2655
|
-
serviceType: Joi7.string().valid(...Object.values(
|
|
2651
|
+
serviceType: Joi7.string().valid(...Object.values(AppServiceType7)).optional().allow("", null)
|
|
2656
2652
|
});
|
|
2657
2653
|
const { error } = validation.validate(payload);
|
|
2658
2654
|
if (error) {
|
|
@@ -2677,7 +2673,7 @@ function useParentChecklistController() {
|
|
|
2677
2673
|
limit: Joi7.number().min(1).optional().allow("", null),
|
|
2678
2674
|
search: Joi7.string().optional().allow("", null),
|
|
2679
2675
|
site: Joi7.string().hex().required(),
|
|
2680
|
-
serviceType: Joi7.string().valid(...Object.values(
|
|
2676
|
+
serviceType: Joi7.string().valid(...Object.values(AppServiceType7)).required(),
|
|
2681
2677
|
startDate: Joi7.alternatives().try(Joi7.date(), Joi7.string()).optional().allow("", null),
|
|
2682
2678
|
endDate: Joi7.alternatives().try(Joi7.date(), Joi7.string()).optional().allow("", null),
|
|
2683
2679
|
status: Joi7.string().valid(...allowedStatus, "all").optional().allow("", null)
|
|
@@ -2725,10 +2721,11 @@ function useParentChecklistController() {
|
|
|
2725
2721
|
import Joi8 from "joi";
|
|
2726
2722
|
import { ObjectId as ObjectId8 } from "mongodb";
|
|
2727
2723
|
import { BadRequestError as BadRequestError14, logger as logger16 } from "@7365admin1/node-server-utils";
|
|
2724
|
+
import { AppServiceType as AppServiceType8 } from "@7365admin1/core";
|
|
2728
2725
|
var allowedChecklistStatus = ["open", "completed", "closed"];
|
|
2729
2726
|
var areaChecklistSchema = Joi8.object({
|
|
2730
2727
|
schedule: Joi8.string().hex().required(),
|
|
2731
|
-
serviceType: Joi8.string().valid(...Object.values(
|
|
2728
|
+
serviceType: Joi8.string().valid(...Object.values(AppServiceType8)).required(),
|
|
2732
2729
|
area: Joi8.string().hex().required(),
|
|
2733
2730
|
name: Joi8.string().required(),
|
|
2734
2731
|
type: Joi8.string().valid(...allowedTypes).required(),
|
|
@@ -4180,6 +4177,7 @@ import {
|
|
|
4180
4177
|
InternalServerError as InternalServerError7,
|
|
4181
4178
|
logger as logger20
|
|
4182
4179
|
} from "@7365admin1/node-server-utils";
|
|
4180
|
+
import { AppServiceType as AppServiceType9 } from "@7365admin1/core";
|
|
4183
4181
|
|
|
4184
4182
|
// src/services/hygiene-checklist-pdf.service.ts
|
|
4185
4183
|
import { launch } from "puppeteer";
|
|
@@ -4446,7 +4444,7 @@ function useAreaChecklistController() {
|
|
|
4446
4444
|
type: Joi9.string().valid(...allowedTypes, "all").optional().allow("", null),
|
|
4447
4445
|
status: Joi9.string().valid(...allowedStatus, "all").optional().allow("", null),
|
|
4448
4446
|
schedule: Joi9.string().hex().required(),
|
|
4449
|
-
serviceType: Joi9.string().valid(...Object.values(
|
|
4447
|
+
serviceType: Joi9.string().valid(...Object.values(AppServiceType9)).required()
|
|
4450
4448
|
});
|
|
4451
4449
|
const { error } = validation.validate(query);
|
|
4452
4450
|
if (error) {
|
|
@@ -4546,7 +4544,7 @@ function useAreaChecklistController() {
|
|
|
4546
4544
|
page: Joi9.number().min(1).optional().allow("", null),
|
|
4547
4545
|
limit: Joi9.number().min(1).optional().allow("", null),
|
|
4548
4546
|
search: Joi9.string().optional().allow("", null),
|
|
4549
|
-
serviceType: Joi9.string().valid(...Object.values(
|
|
4547
|
+
serviceType: Joi9.string().valid(...Object.values(AppServiceType9)).required(),
|
|
4550
4548
|
id: Joi9.string().hex().required()
|
|
4551
4549
|
});
|
|
4552
4550
|
const { error } = validation.validate(query);
|
|
@@ -4675,9 +4673,10 @@ function useAreaChecklistController() {
|
|
|
4675
4673
|
import Joi10 from "joi";
|
|
4676
4674
|
import { ObjectId as ObjectId12 } from "mongodb";
|
|
4677
4675
|
import { BadRequestError as BadRequestError17, logger as logger21 } from "@7365admin1/node-server-utils";
|
|
4676
|
+
import { AppServiceType as AppServiceType10 } from "@7365admin1/core";
|
|
4678
4677
|
var supplySchema = Joi10.object({
|
|
4679
4678
|
site: Joi10.string().hex().required(),
|
|
4680
|
-
serviceType: Joi10.string().valid(...Object.values(
|
|
4679
|
+
serviceType: Joi10.string().valid(...Object.values(AppServiceType10)).required(),
|
|
4681
4680
|
name: Joi10.string().required(),
|
|
4682
4681
|
unitOfMeasurement: Joi10.string().required()
|
|
4683
4682
|
});
|
|
@@ -4968,6 +4967,7 @@ function useSupplyRepository() {
|
|
|
4968
4967
|
// src/controllers/hygiene-supply.controller.ts
|
|
4969
4968
|
import Joi11 from "joi";
|
|
4970
4969
|
import { BadRequestError as BadRequestError19, logger as logger23 } from "@7365admin1/node-server-utils";
|
|
4970
|
+
import { AppServiceType as AppServiceType11 } from "@7365admin1/core";
|
|
4971
4971
|
function useSupplyController() {
|
|
4972
4972
|
const {
|
|
4973
4973
|
createSupply: _createSupply,
|
|
@@ -5001,7 +5001,7 @@ function useSupplyController() {
|
|
|
5001
5001
|
limit: Joi11.number().min(1).optional().allow("", null),
|
|
5002
5002
|
search: Joi11.string().optional().allow("", null),
|
|
5003
5003
|
site: Joi11.string().hex().required(),
|
|
5004
|
-
serviceType: Joi11.string().valid(...Object.values(
|
|
5004
|
+
serviceType: Joi11.string().valid(...Object.values(AppServiceType11)).required()
|
|
5005
5005
|
});
|
|
5006
5006
|
const { error } = validation.validate(query);
|
|
5007
5007
|
if (error) {
|
|
@@ -5106,9 +5106,10 @@ function useSupplyController() {
|
|
|
5106
5106
|
import Joi12 from "joi";
|
|
5107
5107
|
import { ObjectId as ObjectId14 } from "mongodb";
|
|
5108
5108
|
import { BadRequestError as BadRequestError20, logger as logger24 } from "@7365admin1/node-server-utils";
|
|
5109
|
+
import { AppServiceType as AppServiceType12 } from "@7365admin1/core";
|
|
5109
5110
|
var stockSchema = Joi12.object({
|
|
5110
5111
|
site: Joi12.string().hex().required(),
|
|
5111
|
-
serviceType: Joi12.string().valid(...Object.values(
|
|
5112
|
+
serviceType: Joi12.string().valid(...Object.values(AppServiceType12)).required(),
|
|
5112
5113
|
supply: Joi12.string().hex().required(),
|
|
5113
5114
|
in: Joi12.number().min(0).optional(),
|
|
5114
5115
|
out: Joi12.number().min(0).optional(),
|
|
@@ -5342,6 +5343,7 @@ function useStockService() {
|
|
|
5342
5343
|
// src/controllers/hygiene-stock.controller.ts
|
|
5343
5344
|
import Joi13 from "joi";
|
|
5344
5345
|
import { BadRequestError as BadRequestError23, logger as logger26 } from "@7365admin1/node-server-utils";
|
|
5346
|
+
import { AppServiceType as AppServiceType13 } from "@7365admin1/core";
|
|
5345
5347
|
function useStockController() {
|
|
5346
5348
|
const { getStocksBySupplyId: _getStocksBySupplyId } = useStockRepository();
|
|
5347
5349
|
const { createStock: _createStock } = useStockService();
|
|
@@ -5349,7 +5351,7 @@ function useStockController() {
|
|
|
5349
5351
|
const payload = { ...req.body, ...req.params };
|
|
5350
5352
|
const validation = Joi13.object({
|
|
5351
5353
|
site: Joi13.string().hex().required(),
|
|
5352
|
-
serviceType: Joi13.string().valid(...Object.values(
|
|
5354
|
+
serviceType: Joi13.string().valid(...Object.values(AppServiceType13)).required(),
|
|
5353
5355
|
supply: Joi13.string().hex().required(),
|
|
5354
5356
|
qty: Joi13.number().min(0).required(),
|
|
5355
5357
|
remarks: Joi13.string().optional().allow("", null)
|
|
@@ -5377,7 +5379,7 @@ function useStockController() {
|
|
|
5377
5379
|
limit: Joi13.number().min(1).optional().allow("", null),
|
|
5378
5380
|
search: Joi13.string().optional().allow("", null),
|
|
5379
5381
|
site: Joi13.string().hex().required(),
|
|
5380
|
-
serviceType: Joi13.string().valid(...Object.values(
|
|
5382
|
+
serviceType: Joi13.string().valid(...Object.values(AppServiceType13)).required(),
|
|
5381
5383
|
supply: Joi13.string().hex().required()
|
|
5382
5384
|
});
|
|
5383
5385
|
const { error } = validation.validate(query);
|
|
@@ -5419,10 +5421,11 @@ function useStockController() {
|
|
|
5419
5421
|
import Joi14 from "joi";
|
|
5420
5422
|
import { ObjectId as ObjectId16 } from "mongodb";
|
|
5421
5423
|
import { BadRequestError as BadRequestError24, logger as logger27 } from "@7365admin1/node-server-utils";
|
|
5424
|
+
import { AppServiceType as AppServiceType14 } from "@7365admin1/core";
|
|
5422
5425
|
var allowedCheckOutItemStatus = ["pending", "completed"];
|
|
5423
5426
|
var checkOutItemSchema = Joi14.object({
|
|
5424
5427
|
site: Joi14.string().hex().required(),
|
|
5425
|
-
serviceType: Joi14.string().valid(...Object.values(
|
|
5428
|
+
serviceType: Joi14.string().valid(...Object.values(AppServiceType14)).required(),
|
|
5426
5429
|
supply: Joi14.string().hex().required(),
|
|
5427
5430
|
supplyName: Joi14.string().required(),
|
|
5428
5431
|
qty: Joi14.number().min(0).required(),
|
|
@@ -5827,6 +5830,7 @@ function useCheckOutItemService() {
|
|
|
5827
5830
|
// src/controllers/hygiene-checkout-item.controller.ts
|
|
5828
5831
|
import Joi15 from "joi";
|
|
5829
5832
|
import { BadRequestError as BadRequestError27, logger as logger29 } from "@7365admin1/node-server-utils";
|
|
5833
|
+
import { AppServiceType as AppServiceType15 } from "@7365admin1/core";
|
|
5830
5834
|
function useCheckOutItemController() {
|
|
5831
5835
|
const {
|
|
5832
5836
|
getCheckOutItems: _getCheckOutItems,
|
|
@@ -5849,7 +5853,7 @@ function useCheckOutItemController() {
|
|
|
5849
5853
|
};
|
|
5850
5854
|
const validation = Joi15.object({
|
|
5851
5855
|
site: Joi15.string().hex().required(),
|
|
5852
|
-
serviceType: Joi15.string().valid(...Object.values(
|
|
5856
|
+
serviceType: Joi15.string().valid(...Object.values(AppServiceType15)).required(),
|
|
5853
5857
|
supply: Joi15.string().hex().required(),
|
|
5854
5858
|
qty: Joi15.number().min(0).required(),
|
|
5855
5859
|
attachment: Joi15.array().items(Joi15.string()).optional().allow(null),
|
|
@@ -5884,7 +5888,7 @@ function useCheckOutItemController() {
|
|
|
5884
5888
|
};
|
|
5885
5889
|
const validation = Joi15.object({
|
|
5886
5890
|
site: Joi15.string().hex().required(),
|
|
5887
|
-
serviceType: Joi15.string().valid(...Object.values(
|
|
5891
|
+
serviceType: Joi15.string().valid(...Object.values(AppServiceType15)).required(),
|
|
5888
5892
|
createdBy: Joi15.string().hex().required(),
|
|
5889
5893
|
items: Joi15.array().items(
|
|
5890
5894
|
Joi15.object({
|
|
@@ -5917,7 +5921,7 @@ function useCheckOutItemController() {
|
|
|
5917
5921
|
limit: Joi15.number().min(1).optional().allow("", null),
|
|
5918
5922
|
search: Joi15.string().optional().allow("", null),
|
|
5919
5923
|
site: Joi15.string().hex().required(),
|
|
5920
|
-
serviceType: Joi15.string().valid(...Object.values(
|
|
5924
|
+
serviceType: Joi15.string().valid(...Object.values(AppServiceType15)).required()
|
|
5921
5925
|
});
|
|
5922
5926
|
const { error } = validation.validate(query);
|
|
5923
5927
|
if (error) {
|
|
@@ -5975,11 +5979,12 @@ function useCheckOutItemController() {
|
|
|
5975
5979
|
|
|
5976
5980
|
// src/models/hygiene-schedule-task.model.ts
|
|
5977
5981
|
import { BadRequestError as BadRequestError28, logger as logger30 } from "@7365admin1/node-server-utils";
|
|
5982
|
+
import { AppServiceType as AppServiceType16 } from "@7365admin1/core";
|
|
5978
5983
|
import Joi16 from "joi";
|
|
5979
5984
|
import { ObjectId as ObjectId18 } from "mongodb";
|
|
5980
5985
|
var scheduleTaskSchema = Joi16.object({
|
|
5981
5986
|
site: Joi16.string().hex().required(),
|
|
5982
|
-
serviceType: Joi16.string().valid(...Object.values(
|
|
5987
|
+
serviceType: Joi16.string().valid(...Object.values(AppServiceType16)).required(),
|
|
5983
5988
|
title: Joi16.string().required(),
|
|
5984
5989
|
time: Joi16.string().pattern(/^([0-1]\d|2[0-3]):([0-5]\d)$/).required(),
|
|
5985
5990
|
dates: Joi16.array().min(1).items(
|
|
@@ -6594,6 +6599,7 @@ function useScheduleTaskService() {
|
|
|
6594
6599
|
// src/controllers/hygiene-schedule-task.controller.ts
|
|
6595
6600
|
import Joi17 from "joi";
|
|
6596
6601
|
import { BadRequestError as BadRequestError30, logger as logger33 } from "@7365admin1/node-server-utils";
|
|
6602
|
+
import { AppServiceType as AppServiceType17 } from "@7365admin1/core";
|
|
6597
6603
|
function useScheduleTaskController() {
|
|
6598
6604
|
const {
|
|
6599
6605
|
createScheduleTask: _createScheduleTask,
|
|
@@ -6627,7 +6633,7 @@ function useScheduleTaskController() {
|
|
|
6627
6633
|
limit: Joi17.number().min(1).optional().allow("", null),
|
|
6628
6634
|
search: Joi17.string().optional().allow("", null),
|
|
6629
6635
|
site: Joi17.string().hex().required(),
|
|
6630
|
-
serviceType: Joi17.string().valid(...Object.values(
|
|
6636
|
+
serviceType: Joi17.string().valid(...Object.values(AppServiceType17)).required()
|
|
6631
6637
|
});
|
|
6632
6638
|
const { error } = validation.validate(query);
|
|
6633
6639
|
if (error) {
|
|
@@ -7023,7 +7029,6 @@ export {
|
|
|
7023
7029
|
MStock,
|
|
7024
7030
|
MSupply,
|
|
7025
7031
|
MUnit,
|
|
7026
|
-
ServiceType,
|
|
7027
7032
|
allowedCheckOutItemStatus,
|
|
7028
7033
|
allowedChecklistStatus,
|
|
7029
7034
|
allowedPeriods,
|