@pksep/zod-shared 0.0.533 → 0.0.535
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 +6 -1
- package/dist/action/enums/enums.js +5 -0
- package/dist/assemble/dto/assembly-paginate.dto.d.ts +19 -7
- package/dist/assemble/dto/assembly-paginate.dto.js +1 -2
- package/dist/assemble/dto/get-assemble-pagination-sclad.dto.d.ts +19 -7
- package/dist/assemble/dto/get-assemble-pagination-sclad.dto.js +1 -2
- package/dist/assemble/dto/get-assemble-pagination.dto.d.ts +19 -7
- package/dist/assemble/dto/get-assemble-pagination.dto.js +1 -2
- package/dist/cbed/dto/get-deficit.dto.d.ts +19 -7
- package/dist/cbed/dto/get-deficit.dto.js +1 -2
- package/dist/detal/dto/get-deficit.dto.d.ts +19 -7
- package/dist/detal/dto/get-deficit.dto.js +1 -2
- package/dist/detal/schemas/detal-deficit.schema.d.ts +3 -0
- package/dist/detal/schemas/detal-deficit.schema.js +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/material/dto/get-deficit.dto.d.ts +19 -7
- package/dist/material/dto/get-deficit.dto.js +1 -2
- package/dist/material/index.d.ts +1 -0
- package/dist/material/index.js +1 -0
- package/dist/material/schemas/material-shipments-response.schema.d.ts +733 -0
- package/dist/material/schemas/material-shipments-response.schema.js +21 -0
- package/dist/metaloworking/dto/get-metallworking-pagination.dto.d.ts +18 -7
- package/dist/metaloworking/dto/get-metallworking-pagination.dto.js +1 -2
- package/dist/product/dto/get-deficit.dto.d.ts +19 -7
- package/dist/product/dto/get-deficit.dto.js +1 -2
- package/dist/product/schemas/product-deficit.schema.d.ts +3 -0
- package/dist/product/schemas/product-deficit.schema.js +2 -1
- package/dist/production-tasks/dto/get-deficits-detal-by-production-task.dto.d.ts +18 -7
- package/dist/production-tasks/dto/get-deficits-detal-by-production-task.dto.js +1 -2
- package/dist/production-tasks/dto/get-production-task-by-equipment.dto.d.ts +3 -3
- package/dist/production-tasks/dto/get-production-task-by-equipment.dto.js +3 -1
- package/dist/production-tasks/dto/get-production-task-by-user.dto.d.ts +3 -3
- package/dist/production-tasks/dto/get-production-task-by-user.dto.js +3 -1
- package/dist/production-tasks/dto/online-board-working.dto.d.ts +19 -7
- package/dist/production-tasks/dto/online-board-working.dto.js +1 -2
- package/dist/production-tasks/interfaces/production-tasks.d.ts +1 -0
- package/dist/role/default-value/index.js +6 -0
- package/dist/shipments/dto/shipments-paginate.dto.d.ts +19 -7
- package/dist/shipments/dto/shipments-paginate.dto.js +1 -2
- package/dist/stock-order/schemas/stock-order.schema.d.ts +4 -1
- package/dist/stock-order/schemas/stock-order.schema.js +1 -0
- package/dist/utils/enums.d.ts +8 -0
- package/dist/utils/enums.js +10 -1
- package/dist/utils/methods.d.ts +0 -4
- package/dist/utils/methods.js +3 -22
- package/dist/utils/sorting.d.ts +16 -1
- package/dist/utils/sorting.js +44 -17
- package/package.json +1 -1
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.MaterialShipmentsResponseSchema = exports.MaterialShipmentsDeliverySchema = exports.MaterialShipmentDeliveryStatsSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const material_schema_1 = require("./material.schema");
|
|
6
|
+
const deliveries_1 = require("../../deliveries");
|
|
7
|
+
exports.MaterialShipmentDeliveryStatsSchema = zod_1.z.object({
|
|
8
|
+
totalQty: zod_1.z.number().int().nonnegative(),
|
|
9
|
+
remainingQty: zod_1.z.number().int().nonnegative()
|
|
10
|
+
});
|
|
11
|
+
exports.MaterialShipmentsDeliverySchema = deliveries_1.DeliveriesSchema.extend({
|
|
12
|
+
totalQty: zod_1.z.number().int().nonnegative(),
|
|
13
|
+
remainingQty: zod_1.z.number().int().nonnegative(),
|
|
14
|
+
company: zod_1.z.custom().optional()
|
|
15
|
+
});
|
|
16
|
+
exports.MaterialShipmentsResponseSchema = material_schema_1.MaterialSchema.extend({
|
|
17
|
+
documents: zod_1.z.array(zod_1.z.custom()).optional(),
|
|
18
|
+
actual_shipment: zod_1.z.custom().optional(),
|
|
19
|
+
shipments: zod_1.z.array(zod_1.z.custom()).optional(),
|
|
20
|
+
deliveries: zod_1.z.array(exports.MaterialShipmentsDeliverySchema).optional()
|
|
21
|
+
});
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { ProductionPlanSortField } from '../../utils';
|
|
3
2
|
import { IFiltersByByOrder, IFiltersByParents } from '../../production-tasks';
|
|
4
3
|
export declare const GetMetaloworkingPaginationDtoZod: z.ZodObject<{
|
|
5
4
|
page: z.ZodNumber;
|
|
@@ -9,15 +8,25 @@ export declare const GetMetaloworkingPaginationDtoZod: z.ZodObject<{
|
|
|
9
8
|
byParents: z.ZodOptional<z.ZodNullable<z.ZodType<IFiltersByParents, z.ZodTypeDef, IFiltersByParents>>>;
|
|
10
9
|
byOrder: z.ZodOptional<z.ZodNullable<z.ZodType<IFiltersByByOrder, z.ZodTypeDef, IFiltersByByOrder>>>;
|
|
11
10
|
childrenByProductionTaskIds: z.ZodNullable<z.ZodOptional<z.ZodArray<z.ZodNumber, "many">>>;
|
|
12
|
-
|
|
13
|
-
|
|
11
|
+
sort: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
12
|
+
sortField: z.ZodOptional<z.ZodNullable<z.ZodNativeEnum<typeof import("../../utils").ProductionPlanSortField>>>;
|
|
13
|
+
sortDesc: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
14
|
+
}, "strip", z.ZodTypeAny, {
|
|
15
|
+
sortDesc: boolean;
|
|
16
|
+
sortField?: import("../../utils").ProductionPlanSortField | null | undefined;
|
|
17
|
+
}, {
|
|
18
|
+
sortField?: import("../../utils").ProductionPlanSortField | null | undefined;
|
|
19
|
+
sortDesc?: boolean | undefined;
|
|
20
|
+
}>, "many">>>;
|
|
14
21
|
}, "strip", z.ZodTypeAny, {
|
|
22
|
+
sort: {
|
|
23
|
+
sortDesc: boolean;
|
|
24
|
+
sortField?: import("../../utils").ProductionPlanSortField | null | undefined;
|
|
25
|
+
}[];
|
|
15
26
|
page: number;
|
|
16
27
|
searchString: string;
|
|
17
28
|
isBan: boolean;
|
|
18
|
-
sortDesc: boolean;
|
|
19
29
|
responsibleUserId?: number | null | undefined;
|
|
20
|
-
sortField?: ProductionPlanSortField | null | undefined;
|
|
21
30
|
byParents?: IFiltersByParents | null | undefined;
|
|
22
31
|
byOrder?: IFiltersByByOrder | null | undefined;
|
|
23
32
|
childrenByProductionTaskIds?: number[] | null | undefined;
|
|
@@ -25,9 +34,11 @@ export declare const GetMetaloworkingPaginationDtoZod: z.ZodObject<{
|
|
|
25
34
|
page: number;
|
|
26
35
|
searchString: string;
|
|
27
36
|
isBan: boolean;
|
|
37
|
+
sort?: {
|
|
38
|
+
sortField?: import("../../utils").ProductionPlanSortField | null | undefined;
|
|
39
|
+
sortDesc?: boolean | undefined;
|
|
40
|
+
}[] | undefined;
|
|
28
41
|
responsibleUserId?: number | null | undefined;
|
|
29
|
-
sortField?: ProductionPlanSortField | null | undefined;
|
|
30
|
-
sortDesc?: boolean | undefined;
|
|
31
42
|
byParents?: IFiltersByParents | null | undefined;
|
|
32
43
|
byOrder?: IFiltersByByOrder | null | undefined;
|
|
33
44
|
childrenByProductionTaskIds?: number[] | null | undefined;
|
|
@@ -11,6 +11,5 @@ exports.GetMetaloworkingPaginationDtoZod = zod_1.z.object({
|
|
|
11
11
|
byParents: zod_1.z.custom().nullable().optional(),
|
|
12
12
|
byOrder: zod_1.z.custom().nullable().optional(),
|
|
13
13
|
childrenByProductionTaskIds: zod_1.z.array(zod_1.z.number()).optional().nullable(),
|
|
14
|
-
|
|
15
|
-
sortDesc: zod_1.z.boolean().optional().default(false)
|
|
14
|
+
sort: zod_1.z.array(utils_1.ProductionPlanSortRuleSchema).optional().default([])
|
|
16
15
|
});
|
|
@@ -1,28 +1,40 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import {
|
|
2
|
+
import { statusWorkingsDeficit } from '../../utils';
|
|
3
3
|
export declare const GetDeficitProductSchema: z.ZodObject<{
|
|
4
4
|
productIds: z.ZodArray<z.ZodNumber, "many">;
|
|
5
5
|
statusWorking: z.ZodNativeEnum<typeof statusWorkingsDeficit>;
|
|
6
6
|
searchString: z.ZodString;
|
|
7
7
|
shipmentIds: z.ZodNullable<z.ZodOptional<z.ZodArray<z.ZodNumber, "many">>>;
|
|
8
8
|
page: z.ZodOptional<z.ZodNumber>;
|
|
9
|
-
|
|
10
|
-
|
|
9
|
+
sort: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
10
|
+
sortField: z.ZodOptional<z.ZodNullable<z.ZodNativeEnum<typeof import("../../utils").ProductionPlanSortField>>>;
|
|
11
|
+
sortDesc: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
12
|
+
}, "strip", z.ZodTypeAny, {
|
|
13
|
+
sortDesc: boolean;
|
|
14
|
+
sortField?: import("../../utils").ProductionPlanSortField | null | undefined;
|
|
15
|
+
}, {
|
|
16
|
+
sortField?: import("../../utils").ProductionPlanSortField | null | undefined;
|
|
17
|
+
sortDesc?: boolean | undefined;
|
|
18
|
+
}>, "many">>>;
|
|
11
19
|
}, "strip", z.ZodTypeAny, {
|
|
20
|
+
sort: {
|
|
21
|
+
sortDesc: boolean;
|
|
22
|
+
sortField?: import("../../utils").ProductionPlanSortField | null | undefined;
|
|
23
|
+
}[];
|
|
12
24
|
searchString: string;
|
|
13
25
|
statusWorking: statusWorkingsDeficit;
|
|
14
|
-
sortDesc: boolean;
|
|
15
26
|
productIds: number[];
|
|
16
27
|
page?: number | undefined;
|
|
17
28
|
shipmentIds?: number[] | null | undefined;
|
|
18
|
-
sortField?: ProductionPlanSortField | null | undefined;
|
|
19
29
|
}, {
|
|
20
30
|
searchString: string;
|
|
21
31
|
statusWorking: statusWorkingsDeficit;
|
|
22
32
|
productIds: number[];
|
|
33
|
+
sort?: {
|
|
34
|
+
sortField?: import("../../utils").ProductionPlanSortField | null | undefined;
|
|
35
|
+
sortDesc?: boolean | undefined;
|
|
36
|
+
}[] | undefined;
|
|
23
37
|
page?: number | undefined;
|
|
24
38
|
shipmentIds?: number[] | null | undefined;
|
|
25
|
-
sortField?: ProductionPlanSortField | null | undefined;
|
|
26
|
-
sortDesc?: boolean | undefined;
|
|
27
39
|
}>;
|
|
28
40
|
export type GetDeficitProductDtoType = z.infer<typeof GetDeficitProductSchema>;
|
|
@@ -9,6 +9,5 @@ exports.GetDeficitProductSchema = zod_1.z.object({
|
|
|
9
9
|
searchString: zod_1.z.string(),
|
|
10
10
|
shipmentIds: zod_1.z.number().int().array().optional().nullable(),
|
|
11
11
|
page: zod_1.z.number().int().optional(),
|
|
12
|
-
|
|
13
|
-
sortDesc: zod_1.z.boolean().optional().default(false)
|
|
12
|
+
sort: zod_1.z.array(utils_1.ProductionPlanSortRuleSchema).optional().default([])
|
|
14
13
|
});
|
|
@@ -145,6 +145,7 @@ export declare const ProductDeficitSchema: z.ZodObject<{
|
|
|
145
145
|
parent_id?: number | null | undefined;
|
|
146
146
|
}>;
|
|
147
147
|
myQuantity: z.ZodNumber;
|
|
148
|
+
isOrderedByStockOrder: z.ZodBoolean;
|
|
148
149
|
}, "strip", z.ZodTypeAny, {
|
|
149
150
|
ban: boolean;
|
|
150
151
|
shipment: {
|
|
@@ -202,6 +203,7 @@ export declare const ProductDeficitSchema: z.ZodObject<{
|
|
|
202
203
|
articl: string | null;
|
|
203
204
|
is_custom: boolean;
|
|
204
205
|
myQuantity: number;
|
|
206
|
+
isOrderedByStockOrder: boolean;
|
|
205
207
|
id?: number | null | undefined;
|
|
206
208
|
discontinued?: boolean | undefined;
|
|
207
209
|
production_time_assemble?: import("../..").ProductionTimeType | null | undefined;
|
|
@@ -250,6 +252,7 @@ export declare const ProductDeficitSchema: z.ZodObject<{
|
|
|
250
252
|
responsibleId: number | null;
|
|
251
253
|
articl: string | null;
|
|
252
254
|
myQuantity: number;
|
|
255
|
+
isOrderedByStockOrder: boolean;
|
|
253
256
|
ban?: boolean | undefined;
|
|
254
257
|
id?: number | null | undefined;
|
|
255
258
|
calculate_needs_time?: Date | null | undefined;
|
|
@@ -6,5 +6,6 @@ const shipments_1 = require("../../shipments");
|
|
|
6
6
|
const product_schema_1 = require("./product.schema");
|
|
7
7
|
exports.ProductDeficitSchema = product_schema_1.ProductSchema.extend({
|
|
8
8
|
shipment: shipments_1.ShipmentsSchema,
|
|
9
|
-
myQuantity: zod_1.z.number().int()
|
|
9
|
+
myQuantity: zod_1.z.number().int(),
|
|
10
|
+
isOrderedByStockOrder: zod_1.z.boolean()
|
|
10
11
|
});
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { ProductionPlanSortField } from '../../utils';
|
|
3
2
|
import { IFiltersByByOrder, IFiltersByParents } from '../interfaces/online-board';
|
|
4
3
|
export declare const GetDeficitsDetalByProductionTaskDtoZod: z.ZodObject<{
|
|
5
4
|
page: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
@@ -21,17 +20,27 @@ export declare const GetDeficitsDetalByProductionTaskDtoZod: z.ZodObject<{
|
|
|
21
20
|
byParents: z.ZodOptional<z.ZodNullable<z.ZodType<IFiltersByParents, z.ZodTypeDef, IFiltersByParents>>>;
|
|
22
21
|
byOrder: z.ZodOptional<z.ZodNullable<z.ZodType<IFiltersByByOrder, z.ZodTypeDef, IFiltersByByOrder>>>;
|
|
23
22
|
childrenByProductionTaskIds: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodNumber, "many">>>;
|
|
24
|
-
|
|
25
|
-
|
|
23
|
+
sort: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
24
|
+
sortField: z.ZodOptional<z.ZodNullable<z.ZodNativeEnum<typeof import("../../utils").ProductionPlanSortField>>>;
|
|
25
|
+
sortDesc: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
26
|
+
}, "strip", z.ZodTypeAny, {
|
|
27
|
+
sortDesc: boolean;
|
|
28
|
+
sortField?: import("../../utils").ProductionPlanSortField | null | undefined;
|
|
29
|
+
}, {
|
|
30
|
+
sortField?: import("../../utils").ProductionPlanSortField | null | undefined;
|
|
31
|
+
sortDesc?: boolean | undefined;
|
|
32
|
+
}>, "many">>>;
|
|
26
33
|
}, "strip", z.ZodTypeAny, {
|
|
27
|
-
|
|
34
|
+
sort: {
|
|
35
|
+
sortDesc: boolean;
|
|
36
|
+
sortField?: import("../../utils").ProductionPlanSortField | null | undefined;
|
|
37
|
+
}[];
|
|
28
38
|
typeOperationIds: number[] | null;
|
|
29
39
|
employeIds: number[] | null;
|
|
30
40
|
assembleIds: number[] | null;
|
|
31
41
|
isOnlyDetalId: boolean | null;
|
|
32
42
|
page?: number | null | undefined;
|
|
33
43
|
searchString?: string | undefined;
|
|
34
|
-
sortField?: ProductionPlanSortField | null | undefined;
|
|
35
44
|
range?: {
|
|
36
45
|
start?: any;
|
|
37
46
|
end?: any;
|
|
@@ -40,10 +49,12 @@ export declare const GetDeficitsDetalByProductionTaskDtoZod: z.ZodObject<{
|
|
|
40
49
|
byOrder?: IFiltersByByOrder | null | undefined;
|
|
41
50
|
childrenByProductionTaskIds?: number[] | null | undefined;
|
|
42
51
|
}, {
|
|
52
|
+
sort?: {
|
|
53
|
+
sortField?: import("../../utils").ProductionPlanSortField | null | undefined;
|
|
54
|
+
sortDesc?: boolean | undefined;
|
|
55
|
+
}[] | undefined;
|
|
43
56
|
page?: number | null | undefined;
|
|
44
57
|
searchString?: string | undefined;
|
|
45
|
-
sortField?: ProductionPlanSortField | null | undefined;
|
|
46
|
-
sortDesc?: boolean | undefined;
|
|
47
58
|
range?: {
|
|
48
59
|
start?: any;
|
|
49
60
|
end?: any;
|
|
@@ -20,6 +20,5 @@ exports.GetDeficitsDetalByProductionTaskDtoZod = zod_1.z.object({
|
|
|
20
20
|
byParents: zod_1.z.custom().nullable().optional(),
|
|
21
21
|
byOrder: zod_1.z.custom().nullable().optional(),
|
|
22
22
|
childrenByProductionTaskIds: zod_1.z.array(zod_1.z.number()).nullable().optional(),
|
|
23
|
-
|
|
24
|
-
sortDesc: zod_1.z.boolean().optional().default(false)
|
|
23
|
+
sort: zod_1.z.array(utils_1.ProductionPlanSortRuleSchema).optional().default([])
|
|
25
24
|
});
|
|
@@ -15,7 +15,7 @@ export declare const GetProductionTaskByEquipmentDtoZod: z.ZodObject<{
|
|
|
15
15
|
end?: any;
|
|
16
16
|
}>>>;
|
|
17
17
|
onlyTOperation: z.ZodOptional<z.ZodNumber>;
|
|
18
|
-
workStartCalcTypeFilter: z.ZodOptional<z.ZodNativeEnum<typeof WorkStartCalcTypeFilter>>;
|
|
18
|
+
workStartCalcTypeFilter: z.ZodOptional<z.ZodArray<z.ZodNativeEnum<typeof WorkStartCalcTypeFilter>, "many">>;
|
|
19
19
|
}, "strip", z.ZodTypeAny, {
|
|
20
20
|
equipmentId: number;
|
|
21
21
|
searchString?: string | undefined;
|
|
@@ -25,7 +25,7 @@ export declare const GetProductionTaskByEquipmentDtoZod: z.ZodObject<{
|
|
|
25
25
|
} | null | undefined;
|
|
26
26
|
taskId?: number | null | undefined;
|
|
27
27
|
onlyTOperation?: number | undefined;
|
|
28
|
-
workStartCalcTypeFilter?: WorkStartCalcTypeFilter | undefined;
|
|
28
|
+
workStartCalcTypeFilter?: WorkStartCalcTypeFilter[] | undefined;
|
|
29
29
|
}, {
|
|
30
30
|
equipmentId: number;
|
|
31
31
|
searchString?: string | undefined;
|
|
@@ -35,6 +35,6 @@ export declare const GetProductionTaskByEquipmentDtoZod: z.ZodObject<{
|
|
|
35
35
|
} | null | undefined;
|
|
36
36
|
taskId?: number | null | undefined;
|
|
37
37
|
onlyTOperation?: number | undefined;
|
|
38
|
-
workStartCalcTypeFilter?: WorkStartCalcTypeFilter | undefined;
|
|
38
|
+
workStartCalcTypeFilter?: WorkStartCalcTypeFilter[] | undefined;
|
|
39
39
|
}>;
|
|
40
40
|
export type GetProductionTaskByEquipmentDtoZodType = z.infer<typeof GetProductionTaskByEquipmentDtoZod>;
|
|
@@ -15,5 +15,7 @@ exports.GetProductionTaskByEquipmentDtoZod = zod_1.z.object({
|
|
|
15
15
|
.nullable()
|
|
16
16
|
.optional(),
|
|
17
17
|
onlyTOperation: zod_1.z.number().int().optional(),
|
|
18
|
-
workStartCalcTypeFilter: zod_1.z
|
|
18
|
+
workStartCalcTypeFilter: zod_1.z
|
|
19
|
+
.array(zod_1.z.nativeEnum(enums_1.WorkStartCalcTypeFilter))
|
|
20
|
+
.optional()
|
|
19
21
|
});
|
|
@@ -6,7 +6,7 @@ export declare const GetProductionTaskByUserDtoZod: z.ZodObject<{
|
|
|
6
6
|
page: z.ZodDefault<z.ZodNumber>;
|
|
7
7
|
taskId: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodNumber>>>;
|
|
8
8
|
onlyTOperation: z.ZodOptional<z.ZodNumber>;
|
|
9
|
-
workStartCalcTypeFilter: z.ZodOptional<z.ZodNativeEnum<typeof WorkStartCalcTypeFilter>>;
|
|
9
|
+
workStartCalcTypeFilter: z.ZodOptional<z.ZodArray<z.ZodNativeEnum<typeof WorkStartCalcTypeFilter>, "many">>;
|
|
10
10
|
range: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
11
11
|
start: z.ZodAny;
|
|
12
12
|
end: z.ZodAny;
|
|
@@ -27,7 +27,7 @@ export declare const GetProductionTaskByUserDtoZod: z.ZodObject<{
|
|
|
27
27
|
} | null | undefined;
|
|
28
28
|
taskId?: number | null | undefined;
|
|
29
29
|
onlyTOperation?: number | undefined;
|
|
30
|
-
workStartCalcTypeFilter?: WorkStartCalcTypeFilter | undefined;
|
|
30
|
+
workStartCalcTypeFilter?: WorkStartCalcTypeFilter[] | undefined;
|
|
31
31
|
}, {
|
|
32
32
|
userId: number;
|
|
33
33
|
page?: number | undefined;
|
|
@@ -38,6 +38,6 @@ export declare const GetProductionTaskByUserDtoZod: z.ZodObject<{
|
|
|
38
38
|
} | null | undefined;
|
|
39
39
|
taskId?: number | null | undefined;
|
|
40
40
|
onlyTOperation?: number | undefined;
|
|
41
|
-
workStartCalcTypeFilter?: WorkStartCalcTypeFilter | undefined;
|
|
41
|
+
workStartCalcTypeFilter?: WorkStartCalcTypeFilter[] | undefined;
|
|
42
42
|
}>;
|
|
43
43
|
export type GetProductionTaskByUserDtoZodType = z.infer<typeof GetProductionTaskByUserDtoZod>;
|
|
@@ -9,7 +9,9 @@ exports.GetProductionTaskByUserDtoZod = zod_1.z.object({
|
|
|
9
9
|
page: zod_1.z.number().int().min(0).default(0),
|
|
10
10
|
taskId: zod_1.z.number().int().nullable().default(null).optional(),
|
|
11
11
|
onlyTOperation: zod_1.z.number().int().optional(),
|
|
12
|
-
workStartCalcTypeFilter: zod_1.z
|
|
12
|
+
workStartCalcTypeFilter: zod_1.z
|
|
13
|
+
.array(zod_1.z.nativeEnum(enums_1.WorkStartCalcTypeFilter))
|
|
14
|
+
.optional(),
|
|
13
15
|
range: zod_1.z
|
|
14
16
|
.object({
|
|
15
17
|
start: zod_1.z.any(),
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import {
|
|
2
|
+
import { StockOrderType } from '../../utils';
|
|
3
3
|
import { IFiltersByByOrder, IFiltersByParents, IFiltersByUserProductionTask } from '../interfaces/online-board';
|
|
4
4
|
export declare const OnlineBoardWorkingDtoZod: z.ZodObject<{
|
|
5
5
|
page: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
@@ -23,16 +23,26 @@ export declare const OnlineBoardWorkingDtoZod: z.ZodObject<{
|
|
|
23
23
|
childrenByProductionTaskIds: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodNumber, "many">>>;
|
|
24
24
|
isComplect: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
25
25
|
productionIds: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodOptional<z.ZodArray<z.ZodNumber, "many">>>>>;
|
|
26
|
-
|
|
27
|
-
|
|
26
|
+
sort: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
27
|
+
sortField: z.ZodOptional<z.ZodNullable<z.ZodNativeEnum<typeof import("../../utils").ProductionPlanSortField>>>;
|
|
28
|
+
sortDesc: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
29
|
+
}, "strip", z.ZodTypeAny, {
|
|
30
|
+
sortDesc: boolean;
|
|
31
|
+
sortField?: import("../../utils").ProductionPlanSortField | null | undefined;
|
|
32
|
+
}, {
|
|
33
|
+
sortField?: import("../../utils").ProductionPlanSortField | null | undefined;
|
|
34
|
+
sortDesc?: boolean | undefined;
|
|
35
|
+
}>, "many">>>;
|
|
28
36
|
}, "strip", z.ZodTypeAny, {
|
|
29
|
-
|
|
37
|
+
sort: {
|
|
38
|
+
sortDesc: boolean;
|
|
39
|
+
sortField?: import("../../utils").ProductionPlanSortField | null | undefined;
|
|
40
|
+
}[];
|
|
30
41
|
workingType: StockOrderType;
|
|
31
42
|
employeIds: number[] | null;
|
|
32
43
|
isComplect: boolean;
|
|
33
44
|
productionIds: number[] | null;
|
|
34
45
|
page?: number | null | undefined;
|
|
35
|
-
sortField?: ProductionPlanSortField | null | undefined;
|
|
36
46
|
range?: {
|
|
37
47
|
start?: any;
|
|
38
48
|
end?: any;
|
|
@@ -45,9 +55,11 @@ export declare const OnlineBoardWorkingDtoZod: z.ZodObject<{
|
|
|
45
55
|
childrenByProductionTaskIds?: number[] | null | undefined;
|
|
46
56
|
}, {
|
|
47
57
|
workingType: StockOrderType;
|
|
58
|
+
sort?: {
|
|
59
|
+
sortField?: import("../../utils").ProductionPlanSortField | null | undefined;
|
|
60
|
+
sortDesc?: boolean | undefined;
|
|
61
|
+
}[] | undefined;
|
|
48
62
|
page?: number | null | undefined;
|
|
49
|
-
sortField?: ProductionPlanSortField | null | undefined;
|
|
50
|
-
sortDesc?: boolean | undefined;
|
|
51
63
|
range?: {
|
|
52
64
|
start?: any;
|
|
53
65
|
end?: any;
|
|
@@ -25,6 +25,5 @@ exports.OnlineBoardWorkingDtoZod = zod_1.z.object({
|
|
|
25
25
|
childrenByProductionTaskIds: zod_1.z.array(zod_1.z.number()).nullable().optional(),
|
|
26
26
|
isComplect: zod_1.z.boolean().optional().default(false),
|
|
27
27
|
productionIds: zod_1.z.array(zod_1.z.number()).optional().nullish().default([]),
|
|
28
|
-
|
|
29
|
-
sortDesc: zod_1.z.boolean().optional().default(false)
|
|
28
|
+
sort: zod_1.z.array(utils_1.ProductionPlanSortRuleSchema).optional().default([])
|
|
30
29
|
});
|
|
@@ -168,6 +168,7 @@ export interface IGetDeficitsDetalByProductionTask {
|
|
|
168
168
|
preTime: number;
|
|
169
169
|
};
|
|
170
170
|
isHasMaterial: boolean;
|
|
171
|
+
isOrderedByStockOrder: boolean;
|
|
171
172
|
productionOperation: ModelProductionOperationPos;
|
|
172
173
|
calculateNeedsTime: Date | null;
|
|
173
174
|
productionTaskDueDate: Date;
|
|
@@ -411,6 +411,12 @@ exports.accessRoleDefaultValue = {
|
|
|
411
411
|
changeYour: true,
|
|
412
412
|
changeEverything: true,
|
|
413
413
|
title: 'Действия'
|
|
414
|
+
},
|
|
415
|
+
notifications: {
|
|
416
|
+
read: true,
|
|
417
|
+
changeYour: false,
|
|
418
|
+
changeEverything: true,
|
|
419
|
+
title: 'Настройки уведомлений'
|
|
414
420
|
}
|
|
415
421
|
}
|
|
416
422
|
},
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import {
|
|
2
|
+
import { statusShipment } from '../../utils';
|
|
3
3
|
export declare const ShipmentsPaginateSchema: z.ZodObject<{
|
|
4
4
|
offset: z.ZodNumber;
|
|
5
5
|
parentId: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
@@ -17,19 +17,29 @@ export declare const ShipmentsPaginateSchema: z.ZodObject<{
|
|
|
17
17
|
companyId: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
18
18
|
searchStr: z.ZodOptional<z.ZodString>;
|
|
19
19
|
attributes: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
20
|
-
|
|
21
|
-
|
|
20
|
+
sort: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
21
|
+
sortField: z.ZodOptional<z.ZodNullable<z.ZodNativeEnum<typeof import("../../utils").ProductionPlanSortField>>>;
|
|
22
|
+
sortDesc: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
23
|
+
}, "strip", z.ZodTypeAny, {
|
|
24
|
+
sortDesc: boolean;
|
|
25
|
+
sortField?: import("../../utils").ProductionPlanSortField | null | undefined;
|
|
26
|
+
}, {
|
|
27
|
+
sortField?: import("../../utils").ProductionPlanSortField | null | undefined;
|
|
28
|
+
sortDesc?: boolean | undefined;
|
|
29
|
+
}>, "many">>>;
|
|
22
30
|
}, "strip", z.ZodTypeAny, {
|
|
31
|
+
sort: {
|
|
32
|
+
sortDesc: boolean;
|
|
33
|
+
sortField?: import("../../utils").ProductionPlanSortField | null | undefined;
|
|
34
|
+
}[];
|
|
23
35
|
status: statusShipment[];
|
|
24
36
|
dateRange: {
|
|
25
37
|
start: string;
|
|
26
38
|
end: string;
|
|
27
39
|
} | null;
|
|
28
|
-
sortDesc: boolean;
|
|
29
40
|
offset: number;
|
|
30
41
|
attributes?: string[] | undefined;
|
|
31
42
|
parentId?: number | null | undefined;
|
|
32
|
-
sortField?: ProductionPlanSortField | null | undefined;
|
|
33
43
|
searchStr?: string | undefined;
|
|
34
44
|
companyId?: number | null | undefined;
|
|
35
45
|
}, {
|
|
@@ -39,10 +49,12 @@ export declare const ShipmentsPaginateSchema: z.ZodObject<{
|
|
|
39
49
|
end: string;
|
|
40
50
|
} | null;
|
|
41
51
|
offset: number;
|
|
52
|
+
sort?: {
|
|
53
|
+
sortField?: import("../../utils").ProductionPlanSortField | null | undefined;
|
|
54
|
+
sortDesc?: boolean | undefined;
|
|
55
|
+
}[] | undefined;
|
|
42
56
|
attributes?: string[] | undefined;
|
|
43
57
|
parentId?: number | null | undefined;
|
|
44
|
-
sortField?: ProductionPlanSortField | null | undefined;
|
|
45
|
-
sortDesc?: boolean | undefined;
|
|
46
58
|
searchStr?: string | undefined;
|
|
47
59
|
companyId?: number | null | undefined;
|
|
48
60
|
}>;
|
|
@@ -17,6 +17,5 @@ exports.ShipmentsPaginateSchema = zod_1.z.object({
|
|
|
17
17
|
companyId: zod_1.z.number().int().nullish(),
|
|
18
18
|
searchStr: zod_1.z.string().optional(),
|
|
19
19
|
attributes: zod_1.z.array(zod_1.z.string()).optional(),
|
|
20
|
-
|
|
21
|
-
sortDesc: zod_1.z.boolean().optional().default(false)
|
|
20
|
+
sort: zod_1.z.array(utils_1.ProductionPlanSortRuleSchema).optional().default([])
|
|
22
21
|
});
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { ModelStockOrderItem } from './stock-order-item.schema';
|
|
3
|
-
import { StockOrderType } from '../../utils';
|
|
3
|
+
import { EnumStatusOrder, StockOrderType } from '../../utils';
|
|
4
4
|
declare const StockOrderSchema: z.ZodObject<{
|
|
5
5
|
id: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
6
6
|
number_order: z.ZodString;
|
|
7
7
|
date_order: z.ZodDate;
|
|
8
8
|
type: z.ZodNativeEnum<typeof StockOrderType>;
|
|
9
9
|
ban: z.ZodDefault<z.ZodBoolean>;
|
|
10
|
+
status: z.ZodOptional<z.ZodNativeEnum<typeof EnumStatusOrder>>;
|
|
10
11
|
description: z.ZodOptional<z.ZodString>;
|
|
11
12
|
createdAt: z.ZodOptional<z.ZodString>;
|
|
12
13
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -14,6 +15,7 @@ declare const StockOrderSchema: z.ZodObject<{
|
|
|
14
15
|
ban: boolean;
|
|
15
16
|
number_order: string;
|
|
16
17
|
date_order: Date;
|
|
18
|
+
status?: EnumStatusOrder | undefined;
|
|
17
19
|
description?: string | undefined;
|
|
18
20
|
id?: number | null | undefined;
|
|
19
21
|
createdAt?: string | undefined;
|
|
@@ -21,6 +23,7 @@ declare const StockOrderSchema: z.ZodObject<{
|
|
|
21
23
|
type: StockOrderType;
|
|
22
24
|
number_order: string;
|
|
23
25
|
date_order: Date;
|
|
26
|
+
status?: EnumStatusOrder | undefined;
|
|
24
27
|
ban?: boolean | undefined;
|
|
25
28
|
description?: string | undefined;
|
|
26
29
|
id?: number | null | undefined;
|
|
@@ -8,6 +8,7 @@ const StockOrderSchema = zod_1.z.object({
|
|
|
8
8
|
date_order: zod_1.z.coerce.date(),
|
|
9
9
|
type: zod_1.z.nativeEnum(utils_1.StockOrderType),
|
|
10
10
|
ban: zod_1.z.boolean().default(false),
|
|
11
|
+
status: zod_1.z.nativeEnum(utils_1.EnumStatusOrder).optional(),
|
|
11
12
|
description: zod_1.z.string().optional(),
|
|
12
13
|
createdAt: zod_1.z.string().optional()
|
|
13
14
|
});
|
package/dist/utils/enums.d.ts
CHANGED
|
@@ -56,6 +56,7 @@ export declare enum statusShipment {
|
|
|
56
56
|
export declare enum EnumStatusDelivery {
|
|
57
57
|
order = "\u0417\u0430\u043A\u0430\u0437\u0430\u043D\u043E",
|
|
58
58
|
delivery = "\u0414\u043E\u0441\u0442\u0430\u0432\u043B\u0435\u043D\u043E",
|
|
59
|
+
ban = "\u0423\u0434\u0430\u043B\u0435\u043D\u043E",
|
|
59
60
|
done = "\u041E\u0442\u0433\u0440\u0443\u0436\u0435\u043D\u043E"
|
|
60
61
|
}
|
|
61
62
|
/**
|
|
@@ -331,3 +332,10 @@ export declare enum EnumStatusOrder {
|
|
|
331
332
|
archive = "archive",
|
|
332
333
|
overdue = "overdue"
|
|
333
334
|
}
|
|
335
|
+
/**
|
|
336
|
+
* Enum используется для определения типа исключения
|
|
337
|
+
*/
|
|
338
|
+
export declare enum EnumExclusionType {
|
|
339
|
+
disignation = "designation",
|
|
340
|
+
article = "article"
|
|
341
|
+
}
|
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";
|
|
@@ -69,6 +69,7 @@ var EnumStatusDelivery;
|
|
|
69
69
|
(function (EnumStatusDelivery) {
|
|
70
70
|
EnumStatusDelivery["order"] = "\u0417\u0430\u043A\u0430\u0437\u0430\u043D\u043E";
|
|
71
71
|
EnumStatusDelivery["delivery"] = "\u0414\u043E\u0441\u0442\u0430\u0432\u043B\u0435\u043D\u043E";
|
|
72
|
+
EnumStatusDelivery["ban"] = "\u0423\u0434\u0430\u043B\u0435\u043D\u043E";
|
|
72
73
|
EnumStatusDelivery["done"] = "\u041E\u0442\u0433\u0440\u0443\u0436\u0435\u043D\u043E";
|
|
73
74
|
})(EnumStatusDelivery || (exports.EnumStatusDelivery = EnumStatusDelivery = {}));
|
|
74
75
|
/**
|
|
@@ -395,3 +396,11 @@ var EnumStatusOrder;
|
|
|
395
396
|
// Просрочено
|
|
396
397
|
EnumStatusOrder["overdue"] = "overdue";
|
|
397
398
|
})(EnumStatusOrder || (exports.EnumStatusOrder = EnumStatusOrder = {}));
|
|
399
|
+
/**
|
|
400
|
+
* Enum используется для определения типа исключения
|
|
401
|
+
*/
|
|
402
|
+
var EnumExclusionType;
|
|
403
|
+
(function (EnumExclusionType) {
|
|
404
|
+
EnumExclusionType["disignation"] = "designation";
|
|
405
|
+
EnumExclusionType["article"] = "article";
|
|
406
|
+
})(EnumExclusionType || (exports.EnumExclusionType = EnumExclusionType = {}));
|
package/dist/utils/methods.d.ts
CHANGED
|
@@ -22,10 +22,6 @@ export declare function moreMinusNum(num: number): number;
|
|
|
22
22
|
*/
|
|
23
23
|
export declare function getFieldsSpetification(list: EntityCommonSpecification[], subKey: keyof EntityCommonSpecification): (string | number | boolean | undefined)[] | null;
|
|
24
24
|
export declare const calculateByMeasurementRate: (units_measurement: IUnitsMeasurement[], ezId: number) => number;
|
|
25
|
-
/**
|
|
26
|
-
* Функция проверяет, является ли введенное обозначение исключением
|
|
27
|
-
*/
|
|
28
|
-
export declare function isThisExclusionDesignation(designation: string, isProduct?: boolean): boolean;
|
|
29
25
|
/**
|
|
30
26
|
*
|
|
31
27
|
* @param marks
|
package/dist/utils/methods.js
CHANGED
|
@@ -23,7 +23,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
23
23
|
exports.intersect = exports.shipmentsNullOne = exports.differencesShipments = exports.dateDifference = exports.toFormatString = exports.comparison = exports.comparisonTimestamp = exports.parseDate = exports.dataFormat = exports.dateToTimestampFormat = exports.convertStringValuesToNumbers = exports.dateToFormat = exports.photoPreloadUrl = exports.isImage = exports.getReversDate = exports.isValidNumber = exports.returnTypePosition = exports.checkMissingEntity = exports.countChildrensRelative = exports.concatedLists = exports.countUniqueValueChildren = exports.removeArrDublicateByAttr = exports.getOnCommonListChildrens = exports.sleep = exports.parseBoolean = exports.strIsBoolean = exports.useWorkpieceCharacterizationItems = exports.getFileType = exports.calculateStartDate = exports.calculateEndDate = exports.WORK_DAY_END_MINUTE = exports.WORK_DAY_END_HOUR = exports.WORK_DAY_START_HOUR = exports.leftToDoByProductionTask = exports.calculateByMeasurementRate = void 0;
|
|
24
24
|
exports.moreMinusNum = moreMinusNum;
|
|
25
25
|
exports.getFieldsSpetification = getFieldsSpetification;
|
|
26
|
-
exports.isThisExclusionDesignation = isThisExclusionDesignation;
|
|
27
26
|
exports.organiseListCbedDetal = organiseListCbedDetal;
|
|
28
27
|
exports.getFieldBySpetificationList = getFieldBySpetificationList;
|
|
29
28
|
exports.lessPlusNum = lessPlusNum;
|
|
@@ -80,24 +79,6 @@ const calculateByMeasurementRate = (units_measurement, ezId) => {
|
|
|
80
79
|
return convertRate;
|
|
81
80
|
};
|
|
82
81
|
exports.calculateByMeasurementRate = calculateByMeasurementRate;
|
|
83
|
-
/**
|
|
84
|
-
* Функция проверяет, является ли введенное обозначение исключением
|
|
85
|
-
*/
|
|
86
|
-
function isThisExclusionDesignation(designation, isProduct = false) {
|
|
87
|
-
let exclusions = ['-', '', '?', '- архив'];
|
|
88
|
-
const productExclusions = [
|
|
89
|
-
'покупной',
|
|
90
|
-
'',
|
|
91
|
-
'ремонт',
|
|
92
|
-
'документ',
|
|
93
|
-
'оснастка',
|
|
94
|
-
'опция'
|
|
95
|
-
];
|
|
96
|
-
if (isProduct)
|
|
97
|
-
exclusions = exclusions.concat(productExclusions);
|
|
98
|
-
const lowerDesignation = `${designation}`.toLowerCase();
|
|
99
|
-
return exclusions.includes(lowerDesignation);
|
|
100
|
-
}
|
|
101
82
|
/**
|
|
102
83
|
*
|
|
103
84
|
* @param marks
|
|
@@ -784,7 +765,7 @@ const countChildrensRelative = (data) => {
|
|
|
784
765
|
const foundedCbed = cbeds.find(cbed => listCbedItem.id === cbed.id);
|
|
785
766
|
return Object.assign(Object.assign(Object.assign({}, foundedCbed), (0, sequelize_1.addFieldByCondition)(data.isNeedsTypes, {
|
|
786
767
|
entity_type: enums_1.IzdType.cbed
|
|
787
|
-
})), { count_to_obj: listCbedItem.quantity, count_to_needs: relativeNeeds * listCbedItem.quantity, needs: relativeNeeds * listCbedItem.quantity, parent_id: relative.id, parent_type: relativeType, parent_designation: (relative === null || relative === void 0 ? void 0 : relative.designation) || '-', parent_name: (relative === null || relative === void 0 ? void 0 : relative.name) || '-' });
|
|
768
|
+
})), { count_to_obj: listCbedItem.quantity, count_to_needs: relativeNeeds * listCbedItem.quantity, needs: relativeNeeds * listCbedItem.quantity, parent_id: relative.id, parent_type: relativeType, parent_ava: relative === null || relative === void 0 ? void 0 : relative.ava_path, parent_designation: (relative === null || relative === void 0 ? void 0 : relative.designation) || '-', parent_name: (relative === null || relative === void 0 ? void 0 : relative.name) || '-' });
|
|
788
769
|
})) || [];
|
|
789
770
|
relative.cbedGraph = [...relative.cbeds];
|
|
790
771
|
}
|
|
@@ -794,7 +775,7 @@ const countChildrensRelative = (data) => {
|
|
|
794
775
|
const foundedDetal = detals.find(detal => listDetalItem.id === detal.id);
|
|
795
776
|
return Object.assign(Object.assign(Object.assign({}, foundedDetal), (0, sequelize_1.addFieldByCondition)(data.isNeedsTypes, {
|
|
796
777
|
entity_type: enums_1.IzdType.detal
|
|
797
|
-
})), { count_to_obj: listDetalItem.quantity, count_to_needs: relativeNeeds * listDetalItem.quantity, needs: relativeNeeds * listDetalItem.quantity, parent_id: relative.id, parent_type: relativeType, parent_designation: (relative === null || relative === void 0 ? void 0 : relative.designation) || '-', parent_name: (relative === null || relative === void 0 ? void 0 : relative.name) || '-' });
|
|
778
|
+
})), { count_to_obj: listDetalItem.quantity, count_to_needs: relativeNeeds * listDetalItem.quantity, needs: relativeNeeds * listDetalItem.quantity, parent_id: relative.id, parent_type: relativeType, parent_ava: relative === null || relative === void 0 ? void 0 : relative.ava_path, parent_designation: (relative === null || relative === void 0 ? void 0 : relative.designation) || '-', parent_name: (relative === null || relative === void 0 ? void 0 : relative.name) || '-' });
|
|
798
779
|
})) || [];
|
|
799
780
|
relative.detalsGraph = [...relative.detals];
|
|
800
781
|
}
|
|
@@ -837,7 +818,7 @@ const countChildrensRelative = (data) => {
|
|
|
837
818
|
: 0;
|
|
838
819
|
return Object.assign(Object.assign(Object.assign({}, foundedMaterials), (0, sequelize_1.addFieldByCondition)(data.isNeedsTypes, {
|
|
839
820
|
entity_type: enums_1.IzdType.material
|
|
840
|
-
})), { measure_id: listMaterialItem.measureId, count_to_obj_not_converted: listMaterialItem.quantity, count_to_needs_not_converted: relativeNeeds * listMaterialItem.quantity, count_to_obj: specificationConvertedQuantity, count_to_needs: relativeNeeds * specificationConvertedQuantity, needs: relativeNeeds * specificationConvertedQuantity, parent_id: relative.id, parent_type: relativeType, parent_designation: (relative === null || relative === void 0 ? void 0 : relative.designation) || '-', parent_name: (relative === null || relative === void 0 ? void 0 : relative.name) || '-' });
|
|
821
|
+
})), { measure_id: listMaterialItem.measureId, count_to_obj_not_converted: listMaterialItem.quantity, count_to_needs_not_converted: relativeNeeds * listMaterialItem.quantity, count_to_obj: specificationConvertedQuantity, count_to_needs: relativeNeeds * specificationConvertedQuantity, needs: relativeNeeds * specificationConvertedQuantity, parent_id: relative.id, parent_type: relativeType, parent_ava: relative === null || relative === void 0 ? void 0 : relative.ava_path, parent_designation: (relative === null || relative === void 0 ? void 0 : relative.designation) || '-', parent_name: (relative === null || relative === void 0 ? void 0 : relative.name) || '-' });
|
|
841
822
|
});
|
|
842
823
|
materialsArray.forEach((currentMaterial) => {
|
|
843
824
|
const materialKey = `${currentMaterial.parent_id}_${currentMaterial.parent_type}_${currentMaterial.id}`;
|