@pksep/zod-shared 0.0.533 → 0.0.534
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/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/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/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/online-board-working.dto.d.ts +19 -7
- package/dist/production-tasks/dto/online-board-working.dto.js +1 -2
- package/dist/shipments/dto/shipments-paginate.dto.d.ts +19 -7
- package/dist/shipments/dto/shipments-paginate.dto.js +1 -2
- package/dist/utils/enums.d.ts +7 -0
- package/dist/utils/enums.js +9 -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 +33 -17
- package/package.json +1 -1
|
@@ -37,7 +37,8 @@ export declare enum ActionEntityTypes {
|
|
|
37
37
|
revision = "revision",
|
|
38
38
|
thread_entity = "thread_entity",
|
|
39
39
|
user_table_config = "user_table_config",
|
|
40
|
-
tasks = "tasks"
|
|
40
|
+
tasks = "tasks",
|
|
41
|
+
exclusion = "exclusion"
|
|
41
42
|
}
|
|
42
43
|
/**
|
|
43
44
|
* enum для обращения к моделям в бд
|
|
@@ -187,4 +188,8 @@ export declare const ActionEntityTypesDB: {
|
|
|
187
188
|
readonly name: "user_table_configs";
|
|
188
189
|
readonly attributes: readonly ["id"];
|
|
189
190
|
};
|
|
191
|
+
readonly exclusion: {
|
|
192
|
+
readonly name: "exclusion";
|
|
193
|
+
readonly attributes: readonly ["id"];
|
|
194
|
+
};
|
|
190
195
|
};
|
|
@@ -42,6 +42,7 @@ var ActionEntityTypes;
|
|
|
42
42
|
ActionEntityTypes["thread_entity"] = "thread_entity";
|
|
43
43
|
ActionEntityTypes["user_table_config"] = "user_table_config";
|
|
44
44
|
ActionEntityTypes["tasks"] = "tasks";
|
|
45
|
+
ActionEntityTypes["exclusion"] = "exclusion";
|
|
45
46
|
})(ActionEntityTypes || (exports.ActionEntityTypes = ActionEntityTypes = {}));
|
|
46
47
|
/**
|
|
47
48
|
* enum для обращения к моделям в бд
|
|
@@ -133,5 +134,9 @@ exports.ActionEntityTypesDB = {
|
|
|
133
134
|
[ActionEntityTypes.user_table_config]: {
|
|
134
135
|
name: 'user_table_configs',
|
|
135
136
|
attributes: ['id']
|
|
137
|
+
},
|
|
138
|
+
[ActionEntityTypes.exclusion]: {
|
|
139
|
+
name: 'exclusion',
|
|
140
|
+
attributes: ['id']
|
|
136
141
|
}
|
|
137
142
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { IzdType
|
|
2
|
+
import { IzdType } from '../../utils';
|
|
3
3
|
import { IFiltersByByOrder, IFiltersByParents } from '../../production-tasks';
|
|
4
4
|
export declare const AssemblyPaginateDtoZod: z.ZodObject<{
|
|
5
5
|
type: z.ZodEnum<[IzdType.product, IzdType.cbed]>;
|
|
@@ -8,24 +8,36 @@ export declare const AssemblyPaginateDtoZod: z.ZodObject<{
|
|
|
8
8
|
byParents: z.ZodOptional<z.ZodNullable<z.ZodType<IFiltersByParents, z.ZodTypeDef, IFiltersByParents>>>;
|
|
9
9
|
byOrder: z.ZodOptional<z.ZodNullable<z.ZodType<IFiltersByByOrder, z.ZodTypeDef, IFiltersByByOrder>>>;
|
|
10
10
|
isShowDeactivate: z.ZodBoolean;
|
|
11
|
-
|
|
12
|
-
|
|
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">>>;
|
|
13
21
|
}, "strip", z.ZodTypeAny, {
|
|
14
22
|
type: IzdType.product | IzdType.cbed;
|
|
23
|
+
sort: {
|
|
24
|
+
sortDesc: boolean;
|
|
25
|
+
sortField?: import("../../utils").ProductionPlanSortField | null | undefined;
|
|
26
|
+
}[];
|
|
15
27
|
searchString: string;
|
|
16
|
-
sortDesc: boolean;
|
|
17
28
|
isShowDeactivate: boolean;
|
|
18
29
|
page?: number | undefined;
|
|
19
|
-
sortField?: ProductionPlanSortField | null | undefined;
|
|
20
30
|
byParents?: IFiltersByParents | null | undefined;
|
|
21
31
|
byOrder?: IFiltersByByOrder | null | undefined;
|
|
22
32
|
}, {
|
|
23
33
|
type: IzdType.product | IzdType.cbed;
|
|
24
34
|
isShowDeactivate: boolean;
|
|
35
|
+
sort?: {
|
|
36
|
+
sortField?: import("../../utils").ProductionPlanSortField | null | undefined;
|
|
37
|
+
sortDesc?: boolean | undefined;
|
|
38
|
+
}[] | undefined;
|
|
25
39
|
page?: number | undefined;
|
|
26
40
|
searchString?: string | undefined;
|
|
27
|
-
sortField?: ProductionPlanSortField | null | undefined;
|
|
28
|
-
sortDesc?: boolean | undefined;
|
|
29
41
|
byParents?: IFiltersByParents | null | undefined;
|
|
30
42
|
byOrder?: IFiltersByByOrder | null | undefined;
|
|
31
43
|
}>;
|
|
@@ -11,6 +11,5 @@ exports.AssemblyPaginateDtoZod = zod_1.z.object({
|
|
|
11
11
|
byParents: zod_1.z.custom().nullable().optional(),
|
|
12
12
|
byOrder: zod_1.z.custom().nullable().optional(),
|
|
13
13
|
isShowDeactivate: zod_1.z.boolean(),
|
|
14
|
-
|
|
15
|
-
sortDesc: zod_1.z.boolean().optional().default(false)
|
|
14
|
+
sort: zod_1.z.array(utils_1.ProductionPlanSortRuleSchema).optional().default([])
|
|
16
15
|
});
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { IFiltersByByOrder, IFiltersByParents } from '../../production-tasks';
|
|
3
|
-
import { AssembleIzdEnum
|
|
3
|
+
import { AssembleIzdEnum } from '../../utils';
|
|
4
4
|
export declare const GetAssembleScladPaginationDtoZod: z.ZodObject<{
|
|
5
5
|
page: z.ZodNumber;
|
|
6
6
|
searchString: z.ZodString;
|
|
@@ -8,24 +8,36 @@ export declare const GetAssembleScladPaginationDtoZod: z.ZodObject<{
|
|
|
8
8
|
byParents: z.ZodOptional<z.ZodNullable<z.ZodType<IFiltersByParents, z.ZodTypeDef, IFiltersByParents>>>;
|
|
9
9
|
type: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodNativeEnum<typeof AssembleIzdEnum>>>>;
|
|
10
10
|
byOrder: z.ZodOptional<z.ZodNullable<z.ZodType<IFiltersByByOrder, z.ZodTypeDef, IFiltersByByOrder>>>;
|
|
11
|
-
|
|
12
|
-
|
|
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">>>;
|
|
13
21
|
}, "strip", z.ZodTypeAny, {
|
|
14
22
|
type: AssembleIzdEnum | null;
|
|
23
|
+
sort: {
|
|
24
|
+
sortDesc: boolean;
|
|
25
|
+
sortField?: import("../../utils").ProductionPlanSortField | null | undefined;
|
|
26
|
+
}[];
|
|
15
27
|
page: number;
|
|
16
28
|
searchString: string;
|
|
17
|
-
sortDesc: boolean;
|
|
18
29
|
responsibleUserId?: number | null | undefined;
|
|
19
|
-
sortField?: ProductionPlanSortField | null | undefined;
|
|
20
30
|
byParents?: IFiltersByParents | null | undefined;
|
|
21
31
|
byOrder?: IFiltersByByOrder | null | undefined;
|
|
22
32
|
}, {
|
|
23
33
|
page: number;
|
|
24
34
|
searchString: string;
|
|
25
35
|
type?: AssembleIzdEnum | null | undefined;
|
|
36
|
+
sort?: {
|
|
37
|
+
sortField?: import("../../utils").ProductionPlanSortField | null | undefined;
|
|
38
|
+
sortDesc?: boolean | undefined;
|
|
39
|
+
}[] | undefined;
|
|
26
40
|
responsibleUserId?: number | null | undefined;
|
|
27
|
-
sortField?: ProductionPlanSortField | null | undefined;
|
|
28
|
-
sortDesc?: boolean | undefined;
|
|
29
41
|
byParents?: IFiltersByParents | null | undefined;
|
|
30
42
|
byOrder?: IFiltersByByOrder | null | undefined;
|
|
31
43
|
}>;
|
|
@@ -10,6 +10,5 @@ exports.GetAssembleScladPaginationDtoZod = zod_1.z.object({
|
|
|
10
10
|
byParents: zod_1.z.custom().nullable().optional(),
|
|
11
11
|
type: zod_1.z.nativeEnum(utils_1.AssembleIzdEnum).nullish().default(utils_1.AssembleIzdEnum.all),
|
|
12
12
|
byOrder: zod_1.z.custom().nullable().optional(),
|
|
13
|
-
|
|
14
|
-
sortDesc: zod_1.z.boolean().optional().default(false)
|
|
13
|
+
sort: zod_1.z.array(utils_1.ProductionPlanSortRuleSchema).optional().default([])
|
|
15
14
|
});
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { AssembleIzdEnum,
|
|
2
|
+
import { AssembleIzdEnum, SortReadinesEnum } from '../../utils';
|
|
3
3
|
import { IFiltersByByOrder, IFiltersByParents } from '../../production-tasks';
|
|
4
4
|
export declare const GetAssemblePaginationDtoZod: z.ZodObject<{
|
|
5
5
|
page: z.ZodNumber;
|
|
@@ -12,18 +12,28 @@ export declare const GetAssemblePaginationDtoZod: z.ZodObject<{
|
|
|
12
12
|
sortReadines: z.ZodDefault<z.ZodNativeEnum<typeof SortReadinesEnum>>;
|
|
13
13
|
byOrder: z.ZodOptional<z.ZodNullable<z.ZodType<IFiltersByByOrder, z.ZodTypeDef, IFiltersByByOrder>>>;
|
|
14
14
|
onlyCanComplect: z.ZodBoolean;
|
|
15
|
-
|
|
16
|
-
|
|
15
|
+
sort: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
16
|
+
sortField: z.ZodOptional<z.ZodNullable<z.ZodNativeEnum<typeof import("../../utils").ProductionPlanSortField>>>;
|
|
17
|
+
sortDesc: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
18
|
+
}, "strip", z.ZodTypeAny, {
|
|
19
|
+
sortDesc: boolean;
|
|
20
|
+
sortField?: import("../../utils").ProductionPlanSortField | null | undefined;
|
|
21
|
+
}, {
|
|
22
|
+
sortField?: import("../../utils").ProductionPlanSortField | null | undefined;
|
|
23
|
+
sortDesc?: boolean | undefined;
|
|
24
|
+
}>, "many">>>;
|
|
17
25
|
}, "strip", z.ZodTypeAny, {
|
|
18
26
|
type: AssembleIzdEnum;
|
|
27
|
+
sort: {
|
|
28
|
+
sortDesc: boolean;
|
|
29
|
+
sortField?: import("../../utils").ProductionPlanSortField | null | undefined;
|
|
30
|
+
}[];
|
|
19
31
|
page: number;
|
|
20
32
|
searchString: string;
|
|
21
33
|
responsibleUserId: number | null;
|
|
22
34
|
isBan: boolean;
|
|
23
|
-
sortDesc: boolean;
|
|
24
35
|
sortReadines: SortReadinesEnum;
|
|
25
36
|
onlyCanComplect: boolean;
|
|
26
|
-
sortField?: ProductionPlanSortField | null | undefined;
|
|
27
37
|
byParents?: IFiltersByParents | null | undefined;
|
|
28
38
|
byOrder?: IFiltersByByOrder | null | undefined;
|
|
29
39
|
notOrderedByProductionTask?: boolean | null | undefined;
|
|
@@ -34,8 +44,10 @@ export declare const GetAssemblePaginationDtoZod: z.ZodObject<{
|
|
|
34
44
|
isBan: boolean;
|
|
35
45
|
onlyCanComplect: boolean;
|
|
36
46
|
type?: AssembleIzdEnum | undefined;
|
|
37
|
-
|
|
38
|
-
|
|
47
|
+
sort?: {
|
|
48
|
+
sortField?: import("../../utils").ProductionPlanSortField | null | undefined;
|
|
49
|
+
sortDesc?: boolean | undefined;
|
|
50
|
+
}[] | undefined;
|
|
39
51
|
byParents?: IFiltersByParents | null | undefined;
|
|
40
52
|
byOrder?: IFiltersByByOrder | null | undefined;
|
|
41
53
|
notOrderedByProductionTask?: boolean | null | undefined;
|
|
@@ -14,6 +14,5 @@ exports.GetAssemblePaginationDtoZod = zod_1.z.object({
|
|
|
14
14
|
sortReadines: zod_1.z.nativeEnum(utils_1.SortReadinesEnum).default(utils_1.SortReadinesEnum.any),
|
|
15
15
|
byOrder: zod_1.z.custom().nullable().optional(),
|
|
16
16
|
onlyCanComplect: zod_1.z.boolean(),
|
|
17
|
-
|
|
18
|
-
sortDesc: zod_1.z.boolean().optional().default(false)
|
|
17
|
+
sort: zod_1.z.array(utils_1.ProductionPlanSortRuleSchema).optional().default([])
|
|
19
18
|
});
|
|
@@ -1,28 +1,40 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import {
|
|
2
|
+
import { statusWorkingsDeficit } from '../../utils';
|
|
3
3
|
export declare const GetDeficitDtoZod: z.ZodObject<{
|
|
4
4
|
cbedIds: z.ZodArray<z.ZodNumber, "many">;
|
|
5
5
|
page: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
|
|
6
6
|
statusWorking: z.ZodNativeEnum<typeof statusWorkingsDeficit>;
|
|
7
7
|
searchString: z.ZodString;
|
|
8
8
|
shipmentIds: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodNumber, "many">>>;
|
|
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
|
cbedIds: number[];
|
|
16
27
|
page?: number | null | undefined;
|
|
17
28
|
shipmentIds?: number[] | null | undefined;
|
|
18
|
-
sortField?: ProductionPlanSortField | null | undefined;
|
|
19
29
|
}, {
|
|
20
30
|
searchString: string;
|
|
21
31
|
statusWorking: statusWorkingsDeficit;
|
|
22
32
|
cbedIds: number[];
|
|
33
|
+
sort?: {
|
|
34
|
+
sortField?: import("../../utils").ProductionPlanSortField | null | undefined;
|
|
35
|
+
sortDesc?: boolean | undefined;
|
|
36
|
+
}[] | undefined;
|
|
23
37
|
page?: number | null | undefined;
|
|
24
38
|
shipmentIds?: number[] | null | undefined;
|
|
25
|
-
sortField?: ProductionPlanSortField | null | undefined;
|
|
26
|
-
sortDesc?: boolean | undefined;
|
|
27
39
|
}>;
|
|
28
40
|
export type GetDeficitDtoZodType = z.infer<typeof GetDeficitDtoZod>;
|
|
@@ -9,6 +9,5 @@ exports.GetDeficitDtoZod = zod_1.z.object({
|
|
|
9
9
|
statusWorking: zod_1.z.nativeEnum(utils_1.statusWorkingsDeficit),
|
|
10
10
|
searchString: zod_1.z.string(),
|
|
11
11
|
shipmentIds: zod_1.z.array(zod_1.z.number()).nullable().optional(),
|
|
12
|
-
|
|
13
|
-
sortDesc: zod_1.z.boolean().optional().default(false)
|
|
12
|
+
sort: zod_1.z.array(utils_1.ProductionPlanSortRuleSchema).optional().default([])
|
|
14
13
|
});
|
|
@@ -1,28 +1,40 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import {
|
|
2
|
+
import { statusWorkingsDeficit } from '../../utils';
|
|
3
3
|
export declare const GetDetalDeficitDtoZod: z.ZodObject<{
|
|
4
4
|
detalIds: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodNumber, "many">>>;
|
|
5
5
|
statusWorking: z.ZodDefault<z.ZodOptional<z.ZodNativeEnum<typeof statusWorkingsDeficit>>>;
|
|
6
6
|
searchString: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
7
7
|
shipmentIds: z.ZodDefault<z.ZodNullable<z.ZodOptional<z.ZodArray<z.ZodNumber, "many">>>>;
|
|
8
8
|
page: 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
|
page: number;
|
|
13
25
|
searchString: string;
|
|
14
26
|
detalIds: number[];
|
|
15
27
|
statusWorking: statusWorkingsDeficit;
|
|
16
28
|
shipmentIds: number[] | null;
|
|
17
|
-
sortDesc: boolean;
|
|
18
|
-
sortField?: ProductionPlanSortField | null | undefined;
|
|
19
29
|
}, {
|
|
20
30
|
page: number;
|
|
31
|
+
sort?: {
|
|
32
|
+
sortField?: import("../../utils").ProductionPlanSortField | null | undefined;
|
|
33
|
+
sortDesc?: boolean | undefined;
|
|
34
|
+
}[] | undefined;
|
|
21
35
|
searchString?: string | undefined;
|
|
22
36
|
detalIds?: number[] | undefined;
|
|
23
37
|
statusWorking?: statusWorkingsDeficit | undefined;
|
|
24
38
|
shipmentIds?: number[] | null | undefined;
|
|
25
|
-
sortField?: ProductionPlanSortField | null | undefined;
|
|
26
|
-
sortDesc?: boolean | undefined;
|
|
27
39
|
}>;
|
|
28
40
|
export type GetDetalDeficitDtoType = z.infer<typeof GetDetalDeficitDtoZod>;
|
|
@@ -12,6 +12,5 @@ exports.GetDetalDeficitDtoZod = zod_1.z.object({
|
|
|
12
12
|
searchString: zod_1.z.string().optional().default(''),
|
|
13
13
|
shipmentIds: zod_1.z.number().int().array().optional().nullable().default(null),
|
|
14
14
|
page: zod_1.z.number().int(),
|
|
15
|
-
|
|
16
|
-
sortDesc: zod_1.z.boolean().optional().default(false)
|
|
15
|
+
sort: zod_1.z.array(utils_1.ProductionPlanSortRuleSchema).optional().default([])
|
|
17
16
|
});
|
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import {
|
|
2
|
+
import { statusWorkingsDeficit } from '../../utils';
|
|
3
3
|
export declare const GetMaterialDeficitDtoZod: z.ZodObject<{
|
|
4
4
|
materialIds: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodNumber, "many">>>;
|
|
5
5
|
typeMaterialIds: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodNumber, "many">>>;
|
|
@@ -8,25 +8,37 @@ export declare const GetMaterialDeficitDtoZod: z.ZodObject<{
|
|
|
8
8
|
searchString: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
9
9
|
shipmentIds: z.ZodDefault<z.ZodNullable<z.ZodOptional<z.ZodArray<z.ZodNumber, "many">>>>;
|
|
10
10
|
page: z.ZodNumber;
|
|
11
|
-
|
|
12
|
-
|
|
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">>>;
|
|
13
21
|
}, "strip", z.ZodTypeAny, {
|
|
22
|
+
sort: {
|
|
23
|
+
sortDesc: boolean;
|
|
24
|
+
sortField?: import("../../utils").ProductionPlanSortField | null | undefined;
|
|
25
|
+
}[];
|
|
14
26
|
page: number;
|
|
15
27
|
searchString: string;
|
|
16
28
|
statusWorking: statusWorkingsDeficit;
|
|
17
29
|
shipmentIds: number[] | null;
|
|
18
|
-
sortDesc: boolean;
|
|
19
30
|
materialIds: number[];
|
|
20
31
|
typeMaterialIds: number[];
|
|
21
32
|
subTypeMaterialIds: number[];
|
|
22
|
-
sortField?: ProductionPlanSortField | null | undefined;
|
|
23
33
|
}, {
|
|
24
34
|
page: number;
|
|
35
|
+
sort?: {
|
|
36
|
+
sortField?: import("../../utils").ProductionPlanSortField | null | undefined;
|
|
37
|
+
sortDesc?: boolean | undefined;
|
|
38
|
+
}[] | undefined;
|
|
25
39
|
searchString?: string | undefined;
|
|
26
40
|
statusWorking?: statusWorkingsDeficit | undefined;
|
|
27
41
|
shipmentIds?: number[] | null | undefined;
|
|
28
|
-
sortField?: ProductionPlanSortField | null | undefined;
|
|
29
|
-
sortDesc?: boolean | undefined;
|
|
30
42
|
materialIds?: number[] | undefined;
|
|
31
43
|
typeMaterialIds?: number[] | undefined;
|
|
32
44
|
subTypeMaterialIds?: number[] | undefined;
|
|
@@ -14,6 +14,5 @@ exports.GetMaterialDeficitDtoZod = zod_1.z.object({
|
|
|
14
14
|
searchString: zod_1.z.string().optional().default(''),
|
|
15
15
|
shipmentIds: zod_1.z.number().int().array().optional().nullable().default(null),
|
|
16
16
|
page: zod_1.z.number().int(),
|
|
17
|
-
|
|
18
|
-
sortDesc: zod_1.z.boolean().optional().default(false)
|
|
17
|
+
sort: zod_1.z.array(utils_1.ProductionPlanSortRuleSchema).optional().default([])
|
|
19
18
|
});
|
|
@@ -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
|
});
|
|
@@ -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
|
});
|
|
@@ -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
|
});
|
|
@@ -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
|
});
|
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 = {}));
|
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}`;
|
package/dist/utils/sorting.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
1
2
|
type SortValue = Date | number | string | boolean | null | undefined;
|
|
2
3
|
type SortSelector<T> = (item: T) => SortValue;
|
|
3
4
|
export declare enum ProductionPlanSortField {
|
|
@@ -6,5 +7,19 @@ export declare enum ProductionPlanSortField {
|
|
|
6
7
|
warehouseReadinessDate = "warehouseReadinessDate",
|
|
7
8
|
orderedByProduction = "orderedByProduction"
|
|
8
9
|
}
|
|
9
|
-
export
|
|
10
|
+
export type ProductionPlanSortRule = {
|
|
11
|
+
sortField?: ProductionPlanSortField | null;
|
|
12
|
+
sortDesc?: boolean;
|
|
13
|
+
};
|
|
14
|
+
export declare const ProductionPlanSortRuleSchema: z.ZodObject<{
|
|
15
|
+
sortField: z.ZodOptional<z.ZodNullable<z.ZodNativeEnum<typeof ProductionPlanSortField>>>;
|
|
16
|
+
sortDesc: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
17
|
+
}, "strip", z.ZodTypeAny, {
|
|
18
|
+
sortDesc: boolean;
|
|
19
|
+
sortField?: ProductionPlanSortField | null | undefined;
|
|
20
|
+
}, {
|
|
21
|
+
sortField?: ProductionPlanSortField | null | undefined;
|
|
22
|
+
sortDesc?: boolean | undefined;
|
|
23
|
+
}>;
|
|
24
|
+
export declare const sortByRules: <T>(items: T[], rules: ProductionPlanSortRule[] | null | undefined, selectors: Partial<Record<ProductionPlanSortField, SortSelector<T>>>) => T[];
|
|
10
25
|
export {};
|
package/dist/utils/sorting.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.sortByRules = exports.ProductionPlanSortRuleSchema = exports.ProductionPlanSortField = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
4
5
|
var ProductionPlanSortField;
|
|
5
6
|
(function (ProductionPlanSortField) {
|
|
6
7
|
ProductionPlanSortField["calculateNeedsTime"] = "calculateNeedsTime";
|
|
@@ -8,6 +9,10 @@ var ProductionPlanSortField;
|
|
|
8
9
|
ProductionPlanSortField["warehouseReadinessDate"] = "warehouseReadinessDate";
|
|
9
10
|
ProductionPlanSortField["orderedByProduction"] = "orderedByProduction";
|
|
10
11
|
})(ProductionPlanSortField || (exports.ProductionPlanSortField = ProductionPlanSortField = {}));
|
|
12
|
+
exports.ProductionPlanSortRuleSchema = zod_1.z.object({
|
|
13
|
+
sortField: zod_1.z.nativeEnum(ProductionPlanSortField).nullable().optional(),
|
|
14
|
+
sortDesc: zod_1.z.boolean().optional().default(false)
|
|
15
|
+
});
|
|
11
16
|
const normalizeSortValue = (value) => {
|
|
12
17
|
if (value instanceof Date)
|
|
13
18
|
return value.getTime();
|
|
@@ -17,24 +22,35 @@ const normalizeSortValue = (value) => {
|
|
|
17
22
|
}
|
|
18
23
|
return value;
|
|
19
24
|
};
|
|
20
|
-
const
|
|
25
|
+
const compareValues = (firstValue, secondValue, desc = false) => {
|
|
26
|
+
const isFirstNull = firstValue === null || firstValue === undefined;
|
|
27
|
+
const isSecondNull = secondValue === null || secondValue === undefined;
|
|
28
|
+
if (isFirstNull || isSecondNull) {
|
|
29
|
+
if (isFirstNull && isSecondNull)
|
|
30
|
+
return 0;
|
|
31
|
+
return isFirstNull ? (desc ? -1 : 1) : desc ? 1 : -1;
|
|
32
|
+
}
|
|
33
|
+
const normalizedFirstValue = normalizeSortValue(firstValue);
|
|
34
|
+
const normalizedSecondValue = normalizeSortValue(secondValue);
|
|
35
|
+
if (normalizedFirstValue < normalizedSecondValue)
|
|
36
|
+
return desc ? 1 : -1;
|
|
37
|
+
if (normalizedFirstValue > normalizedSecondValue)
|
|
38
|
+
return desc ? -1 : 1;
|
|
39
|
+
return 0;
|
|
40
|
+
};
|
|
41
|
+
const sortByRules = (items, rules, selectors) => {
|
|
42
|
+
const activeRules = (rules !== null && rules !== void 0 ? rules : []).filter(rule => rule.sortField && selectors[rule.sortField]);
|
|
43
|
+
if (!activeRules.length)
|
|
44
|
+
return items;
|
|
21
45
|
return [...items].sort((firstItem, secondItem) => {
|
|
22
|
-
|
|
23
|
-
const
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
return 0;
|
|
29
|
-
return isFirstNull ? (desc ? -1 : 1) : desc ? 1 : -1;
|
|
46
|
+
var _a;
|
|
47
|
+
for (const rule of activeRules) {
|
|
48
|
+
const selector = selectors[rule.sortField];
|
|
49
|
+
const result = compareValues(selector(firstItem), selector(secondItem), (_a = rule.sortDesc) !== null && _a !== void 0 ? _a : false);
|
|
50
|
+
if (result !== 0)
|
|
51
|
+
return result;
|
|
30
52
|
}
|
|
31
|
-
const normalizedFirstValue = normalizeSortValue(firstValue);
|
|
32
|
-
const normalizedSecondValue = normalizeSortValue(secondValue);
|
|
33
|
-
if (normalizedFirstValue < normalizedSecondValue)
|
|
34
|
-
return desc ? 1 : -1;
|
|
35
|
-
if (normalizedFirstValue > normalizedSecondValue)
|
|
36
|
-
return desc ? -1 : 1;
|
|
37
53
|
return 0;
|
|
38
54
|
});
|
|
39
55
|
};
|
|
40
|
-
exports.
|
|
56
|
+
exports.sortByRules = sortByRules;
|