@pksep/zod-shared 0.0.531 → 0.0.532
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/dist/action/enums/enums.d.ts +7 -1
- package/dist/action/enums/enums.js +6 -0
- package/dist/assemble/dto/get-assemble-operation-count.dto.d.ts +16 -0
- package/dist/assemble/schemas/assemble-coming.schema.d.ts +12 -0
- package/dist/assemble/schemas/assemble.schema.d.ts +12 -0
- package/dist/assemble-kit/schemas/assemble-kit.schema.d.ts +5 -0
- package/dist/detal/schemas/detal-deficit.schema.d.ts +10 -0
- package/dist/detal/schemas/detal.schema.d.ts +5 -0
- package/dist/exclusion/dto/create-exclusion.dto.d.ts +16 -0
- package/dist/exclusion/dto/create-exclusion.dto.js +13 -0
- package/dist/exclusion/dto/get-exclusion-pagination.dto.d.ts +13 -0
- package/dist/exclusion/dto/get-exclusion-pagination.dto.js +12 -0
- package/dist/exclusion/dto/update-exclusion.dto.d.ts +13 -0
- package/dist/exclusion/dto/update-exclusion.dto.js +12 -0
- package/dist/exclusion/index.d.ts +5 -0
- package/dist/exclusion/index.js +21 -0
- package/dist/exclusion/interfaces/interface.d.ts +8 -0
- package/dist/exclusion/interfaces/interface.js +2 -0
- package/dist/exclusion/schemas/exclusion.schema.d.ts +28 -0
- package/dist/exclusion/schemas/exclusion.schema.js +17 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/product/schemas/product-deficit.schema.d.ts +5 -0
- package/dist/production-tasks/interfaces/production-tasks.d.ts +2 -0
- package/dist/shipments/dto/set-warehouse-readiness-date.dto.d.ts +12 -0
- package/dist/shipments/dto/set-warehouse-readiness-date.dto.js +8 -0
- package/dist/shipments/dto/shipments-list-pagination-response.dto.d.ts +5 -0
- package/dist/shipments/index.d.ts +1 -0
- package/dist/shipments/index.js +1 -0
- package/dist/shipments/schemas/shipment-list-item.schema.d.ts +3 -0
- package/dist/shipments/schemas/shipment-list-item.schema.js +4 -0
- package/dist/shipments/schemas/shipments.schema.d.ts +3 -0
- package/dist/shipments/schemas/shipments.schema.js +1 -0
- package/dist/specification/schema/attributes.schema.d.ts +7 -0
- package/dist/user/dto/update-user-table-config.dto.d.ts +5 -0
- package/dist/user/schemas/user-table-config.schema.d.ts +43 -0
- package/dist/user/schemas/user-table-config.schema.js +2 -1
- package/dist/utils/enums.d.ts +7 -0
- package/dist/utils/enums.js +9 -1
- package/dist/utils/tables-config/methods.js +28 -11
- package/package.json +1 -1
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import z from 'zod';
|
|
2
|
+
import { EnumExclusionType, IzdType } from '../../utils';
|
|
3
|
+
export declare const ExclusionSchema: z.ZodObject<{
|
|
4
|
+
id: z.ZodNumber;
|
|
5
|
+
ban: z.ZodDefault<z.ZodBoolean>;
|
|
6
|
+
exclusion: z.ZodString;
|
|
7
|
+
exclusionType: z.ZodNativeEnum<typeof EnumExclusionType>;
|
|
8
|
+
entityType: z.ZodNativeEnum<typeof IzdType>;
|
|
9
|
+
createdAt: z.ZodOptional<z.ZodUnion<[z.ZodDate, z.ZodString]>>;
|
|
10
|
+
updatedAt: z.ZodOptional<z.ZodUnion<[z.ZodDate, z.ZodString]>>;
|
|
11
|
+
}, "strip", z.ZodTypeAny, {
|
|
12
|
+
ban: boolean;
|
|
13
|
+
exclusion: string;
|
|
14
|
+
id: number;
|
|
15
|
+
entityType: IzdType;
|
|
16
|
+
exclusionType: EnumExclusionType;
|
|
17
|
+
createdAt?: string | Date | undefined;
|
|
18
|
+
updatedAt?: string | Date | undefined;
|
|
19
|
+
}, {
|
|
20
|
+
exclusion: string;
|
|
21
|
+
id: number;
|
|
22
|
+
entityType: IzdType;
|
|
23
|
+
exclusionType: EnumExclusionType;
|
|
24
|
+
ban?: boolean | undefined;
|
|
25
|
+
createdAt?: string | Date | undefined;
|
|
26
|
+
updatedAt?: string | Date | undefined;
|
|
27
|
+
}>;
|
|
28
|
+
export type ModelExclusion = z.infer<typeof ExclusionSchema>;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.ExclusionSchema = void 0;
|
|
7
|
+
const zod_1 = __importDefault(require("zod"));
|
|
8
|
+
const utils_1 = require("../../utils");
|
|
9
|
+
exports.ExclusionSchema = zod_1.default.object({
|
|
10
|
+
id: zod_1.default.number().int().positive(),
|
|
11
|
+
ban: zod_1.default.boolean().default(false),
|
|
12
|
+
exclusion: zod_1.default.string().nonempty(),
|
|
13
|
+
exclusionType: zod_1.default.nativeEnum(utils_1.EnumExclusionType),
|
|
14
|
+
entityType: zod_1.default.nativeEnum(utils_1.IzdType),
|
|
15
|
+
createdAt: zod_1.default.union([zod_1.default.date(), zod_1.default.string()]).optional(),
|
|
16
|
+
updatedAt: zod_1.default.union([zod_1.default.date(), zod_1.default.string()]).optional()
|
|
17
|
+
});
|
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -33,6 +33,7 @@ export declare const ProductDeficitSchema: z.ZodObject<{
|
|
|
33
33
|
ban: z.ZodDefault<z.ZodBoolean>;
|
|
34
34
|
date_order: z.ZodDate;
|
|
35
35
|
date_shipments: z.ZodDate;
|
|
36
|
+
warehouse_readiness_date: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
|
|
36
37
|
number_order: z.ZodString;
|
|
37
38
|
kol: z.ZodNumber;
|
|
38
39
|
bron: z.ZodDefault<z.ZodBoolean>;
|
|
@@ -109,6 +110,7 @@ export declare const ProductDeficitSchema: z.ZodObject<{
|
|
|
109
110
|
purchasesId?: number | undefined;
|
|
110
111
|
} | undefined;
|
|
111
112
|
company_id?: number | undefined;
|
|
113
|
+
warehouse_readiness_date?: Date | null | undefined;
|
|
112
114
|
parent_id?: number | null | undefined;
|
|
113
115
|
}, {
|
|
114
116
|
description: string;
|
|
@@ -137,6 +139,7 @@ export declare const ProductDeficitSchema: z.ZodObject<{
|
|
|
137
139
|
purchasesId?: number | undefined;
|
|
138
140
|
} | undefined;
|
|
139
141
|
company_id?: number | undefined;
|
|
142
|
+
warehouse_readiness_date?: Date | null | undefined;
|
|
140
143
|
bron?: boolean | undefined;
|
|
141
144
|
is_custom_product?: boolean | undefined;
|
|
142
145
|
parent_id?: number | null | undefined;
|
|
@@ -173,6 +176,7 @@ export declare const ProductDeficitSchema: z.ZodObject<{
|
|
|
173
176
|
purchasesId?: number | undefined;
|
|
174
177
|
} | undefined;
|
|
175
178
|
company_id?: number | undefined;
|
|
179
|
+
warehouse_readiness_date?: Date | null | undefined;
|
|
176
180
|
parent_id?: number | null | undefined;
|
|
177
181
|
};
|
|
178
182
|
designation: string | null;
|
|
@@ -230,6 +234,7 @@ export declare const ProductDeficitSchema: z.ZodObject<{
|
|
|
230
234
|
purchasesId?: number | undefined;
|
|
231
235
|
} | undefined;
|
|
232
236
|
company_id?: number | undefined;
|
|
237
|
+
warehouse_readiness_date?: Date | null | undefined;
|
|
233
238
|
bron?: boolean | undefined;
|
|
234
239
|
is_custom_product?: boolean | undefined;
|
|
235
240
|
parent_id?: number | null | undefined;
|
|
@@ -72,6 +72,7 @@ export interface IGetByOperation {
|
|
|
72
72
|
operationPosId: number;
|
|
73
73
|
endDate: Date | null;
|
|
74
74
|
mainEquipment: ModelEquipment | null;
|
|
75
|
+
equipmentIds: number[];
|
|
75
76
|
currentOperation: ModelOperation;
|
|
76
77
|
entityType: IzdType;
|
|
77
78
|
createTimeMax: number;
|
|
@@ -261,6 +262,7 @@ export interface IGetByEquipment {
|
|
|
261
262
|
mainShipment: ModelShipments | null;
|
|
262
263
|
totalProductionTAskOrdered: number;
|
|
263
264
|
mainOperation: ModelOperation;
|
|
265
|
+
equipmentIds: number[];
|
|
264
266
|
prevOperation: ModelOperation | null;
|
|
265
267
|
nextOperation: ModelOperation | null;
|
|
266
268
|
orderedByCurrentTask: number;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const setShipmentWarehouseReadinessDateSchema: z.ZodObject<{
|
|
3
|
+
shipmentId: z.ZodNumber;
|
|
4
|
+
date: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
5
|
+
}, "strip", z.ZodTypeAny, {
|
|
6
|
+
shipmentId: number;
|
|
7
|
+
date?: string | null | undefined;
|
|
8
|
+
}, {
|
|
9
|
+
shipmentId: number;
|
|
10
|
+
date?: string | null | undefined;
|
|
11
|
+
}>;
|
|
12
|
+
export type setShipmentWarehouseReadinessDateDto = z.infer<typeof setShipmentWarehouseReadinessDateSchema>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.setShipmentWarehouseReadinessDateSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
exports.setShipmentWarehouseReadinessDateSchema = zod_1.z.object({
|
|
6
|
+
shipmentId: zod_1.z.number(),
|
|
7
|
+
date: zod_1.z.string().nullish()
|
|
8
|
+
});
|
|
@@ -3,6 +3,7 @@ export declare const ShipmentsListPaginationResponseSchema: z.ZodObject<{
|
|
|
3
3
|
count: z.ZodNumber;
|
|
4
4
|
rows: z.ZodArray<z.ZodObject<{
|
|
5
5
|
date_shipments: z.ZodUnion<[z.ZodString, z.ZodDate]>;
|
|
6
|
+
warehouse_readiness_date: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodString, z.ZodDate]>>>;
|
|
6
7
|
id: z.ZodNumber;
|
|
7
8
|
number_order: z.ZodString;
|
|
8
9
|
product: z.ZodOptional<z.ZodObject<{
|
|
@@ -119,6 +120,7 @@ export declare const ShipmentsListPaginationResponseSchema: z.ZodObject<{
|
|
|
119
120
|
shipmentsId: number;
|
|
120
121
|
};
|
|
121
122
|
}[] | undefined;
|
|
123
|
+
warehouse_readiness_date?: string | Date | null | undefined;
|
|
122
124
|
detals?: {
|
|
123
125
|
id: number;
|
|
124
126
|
ShipmentsDetal: {
|
|
@@ -151,6 +153,7 @@ export declare const ShipmentsListPaginationResponseSchema: z.ZodObject<{
|
|
|
151
153
|
shipmentsId: number;
|
|
152
154
|
};
|
|
153
155
|
}[] | undefined;
|
|
156
|
+
warehouse_readiness_date?: string | Date | null | undefined;
|
|
154
157
|
detals?: {
|
|
155
158
|
id: number;
|
|
156
159
|
ShipmentsDetal: {
|
|
@@ -186,6 +189,7 @@ export declare const ShipmentsListPaginationResponseSchema: z.ZodObject<{
|
|
|
186
189
|
shipmentsId: number;
|
|
187
190
|
};
|
|
188
191
|
}[] | undefined;
|
|
192
|
+
warehouse_readiness_date?: string | Date | null | undefined;
|
|
189
193
|
detals?: {
|
|
190
194
|
id: number;
|
|
191
195
|
ShipmentsDetal: {
|
|
@@ -221,6 +225,7 @@ export declare const ShipmentsListPaginationResponseSchema: z.ZodObject<{
|
|
|
221
225
|
shipmentsId: number;
|
|
222
226
|
};
|
|
223
227
|
}[] | undefined;
|
|
228
|
+
warehouse_readiness_date?: string | Date | null | undefined;
|
|
224
229
|
detals?: {
|
|
225
230
|
id: number;
|
|
226
231
|
ShipmentsDetal: {
|
package/dist/shipments/index.js
CHANGED
|
@@ -36,3 +36,4 @@ __exportStar(require("./interface/interface"), exports);
|
|
|
36
36
|
__exportStar(require("./dto/entity-filtering-by-shipment.dto"), exports);
|
|
37
37
|
__exportStar(require("./schemas/shipments-sh-complit.schema"), exports);
|
|
38
38
|
__exportStar(require("./dto/sh-complit-update.dto"), exports);
|
|
39
|
+
__exportStar(require("./dto/set-warehouse-readiness-date.dto"), exports);
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
export declare const ShipmentListItem: z.ZodObject<{
|
|
3
3
|
date_shipments: z.ZodUnion<[z.ZodString, z.ZodDate]>;
|
|
4
|
+
warehouse_readiness_date: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodString, z.ZodDate]>>>;
|
|
4
5
|
id: z.ZodNumber;
|
|
5
6
|
number_order: z.ZodString;
|
|
6
7
|
product: z.ZodOptional<z.ZodObject<{
|
|
@@ -117,6 +118,7 @@ export declare const ShipmentListItem: z.ZodObject<{
|
|
|
117
118
|
shipmentsId: number;
|
|
118
119
|
};
|
|
119
120
|
}[] | undefined;
|
|
121
|
+
warehouse_readiness_date?: string | Date | null | undefined;
|
|
120
122
|
detals?: {
|
|
121
123
|
id: number;
|
|
122
124
|
ShipmentsDetal: {
|
|
@@ -149,6 +151,7 @@ export declare const ShipmentListItem: z.ZodObject<{
|
|
|
149
151
|
shipmentsId: number;
|
|
150
152
|
};
|
|
151
153
|
}[] | undefined;
|
|
154
|
+
warehouse_readiness_date?: string | Date | null | undefined;
|
|
152
155
|
detals?: {
|
|
153
156
|
id: number;
|
|
154
157
|
ShipmentsDetal: {
|
|
@@ -6,6 +6,10 @@ const shipments_detal_schema_1 = require("./shipments-detal.schema");
|
|
|
6
6
|
const shipments_cbed_schema_1 = require("./shipments-cbed.schema");
|
|
7
7
|
exports.ShipmentListItem = zod_1.z.object({
|
|
8
8
|
date_shipments: zod_1.z.union([zod_1.z.string(), zod_1.z.date()]),
|
|
9
|
+
warehouse_readiness_date: zod_1.z
|
|
10
|
+
.union([zod_1.z.string(), zod_1.z.date()])
|
|
11
|
+
.nullable()
|
|
12
|
+
.optional(),
|
|
9
13
|
id: zod_1.z.number().int(),
|
|
10
14
|
number_order: zod_1.z.string(),
|
|
11
15
|
product: zod_1.z
|
|
@@ -16,6 +16,7 @@ export declare const ShipmentsSchema: z.ZodObject<{
|
|
|
16
16
|
ban: z.ZodDefault<z.ZodBoolean>;
|
|
17
17
|
date_order: z.ZodDate;
|
|
18
18
|
date_shipments: z.ZodDate;
|
|
19
|
+
warehouse_readiness_date: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
|
|
19
20
|
number_order: z.ZodString;
|
|
20
21
|
kol: z.ZodNumber;
|
|
21
22
|
bron: z.ZodDefault<z.ZodBoolean>;
|
|
@@ -92,6 +93,7 @@ export declare const ShipmentsSchema: z.ZodObject<{
|
|
|
92
93
|
purchasesId?: number | undefined;
|
|
93
94
|
} | undefined;
|
|
94
95
|
company_id?: number | undefined;
|
|
96
|
+
warehouse_readiness_date?: Date | null | undefined;
|
|
95
97
|
parent_id?: number | null | undefined;
|
|
96
98
|
}, {
|
|
97
99
|
description: string;
|
|
@@ -120,6 +122,7 @@ export declare const ShipmentsSchema: z.ZodObject<{
|
|
|
120
122
|
purchasesId?: number | undefined;
|
|
121
123
|
} | undefined;
|
|
122
124
|
company_id?: number | undefined;
|
|
125
|
+
warehouse_readiness_date?: Date | null | undefined;
|
|
123
126
|
bron?: boolean | undefined;
|
|
124
127
|
is_custom_product?: boolean | undefined;
|
|
125
128
|
parent_id?: number | null | undefined;
|
|
@@ -9,6 +9,7 @@ exports.ShipmentsSchema = zod_1.z.object({
|
|
|
9
9
|
ban: zod_1.z.boolean().default(false),
|
|
10
10
|
date_order: zod_1.z.date(),
|
|
11
11
|
date_shipments: zod_1.z.date(),
|
|
12
|
+
warehouse_readiness_date: zod_1.z.coerce.date().nullable().optional(),
|
|
12
13
|
number_order: zod_1.z.string(),
|
|
13
14
|
kol: zod_1.z.number().int().nonnegative(),
|
|
14
15
|
bron: zod_1.z.boolean().default(false),
|
|
@@ -914,6 +914,7 @@ export declare const SpecificationAttributesSchema: z.ZodObject<{
|
|
|
914
914
|
ban: z.ZodDefault<z.ZodBoolean>;
|
|
915
915
|
date_order: z.ZodDate;
|
|
916
916
|
date_shipments: z.ZodDate;
|
|
917
|
+
warehouse_readiness_date: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
|
|
917
918
|
number_order: z.ZodString;
|
|
918
919
|
kol: z.ZodNumber;
|
|
919
920
|
bron: z.ZodDefault<z.ZodBoolean>;
|
|
@@ -990,6 +991,7 @@ export declare const SpecificationAttributesSchema: z.ZodObject<{
|
|
|
990
991
|
purchasesId?: number | undefined;
|
|
991
992
|
} | undefined;
|
|
992
993
|
company_id?: number | undefined;
|
|
994
|
+
warehouse_readiness_date?: Date | null | undefined;
|
|
993
995
|
parent_id?: number | null | undefined;
|
|
994
996
|
}, {
|
|
995
997
|
description: string;
|
|
@@ -1018,6 +1020,7 @@ export declare const SpecificationAttributesSchema: z.ZodObject<{
|
|
|
1018
1020
|
purchasesId?: number | undefined;
|
|
1019
1021
|
} | undefined;
|
|
1020
1022
|
company_id?: number | undefined;
|
|
1023
|
+
warehouse_readiness_date?: Date | null | undefined;
|
|
1021
1024
|
bron?: boolean | undefined;
|
|
1022
1025
|
is_custom_product?: boolean | undefined;
|
|
1023
1026
|
parent_id?: number | null | undefined;
|
|
@@ -1120,6 +1123,7 @@ export declare const SpecificationAttributesSchema: z.ZodObject<{
|
|
|
1120
1123
|
purchasesId?: number | undefined;
|
|
1121
1124
|
} | undefined;
|
|
1122
1125
|
company_id?: number | undefined;
|
|
1126
|
+
warehouse_readiness_date?: Date | null | undefined;
|
|
1123
1127
|
parent_id?: number | null | undefined;
|
|
1124
1128
|
}[] | undefined;
|
|
1125
1129
|
calculate_needs_time?: Date | null | undefined;
|
|
@@ -1407,6 +1411,7 @@ export declare const SpecificationAttributesSchema: z.ZodObject<{
|
|
|
1407
1411
|
purchasesId?: number | undefined;
|
|
1408
1412
|
} | undefined;
|
|
1409
1413
|
company_id?: number | undefined;
|
|
1414
|
+
warehouse_readiness_date?: Date | null | undefined;
|
|
1410
1415
|
bron?: boolean | undefined;
|
|
1411
1416
|
is_custom_product?: boolean | undefined;
|
|
1412
1417
|
parent_id?: number | null | undefined;
|
|
@@ -2504,6 +2509,7 @@ export declare const SpecificationAttributesSchema: z.ZodObject<{
|
|
|
2504
2509
|
purchasesId?: number | undefined;
|
|
2505
2510
|
} | undefined;
|
|
2506
2511
|
company_id?: number | undefined;
|
|
2512
|
+
warehouse_readiness_date?: Date | null | undefined;
|
|
2507
2513
|
parent_id?: number | null | undefined;
|
|
2508
2514
|
}[] | undefined;
|
|
2509
2515
|
calculate_needs_time?: Date | null | undefined;
|
|
@@ -2940,6 +2946,7 @@ export declare const SpecificationAttributesSchema: z.ZodObject<{
|
|
|
2940
2946
|
purchasesId?: number | undefined;
|
|
2941
2947
|
} | undefined;
|
|
2942
2948
|
company_id?: number | undefined;
|
|
2949
|
+
warehouse_readiness_date?: Date | null | undefined;
|
|
2943
2950
|
bron?: boolean | undefined;
|
|
2944
2951
|
is_custom_product?: boolean | undefined;
|
|
2945
2952
|
parent_id?: number | null | undefined;
|
|
@@ -5,17 +5,21 @@ export declare const UpdateUserTableConfigDtoSchema: z.ZodObject<{
|
|
|
5
5
|
newConfigObject: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
6
6
|
columnName: z.ZodNativeEnum<typeof import("../..").tablesEnumConfig>;
|
|
7
7
|
isShow: z.ZodDefault<z.ZodBoolean>;
|
|
8
|
+
position: z.ZodDefault<z.ZodNumber>;
|
|
8
9
|
}, "strip", z.ZodTypeAny, {
|
|
10
|
+
position: number;
|
|
9
11
|
columnName: import("../..").tablesEnumConfig;
|
|
10
12
|
isShow: boolean;
|
|
11
13
|
}, {
|
|
12
14
|
columnName: import("../..").tablesEnumConfig;
|
|
15
|
+
position?: number | undefined;
|
|
13
16
|
isShow?: boolean | undefined;
|
|
14
17
|
}>, "many">>;
|
|
15
18
|
}, "strip", z.ZodTypeAny, {
|
|
16
19
|
userId: number;
|
|
17
20
|
configKey: string;
|
|
18
21
|
newConfigObject: {
|
|
22
|
+
position: number;
|
|
19
23
|
columnName: import("../..").tablesEnumConfig;
|
|
20
24
|
isShow: boolean;
|
|
21
25
|
}[];
|
|
@@ -24,6 +28,7 @@ export declare const UpdateUserTableConfigDtoSchema: z.ZodObject<{
|
|
|
24
28
|
configKey: string;
|
|
25
29
|
newConfigObject?: {
|
|
26
30
|
columnName: import("../..").tablesEnumConfig;
|
|
31
|
+
position?: number | undefined;
|
|
27
32
|
isShow?: boolean | undefined;
|
|
28
33
|
}[] | undefined;
|
|
29
34
|
}>;
|
|
@@ -3,11 +3,14 @@ import { tablesEnumConfig } from '../../utils';
|
|
|
3
3
|
export declare const UserTableConfigItemSchema: z.ZodObject<{
|
|
4
4
|
columnName: z.ZodNativeEnum<typeof tablesEnumConfig>;
|
|
5
5
|
isShow: z.ZodDefault<z.ZodBoolean>;
|
|
6
|
+
position: z.ZodDefault<z.ZodNumber>;
|
|
6
7
|
}, "strip", z.ZodTypeAny, {
|
|
8
|
+
position: number;
|
|
7
9
|
columnName: tablesEnumConfig;
|
|
8
10
|
isShow: boolean;
|
|
9
11
|
}, {
|
|
10
12
|
columnName: tablesEnumConfig;
|
|
13
|
+
position?: number | undefined;
|
|
11
14
|
isShow?: boolean | undefined;
|
|
12
15
|
}>;
|
|
13
16
|
export type UserTableConfigItem = z.infer<typeof UserTableConfigItemSchema>;
|
|
@@ -17,115 +20,147 @@ export declare const UserTableConfigSchema: z.ZodObject<{
|
|
|
17
20
|
metalworking: z.ZodArray<z.ZodObject<{
|
|
18
21
|
columnName: z.ZodNativeEnum<typeof tablesEnumConfig>;
|
|
19
22
|
isShow: z.ZodDefault<z.ZodBoolean>;
|
|
23
|
+
position: z.ZodDefault<z.ZodNumber>;
|
|
20
24
|
}, "strip", z.ZodTypeAny, {
|
|
25
|
+
position: number;
|
|
21
26
|
columnName: tablesEnumConfig;
|
|
22
27
|
isShow: boolean;
|
|
23
28
|
}, {
|
|
24
29
|
columnName: tablesEnumConfig;
|
|
30
|
+
position?: number | undefined;
|
|
25
31
|
isShow?: boolean | undefined;
|
|
26
32
|
}>, "many">;
|
|
27
33
|
metalworking_deficit_by_assemble: z.ZodArray<z.ZodObject<{
|
|
28
34
|
columnName: z.ZodNativeEnum<typeof tablesEnumConfig>;
|
|
29
35
|
isShow: z.ZodDefault<z.ZodBoolean>;
|
|
36
|
+
position: z.ZodDefault<z.ZodNumber>;
|
|
30
37
|
}, "strip", z.ZodTypeAny, {
|
|
38
|
+
position: number;
|
|
31
39
|
columnName: tablesEnumConfig;
|
|
32
40
|
isShow: boolean;
|
|
33
41
|
}, {
|
|
34
42
|
columnName: tablesEnumConfig;
|
|
43
|
+
position?: number | undefined;
|
|
35
44
|
isShow?: boolean | undefined;
|
|
36
45
|
}>, "many">;
|
|
37
46
|
online_board_production: z.ZodArray<z.ZodObject<{
|
|
38
47
|
columnName: z.ZodNativeEnum<typeof tablesEnumConfig>;
|
|
39
48
|
isShow: z.ZodDefault<z.ZodBoolean>;
|
|
49
|
+
position: z.ZodDefault<z.ZodNumber>;
|
|
40
50
|
}, "strip", z.ZodTypeAny, {
|
|
51
|
+
position: number;
|
|
41
52
|
columnName: tablesEnumConfig;
|
|
42
53
|
isShow: boolean;
|
|
43
54
|
}, {
|
|
44
55
|
columnName: tablesEnumConfig;
|
|
56
|
+
position?: number | undefined;
|
|
45
57
|
isShow?: boolean | undefined;
|
|
46
58
|
}>, "many">;
|
|
47
59
|
online_board: z.ZodArray<z.ZodObject<{
|
|
48
60
|
columnName: z.ZodNativeEnum<typeof tablesEnumConfig>;
|
|
49
61
|
isShow: z.ZodDefault<z.ZodBoolean>;
|
|
62
|
+
position: z.ZodDefault<z.ZodNumber>;
|
|
50
63
|
}, "strip", z.ZodTypeAny, {
|
|
64
|
+
position: number;
|
|
51
65
|
columnName: tablesEnumConfig;
|
|
52
66
|
isShow: boolean;
|
|
53
67
|
}, {
|
|
54
68
|
columnName: tablesEnumConfig;
|
|
69
|
+
position?: number | undefined;
|
|
55
70
|
isShow?: boolean | undefined;
|
|
56
71
|
}>, "many">;
|
|
57
72
|
assemble: z.ZodArray<z.ZodObject<{
|
|
58
73
|
columnName: z.ZodNativeEnum<typeof tablesEnumConfig>;
|
|
59
74
|
isShow: z.ZodDefault<z.ZodBoolean>;
|
|
75
|
+
position: z.ZodDefault<z.ZodNumber>;
|
|
60
76
|
}, "strip", z.ZodTypeAny, {
|
|
77
|
+
position: number;
|
|
61
78
|
columnName: tablesEnumConfig;
|
|
62
79
|
isShow: boolean;
|
|
63
80
|
}, {
|
|
64
81
|
columnName: tablesEnumConfig;
|
|
82
|
+
position?: number | undefined;
|
|
65
83
|
isShow?: boolean | undefined;
|
|
66
84
|
}>, "many">;
|
|
67
85
|
production_task_by_user: z.ZodArray<z.ZodObject<{
|
|
68
86
|
columnName: z.ZodNativeEnum<typeof tablesEnumConfig>;
|
|
69
87
|
isShow: z.ZodDefault<z.ZodBoolean>;
|
|
88
|
+
position: z.ZodDefault<z.ZodNumber>;
|
|
70
89
|
}, "strip", z.ZodTypeAny, {
|
|
90
|
+
position: number;
|
|
71
91
|
columnName: tablesEnumConfig;
|
|
72
92
|
isShow: boolean;
|
|
73
93
|
}, {
|
|
74
94
|
columnName: tablesEnumConfig;
|
|
95
|
+
position?: number | undefined;
|
|
75
96
|
isShow?: boolean | undefined;
|
|
76
97
|
}>, "many">;
|
|
77
98
|
production_task_by_equipment: z.ZodArray<z.ZodObject<{
|
|
78
99
|
columnName: z.ZodNativeEnum<typeof tablesEnumConfig>;
|
|
79
100
|
isShow: z.ZodDefault<z.ZodBoolean>;
|
|
101
|
+
position: z.ZodDefault<z.ZodNumber>;
|
|
80
102
|
}, "strip", z.ZodTypeAny, {
|
|
103
|
+
position: number;
|
|
81
104
|
columnName: tablesEnumConfig;
|
|
82
105
|
isShow: boolean;
|
|
83
106
|
}, {
|
|
84
107
|
columnName: tablesEnumConfig;
|
|
108
|
+
position?: number | undefined;
|
|
85
109
|
isShow?: boolean | undefined;
|
|
86
110
|
}>, "many">;
|
|
87
111
|
production_task_by_operation: z.ZodArray<z.ZodObject<{
|
|
88
112
|
columnName: z.ZodNativeEnum<typeof tablesEnumConfig>;
|
|
89
113
|
isShow: z.ZodDefault<z.ZodBoolean>;
|
|
114
|
+
position: z.ZodDefault<z.ZodNumber>;
|
|
90
115
|
}, "strip", z.ZodTypeAny, {
|
|
116
|
+
position: number;
|
|
91
117
|
columnName: tablesEnumConfig;
|
|
92
118
|
isShow: boolean;
|
|
93
119
|
}, {
|
|
94
120
|
columnName: tablesEnumConfig;
|
|
121
|
+
position?: number | undefined;
|
|
95
122
|
isShow?: boolean | undefined;
|
|
96
123
|
}>, "many">;
|
|
97
124
|
}, "strip", z.ZodTypeAny, {
|
|
98
125
|
id: number;
|
|
99
126
|
assemble: {
|
|
127
|
+
position: number;
|
|
100
128
|
columnName: tablesEnumConfig;
|
|
101
129
|
isShow: boolean;
|
|
102
130
|
}[];
|
|
103
131
|
user_id: number;
|
|
104
132
|
metalworking: {
|
|
133
|
+
position: number;
|
|
105
134
|
columnName: tablesEnumConfig;
|
|
106
135
|
isShow: boolean;
|
|
107
136
|
}[];
|
|
108
137
|
metalworking_deficit_by_assemble: {
|
|
138
|
+
position: number;
|
|
109
139
|
columnName: tablesEnumConfig;
|
|
110
140
|
isShow: boolean;
|
|
111
141
|
}[];
|
|
112
142
|
online_board_production: {
|
|
143
|
+
position: number;
|
|
113
144
|
columnName: tablesEnumConfig;
|
|
114
145
|
isShow: boolean;
|
|
115
146
|
}[];
|
|
116
147
|
online_board: {
|
|
148
|
+
position: number;
|
|
117
149
|
columnName: tablesEnumConfig;
|
|
118
150
|
isShow: boolean;
|
|
119
151
|
}[];
|
|
120
152
|
production_task_by_user: {
|
|
153
|
+
position: number;
|
|
121
154
|
columnName: tablesEnumConfig;
|
|
122
155
|
isShow: boolean;
|
|
123
156
|
}[];
|
|
124
157
|
production_task_by_equipment: {
|
|
158
|
+
position: number;
|
|
125
159
|
columnName: tablesEnumConfig;
|
|
126
160
|
isShow: boolean;
|
|
127
161
|
}[];
|
|
128
162
|
production_task_by_operation: {
|
|
163
|
+
position: number;
|
|
129
164
|
columnName: tablesEnumConfig;
|
|
130
165
|
isShow: boolean;
|
|
131
166
|
}[];
|
|
@@ -133,35 +168,43 @@ export declare const UserTableConfigSchema: z.ZodObject<{
|
|
|
133
168
|
id: number;
|
|
134
169
|
assemble: {
|
|
135
170
|
columnName: tablesEnumConfig;
|
|
171
|
+
position?: number | undefined;
|
|
136
172
|
isShow?: boolean | undefined;
|
|
137
173
|
}[];
|
|
138
174
|
user_id: number;
|
|
139
175
|
metalworking: {
|
|
140
176
|
columnName: tablesEnumConfig;
|
|
177
|
+
position?: number | undefined;
|
|
141
178
|
isShow?: boolean | undefined;
|
|
142
179
|
}[];
|
|
143
180
|
metalworking_deficit_by_assemble: {
|
|
144
181
|
columnName: tablesEnumConfig;
|
|
182
|
+
position?: number | undefined;
|
|
145
183
|
isShow?: boolean | undefined;
|
|
146
184
|
}[];
|
|
147
185
|
online_board_production: {
|
|
148
186
|
columnName: tablesEnumConfig;
|
|
187
|
+
position?: number | undefined;
|
|
149
188
|
isShow?: boolean | undefined;
|
|
150
189
|
}[];
|
|
151
190
|
online_board: {
|
|
152
191
|
columnName: tablesEnumConfig;
|
|
192
|
+
position?: number | undefined;
|
|
153
193
|
isShow?: boolean | undefined;
|
|
154
194
|
}[];
|
|
155
195
|
production_task_by_user: {
|
|
156
196
|
columnName: tablesEnumConfig;
|
|
197
|
+
position?: number | undefined;
|
|
157
198
|
isShow?: boolean | undefined;
|
|
158
199
|
}[];
|
|
159
200
|
production_task_by_equipment: {
|
|
160
201
|
columnName: tablesEnumConfig;
|
|
202
|
+
position?: number | undefined;
|
|
161
203
|
isShow?: boolean | undefined;
|
|
162
204
|
}[];
|
|
163
205
|
production_task_by_operation: {
|
|
164
206
|
columnName: tablesEnumConfig;
|
|
207
|
+
position?: number | undefined;
|
|
165
208
|
isShow?: boolean | undefined;
|
|
166
209
|
}[];
|
|
167
210
|
}>;
|
|
@@ -5,7 +5,8 @@ const zod_1 = require("zod");
|
|
|
5
5
|
const utils_1 = require("../../utils");
|
|
6
6
|
exports.UserTableConfigItemSchema = zod_1.z.object({
|
|
7
7
|
columnName: zod_1.z.nativeEnum(utils_1.tablesEnumConfig),
|
|
8
|
-
isShow: zod_1.z.boolean().default(true)
|
|
8
|
+
isShow: zod_1.z.boolean().default(true),
|
|
9
|
+
position: zod_1.z.number().int().nonnegative().default(0)
|
|
9
10
|
});
|
|
10
11
|
exports.UserTableConfigSchema = zod_1.z.object({
|
|
11
12
|
id: zod_1.z.number().int().positive(),
|
package/dist/utils/enums.d.ts
CHANGED
|
@@ -331,3 +331,10 @@ export declare enum EnumStatusOrder {
|
|
|
331
331
|
archive = "archive",
|
|
332
332
|
overdue = "overdue"
|
|
333
333
|
}
|
|
334
|
+
/**
|
|
335
|
+
* Enum используется для определения типа исключения
|
|
336
|
+
*/
|
|
337
|
+
export declare enum EnumExclusionType {
|
|
338
|
+
disignation = "designation",
|
|
339
|
+
article = "article"
|
|
340
|
+
}
|
package/dist/utils/enums.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.EnumStatusOrder = exports.EnumRequisitesUserType = exports.EnumRequisitesType = exports.FileCategory = exports.SpetificationEntityKeys = exports.MetalloworkingStatus = exports.InstansMaterial = exports.InstansTypeInstrument = exports.ParentTypeEnum = exports.IMG_TYPES = exports.UnitsEnum = exports.FileType = exports.WorkSpaceObject = exports.enumDeficit = exports.statusWorkingsDeficit = exports.MovementObjectBase = exports.ActionType = exports.ModuleIncludeForAvatarEnum = exports.ModuleIncludeForDocumentEnum = exports.ModuleInclude = exports.MovementObjectType = exports.WaybilTypeComingEnums = exports.WorkingItemType = exports.AssembleStatus = exports.ProductionOperationType = exports.SortReadinesEnum = exports.AssembleIzdEnum = exports.StockOrderType = exports.RevisionEntityTypes = exports.Neo4jEntityTypes = exports.EntityTypes = exports.EnumEntityDeliveryItem = exports.EnumStatusDelivery = exports.statusShipment = exports.StatusScladWorking = exports.IzdType = exports.bullJobStatusEnum = exports.TypeSubTypeEntities = exports.StatusIssue = exports.EnumFilePrefix = exports.QueueStatusEnum = exports.StatusAssembleKit = void 0;
|
|
3
|
+
exports.EnumExclusionType = exports.EnumStatusOrder = exports.EnumRequisitesUserType = exports.EnumRequisitesType = exports.FileCategory = exports.SpetificationEntityKeys = exports.MetalloworkingStatus = exports.InstansMaterial = exports.InstansTypeInstrument = exports.ParentTypeEnum = exports.IMG_TYPES = exports.UnitsEnum = exports.FileType = exports.WorkSpaceObject = exports.enumDeficit = exports.statusWorkingsDeficit = exports.MovementObjectBase = exports.ActionType = exports.ModuleIncludeForAvatarEnum = exports.ModuleIncludeForDocumentEnum = exports.ModuleInclude = exports.MovementObjectType = exports.WaybilTypeComingEnums = exports.WorkingItemType = exports.AssembleStatus = exports.ProductionOperationType = exports.SortReadinesEnum = exports.AssembleIzdEnum = exports.StockOrderType = exports.RevisionEntityTypes = exports.Neo4jEntityTypes = exports.EntityTypes = exports.EnumEntityDeliveryItem = exports.EnumStatusDelivery = exports.statusShipment = exports.StatusScladWorking = exports.IzdType = exports.bullJobStatusEnum = exports.TypeSubTypeEntities = exports.StatusIssue = exports.EnumFilePrefix = exports.QueueStatusEnum = exports.StatusAssembleKit = void 0;
|
|
4
4
|
var StatusAssembleKit;
|
|
5
5
|
(function (StatusAssembleKit) {
|
|
6
6
|
StatusAssembleKit["collected"] = "\u0421\u043E\u0431\u0440\u0430\u043D\u043E";
|
|
@@ -395,3 +395,11 @@ var EnumStatusOrder;
|
|
|
395
395
|
// Просрочено
|
|
396
396
|
EnumStatusOrder["overdue"] = "overdue";
|
|
397
397
|
})(EnumStatusOrder || (exports.EnumStatusOrder = EnumStatusOrder = {}));
|
|
398
|
+
/**
|
|
399
|
+
* Enum используется для определения типа исключения
|
|
400
|
+
*/
|
|
401
|
+
var EnumExclusionType;
|
|
402
|
+
(function (EnumExclusionType) {
|
|
403
|
+
EnumExclusionType["disignation"] = "designation";
|
|
404
|
+
EnumExclusionType["article"] = "article";
|
|
405
|
+
})(EnumExclusionType || (exports.EnumExclusionType = EnumExclusionType = {}));
|
|
@@ -1,12 +1,17 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.createCorrectColumnConfig = exports.checkMissingColumns = exports.generateDefaultConfigArray = void 0;
|
|
4
|
-
|
|
4
|
+
/**
|
|
5
|
+
* Нормализует порядок колонок и всегда пересчитывает позицию колонки
|
|
6
|
+
* по фактической позиции элемента в массиве.
|
|
7
|
+
*/
|
|
8
|
+
const addPositionForColumns = (columns) => columns.map((currentColumn, index) => (Object.assign(Object.assign({}, currentColumn), { position: index })));
|
|
9
|
+
const generateDefaultConfigArray = (configArray) => addPositionForColumns(configArray.map(currentConfigitem => {
|
|
5
10
|
return {
|
|
6
11
|
columnName: currentConfigitem,
|
|
7
12
|
isShow: true
|
|
8
13
|
};
|
|
9
|
-
});
|
|
14
|
+
}));
|
|
10
15
|
exports.generateDefaultConfigArray = generateDefaultConfigArray;
|
|
11
16
|
/**
|
|
12
17
|
* Возвращает список колонок из `arrayToCheck`, которые отсутствуют в текущей конфигурации `columns`.
|
|
@@ -20,16 +25,28 @@ const checkMissingColumns = (columns, arrayToCheck) => {
|
|
|
20
25
|
};
|
|
21
26
|
exports.checkMissingColumns = checkMissingColumns;
|
|
22
27
|
const createCorrectColumnConfig = (columns, arrayToCheck) => {
|
|
23
|
-
const
|
|
24
|
-
|
|
25
|
-
|
|
28
|
+
const availableColumns = new Set(arrayToCheck);
|
|
29
|
+
const uniqueColumns = new Map();
|
|
30
|
+
columns
|
|
31
|
+
.filter(currentColumn => availableColumns.has(currentColumn.columnName))
|
|
32
|
+
.sort((leftColumn, rightColumn) => leftColumn.position - rightColumn.position)
|
|
33
|
+
.forEach(currentColumn => {
|
|
34
|
+
uniqueColumns.set(currentColumn.columnName, currentColumn);
|
|
35
|
+
});
|
|
36
|
+
const normalizedColumns = Array.from(uniqueColumns.values()).map(currentColumn => {
|
|
37
|
+
return {
|
|
38
|
+
columnName: currentColumn.columnName,
|
|
39
|
+
isShow: currentColumn.isShow
|
|
40
|
+
};
|
|
26
41
|
});
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
42
|
+
arrayToCheck.forEach(currentItem => {
|
|
43
|
+
if (uniqueColumns.has(currentItem))
|
|
44
|
+
return;
|
|
45
|
+
normalizedColumns.push({
|
|
46
|
+
columnName: currentItem,
|
|
47
|
+
isShow: true
|
|
48
|
+
});
|
|
32
49
|
});
|
|
33
|
-
return
|
|
50
|
+
return addPositionForColumns(normalizedColumns);
|
|
34
51
|
};
|
|
35
52
|
exports.createCorrectColumnConfig = createCorrectColumnConfig;
|