@pksep/zod-shared 0.0.528 → 0.0.530
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/dto/actions-by-param.dto.d.ts +2 -2
- package/dist/action/schemas/actions.schema.d.ts +18 -18
- package/dist/assemble/dto/get-assemble-operation-count.dto.d.ts +90 -81
- package/dist/assemble/schemas/assemble-coming.schema.d.ts +75 -68
- package/dist/assemble/schemas/assemble.schema.d.ts +69 -62
- package/dist/assemble-kit/schemas/assemble-kit.schema.d.ts +13 -13
- package/dist/buyer/schemas/buyer.schema.d.ts +1 -1
- package/dist/cbed/dto/cbed-pagination.dto.d.ts +1 -1
- package/dist/cbed/dto/get-one-cbed-dto.d.ts +2 -2
- package/dist/cbed/dto/up-create-cbed.dto.d.ts +6 -6
- package/dist/cbed/schemas/cbed-material.schema.d.ts +2 -2
- package/dist/cbed/schemas/cbed.schema.d.ts +21 -21
- package/dist/company/dto/companies-pagination.dto.d.ts +3 -0
- package/dist/company/dto/companies-pagination.dto.js +1 -0
- package/dist/company/dto/create-company.dto.d.ts +10 -10
- package/dist/company/dto/update-company.dto.d.ts +10 -10
- package/dist/company/schemas/companies.schema.d.ts +4 -4
- package/dist/contact/dto/create-contact.dto.d.ts +6 -6
- package/dist/contact/dto/update-contact.dto.d.ts +6 -6
- package/dist/contact/schemas/contact.schema.d.ts +3 -3
- package/dist/deliveries/dto/create-deliveries.dto.d.ts +3 -3
- package/dist/deliveries/schemas/deliveries-inventary.schema.d.ts +2 -2
- package/dist/deliveries/schemas/deliveries.schema.d.ts +4 -4
- package/dist/detal/dto/detal-pagination.dto.d.ts +2 -2
- package/dist/detal/dto/get-one-detal-dto.d.ts +1 -1
- package/dist/detal/dto/update-detal.dto.d.ts +9 -9
- package/dist/detal/schemas/detal-deficit.schema.d.ts +203 -203
- package/dist/detal/schemas/detal.schema.d.ts +200 -200
- package/dist/document/schemas/documentsSchema.d.ts +4 -4
- package/dist/equipment/dto/create-equipment.dto.d.ts +1 -1
- package/dist/equipment/dto/update-equipment.dto.d.ts +1 -1
- package/dist/equipment/schemas/equipment.schema.d.ts +98 -93
- package/dist/expenditure/schema/expenditure-consumption.schema.d.ts +2 -2
- package/dist/expenditure/schema/expenditure.schema.d.ts +2 -2
- package/dist/instrument/dto/create-name-instrument.dto.d.ts +1 -1
- package/dist/instrument/dto/update-name-instrument.dto.d.ts +2 -2
- package/dist/inventary/dto/create-inventary.dto.d.ts +1 -1
- package/dist/marks/dto/change-mark-quantity.dto.d.ts +16 -16
- package/dist/marks/dto/create-mark.dto.d.ts +8 -8
- package/dist/marks/dto/update-mark.dto.d.ts +2 -2
- package/dist/marks/schemas/marks.schema.d.ts +8 -8
- package/dist/marks/type/type.d.ts +2 -2
- package/dist/material/dto/create-material.dto.d.ts +20 -20
- package/dist/material/schemas/material-characteristics.schema.d.ts +6 -6
- package/dist/material/schemas/material.schema.d.ts +26 -26
- package/dist/metaloworking/schemas/metaloworking-by-operation.schema.d.ts +4 -4
- package/dist/metaloworking/schemas/metaloworking-coming.schema.d.ts +2 -2
- package/dist/movement-error/schemas/movement-error.schema.d.ts +2 -2
- package/dist/moving/schemas/moving.schema.d.ts +463 -456
- package/dist/operations/dto/create-type-operation.dto.d.ts +4 -0
- package/dist/operations/dto/create-type-operation.dto.js +5 -1
- package/dist/operations/dto/update-type-operation.dto.d.ts +4 -0
- package/dist/operations/dto/update-type-operation.dto.js +5 -1
- package/dist/operations/enums/enums.d.ts +7 -0
- package/dist/operations/enums/enums.js +21 -1
- package/dist/operations/index.d.ts +2 -0
- package/dist/operations/index.js +2 -0
- package/dist/operations/interfaces/interface.d.ts +5 -0
- package/dist/operations/schemas/operation.schema.d.ts +21 -17
- package/dist/operations/schemas/operation.schema.js +4 -0
- package/dist/operations/schemas/type-operation.schema.d.ts +4 -0
- package/dist/operations/schemas/type-operation.schema.js +2 -0
- package/dist/product/dto/up-create-product.dto.d.ts +7 -7
- package/dist/product/schemas/product-deficit.schema.d.ts +20 -20
- package/dist/product/schemas/product-material.schema.d.ts +2 -2
- package/dist/product/schemas/product-specification.schema.d.ts +2 -2
- package/dist/product/schemas/product.schema.d.ts +17 -17
- package/dist/production-tasks/dto/create-operation-pos.dto.d.ts +2 -2
- package/dist/production-tasks/dto/get-production-task-by-equipment.dto.d.ts +4 -0
- 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 +4 -0
- package/dist/production-tasks/dto/get-production-task-by-user.dto.js +2 -0
- package/dist/production-tasks/dto/workload-by-entity.dto.d.ts +2 -2
- package/dist/production-tasks/interfaces/production-tasks.d.ts +2 -0
- package/dist/production-tasks/interfaces/workload-by-entity.d.ts +19 -0
- package/dist/production-tasks/schemas/operation-positions.schema.d.ts +7 -4
- package/dist/production-tasks/schemas/operation-positions.schema.js +1 -0
- package/dist/production-tasks/schemas/production-operation-pos.schema.d.ts +4 -4
- package/dist/provider/dto/create-provider.dto.d.ts +4 -4
- package/dist/provider/schemas/provider.schema.d.ts +1 -1
- package/dist/rack/dto/get-all-racks.dto.d.ts +3 -0
- package/dist/rack/dto/get-all-racks.dto.js +2 -1
- package/dist/role/schemas/role.schema.d.ts +455 -448
- package/dist/sclad/schemas/remain.schema.d.ts +2 -2
- package/dist/sclad/schemas/remains.schema.d.ts +6 -6
- package/dist/shipments/dto/get-attributes.dto.d.ts +2 -2
- package/dist/shipments/dto/shipments-list-pagination.dto.d.ts +1 -1
- package/dist/shipments/dto/shipments-paginate.dto.d.ts +2 -2
- package/dist/shipments/schemas/sh-complit.schema.d.ts +2 -2
- package/dist/shipments/schemas/shipments.schema.d.ts +2 -2
- package/dist/specification/dto/specification-attributes.dto.d.ts +1 -1
- package/dist/specification/schema/attributes.schema.d.ts +472 -472
- package/dist/stock-order/schemas/stock-order-item.schema.d.ts +2 -2
- package/dist/tech-process/schemas/tech-process.schema.d.ts +31 -26
- package/dist/thread/dto/add-thread.dto.d.ts +8 -8
- package/dist/user/dto/create-user.dto.d.ts +5 -5
- package/dist/user/dto/get-one-user.dto.d.ts +2 -2
- package/dist/user/schemas/user.schema.d.ts +267 -262
- package/dist/utils/enums.d.ts +2 -1
- package/dist/utils/enums.js +2 -1
- package/dist/utils/methods.d.ts +13 -0
- package/dist/utils/methods.js +106 -26
- package/dist/utils/types/types.d.ts +1 -0
- package/dist/waybill/dto/create-waybill-product.dto.d.ts +8 -2
- package/dist/waybill/dto/create-waybill-product.dto.js +15 -1
- package/dist/waybill/dto/create-waybill.dto.d.ts +16 -6
- package/dist/waybill/dto/create-waybill.dto.js +1 -1
- package/dist/waybill/interface/interface.d.ts +1 -0
- package/dist/waybill/schemas/waybill-product.schema.d.ts +8 -8
- package/dist/waybill/schemas/waybill.schema.d.ts +2 -2
- package/package.json +1 -1
- package/dist/issue/dto/up-create-issue.dto.d.ts +0 -49
- package/dist/issue/dto/up-create-issue.dto.js +0 -21
- package/dist/issue/index.d.ts +0 -5
- package/dist/issue/index.js +0 -21
- package/dist/issue/interfaces/interface.d.ts +0 -4
- package/dist/issue/schemas/issue-user-controller.schema.d.ts +0 -15
- package/dist/issue/schemas/issue-user-controller.schema.js +0 -9
- package/dist/issue/schemas/issue-user.schema.d.ts +0 -15
- package/dist/issue/schemas/issue-user.schema.js +0 -9
- package/dist/issue/schemas/issue.schema.d.ts +0 -51
- package/dist/issue/schemas/issue.schema.js +0 -21
- package/dist/library/dto/create-chapter.dto.d.ts +0 -12
- package/dist/library/dto/create-chapter.dto.js +0 -8
- package/dist/library/dto/create-link.dto.d.ts +0 -30
- package/dist/library/dto/create-link.dto.js +0 -14
- package/dist/library/index.d.ts +0 -5
- package/dist/library/index.js +0 -21
- package/dist/library/interfaces/interface.d.ts +0 -3
- package/dist/library/interfaces/interface.js +0 -2
- package/dist/library/schemas/links-user.schema.d.ts +0 -15
- package/dist/library/schemas/links-user.schema.js +0 -9
- package/dist/library/schemas/links.schema.d.ts +0 -30
- package/dist/library/schemas/links.schema.js +0 -14
- package/dist/production-tasks/dto/update-marks.dto.d.ts +0 -13
- package/dist/production-tasks/dto/update-marks.dto.js +0 -8
- package/dist/tech-process/schemas/tech-process-with-options.schema.d.ts +0 -306
- package/dist/tech-process/schemas/tech-process-with-options.schema.js +0 -8
- package/dist/utils/interface/mat.interface.d.ts +0 -10
- package/dist/utils/interface/mat.interface.js +0 -2
- /package/dist/{issue/interfaces/interface.js → production-tasks/interfaces/workload-by-entity.js} +0 -0
package/dist/utils/enums.d.ts
CHANGED
|
@@ -48,6 +48,7 @@ export declare enum StatusScladWorking {
|
|
|
48
48
|
export declare enum statusShipment {
|
|
49
49
|
all = "\u0412\u0441\u0435",
|
|
50
50
|
order = "\u0417\u0430\u043A\u0430\u0437\u0430\u043D\u043E",
|
|
51
|
+
readyToShip = "\u0413\u043E\u0442\u043E\u0432\u043E \u043A \u043E\u0442\u0433\u0440\u0443\u0437\u043A\u0435",
|
|
51
52
|
ban = "\u0423\u0434\u0430\u043B\u0435\u043D\u043E",
|
|
52
53
|
done = "\u041E\u0442\u0433\u0440\u0443\u0436\u0435\u043D\u043E",
|
|
53
54
|
overbue = "\u041F\u0440\u043E\u0441\u0440\u043E\u0447\u0435\u043D\u043E"
|
|
@@ -226,7 +227,7 @@ export declare enum WorkSpaceObject {
|
|
|
226
227
|
inventary = "\u0418\u043D\u0432\u0435\u043D\u0442\u0430\u0440\u044C",
|
|
227
228
|
inventary_type = "\u0422\u0438\u043F \u0438\u043D\u0432\u0435\u043D\u0442\u0430\u0440\u044F",
|
|
228
229
|
inventary_p_type = "\u041F\u043E\u0434 \u0442\u0438\u043F \u0438\u043D\u0432\u0435\u043D\u0442\u0430\u0440\u044F",
|
|
229
|
-
material = "\
|
|
230
|
+
material = "\u041C\u0430\u0442\u0435\u0440\u0438\u0430\u043B",
|
|
230
231
|
material_type = "\u0422\u0438\u043F \u043C\u0430\u0442\u0435\u0440\u0438\u0430\u043B\u0430",
|
|
231
232
|
material_p_type = "\u041F\u043E\u0434 \u0442\u0438\u043F \u043C\u0430\u0442\u0435\u0440\u0438\u0430\u043B\u0430",
|
|
232
233
|
issue = "\u0417\u0430\u0434\u0430\u0447\u0438",
|
package/dist/utils/enums.js
CHANGED
|
@@ -60,6 +60,7 @@ var statusShipment;
|
|
|
60
60
|
(function (statusShipment) {
|
|
61
61
|
statusShipment["all"] = "\u0412\u0441\u0435";
|
|
62
62
|
statusShipment["order"] = "\u0417\u0430\u043A\u0430\u0437\u0430\u043D\u043E";
|
|
63
|
+
statusShipment["readyToShip"] = "\u0413\u043E\u0442\u043E\u0432\u043E \u043A \u043E\u0442\u0433\u0440\u0443\u0437\u043A\u0435";
|
|
63
64
|
statusShipment["ban"] = "\u0423\u0434\u0430\u043B\u0435\u043D\u043E";
|
|
64
65
|
statusShipment["done"] = "\u041E\u0442\u0433\u0440\u0443\u0436\u0435\u043D\u043E";
|
|
65
66
|
statusShipment["overbue"] = "\u041F\u0440\u043E\u0441\u0440\u043E\u0447\u0435\u043D\u043E";
|
|
@@ -259,7 +260,7 @@ var WorkSpaceObject;
|
|
|
259
260
|
WorkSpaceObject["inventary"] = "\u0418\u043D\u0432\u0435\u043D\u0442\u0430\u0440\u044C";
|
|
260
261
|
WorkSpaceObject["inventary_type"] = "\u0422\u0438\u043F \u0438\u043D\u0432\u0435\u043D\u0442\u0430\u0440\u044F";
|
|
261
262
|
WorkSpaceObject["inventary_p_type"] = "\u041F\u043E\u0434 \u0442\u0438\u043F \u0438\u043D\u0432\u0435\u043D\u0442\u0430\u0440\u044F";
|
|
262
|
-
WorkSpaceObject["material"] = "\
|
|
263
|
+
WorkSpaceObject["material"] = "\u041C\u0430\u0442\u0435\u0440\u0438\u0430\u043B";
|
|
263
264
|
WorkSpaceObject["material_type"] = "\u0422\u0438\u043F \u043C\u0430\u0442\u0435\u0440\u0438\u0430\u043B\u0430";
|
|
264
265
|
WorkSpaceObject["material_p_type"] = "\u041F\u043E\u0434 \u0442\u0438\u043F \u043C\u0430\u0442\u0435\u0440\u0438\u0430\u043B\u0430";
|
|
265
266
|
WorkSpaceObject["issue"] = "\u0417\u0430\u0434\u0430\u0447\u0438";
|
package/dist/utils/methods.d.ts
CHANGED
|
@@ -60,7 +60,20 @@ export interface HolidayConfig {
|
|
|
60
60
|
*/
|
|
61
61
|
skipDefaultJanuaryHolidays?: boolean;
|
|
62
62
|
}
|
|
63
|
+
export declare const WORK_DAY_START_HOUR = 5;
|
|
64
|
+
export declare const WORK_DAY_END_HOUR = 13;
|
|
65
|
+
export declare const WORK_DAY_END_MINUTE = 30;
|
|
63
66
|
export declare const calculateEndDate: (startDate: Date, totalMinutes: number, config?: HolidayConfig) => Date;
|
|
67
|
+
/**
|
|
68
|
+
* Возвращает время начала работы, вычитая рабочие минуты из конечной даты.
|
|
69
|
+
* Обратное направление по сравнению с calculateEndDate.
|
|
70
|
+
* Учитываются только рабочие часы (5:00-13:30 UTC, будни).
|
|
71
|
+
* @param endDate Конечная дата (от которой идем назад)
|
|
72
|
+
* @param totalMinutes Количество минут, которое нужно вычесть
|
|
73
|
+
* @param config Опциональная конфигурация праздников
|
|
74
|
+
* @returns Дата начала работы
|
|
75
|
+
*/
|
|
76
|
+
export declare const calculateStartDate: (endDate: Date, totalMinutes: number, config?: HolidayConfig) => Date;
|
|
64
77
|
/**
|
|
65
78
|
* Функция получает сущность и генерирует из него элемент спецификации
|
|
66
79
|
* @param entity
|
package/dist/utils/methods.js
CHANGED
|
@@ -20,7 +20,7 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
20
20
|
return t;
|
|
21
21
|
};
|
|
22
22
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
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.calculateEndDate = exports.leftToDoByProductionTask = exports.calculateByMeasurementRate = void 0;
|
|
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
26
|
exports.isThisExclusionDesignation = isThisExclusionDesignation;
|
|
@@ -113,13 +113,12 @@ const leftToDoByProductionTask = (marks, myQuantity) => {
|
|
|
113
113
|
return moreMinusNum(myQuantity - createByMarks);
|
|
114
114
|
};
|
|
115
115
|
exports.leftToDoByProductionTask = leftToDoByProductionTask;
|
|
116
|
+
exports.WORK_DAY_START_HOUR = 5;
|
|
117
|
+
exports.WORK_DAY_END_HOUR = 13;
|
|
118
|
+
exports.WORK_DAY_END_MINUTE = 30;
|
|
116
119
|
const calculateEndDate = (startDate, totalMinutes, config) => {
|
|
117
120
|
let currentDate = new Date(startDate);
|
|
118
121
|
let remainingMinutes = totalMinutes;
|
|
119
|
-
const workDayStartHour = 5;
|
|
120
|
-
const workDayHours = 8;
|
|
121
|
-
const workDayEndHour = workDayStartHour + workDayHours;
|
|
122
|
-
// Функция для проверки, является ли дата рабочим днем
|
|
123
122
|
const isWorkDay = (date) => {
|
|
124
123
|
var _a, _b;
|
|
125
124
|
const dayOfWeek = date.getUTCDay();
|
|
@@ -129,7 +128,6 @@ const calculateEndDate = (startDate, totalMinutes, config) => {
|
|
|
129
128
|
if (skipJanuary && month === 0 && day >= 1 && day <= 14) {
|
|
130
129
|
return false;
|
|
131
130
|
}
|
|
132
|
-
// Проверяем кастомные праздники из конфига
|
|
133
131
|
if ((_b = config === null || config === void 0 ? void 0 : config.holidays) === null || _b === void 0 ? void 0 : _b.length) {
|
|
134
132
|
const isHoliday = config.holidays.some(holiday => holiday.month === month && holiday.day === day);
|
|
135
133
|
if (isHoliday) {
|
|
@@ -140,12 +138,12 @@ const calculateEndDate = (startDate, totalMinutes, config) => {
|
|
|
140
138
|
};
|
|
141
139
|
const getWorkDayStart = (date) => {
|
|
142
140
|
const start = new Date(date);
|
|
143
|
-
start.setUTCHours(
|
|
141
|
+
start.setUTCHours(exports.WORK_DAY_START_HOUR, 0, 0, 0);
|
|
144
142
|
return start;
|
|
145
143
|
};
|
|
146
144
|
const getWorkDayEnd = (date) => {
|
|
147
145
|
const end = new Date(date);
|
|
148
|
-
end.setUTCHours(
|
|
146
|
+
end.setUTCHours(exports.WORK_DAY_END_HOUR, exports.WORK_DAY_END_MINUTE, 0, 0);
|
|
149
147
|
return end;
|
|
150
148
|
};
|
|
151
149
|
const moveToNextWorkDay = (date) => {
|
|
@@ -153,7 +151,7 @@ const calculateEndDate = (startDate, totalMinutes, config) => {
|
|
|
153
151
|
do {
|
|
154
152
|
nextDay.setUTCDate(nextDay.getUTCDate() + 1);
|
|
155
153
|
} while (!isWorkDay(nextDay));
|
|
156
|
-
nextDay.setUTCHours(
|
|
154
|
+
nextDay.setUTCHours(exports.WORK_DAY_START_HOUR, 0, 0, 0);
|
|
157
155
|
return nextDay;
|
|
158
156
|
};
|
|
159
157
|
if (!isWorkDay(currentDate)) {
|
|
@@ -163,12 +161,12 @@ const calculateEndDate = (startDate, totalMinutes, config) => {
|
|
|
163
161
|
const currentHour = currentDate.getUTCHours();
|
|
164
162
|
const currentMinutes = currentDate.getUTCMinutes();
|
|
165
163
|
const currentTimeInMinutes = currentHour * 60 + currentMinutes;
|
|
166
|
-
const workDayStartInMinutes =
|
|
167
|
-
const workDayEndInMinutes =
|
|
164
|
+
const workDayStartInMinutes = exports.WORK_DAY_START_HOUR * 60;
|
|
165
|
+
const workDayEndInMinutes = exports.WORK_DAY_END_HOUR * 60 + exports.WORK_DAY_END_MINUTE;
|
|
168
166
|
if (currentTimeInMinutes < workDayStartInMinutes) {
|
|
169
167
|
currentDate = getWorkDayStart(currentDate);
|
|
170
168
|
}
|
|
171
|
-
else if (currentTimeInMinutes
|
|
169
|
+
else if (currentTimeInMinutes > workDayEndInMinutes) {
|
|
172
170
|
currentDate = moveToNextWorkDay(currentDate);
|
|
173
171
|
}
|
|
174
172
|
}
|
|
@@ -186,6 +184,83 @@ const calculateEndDate = (startDate, totalMinutes, config) => {
|
|
|
186
184
|
return currentDate;
|
|
187
185
|
};
|
|
188
186
|
exports.calculateEndDate = calculateEndDate;
|
|
187
|
+
/**
|
|
188
|
+
* Возвращает время начала работы, вычитая рабочие минуты из конечной даты.
|
|
189
|
+
* Обратное направление по сравнению с calculateEndDate.
|
|
190
|
+
* Учитываются только рабочие часы (5:00-13:30 UTC, будни).
|
|
191
|
+
* @param endDate Конечная дата (от которой идем назад)
|
|
192
|
+
* @param totalMinutes Количество минут, которое нужно вычесть
|
|
193
|
+
* @param config Опциональная конфигурация праздников
|
|
194
|
+
* @returns Дата начала работы
|
|
195
|
+
*/
|
|
196
|
+
const calculateStartDate = (endDate, totalMinutes, config) => {
|
|
197
|
+
let currentDate = new Date(endDate);
|
|
198
|
+
let remainingMinutes = totalMinutes;
|
|
199
|
+
const isWorkDay = (date) => {
|
|
200
|
+
var _a, _b;
|
|
201
|
+
const dayOfWeek = date.getUTCDay();
|
|
202
|
+
const month = date.getUTCMonth();
|
|
203
|
+
const day = date.getUTCDate();
|
|
204
|
+
const skipJanuary = (_a = config === null || config === void 0 ? void 0 : config.skipDefaultJanuaryHolidays) !== null && _a !== void 0 ? _a : true;
|
|
205
|
+
if (skipJanuary && month === 0 && day >= 1 && day <= 14) {
|
|
206
|
+
return false;
|
|
207
|
+
}
|
|
208
|
+
if ((_b = config === null || config === void 0 ? void 0 : config.holidays) === null || _b === void 0 ? void 0 : _b.length) {
|
|
209
|
+
const isHoliday = config.holidays.some(holiday => holiday.month === month && holiday.day === day);
|
|
210
|
+
if (isHoliday) {
|
|
211
|
+
return false;
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
return dayOfWeek !== 0 && dayOfWeek !== 6;
|
|
215
|
+
};
|
|
216
|
+
const getWorkDayStart = (date) => {
|
|
217
|
+
const start = new Date(date);
|
|
218
|
+
start.setUTCHours(exports.WORK_DAY_START_HOUR, 0, 0, 0);
|
|
219
|
+
return start;
|
|
220
|
+
};
|
|
221
|
+
const getWorkDayEnd = (date) => {
|
|
222
|
+
const end = new Date(date);
|
|
223
|
+
end.setUTCHours(exports.WORK_DAY_END_HOUR, exports.WORK_DAY_END_MINUTE, 0, 0);
|
|
224
|
+
return end;
|
|
225
|
+
};
|
|
226
|
+
const moveToPrevWorkDay = (date) => {
|
|
227
|
+
const prevDay = new Date(date);
|
|
228
|
+
do {
|
|
229
|
+
prevDay.setUTCDate(prevDay.getUTCDate() - 1);
|
|
230
|
+
} while (!isWorkDay(prevDay));
|
|
231
|
+
prevDay.setUTCHours(exports.WORK_DAY_END_HOUR, exports.WORK_DAY_END_MINUTE, 0, 0);
|
|
232
|
+
return prevDay;
|
|
233
|
+
};
|
|
234
|
+
if (!isWorkDay(currentDate)) {
|
|
235
|
+
currentDate = moveToPrevWorkDay(currentDate);
|
|
236
|
+
}
|
|
237
|
+
else {
|
|
238
|
+
const currentHour = currentDate.getUTCHours();
|
|
239
|
+
const currentMinutes = currentDate.getUTCMinutes();
|
|
240
|
+
const currentTimeInMinutes = currentHour * 60 + currentMinutes;
|
|
241
|
+
const workDayStartInMinutes = exports.WORK_DAY_START_HOUR * 60;
|
|
242
|
+
const workDayEndInMinutes = exports.WORK_DAY_END_HOUR * 60 + exports.WORK_DAY_END_MINUTE;
|
|
243
|
+
if (currentTimeInMinutes > workDayEndInMinutes) {
|
|
244
|
+
currentDate = getWorkDayEnd(currentDate);
|
|
245
|
+
}
|
|
246
|
+
else if (currentTimeInMinutes < workDayStartInMinutes) {
|
|
247
|
+
currentDate = moveToPrevWorkDay(currentDate);
|
|
248
|
+
}
|
|
249
|
+
}
|
|
250
|
+
while (remainingMinutes > 0) {
|
|
251
|
+
const workDayStart = getWorkDayStart(currentDate);
|
|
252
|
+
const availableMinutesToday = Math.min(remainingMinutes, (currentDate.getTime() - workDayStart.getTime()) / (1000 * 60));
|
|
253
|
+
if (availableMinutesToday > 0) {
|
|
254
|
+
currentDate = new Date(currentDate.getTime() - availableMinutesToday * 60 * 1000);
|
|
255
|
+
remainingMinutes -= availableMinutesToday;
|
|
256
|
+
}
|
|
257
|
+
if (remainingMinutes > 0) {
|
|
258
|
+
currentDate = moveToPrevWorkDay(currentDate);
|
|
259
|
+
}
|
|
260
|
+
}
|
|
261
|
+
return currentDate;
|
|
262
|
+
};
|
|
263
|
+
exports.calculateStartDate = calculateStartDate;
|
|
189
264
|
/**
|
|
190
265
|
* Функция получает сущность и генерирует из него элемент спецификации
|
|
191
266
|
* @param entity
|
|
@@ -735,26 +810,31 @@ const countChildrensRelative = (data) => {
|
|
|
735
810
|
const characteristicValue = materialConverRate
|
|
736
811
|
? Math.ceil(detalMass / materialConverRate)
|
|
737
812
|
: 0;
|
|
738
|
-
const characteristicQuantity = characteristicValue
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
quantity: characteristicQuantity
|
|
745
|
-
});
|
|
813
|
+
const characteristicQuantity = characteristicValue || 0;
|
|
814
|
+
// всегда добавляем материал, даже если количество = 0, чтобы не терять его в графе
|
|
815
|
+
concatedMaterialLists.push({
|
|
816
|
+
id: relative === null || relative === void 0 ? void 0 : relative.mat_zag,
|
|
817
|
+
quantity: characteristicQuantity
|
|
818
|
+
});
|
|
746
819
|
}
|
|
747
820
|
}
|
|
748
821
|
const materialMap = new Map();
|
|
749
822
|
const materialsArray = concatedMaterialLists.map((listMaterialItem) => {
|
|
750
823
|
const foundedMaterials = materials.find(material => listMaterialItem.id === material.id);
|
|
824
|
+
// если материал не найден, пропускаем
|
|
825
|
+
if (!foundedMaterials) {
|
|
826
|
+
return null;
|
|
827
|
+
}
|
|
828
|
+
// проверяем: это реальный 0 или результат ошибки/расчета
|
|
829
|
+
const isZeroQuantity = listMaterialItem.quantity === 0;
|
|
751
830
|
//конвертируем потребность в ШТ
|
|
752
|
-
const materialConverRate = foundedMaterials
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
831
|
+
const materialConverRate = (0, exports.calculateByMeasurementRate)(foundedMaterials.units_measurement, listMaterialItem.measureId);
|
|
832
|
+
// если количество 0, не пересчитываем, иначе - считаем как раньше
|
|
833
|
+
const specificationConvertedQuantity = isZeroQuantity
|
|
834
|
+
? 0
|
|
835
|
+
: materialConverRate
|
|
836
|
+
? Math.ceil(listMaterialItem.quantity / materialConverRate)
|
|
837
|
+
: 0;
|
|
758
838
|
return Object.assign(Object.assign(Object.assign({}, foundedMaterials), (0, sequelize_1.addFieldByCondition)(data.isNeedsTypes, {
|
|
759
839
|
entity_type: enums_1.IzdType.material
|
|
760
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) || '-' });
|
|
@@ -6,7 +6,9 @@ export declare const CreateWaybillProductSchema: z.ZodObject<{
|
|
|
6
6
|
quantity: z.ZodNumber;
|
|
7
7
|
entityType: z.ZodNativeEnum<typeof PositionItemType>;
|
|
8
8
|
workerType: z.ZodNativeEnum<typeof WaybilTypeComingEnums>;
|
|
9
|
-
sum: z.ZodOptional<z.ZodNumber>;
|
|
9
|
+
sum: z.ZodEffects<z.ZodOptional<z.ZodNumber>, number | undefined, unknown>;
|
|
10
|
+
deliveryId: z.ZodOptional<z.ZodNullable<z.ZodOptional<z.ZodNumber>>>;
|
|
11
|
+
deliveryPositionIndex: z.ZodOptional<z.ZodNullable<z.ZodOptional<z.ZodNumber>>>;
|
|
10
12
|
productId: z.ZodOptional<z.ZodNullable<z.ZodOptional<z.ZodNumber>>>;
|
|
11
13
|
toolsId: z.ZodOptional<z.ZodNullable<z.ZodOptional<z.ZodNumber>>>;
|
|
12
14
|
cbedId: z.ZodOptional<z.ZodNullable<z.ZodOptional<z.ZodNumber>>>;
|
|
@@ -36,6 +38,8 @@ export declare const CreateWaybillProductSchema: z.ZodObject<{
|
|
|
36
38
|
cbedId?: number | null | undefined;
|
|
37
39
|
productId?: number | null | undefined;
|
|
38
40
|
assembleId?: number | null | undefined;
|
|
41
|
+
deliveryId?: number | null | undefined;
|
|
42
|
+
deliveryPositionIndex?: number | null | undefined;
|
|
39
43
|
toolsId?: number | null | undefined;
|
|
40
44
|
inventaryId?: number | null | undefined;
|
|
41
45
|
metalloworkingId?: number | null | undefined;
|
|
@@ -51,11 +55,13 @@ export declare const CreateWaybillProductSchema: z.ZodObject<{
|
|
|
51
55
|
detalId?: number | null | undefined;
|
|
52
56
|
equipmentId?: number | null | undefined;
|
|
53
57
|
materialId?: number | null | undefined;
|
|
54
|
-
sum?:
|
|
58
|
+
sum?: unknown;
|
|
55
59
|
instrumentId?: number | null | undefined;
|
|
56
60
|
cbedId?: number | null | undefined;
|
|
57
61
|
productId?: number | null | undefined;
|
|
58
62
|
assembleId?: number | null | undefined;
|
|
63
|
+
deliveryId?: number | null | undefined;
|
|
64
|
+
deliveryPositionIndex?: number | null | undefined;
|
|
59
65
|
toolsId?: number | null | undefined;
|
|
60
66
|
inventaryId?: number | null | undefined;
|
|
61
67
|
metalloworkingId?: number | null | undefined;
|
|
@@ -8,7 +8,21 @@ exports.CreateWaybillProductSchema = zod_1.z.object({
|
|
|
8
8
|
quantity: zod_1.z.number(),
|
|
9
9
|
entityType: zod_1.z.nativeEnum(enum_1.PositionItemType),
|
|
10
10
|
workerType: zod_1.z.nativeEnum(utils_1.WaybilTypeComingEnums),
|
|
11
|
-
sum: zod_1.z.
|
|
11
|
+
sum: zod_1.z.preprocess(val => {
|
|
12
|
+
if (val === '' || val === null || val === undefined)
|
|
13
|
+
return undefined;
|
|
14
|
+
if (typeof val === 'string') {
|
|
15
|
+
const normalizedValue = val.trim().replace(',', '.');
|
|
16
|
+
if (!normalizedValue.length)
|
|
17
|
+
return undefined;
|
|
18
|
+
const parsedValue = Number(normalizedValue);
|
|
19
|
+
if (!isNaN(parsedValue))
|
|
20
|
+
return parsedValue;
|
|
21
|
+
}
|
|
22
|
+
return val;
|
|
23
|
+
}, zod_1.z.number().optional()),
|
|
24
|
+
deliveryId: zod_1.z.number().optional().nullish(),
|
|
25
|
+
deliveryPositionIndex: zod_1.z.number().int().optional().nullish(),
|
|
12
26
|
productId: zod_1.z.number().optional().nullish(),
|
|
13
27
|
toolsId: zod_1.z.number().optional().nullish(),
|
|
14
28
|
cbedId: zod_1.z.number().optional().nullish(),
|
|
@@ -2,12 +2,14 @@ import { z } from 'zod';
|
|
|
2
2
|
import { WaybilTypeComingEnums } from '../../utils';
|
|
3
3
|
export declare const CreateWaybillDtoZod: z.ZodObject<{
|
|
4
4
|
materialId: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodNumber>>, number | null | undefined, unknown>;
|
|
5
|
-
|
|
5
|
+
companyId: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodNumber, z.ZodString]>>>;
|
|
6
6
|
productList: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
7
7
|
quantity: z.ZodNumber;
|
|
8
8
|
entityType: z.ZodNativeEnum<typeof import("..").PositionItemType>;
|
|
9
9
|
workerType: z.ZodNativeEnum<typeof WaybilTypeComingEnums>;
|
|
10
|
-
sum: z.ZodOptional<z.ZodNumber>;
|
|
10
|
+
sum: z.ZodEffects<z.ZodOptional<z.ZodNumber>, number | undefined, unknown>;
|
|
11
|
+
deliveryId: z.ZodOptional<z.ZodNullable<z.ZodOptional<z.ZodNumber>>>;
|
|
12
|
+
deliveryPositionIndex: z.ZodOptional<z.ZodNullable<z.ZodOptional<z.ZodNumber>>>;
|
|
11
13
|
productId: z.ZodOptional<z.ZodNullable<z.ZodOptional<z.ZodNumber>>>;
|
|
12
14
|
toolsId: z.ZodOptional<z.ZodNullable<z.ZodOptional<z.ZodNumber>>>;
|
|
13
15
|
cbedId: z.ZodOptional<z.ZodNullable<z.ZodOptional<z.ZodNumber>>>;
|
|
@@ -37,6 +39,8 @@ export declare const CreateWaybillDtoZod: z.ZodObject<{
|
|
|
37
39
|
cbedId?: number | null | undefined;
|
|
38
40
|
productId?: number | null | undefined;
|
|
39
41
|
assembleId?: number | null | undefined;
|
|
42
|
+
deliveryId?: number | null | undefined;
|
|
43
|
+
deliveryPositionIndex?: number | null | undefined;
|
|
40
44
|
toolsId?: number | null | undefined;
|
|
41
45
|
inventaryId?: number | null | undefined;
|
|
42
46
|
metalloworkingId?: number | null | undefined;
|
|
@@ -52,11 +56,13 @@ export declare const CreateWaybillDtoZod: z.ZodObject<{
|
|
|
52
56
|
detalId?: number | null | undefined;
|
|
53
57
|
equipmentId?: number | null | undefined;
|
|
54
58
|
materialId?: number | null | undefined;
|
|
55
|
-
sum?:
|
|
59
|
+
sum?: unknown;
|
|
56
60
|
instrumentId?: number | null | undefined;
|
|
57
61
|
cbedId?: number | null | undefined;
|
|
58
62
|
productId?: number | null | undefined;
|
|
59
63
|
assembleId?: number | null | undefined;
|
|
64
|
+
deliveryId?: number | null | undefined;
|
|
65
|
+
deliveryPositionIndex?: number | null | undefined;
|
|
60
66
|
toolsId?: number | null | undefined;
|
|
61
67
|
inventaryId?: number | null | undefined;
|
|
62
68
|
metalloworkingId?: number | null | undefined;
|
|
@@ -73,8 +79,8 @@ export declare const CreateWaybillDtoZod: z.ZodObject<{
|
|
|
73
79
|
typeComing: WaybilTypeComingEnums;
|
|
74
80
|
sclad?: boolean | null | undefined;
|
|
75
81
|
materialId?: number | null | undefined;
|
|
76
|
-
providerId?: string | number | null | undefined;
|
|
77
82
|
documentsIds?: number[] | null | undefined;
|
|
83
|
+
companyId?: string | number | null | undefined;
|
|
78
84
|
productList?: {
|
|
79
85
|
quantity: number;
|
|
80
86
|
ezId: number;
|
|
@@ -89,6 +95,8 @@ export declare const CreateWaybillDtoZod: z.ZodObject<{
|
|
|
89
95
|
cbedId?: number | null | undefined;
|
|
90
96
|
productId?: number | null | undefined;
|
|
91
97
|
assembleId?: number | null | undefined;
|
|
98
|
+
deliveryId?: number | null | undefined;
|
|
99
|
+
deliveryPositionIndex?: number | null | undefined;
|
|
92
100
|
toolsId?: number | null | undefined;
|
|
93
101
|
inventaryId?: number | null | undefined;
|
|
94
102
|
metalloworkingId?: number | null | undefined;
|
|
@@ -101,8 +109,8 @@ export declare const CreateWaybillDtoZod: z.ZodObject<{
|
|
|
101
109
|
typeComing: WaybilTypeComingEnums;
|
|
102
110
|
sclad?: unknown;
|
|
103
111
|
materialId?: unknown;
|
|
104
|
-
providerId?: string | number | null | undefined;
|
|
105
112
|
documentsIds?: number[] | null | undefined;
|
|
113
|
+
companyId?: string | number | null | undefined;
|
|
106
114
|
productList?: {
|
|
107
115
|
quantity: number;
|
|
108
116
|
ezId: number;
|
|
@@ -112,11 +120,13 @@ export declare const CreateWaybillDtoZod: z.ZodObject<{
|
|
|
112
120
|
detalId?: number | null | undefined;
|
|
113
121
|
equipmentId?: number | null | undefined;
|
|
114
122
|
materialId?: number | null | undefined;
|
|
115
|
-
sum?:
|
|
123
|
+
sum?: unknown;
|
|
116
124
|
instrumentId?: number | null | undefined;
|
|
117
125
|
cbedId?: number | null | undefined;
|
|
118
126
|
productId?: number | null | undefined;
|
|
119
127
|
assembleId?: number | null | undefined;
|
|
128
|
+
deliveryId?: number | null | undefined;
|
|
129
|
+
deliveryPositionIndex?: number | null | undefined;
|
|
120
130
|
toolsId?: number | null | undefined;
|
|
121
131
|
inventaryId?: number | null | undefined;
|
|
122
132
|
metalloworkingId?: number | null | undefined;
|
|
@@ -6,7 +6,7 @@ const utils_1 = require("../../utils");
|
|
|
6
6
|
const create_waybill_product_dto_1 = require("./create-waybill-product.dto");
|
|
7
7
|
exports.CreateWaybillDtoZod = zod_1.z.object({
|
|
8
8
|
materialId: zod_1.z.preprocess(val => typeof val === 'string' && parseInt(val, 10) ? parseInt(val, 10) : null, zod_1.z.number().nullable().optional()),
|
|
9
|
-
|
|
9
|
+
companyId: zod_1.z.union([zod_1.z.number(), zod_1.z.string()]).nullish(),
|
|
10
10
|
productList: create_waybill_product_dto_1.CreateWaybillProductSchema.array().optional(),
|
|
11
11
|
documentsIds: zod_1.z.number().array().nullable().optional(),
|
|
12
12
|
description: zod_1.z.string(),
|
|
@@ -39,20 +39,20 @@ export declare const WaybillProductSchema: z.ZodObject<{
|
|
|
39
39
|
}, "strip", z.ZodTypeAny, {
|
|
40
40
|
id: number;
|
|
41
41
|
quantity: number;
|
|
42
|
-
sum: number;
|
|
43
42
|
waybill_id: number;
|
|
43
|
+
sum: number;
|
|
44
44
|
entity_type: PositionItemType;
|
|
45
45
|
worker_type: WaybilTypeComingEnums;
|
|
46
46
|
description?: string | undefined;
|
|
47
47
|
assemble_id?: number | null | undefined;
|
|
48
|
-
cbed_id?: number | null | undefined;
|
|
49
|
-
provider_id?: number | null | undefined;
|
|
50
|
-
inventary_id?: number | null | undefined;
|
|
51
48
|
equipment_id?: number | null | undefined;
|
|
49
|
+
provider_id?: number | null | undefined;
|
|
52
50
|
material_id?: number | null | undefined;
|
|
53
51
|
instrument_id?: number | null | undefined;
|
|
54
52
|
detal_id?: number | null | undefined;
|
|
53
|
+
cbed_id?: number | null | undefined;
|
|
55
54
|
product_id?: number | null | undefined;
|
|
55
|
+
inventary_id?: number | null | undefined;
|
|
56
56
|
metalloworking_id?: number | null | undefined;
|
|
57
57
|
ez_id?: number | undefined;
|
|
58
58
|
tools_id?: number | null | undefined;
|
|
@@ -61,20 +61,20 @@ export declare const WaybillProductSchema: z.ZodObject<{
|
|
|
61
61
|
}, {
|
|
62
62
|
id: number;
|
|
63
63
|
quantity: number;
|
|
64
|
-
sum: number;
|
|
65
64
|
waybill_id: number;
|
|
65
|
+
sum: number;
|
|
66
66
|
entity_type: PositionItemType;
|
|
67
67
|
worker_type: WaybilTypeComingEnums;
|
|
68
68
|
description?: string | undefined;
|
|
69
69
|
assemble_id?: number | null | undefined;
|
|
70
|
-
cbed_id?: number | null | undefined;
|
|
71
|
-
provider_id?: number | null | undefined;
|
|
72
|
-
inventary_id?: number | null | undefined;
|
|
73
70
|
equipment_id?: number | null | undefined;
|
|
71
|
+
provider_id?: number | null | undefined;
|
|
74
72
|
material_id?: number | null | undefined;
|
|
75
73
|
instrument_id?: number | null | undefined;
|
|
76
74
|
detal_id?: number | null | undefined;
|
|
75
|
+
cbed_id?: number | null | undefined;
|
|
77
76
|
product_id?: number | null | undefined;
|
|
77
|
+
inventary_id?: number | null | undefined;
|
|
78
78
|
metalloworking_id?: number | null | undefined;
|
|
79
79
|
ez_id?: number | undefined;
|
|
80
80
|
tools_id?: number | null | undefined;
|
|
@@ -19,16 +19,16 @@ export declare const WaybillSchema: z.ZodObject<{
|
|
|
19
19
|
name: string;
|
|
20
20
|
type_сoming: WaybilTypeComingEnums;
|
|
21
21
|
id?: number | null | undefined;
|
|
22
|
-
company_id?: number | undefined;
|
|
23
22
|
createdAt?: string | Date | undefined;
|
|
23
|
+
company_id?: number | undefined;
|
|
24
24
|
}, {
|
|
25
25
|
name: string;
|
|
26
26
|
type_сoming: WaybilTypeComingEnums;
|
|
27
27
|
ban?: boolean | undefined;
|
|
28
28
|
description?: string | undefined;
|
|
29
29
|
id?: number | null | undefined;
|
|
30
|
-
company_id?: number | undefined;
|
|
31
30
|
createdAt?: string | Date | undefined;
|
|
31
|
+
company_id?: number | undefined;
|
|
32
32
|
}>;
|
|
33
33
|
export type ModelWaybill = z.infer<typeof WaybillSchema> & {
|
|
34
34
|
documents?: ModelDocuments[];
|
package/package.json
CHANGED
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
import { StatusIssue } from '../../utils';
|
|
3
|
-
export declare const UpCreateIssueDtoZod: z.ZodObject<{
|
|
4
|
-
description: z.ZodString;
|
|
5
|
-
dateUse: z.ZodString;
|
|
6
|
-
normTime: z.ZodString;
|
|
7
|
-
sourse: z.ZodString;
|
|
8
|
-
srok: z.ZodString;
|
|
9
|
-
status: z.ZodNativeEnum<typeof StatusIssue>;
|
|
10
|
-
controllerList: z.ZodString;
|
|
11
|
-
executorList: z.ZodString;
|
|
12
|
-
izdList: z.ZodString;
|
|
13
|
-
shopNeeds: z.ZodString;
|
|
14
|
-
fileArrModal: z.ZodString;
|
|
15
|
-
srok_control: z.ZodString;
|
|
16
|
-
id: z.ZodNumber;
|
|
17
|
-
name: z.ZodString;
|
|
18
|
-
}, "strip", z.ZodTypeAny, {
|
|
19
|
-
status: StatusIssue;
|
|
20
|
-
id: number;
|
|
21
|
-
name: string;
|
|
22
|
-
description: string;
|
|
23
|
-
dateUse: string;
|
|
24
|
-
normTime: string;
|
|
25
|
-
sourse: string;
|
|
26
|
-
srok: string;
|
|
27
|
-
controllerList: string;
|
|
28
|
-
executorList: string;
|
|
29
|
-
srok_control: string;
|
|
30
|
-
izdList: string;
|
|
31
|
-
shopNeeds: string;
|
|
32
|
-
fileArrModal: string;
|
|
33
|
-
}, {
|
|
34
|
-
status: StatusIssue;
|
|
35
|
-
id: number;
|
|
36
|
-
name: string;
|
|
37
|
-
description: string;
|
|
38
|
-
dateUse: string;
|
|
39
|
-
normTime: string;
|
|
40
|
-
sourse: string;
|
|
41
|
-
srok: string;
|
|
42
|
-
controllerList: string;
|
|
43
|
-
executorList: string;
|
|
44
|
-
srok_control: string;
|
|
45
|
-
izdList: string;
|
|
46
|
-
shopNeeds: string;
|
|
47
|
-
fileArrModal: string;
|
|
48
|
-
}>;
|
|
49
|
-
export type UpCreateIssueDtoType = z.infer<typeof UpCreateIssueDtoZod>;
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.UpCreateIssueDtoZod = void 0;
|
|
4
|
-
const zod_1 = require("zod");
|
|
5
|
-
const utils_1 = require("../../utils");
|
|
6
|
-
exports.UpCreateIssueDtoZod = zod_1.z.object({
|
|
7
|
-
description: zod_1.z.string(),
|
|
8
|
-
dateUse: zod_1.z.string(),
|
|
9
|
-
normTime: zod_1.z.string(),
|
|
10
|
-
sourse: zod_1.z.string(),
|
|
11
|
-
srok: zod_1.z.string(),
|
|
12
|
-
status: zod_1.z.nativeEnum(utils_1.StatusIssue),
|
|
13
|
-
controllerList: zod_1.z.string(),
|
|
14
|
-
executorList: zod_1.z.string(),
|
|
15
|
-
izdList: zod_1.z.string(),
|
|
16
|
-
shopNeeds: zod_1.z.string(),
|
|
17
|
-
fileArrModal: zod_1.z.string(),
|
|
18
|
-
srok_control: zod_1.z.string(),
|
|
19
|
-
id: zod_1.z.number(),
|
|
20
|
-
name: zod_1.z.string()
|
|
21
|
-
});
|
package/dist/issue/index.d.ts
DELETED
package/dist/issue/index.js
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./schemas/issue.schema"), exports);
|
|
18
|
-
__exportStar(require("./schemas/issue-user.schema"), exports);
|
|
19
|
-
__exportStar(require("./schemas/issue-user-controller.schema"), exports);
|
|
20
|
-
__exportStar(require("./interfaces/interface"), exports);
|
|
21
|
-
__exportStar(require("./dto/up-create-issue.dto"), exports);
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
export declare const issueUserControllerSchema: z.ZodObject<{
|
|
3
|
-
id: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
4
|
-
issueId: z.ZodNumber;
|
|
5
|
-
userId: z.ZodNumber;
|
|
6
|
-
}, "strip", z.ZodTypeAny, {
|
|
7
|
-
userId: number;
|
|
8
|
-
issueId: number;
|
|
9
|
-
id?: number | null | undefined;
|
|
10
|
-
}, {
|
|
11
|
-
userId: number;
|
|
12
|
-
issueId: number;
|
|
13
|
-
id?: number | null | undefined;
|
|
14
|
-
}>;
|
|
15
|
-
export type ModelIssueUserController = z.infer<typeof issueUserControllerSchema>;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.issueUserControllerSchema = void 0;
|
|
4
|
-
const zod_1 = require("zod");
|
|
5
|
-
exports.issueUserControllerSchema = zod_1.z.object({
|
|
6
|
-
id: zod_1.z.number().nullish(),
|
|
7
|
-
issueId: zod_1.z.number().int().positive(),
|
|
8
|
-
userId: zod_1.z.number().int().positive()
|
|
9
|
-
});
|