@pksep/zod-shared 0.0.514 → 0.0.516

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.
@@ -34,7 +34,8 @@ export declare enum ActionEntityTypes {
34
34
  contact = "contact",
35
35
  company = "company",
36
36
  revision = "revision",
37
- thread_entity = "thread_entity"
37
+ thread_entity = "thread_entity",
38
+ user_table_config = "user_table_config"
38
39
  }
39
40
  /**
40
41
  * enum для обращения к моделям в бд
@@ -180,4 +181,8 @@ export declare const ActionEntityTypesDB: {
180
181
  readonly name: "thread_entity";
181
182
  readonly attributes: readonly ["id"];
182
183
  };
184
+ readonly user_table_config: {
185
+ readonly name: "user_table_configs";
186
+ readonly attributes: readonly ["id"];
187
+ };
183
188
  };
@@ -39,6 +39,7 @@ var ActionEntityTypes;
39
39
  ActionEntityTypes["company"] = "company";
40
40
  ActionEntityTypes["revision"] = "revision";
41
41
  ActionEntityTypes["thread_entity"] = "thread_entity";
42
+ ActionEntityTypes["user_table_config"] = "user_table_config";
42
43
  })(ActionEntityTypes || (exports.ActionEntityTypes = ActionEntityTypes = {}));
43
44
  /**
44
45
  * enum для обращения к моделям в бд
@@ -126,5 +127,9 @@ exports.ActionEntityTypesDB = {
126
127
  [ActionEntityTypes.thread_entity]: {
127
128
  name: 'thread_entity',
128
129
  attributes: ['id']
130
+ },
131
+ [ActionEntityTypes.user_table_config]: {
132
+ name: 'user_table_configs',
133
+ attributes: ['id']
129
134
  }
130
135
  };
@@ -1,7 +1,6 @@
1
1
  import { z } from 'zod';
2
2
  export declare const GetProductionTaskByEquipmentDtoZod: z.ZodObject<{
3
3
  equipmentId: z.ZodNumber;
4
- searchString: z.ZodOptional<z.ZodString>;
5
4
  taskId: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
6
5
  range: z.ZodOptional<z.ZodNullable<z.ZodObject<{
7
6
  start: z.ZodAny;
@@ -16,7 +15,6 @@ export declare const GetProductionTaskByEquipmentDtoZod: z.ZodObject<{
16
15
  onlyTOperation: z.ZodOptional<z.ZodNumber>;
17
16
  }, "strip", z.ZodTypeAny, {
18
17
  equipmentId: number;
19
- searchString?: string | undefined;
20
18
  range?: {
21
19
  start?: any;
22
20
  end?: any;
@@ -25,7 +23,6 @@ export declare const GetProductionTaskByEquipmentDtoZod: z.ZodObject<{
25
23
  onlyTOperation?: number | undefined;
26
24
  }, {
27
25
  equipmentId: number;
28
- searchString?: string | undefined;
29
26
  range?: {
30
27
  start?: any;
31
28
  end?: any;
@@ -4,7 +4,6 @@ exports.GetProductionTaskByEquipmentDtoZod = void 0;
4
4
  const zod_1 = require("zod");
5
5
  exports.GetProductionTaskByEquipmentDtoZod = zod_1.z.object({
6
6
  equipmentId: zod_1.z.number().int(),
7
- searchString: zod_1.z.string().optional(),
8
7
  taskId: zod_1.z.number().int().nullish(),
9
8
  range: zod_1.z
10
9
  .object({
@@ -2,7 +2,6 @@ import { z } from 'zod';
2
2
  import { StockOrderType } from '../../utils';
3
3
  export declare const GetProductionTaskByOperationDtoZod: z.ZodObject<{
4
4
  operationTypeId: z.ZodNumber;
5
- searchString: z.ZodOptional<z.ZodString>;
6
5
  taskId: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodNumber>>>;
7
6
  onlyTOperation: z.ZodOptional<z.ZodNumber>;
8
7
  range: z.ZodOptional<z.ZodNullable<z.ZodObject<{
@@ -20,7 +19,6 @@ export declare const GetProductionTaskByOperationDtoZod: z.ZodObject<{
20
19
  }, "strip", z.ZodTypeAny, {
21
20
  equipmentIds: number[] | null;
22
21
  operationTypeId: number;
23
- searchString?: string | undefined;
24
22
  range?: {
25
23
  start?: any;
26
24
  end?: any;
@@ -31,7 +29,6 @@ export declare const GetProductionTaskByOperationDtoZod: z.ZodObject<{
31
29
  }, {
32
30
  operationTypeId: number;
33
31
  equipmentIds?: number[] | null | undefined;
34
- searchString?: string | undefined;
35
32
  range?: {
36
33
  start?: any;
37
34
  end?: any;
@@ -5,7 +5,6 @@ const zod_1 = require("zod");
5
5
  const utils_1 = require("../../utils");
6
6
  exports.GetProductionTaskByOperationDtoZod = zod_1.z.object({
7
7
  operationTypeId: zod_1.z.number().int(),
8
- searchString: zod_1.z.string().optional(),
9
8
  taskId: zod_1.z.number().int().nullable().default(null).optional(),
10
9
  onlyTOperation: zod_1.z.number().int().optional(),
11
10
  range: zod_1.z
@@ -1,7 +1,6 @@
1
1
  import { z } from 'zod';
2
2
  export declare const GetProductionTaskByUserDtoZod: z.ZodObject<{
3
3
  userId: z.ZodNumber;
4
- searchString: z.ZodOptional<z.ZodString>;
5
4
  taskId: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodNumber>>>;
6
5
  onlyTOperation: z.ZodOptional<z.ZodNumber>;
7
6
  range: z.ZodOptional<z.ZodNullable<z.ZodObject<{
@@ -16,7 +15,6 @@ export declare const GetProductionTaskByUserDtoZod: z.ZodObject<{
16
15
  }>>>;
17
16
  }, "strip", z.ZodTypeAny, {
18
17
  userId: number;
19
- searchString?: string | undefined;
20
18
  range?: {
21
19
  start?: any;
22
20
  end?: any;
@@ -25,7 +23,6 @@ export declare const GetProductionTaskByUserDtoZod: z.ZodObject<{
25
23
  onlyTOperation?: number | undefined;
26
24
  }, {
27
25
  userId: number;
28
- searchString?: string | undefined;
29
26
  range?: {
30
27
  start?: any;
31
28
  end?: any;
@@ -4,7 +4,6 @@ exports.GetProductionTaskByUserDtoZod = void 0;
4
4
  const zod_1 = require("zod");
5
5
  exports.GetProductionTaskByUserDtoZod = zod_1.z.object({
6
6
  userId: zod_1.z.number().int(),
7
- searchString: zod_1.z.string().optional(),
8
7
  taskId: zod_1.z.number().int().nullable().default(null).optional(),
9
8
  onlyTOperation: zod_1.z.number().int().optional(),
10
9
  range: zod_1.z
@@ -333,12 +333,12 @@ export interface IUnicalUsers extends IUnicalEntity {
333
333
  tabel?: string;
334
334
  }
335
335
  export interface IWorkloadByEntityResponse {
336
- responsibleInfo: any;
337
- operationWorkload: IWorkloadByOperationData[];
338
- }
339
- export interface IWorkloadByOperationData {
340
336
  operationName: string;
341
337
  typeOperationId: number | string;
338
+ workloadData: IWorkloadData[];
339
+ }
340
+ export interface IWorkloadData {
341
+ responsibleInfo: any;
342
342
  positionsByDate: IWorkloadPositionByDate[];
343
343
  }
344
344
  export interface IWorkloadPositionSchema {
@@ -0,0 +1,30 @@
1
+ import { z } from 'zod';
2
+ export declare const UpdateUserTableConfigDtoSchema: z.ZodObject<{
3
+ userId: z.ZodNumber;
4
+ configKey: z.ZodString;
5
+ newConfigObject: z.ZodDefault<z.ZodArray<z.ZodObject<{
6
+ columnName: z.ZodNativeEnum<typeof import("../..").tablesEnumConfig>;
7
+ isShow: z.ZodDefault<z.ZodBoolean>;
8
+ }, "strip", z.ZodTypeAny, {
9
+ columnName: import("../..").tablesEnumConfig;
10
+ isShow: boolean;
11
+ }, {
12
+ columnName: import("../..").tablesEnumConfig;
13
+ isShow?: boolean | undefined;
14
+ }>, "many">>;
15
+ }, "strip", z.ZodTypeAny, {
16
+ userId: number;
17
+ configKey: string;
18
+ newConfigObject: {
19
+ columnName: import("../..").tablesEnumConfig;
20
+ isShow: boolean;
21
+ }[];
22
+ }, {
23
+ userId: number;
24
+ configKey: string;
25
+ newConfigObject?: {
26
+ columnName: import("../..").tablesEnumConfig;
27
+ isShow?: boolean | undefined;
28
+ }[] | undefined;
29
+ }>;
30
+ export type UpdateUserTableConfigDtoType = z.infer<typeof UpdateUserTableConfigDtoSchema>;
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.UpdateUserTableConfigDtoSchema = void 0;
4
+ const zod_1 = require("zod");
5
+ const user_table_config_schema_1 = require("../schemas/user-table-config.schema");
6
+ exports.UpdateUserTableConfigDtoSchema = zod_1.z.object({
7
+ userId: zod_1.z.number(),
8
+ configKey: zod_1.z.string(),
9
+ newConfigObject: zod_1.z.array(user_table_config_schema_1.UserTableConfigItemSchema).default([])
10
+ });
@@ -8,3 +8,5 @@ export * from './dto/tabel-unique.dto';
8
8
  export * from './default-value/model';
9
9
  export * from './dto/auth-user.dto';
10
10
  export * from './enums';
11
+ export * from './schemas/user-table-config.schema';
12
+ export * from './dto/update-user-table-config.dto';
@@ -24,3 +24,5 @@ __exportStar(require("./dto/tabel-unique.dto"), exports);
24
24
  __exportStar(require("./default-value/model"), exports);
25
25
  __exportStar(require("./dto/auth-user.dto"), exports);
26
26
  __exportStar(require("./enums"), exports);
27
+ __exportStar(require("./schemas/user-table-config.schema"), exports);
28
+ __exportStar(require("./dto/update-user-table-config.dto"), exports);
@@ -0,0 +1,168 @@
1
+ import { z } from 'zod';
2
+ import { tablesEnumConfig } from '../../utils';
3
+ export declare const UserTableConfigItemSchema: z.ZodObject<{
4
+ columnName: z.ZodNativeEnum<typeof tablesEnumConfig>;
5
+ isShow: z.ZodDefault<z.ZodBoolean>;
6
+ }, "strip", z.ZodTypeAny, {
7
+ columnName: tablesEnumConfig;
8
+ isShow: boolean;
9
+ }, {
10
+ columnName: tablesEnumConfig;
11
+ isShow?: boolean | undefined;
12
+ }>;
13
+ export type UserTableConfigItem = z.infer<typeof UserTableConfigItemSchema>;
14
+ export declare const UserTableConfigSchema: z.ZodObject<{
15
+ id: z.ZodNumber;
16
+ user_id: z.ZodNumber;
17
+ metalworking: z.ZodArray<z.ZodObject<{
18
+ columnName: z.ZodNativeEnum<typeof tablesEnumConfig>;
19
+ isShow: z.ZodDefault<z.ZodBoolean>;
20
+ }, "strip", z.ZodTypeAny, {
21
+ columnName: tablesEnumConfig;
22
+ isShow: boolean;
23
+ }, {
24
+ columnName: tablesEnumConfig;
25
+ isShow?: boolean | undefined;
26
+ }>, "many">;
27
+ metalworking_deficit_by_assemble: z.ZodArray<z.ZodObject<{
28
+ columnName: z.ZodNativeEnum<typeof tablesEnumConfig>;
29
+ isShow: z.ZodDefault<z.ZodBoolean>;
30
+ }, "strip", z.ZodTypeAny, {
31
+ columnName: tablesEnumConfig;
32
+ isShow: boolean;
33
+ }, {
34
+ columnName: tablesEnumConfig;
35
+ isShow?: boolean | undefined;
36
+ }>, "many">;
37
+ online_board_production: z.ZodArray<z.ZodObject<{
38
+ columnName: z.ZodNativeEnum<typeof tablesEnumConfig>;
39
+ isShow: z.ZodDefault<z.ZodBoolean>;
40
+ }, "strip", z.ZodTypeAny, {
41
+ columnName: tablesEnumConfig;
42
+ isShow: boolean;
43
+ }, {
44
+ columnName: tablesEnumConfig;
45
+ isShow?: boolean | undefined;
46
+ }>, "many">;
47
+ online_board: z.ZodArray<z.ZodObject<{
48
+ columnName: z.ZodNativeEnum<typeof tablesEnumConfig>;
49
+ isShow: z.ZodDefault<z.ZodBoolean>;
50
+ }, "strip", z.ZodTypeAny, {
51
+ columnName: tablesEnumConfig;
52
+ isShow: boolean;
53
+ }, {
54
+ columnName: tablesEnumConfig;
55
+ isShow?: boolean | undefined;
56
+ }>, "many">;
57
+ assemble: z.ZodArray<z.ZodObject<{
58
+ columnName: z.ZodNativeEnum<typeof tablesEnumConfig>;
59
+ isShow: z.ZodDefault<z.ZodBoolean>;
60
+ }, "strip", z.ZodTypeAny, {
61
+ columnName: tablesEnumConfig;
62
+ isShow: boolean;
63
+ }, {
64
+ columnName: tablesEnumConfig;
65
+ isShow?: boolean | undefined;
66
+ }>, "many">;
67
+ production_task_by_user: z.ZodArray<z.ZodObject<{
68
+ columnName: z.ZodNativeEnum<typeof tablesEnumConfig>;
69
+ isShow: z.ZodDefault<z.ZodBoolean>;
70
+ }, "strip", z.ZodTypeAny, {
71
+ columnName: tablesEnumConfig;
72
+ isShow: boolean;
73
+ }, {
74
+ columnName: tablesEnumConfig;
75
+ isShow?: boolean | undefined;
76
+ }>, "many">;
77
+ production_task_by_equipment: z.ZodArray<z.ZodObject<{
78
+ columnName: z.ZodNativeEnum<typeof tablesEnumConfig>;
79
+ isShow: z.ZodDefault<z.ZodBoolean>;
80
+ }, "strip", z.ZodTypeAny, {
81
+ columnName: tablesEnumConfig;
82
+ isShow: boolean;
83
+ }, {
84
+ columnName: tablesEnumConfig;
85
+ isShow?: boolean | undefined;
86
+ }>, "many">;
87
+ production_task_by_operation: z.ZodArray<z.ZodObject<{
88
+ columnName: z.ZodNativeEnum<typeof tablesEnumConfig>;
89
+ isShow: z.ZodDefault<z.ZodBoolean>;
90
+ }, "strip", z.ZodTypeAny, {
91
+ columnName: tablesEnumConfig;
92
+ isShow: boolean;
93
+ }, {
94
+ columnName: tablesEnumConfig;
95
+ isShow?: boolean | undefined;
96
+ }>, "many">;
97
+ }, "strip", z.ZodTypeAny, {
98
+ id: number;
99
+ assemble: {
100
+ columnName: tablesEnumConfig;
101
+ isShow: boolean;
102
+ }[];
103
+ user_id: number;
104
+ metalworking: {
105
+ columnName: tablesEnumConfig;
106
+ isShow: boolean;
107
+ }[];
108
+ metalworking_deficit_by_assemble: {
109
+ columnName: tablesEnumConfig;
110
+ isShow: boolean;
111
+ }[];
112
+ online_board_production: {
113
+ columnName: tablesEnumConfig;
114
+ isShow: boolean;
115
+ }[];
116
+ online_board: {
117
+ columnName: tablesEnumConfig;
118
+ isShow: boolean;
119
+ }[];
120
+ production_task_by_user: {
121
+ columnName: tablesEnumConfig;
122
+ isShow: boolean;
123
+ }[];
124
+ production_task_by_equipment: {
125
+ columnName: tablesEnumConfig;
126
+ isShow: boolean;
127
+ }[];
128
+ production_task_by_operation: {
129
+ columnName: tablesEnumConfig;
130
+ isShow: boolean;
131
+ }[];
132
+ }, {
133
+ id: number;
134
+ assemble: {
135
+ columnName: tablesEnumConfig;
136
+ isShow?: boolean | undefined;
137
+ }[];
138
+ user_id: number;
139
+ metalworking: {
140
+ columnName: tablesEnumConfig;
141
+ isShow?: boolean | undefined;
142
+ }[];
143
+ metalworking_deficit_by_assemble: {
144
+ columnName: tablesEnumConfig;
145
+ isShow?: boolean | undefined;
146
+ }[];
147
+ online_board_production: {
148
+ columnName: tablesEnumConfig;
149
+ isShow?: boolean | undefined;
150
+ }[];
151
+ online_board: {
152
+ columnName: tablesEnumConfig;
153
+ isShow?: boolean | undefined;
154
+ }[];
155
+ production_task_by_user: {
156
+ columnName: tablesEnumConfig;
157
+ isShow?: boolean | undefined;
158
+ }[];
159
+ production_task_by_equipment: {
160
+ columnName: tablesEnumConfig;
161
+ isShow?: boolean | undefined;
162
+ }[];
163
+ production_task_by_operation: {
164
+ columnName: tablesEnumConfig;
165
+ isShow?: boolean | undefined;
166
+ }[];
167
+ }>;
168
+ export type ModelUserTableConfig = z.infer<typeof UserTableConfigSchema>;
@@ -0,0 +1,29 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.UserTableConfigSchema = exports.UserTableConfigItemSchema = void 0;
4
+ const zod_1 = require("zod");
5
+ const utils_1 = require("../../utils");
6
+ exports.UserTableConfigItemSchema = zod_1.z.object({
7
+ columnName: zod_1.z.nativeEnum(utils_1.tablesEnumConfig),
8
+ isShow: zod_1.z.boolean().default(true)
9
+ });
10
+ exports.UserTableConfigSchema = zod_1.z.object({
11
+ id: zod_1.z.number().int().positive(),
12
+ user_id: zod_1.z.number().int().positive(),
13
+ // Металлообработка
14
+ metalworking: zod_1.z.array(exports.UserTableConfigItemSchema),
15
+ // Онлайн табло для МО по ПЗ Сборки
16
+ metalworking_deficit_by_assemble: zod_1.z.array(exports.UserTableConfigItemSchema),
17
+ // Онлайн табло по ПЗ
18
+ online_board_production: zod_1.z.array(exports.UserTableConfigItemSchema),
19
+ // Онлайн табло
20
+ online_board: zod_1.z.array(exports.UserTableConfigItemSchema),
21
+ // Сборка
22
+ assemble: zod_1.z.array(exports.UserTableConfigItemSchema),
23
+ // ПЗ для пользователя
24
+ production_task_by_user: zod_1.z.array(exports.UserTableConfigItemSchema),
25
+ // ПЗ по оборудованию
26
+ production_task_by_equipment: zod_1.z.array(exports.UserTableConfigItemSchema),
27
+ // ПЗ по операции
28
+ production_task_by_operation: zod_1.z.array(exports.UserTableConfigItemSchema)
29
+ });
@@ -24,3 +24,6 @@ export * from './interfaces';
24
24
  export * from './methods/utils';
25
25
  export * from './promise-pool';
26
26
  export * from './default-value/default-value';
27
+ export * from './tables-config/enum';
28
+ export * from './tables-config/methods';
29
+ export * from './tables-config/tables-array';
@@ -40,3 +40,6 @@ __exportStar(require("./interfaces"), exports);
40
40
  __exportStar(require("./methods/utils"), exports);
41
41
  __exportStar(require("./promise-pool"), exports);
42
42
  __exportStar(require("./default-value/default-value"), exports);
43
+ __exportStar(require("./tables-config/enum"), exports);
44
+ __exportStar(require("./tables-config/methods"), exports);
45
+ __exportStar(require("./tables-config/tables-array"), exports);
@@ -0,0 +1,42 @@
1
+ export declare enum tablesEnumConfig {
2
+ number = "number",
3
+ image = "image",
4
+ designation = "designation",
5
+ name = "name",
6
+ description = "description",
7
+ createMarkLabel = "createMarkLabel",
8
+ calculatedCreateTime = "calculatedCreateTime",
9
+ calculateNeedsTime = "calculateNeedsTime",
10
+ calculateAssembleTime = "calculateAssembleTime",
11
+ orderedByProduction = "orderedByProduction",
12
+ ordered = "ordered",
13
+ deficitChildCreateTime = "deficitChildCreateTime",
14
+ remainingByProductionTask = "remainingByProductionTask",
15
+ dateByUrgency = "dateByUrgency",
16
+ dateShipment = "dateShipment",
17
+ workpieceParameters = "workpieceParameters",
18
+ material = "material",
19
+ operationsLength = "operationsLength",
20
+ timeToProduction = "timeToProduction",
21
+ waste = "waste",
22
+ relativeProductionTaskId = "relativeProductionTaskId",
23
+ productionTaskDueDate = "productionTaskDueDate",
24
+ responsibleEquipment = "responsibleEquipment",
25
+ responsibleUserName = "responsibleUserName",
26
+ startTime = "startTime",
27
+ deficitByProductionTask = "deficitByProductionTask",
28
+ deficitByCurrentProductionTask = "deficitByCurrentProductionTask",
29
+ operationFullName = "operationFullName",
30
+ entityType = "entityType",
31
+ totalTimePerItem = "totalTimePerItem",
32
+ totalTime = "totalTime",
33
+ productionTaskId = "productionTaskId",
34
+ totalRemainingTime = "totalRemainingTime",
35
+ operationList = "operationList",
36
+ prevOperation = "prevOperation",
37
+ currentOperation = "currentOperation",
38
+ nextOperation = "nextOperation",
39
+ readyToComplect = "readyToComplect",
40
+ readyInProcent = "readyInProcent",
41
+ readyToAssembleQuantity = "readyToAssembleQuantity"
42
+ }
@@ -0,0 +1,81 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.tablesEnumConfig = void 0;
4
+ var tablesEnumConfig;
5
+ (function (tablesEnumConfig) {
6
+ tablesEnumConfig["number"] = "number";
7
+ tablesEnumConfig["image"] = "image";
8
+ // обозначение
9
+ tablesEnumConfig["designation"] = "designation";
10
+ // наименование
11
+ tablesEnumConfig["name"] = "name";
12
+ // описание
13
+ tablesEnumConfig["description"] = "description";
14
+ // Создать отметку
15
+ tablesEnumConfig["createMarkLabel"] = "createMarkLabel";
16
+ // Требуемое время готовности
17
+ tablesEnumConfig["calculatedCreateTime"] = "calculatedCreateTime";
18
+ // Расчетная дата изготовления
19
+ tablesEnumConfig["calculateNeedsTime"] = "calculateNeedsTime";
20
+ // Расчетное время выполнения ч/мин
21
+ tablesEnumConfig["calculateAssembleTime"] = "calculateAssembleTime";
22
+ // заказано по ПЗ
23
+ tablesEnumConfig["orderedByProduction"] = "orderedByProduction";
24
+ // заказано
25
+ tablesEnumConfig["ordered"] = "ordered";
26
+ // Время изг. дефицитных Д/СБ
27
+ tablesEnumConfig["deficitChildCreateTime"] = "deficitChildCreateTime";
28
+ // Осталось сделать по ПЗ
29
+ tablesEnumConfig["remainingByProductionTask"] = "remainingByProductionTask";
30
+ // дата по срочности
31
+ tablesEnumConfig["dateByUrgency"] = "dateByUrgency";
32
+ // планируемая дата отгрузки
33
+ tablesEnumConfig["dateShipment"] = "dateShipment";
34
+ // параметр заготовки
35
+ tablesEnumConfig["workpieceParameters"] = "workpieceParameters";
36
+ // материал
37
+ tablesEnumConfig["material"] = "material";
38
+ tablesEnumConfig["operationsLength"] = "operationsLength";
39
+ tablesEnumConfig["timeToProduction"] = "timeToProduction";
40
+ tablesEnumConfig["waste"] = "waste";
41
+ // Номер ПЗ родителя
42
+ tablesEnumConfig["relativeProductionTaskId"] = "relativeProductionTaskId";
43
+ // Дата выполнения ПЗ
44
+ tablesEnumConfig["productionTaskDueDate"] = "productionTaskDueDate";
45
+ // Оборудование
46
+ tablesEnumConfig["responsibleEquipment"] = "responsibleEquipment";
47
+ // ответственный пользователь
48
+ tablesEnumConfig["responsibleUserName"] = "responsibleUserName";
49
+ // начало работ
50
+ tablesEnumConfig["startTime"] = "startTime";
51
+ // Дефицит по ПЗ
52
+ tablesEnumConfig["deficitByProductionTask"] = "deficitByProductionTask";
53
+ // Заказано по текущему ПЗ
54
+ tablesEnumConfig["deficitByCurrentProductionTask"] = "deficitByCurrentProductionTask";
55
+ // название операции
56
+ tablesEnumConfig["operationFullName"] = "operationFullName";
57
+ // Тип
58
+ tablesEnumConfig["entityType"] = "entityType";
59
+ // время выполнения 1 шт
60
+ tablesEnumConfig["totalTimePerItem"] = "totalTimePerItem";
61
+ // время выполнения Всего по ПЗ
62
+ tablesEnumConfig["totalTime"] = "totalTime";
63
+ // Номер ПЗ
64
+ tablesEnumConfig["productionTaskId"] = "productionTaskId";
65
+ // время выполнения Осталось на ПЗ
66
+ tablesEnumConfig["totalRemainingTime"] = "totalRemainingTime";
67
+ // список операций
68
+ tablesEnumConfig["operationList"] = "operationList";
69
+ // Предыдущая операция
70
+ tablesEnumConfig["prevOperation"] = "prevOperation";
71
+ // текущая операция
72
+ tablesEnumConfig["currentOperation"] = "currentOperation";
73
+ // следующая операция
74
+ tablesEnumConfig["nextOperation"] = "nextOperation";
75
+ // Готово к комплектации
76
+ tablesEnumConfig["readyToComplect"] = "readyToComplect";
77
+ // Готовность в %
78
+ tablesEnumConfig["readyInProcent"] = "readyInProcent";
79
+ // Готовность к сборке
80
+ tablesEnumConfig["readyToAssembleQuantity"] = "readyToAssembleQuantity";
81
+ })(tablesEnumConfig || (exports.tablesEnumConfig = tablesEnumConfig = {}));
@@ -0,0 +1,5 @@
1
+ import { UserTableConfigItem } from '../../user';
2
+ import { tablesEnumConfig } from './enum';
3
+ export declare const generateDefaultConfigArray: (configArray: tablesEnumConfig[]) => UserTableConfigItem[];
4
+ export declare const checkMissingColumns: (columns: UserTableConfigItem[], arrayToCheck: tablesEnumConfig[]) => tablesEnumConfig[];
5
+ export declare const createCorrectColumnConfig: (columns: UserTableConfigItem[], arrayToCheck: tablesEnumConfig[]) => UserTableConfigItem[];
@@ -0,0 +1,31 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.createCorrectColumnConfig = exports.checkMissingColumns = exports.generateDefaultConfigArray = void 0;
4
+ const generateDefaultConfigArray = (configArray) => configArray.map(currentConfigitem => {
5
+ return {
6
+ columnName: currentConfigitem,
7
+ isShow: true
8
+ };
9
+ });
10
+ exports.generateDefaultConfigArray = generateDefaultConfigArray;
11
+ const checkMissingColumns = (columns, arrayToCheck) => {
12
+ const columnsSet = new Set();
13
+ columns.forEach(currentColumn => columnsSet.add(currentColumn.columnName));
14
+ const filteredItems = arrayToCheck.filter(currentItem => !columnsSet.has(currentItem));
15
+ return filteredItems;
16
+ };
17
+ exports.checkMissingColumns = checkMissingColumns;
18
+ const createCorrectColumnConfig = (columns, arrayToCheck) => {
19
+ const columnMap = new Map();
20
+ columns.forEach(currentColumn => {
21
+ columnMap.set(currentColumn.columnName, currentColumn);
22
+ });
23
+ const newColumnArray = arrayToCheck.map(currentItem => {
24
+ const currentItemFromMap = columnMap.get(currentItem);
25
+ return currentItemFromMap
26
+ ? currentItemFromMap
27
+ : { columnName: currentItem, isShow: true };
28
+ });
29
+ return newColumnArray;
30
+ };
31
+ exports.createCorrectColumnConfig = createCorrectColumnConfig;
@@ -0,0 +1,9 @@
1
+ import { tablesEnumConfig } from './enum';
2
+ export declare const metalloworkingTableConfig: tablesEnumConfig[];
3
+ export declare const metalDeficitByAssembleTableConfig: tablesEnumConfig[];
4
+ export declare const onlineBoardProductionTableConfig: tablesEnumConfig[];
5
+ export declare const onlineBoardTableConfig: tablesEnumConfig[];
6
+ export declare const assembleTableConfig: tablesEnumConfig[];
7
+ export declare const productionTaskByUserTableConfig: tablesEnumConfig[];
8
+ export declare const productionTaskByOperationTableConfig: tablesEnumConfig[];
9
+ export declare const productionTaskByEquipmentTableConfig: tablesEnumConfig[];
@@ -0,0 +1,189 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.productionTaskByEquipmentTableConfig = exports.productionTaskByOperationTableConfig = exports.productionTaskByUserTableConfig = exports.assembleTableConfig = exports.onlineBoardTableConfig = exports.onlineBoardProductionTableConfig = exports.metalDeficitByAssembleTableConfig = exports.metalloworkingTableConfig = void 0;
4
+ const enum_1 = require("./enum");
5
+ // металлообработка
6
+ exports.metalloworkingTableConfig = [
7
+ enum_1.tablesEnumConfig.number,
8
+ enum_1.tablesEnumConfig.image,
9
+ enum_1.tablesEnumConfig.designation,
10
+ enum_1.tablesEnumConfig.name,
11
+ enum_1.tablesEnumConfig.calculatedCreateTime,
12
+ enum_1.tablesEnumConfig.calculateNeedsTime,
13
+ enum_1.tablesEnumConfig.orderedByProduction,
14
+ enum_1.tablesEnumConfig.ordered,
15
+ enum_1.tablesEnumConfig.dateByUrgency,
16
+ enum_1.tablesEnumConfig.dateShipment,
17
+ enum_1.tablesEnumConfig.workpieceParameters,
18
+ enum_1.tablesEnumConfig.material,
19
+ enum_1.tablesEnumConfig.operationsLength,
20
+ enum_1.tablesEnumConfig.readyInProcent,
21
+ enum_1.tablesEnumConfig.timeToProduction,
22
+ enum_1.tablesEnumConfig.waste
23
+ ];
24
+ // Онлайн табло для МО по ПЗ Сборки
25
+ exports.metalDeficitByAssembleTableConfig = [
26
+ enum_1.tablesEnumConfig.number,
27
+ enum_1.tablesEnumConfig.responsibleUserName,
28
+ enum_1.tablesEnumConfig.productionTaskDueDate,
29
+ enum_1.tablesEnumConfig.relativeProductionTaskId,
30
+ enum_1.tablesEnumConfig.image,
31
+ enum_1.tablesEnumConfig.designation,
32
+ enum_1.tablesEnumConfig.name,
33
+ enum_1.tablesEnumConfig.startTime,
34
+ enum_1.tablesEnumConfig.calculatedCreateTime,
35
+ enum_1.tablesEnumConfig.calculateNeedsTime,
36
+ enum_1.tablesEnumConfig.deficitByProductionTask,
37
+ enum_1.tablesEnumConfig.orderedByProduction,
38
+ enum_1.tablesEnumConfig.ordered,
39
+ enum_1.tablesEnumConfig.operationsLength,
40
+ enum_1.tablesEnumConfig.operationList,
41
+ enum_1.tablesEnumConfig.totalTimePerItem,
42
+ enum_1.tablesEnumConfig.totalTime,
43
+ enum_1.tablesEnumConfig.totalRemainingTime
44
+ ];
45
+ // Онлайн табло по ПЗ
46
+ exports.onlineBoardProductionTableConfig = [
47
+ enum_1.tablesEnumConfig.number,
48
+ enum_1.tablesEnumConfig.productionTaskDueDate,
49
+ enum_1.tablesEnumConfig.productionTaskId,
50
+ enum_1.tablesEnumConfig.image,
51
+ enum_1.tablesEnumConfig.designation,
52
+ enum_1.tablesEnumConfig.name,
53
+ enum_1.tablesEnumConfig.entityType,
54
+ enum_1.tablesEnumConfig.dateByUrgency,
55
+ enum_1.tablesEnumConfig.startTime,
56
+ enum_1.tablesEnumConfig.calculatedCreateTime,
57
+ enum_1.tablesEnumConfig.calculateNeedsTime,
58
+ enum_1.tablesEnumConfig.dateShipment,
59
+ enum_1.tablesEnumConfig.deficitByCurrentProductionTask,
60
+ enum_1.tablesEnumConfig.deficitByProductionTask,
61
+ enum_1.tablesEnumConfig.ordered,
62
+ enum_1.tablesEnumConfig.readyToComplect,
63
+ enum_1.tablesEnumConfig.operationsLength,
64
+ enum_1.tablesEnumConfig.operationList,
65
+ enum_1.tablesEnumConfig.totalTimePerItem,
66
+ enum_1.tablesEnumConfig.totalTime,
67
+ enum_1.tablesEnumConfig.totalRemainingTime
68
+ ];
69
+ // Онлайн табло
70
+ exports.onlineBoardTableConfig = [
71
+ enum_1.tablesEnumConfig.number,
72
+ enum_1.tablesEnumConfig.image,
73
+ enum_1.tablesEnumConfig.designation,
74
+ enum_1.tablesEnumConfig.name,
75
+ enum_1.tablesEnumConfig.entityType,
76
+ enum_1.tablesEnumConfig.dateByUrgency,
77
+ enum_1.tablesEnumConfig.startTime,
78
+ enum_1.tablesEnumConfig.calculatedCreateTime,
79
+ enum_1.tablesEnumConfig.calculateNeedsTime,
80
+ enum_1.tablesEnumConfig.dateShipment,
81
+ enum_1.tablesEnumConfig.deficitByProductionTask,
82
+ enum_1.tablesEnumConfig.ordered,
83
+ enum_1.tablesEnumConfig.readyToComplect,
84
+ enum_1.tablesEnumConfig.operationsLength,
85
+ enum_1.tablesEnumConfig.operationList,
86
+ enum_1.tablesEnumConfig.totalTimePerItem,
87
+ enum_1.tablesEnumConfig.totalTime,
88
+ enum_1.tablesEnumConfig.totalRemainingTime
89
+ ];
90
+ // сборка
91
+ exports.assembleTableConfig = [
92
+ enum_1.tablesEnumConfig.number,
93
+ enum_1.tablesEnumConfig.entityType,
94
+ enum_1.tablesEnumConfig.image,
95
+ enum_1.tablesEnumConfig.designation,
96
+ enum_1.tablesEnumConfig.name,
97
+ enum_1.tablesEnumConfig.ordered,
98
+ enum_1.tablesEnumConfig.startTime,
99
+ enum_1.tablesEnumConfig.calculatedCreateTime,
100
+ enum_1.tablesEnumConfig.calculateNeedsTime,
101
+ enum_1.tablesEnumConfig.dateByUrgency,
102
+ enum_1.tablesEnumConfig.dateShipment,
103
+ enum_1.tablesEnumConfig.operationsLength,
104
+ enum_1.tablesEnumConfig.readyInProcent,
105
+ enum_1.tablesEnumConfig.readyToComplect,
106
+ enum_1.tablesEnumConfig.readyToAssembleQuantity,
107
+ enum_1.tablesEnumConfig.timeToProduction
108
+ ];
109
+ // Производственные задания для пользователя
110
+ exports.productionTaskByUserTableConfig = [
111
+ enum_1.tablesEnumConfig.number,
112
+ enum_1.tablesEnumConfig.productionTaskId,
113
+ enum_1.tablesEnumConfig.responsibleUserName,
114
+ enum_1.tablesEnumConfig.productionTaskDueDate,
115
+ enum_1.tablesEnumConfig.description,
116
+ enum_1.tablesEnumConfig.createMarkLabel,
117
+ enum_1.tablesEnumConfig.entityType,
118
+ enum_1.tablesEnumConfig.image,
119
+ enum_1.tablesEnumConfig.designation,
120
+ enum_1.tablesEnumConfig.name,
121
+ enum_1.tablesEnumConfig.deficitChildCreateTime,
122
+ enum_1.tablesEnumConfig.startTime,
123
+ enum_1.tablesEnumConfig.calculatedCreateTime,
124
+ enum_1.tablesEnumConfig.calculateNeedsTime,
125
+ enum_1.tablesEnumConfig.orderedByProduction,
126
+ enum_1.tablesEnumConfig.remainingByProductionTask,
127
+ enum_1.tablesEnumConfig.timeToProduction,
128
+ enum_1.tablesEnumConfig.operationsLength,
129
+ enum_1.tablesEnumConfig.prevOperation,
130
+ enum_1.tablesEnumConfig.currentOperation,
131
+ enum_1.tablesEnumConfig.nextOperation,
132
+ enum_1.tablesEnumConfig.totalTimePerItem,
133
+ enum_1.tablesEnumConfig.totalTime,
134
+ enum_1.tablesEnumConfig.totalRemainingTime
135
+ ];
136
+ // Производственные задания по операции
137
+ exports.productionTaskByOperationTableConfig = [
138
+ enum_1.tablesEnumConfig.number,
139
+ enum_1.tablesEnumConfig.productionTaskId,
140
+ enum_1.tablesEnumConfig.responsibleEquipment,
141
+ enum_1.tablesEnumConfig.productionTaskDueDate,
142
+ enum_1.tablesEnumConfig.description,
143
+ enum_1.tablesEnumConfig.createMarkLabel,
144
+ enum_1.tablesEnumConfig.entityType,
145
+ enum_1.tablesEnumConfig.image,
146
+ enum_1.tablesEnumConfig.designation,
147
+ enum_1.tablesEnumConfig.name,
148
+ enum_1.tablesEnumConfig.startTime,
149
+ enum_1.tablesEnumConfig.calculatedCreateTime,
150
+ enum_1.tablesEnumConfig.calculateNeedsTime,
151
+ enum_1.tablesEnumConfig.calculateAssembleTime,
152
+ enum_1.tablesEnumConfig.orderedByProduction,
153
+ enum_1.tablesEnumConfig.remainingByProductionTask,
154
+ enum_1.tablesEnumConfig.timeToProduction,
155
+ enum_1.tablesEnumConfig.operationsLength,
156
+ enum_1.tablesEnumConfig.prevOperation,
157
+ enum_1.tablesEnumConfig.currentOperation,
158
+ enum_1.tablesEnumConfig.nextOperation,
159
+ enum_1.tablesEnumConfig.totalTimePerItem,
160
+ enum_1.tablesEnumConfig.totalTime,
161
+ enum_1.tablesEnumConfig.totalRemainingTime
162
+ ];
163
+ // Производственные задания по оборудованию
164
+ exports.productionTaskByEquipmentTableConfig = [
165
+ enum_1.tablesEnumConfig.number,
166
+ enum_1.tablesEnumConfig.productionTaskId,
167
+ enum_1.tablesEnumConfig.responsibleEquipment,
168
+ enum_1.tablesEnumConfig.productionTaskDueDate,
169
+ enum_1.tablesEnumConfig.description,
170
+ enum_1.tablesEnumConfig.createMarkLabel,
171
+ enum_1.tablesEnumConfig.entityType,
172
+ enum_1.tablesEnumConfig.image,
173
+ enum_1.tablesEnumConfig.designation,
174
+ enum_1.tablesEnumConfig.name,
175
+ enum_1.tablesEnumConfig.startTime,
176
+ enum_1.tablesEnumConfig.calculatedCreateTime,
177
+ enum_1.tablesEnumConfig.calculateNeedsTime,
178
+ enum_1.tablesEnumConfig.calculateAssembleTime,
179
+ enum_1.tablesEnumConfig.orderedByProduction,
180
+ enum_1.tablesEnumConfig.remainingByProductionTask,
181
+ enum_1.tablesEnumConfig.timeToProduction,
182
+ enum_1.tablesEnumConfig.operationsLength,
183
+ enum_1.tablesEnumConfig.prevOperation,
184
+ enum_1.tablesEnumConfig.currentOperation,
185
+ enum_1.tablesEnumConfig.nextOperation,
186
+ enum_1.tablesEnumConfig.totalTimePerItem,
187
+ enum_1.tablesEnumConfig.totalTime,
188
+ enum_1.tablesEnumConfig.totalRemainingTime
189
+ ];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pksep/zod-shared",
3
- "version": "0.0.514",
3
+ "version": "0.0.516",
4
4
  "description": "Zod package for erp project. Contains dto, interfaces, schems, types, enum",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",