@banch0u/core-project-test-repository 2.3.9 → 2.3.11
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/assets/css/antd.css +4 -3
- package/dist/assets/icons/index.js +37 -0
- package/dist/components/CategoryTreeSelect/index.js +3 -1
- package/dist/components/CategoryTreeSelect/index.module.scss +13 -0
- package/dist/components/Input/index.module.scss +1 -1
- package/dist/components/Table/index.js +6 -3
- package/dist/pages/Platform/constant.js +8 -2
- package/dist/pages/Questionnnaires/QuestionnairesInventoryCategoriesContent/index.js +21 -5
- package/dist/translations/index.json +3 -0
- package/package.json +1 -1
package/dist/assets/css/antd.css
CHANGED
|
@@ -216,6 +216,7 @@
|
|
|
216
216
|
|
|
217
217
|
.ant-table-row td {
|
|
218
218
|
vertical-align: middle !important;
|
|
219
|
+
|
|
219
220
|
}
|
|
220
221
|
|
|
221
222
|
.ant-pagination-item {
|
|
@@ -262,12 +263,12 @@
|
|
|
262
263
|
.rowClassName1 td:first-child {
|
|
263
264
|
border-top-left-radius: 4px;
|
|
264
265
|
border-bottom-left-radius: 4px;
|
|
265
|
-
border-left: 1px solid
|
|
266
|
+
border-left: 1px solid transparent !important;
|
|
266
267
|
}
|
|
267
268
|
|
|
268
269
|
.rowClassName1 td:first-child {
|
|
269
|
-
border-top: 1px solid
|
|
270
|
-
border-bottom: 1px solid
|
|
270
|
+
border-top: 1px solid transparent !important;
|
|
271
|
+
border-bottom: 1px solid transparent !important;
|
|
271
272
|
}
|
|
272
273
|
|
|
273
274
|
.rowClassName1 td:nth-child(2) {
|
|
@@ -700,4 +700,41 @@ export var ThreeDotsIcon = function ThreeDotsIcon() {
|
|
|
700
700
|
strokeLinecap: "round",
|
|
701
701
|
strokeLinejoin: "round"
|
|
702
702
|
}));
|
|
703
|
+
};
|
|
704
|
+
export var ProcurementIcon = function ProcurementIcon() {
|
|
705
|
+
return /*#__PURE__*/React.createElement("svg", {
|
|
706
|
+
width: "26",
|
|
707
|
+
height: "26",
|
|
708
|
+
viewBox: "0 0 26 26",
|
|
709
|
+
fill: "none",
|
|
710
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
711
|
+
}, /*#__PURE__*/React.createElement("path", {
|
|
712
|
+
d: "M2 2H3.74001C4.82001 2 5.67 2.93 5.58 4L4.75 13.96C4.61 15.59 5.89999 16.99 7.53999 16.99H18.19C19.63 16.99 20.89 15.81 21 14.38L21.54 6.88C21.66 5.22 20.4 3.87 18.73 3.87H5.82001",
|
|
713
|
+
stroke: "#035FB5",
|
|
714
|
+
strokeWidth: "1.5",
|
|
715
|
+
strokeMiterlimit: "10",
|
|
716
|
+
strokeLinecap: "round",
|
|
717
|
+
strokeLinejoin: "round"
|
|
718
|
+
}), /*#__PURE__*/React.createElement("path", {
|
|
719
|
+
d: "M16.25 22C16.9404 22 17.5 21.4404 17.5 20.75C17.5 20.0596 16.9404 19.5 16.25 19.5C15.5596 19.5 15 20.0596 15 20.75C15 21.4404 15.5596 22 16.25 22Z",
|
|
720
|
+
stroke: "#035FB5",
|
|
721
|
+
strokeWidth: "1.5",
|
|
722
|
+
strokeMiterlimit: "10",
|
|
723
|
+
strokeLinecap: "round",
|
|
724
|
+
strokeLinejoin: "round"
|
|
725
|
+
}), /*#__PURE__*/React.createElement("path", {
|
|
726
|
+
d: "M8.25 22C8.94036 22 9.5 21.4404 9.5 20.75C9.5 20.0596 8.94036 19.5 8.25 19.5C7.55964 19.5 7 20.0596 7 20.75C7 21.4404 7.55964 22 8.25 22Z",
|
|
727
|
+
stroke: "#035FB5",
|
|
728
|
+
strokeWidth: "1.5",
|
|
729
|
+
strokeMiterlimit: "10",
|
|
730
|
+
strokeLinecap: "round",
|
|
731
|
+
strokeLinejoin: "round"
|
|
732
|
+
}), /*#__PURE__*/React.createElement("path", {
|
|
733
|
+
d: "M9 8H21",
|
|
734
|
+
stroke: "#035FB5",
|
|
735
|
+
strokeWidth: "1.5",
|
|
736
|
+
strokeMiterlimit: "10",
|
|
737
|
+
strokeLinecap: "round",
|
|
738
|
+
strokeLinejoin: "round"
|
|
739
|
+
}));
|
|
703
740
|
};
|
|
@@ -5,6 +5,7 @@ import React, { useEffect } from "react";
|
|
|
5
5
|
import { TreeSelect } from "antd";
|
|
6
6
|
import { useDispatch, useSelector } from "react-redux";
|
|
7
7
|
import { getInventoryCategoriesAll } from "../../store/slices/questionnaire";
|
|
8
|
+
import style from "./index.module.scss";
|
|
8
9
|
var _mapCategoriesToTree = function mapCategoriesToTree() {
|
|
9
10
|
var nodes = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
|
|
10
11
|
return nodes.map(function (node) {
|
|
@@ -41,7 +42,8 @@ var CategoryTreeSelect = function CategoryTreeSelect(_ref) {
|
|
|
41
42
|
style: {
|
|
42
43
|
width: "100%",
|
|
43
44
|
height: 42
|
|
44
|
-
}
|
|
45
|
+
},
|
|
46
|
+
className: style.treeSelect
|
|
45
47
|
}, rest));
|
|
46
48
|
};
|
|
47
49
|
export default CategoryTreeSelect;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
.treeSelect > div {
|
|
2
|
+
padding: 5px 16px !important;
|
|
3
|
+
border-radius: 6px !important;
|
|
4
|
+
}
|
|
5
|
+
.treeSelect {
|
|
6
|
+
width: 100%;
|
|
7
|
+
span {
|
|
8
|
+
font-size: 16px !important;
|
|
9
|
+
font-weight: 500 !important;
|
|
10
|
+
line-height: 24px !important;
|
|
11
|
+
text-align: left !important;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
@@ -2,6 +2,8 @@ import _extends from "@babel/runtime/helpers/extends";
|
|
|
2
2
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
3
3
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
4
4
|
import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
|
|
5
|
+
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
6
|
+
var _excluded = ["tableId", "columns", "dataSource", "selectedColumns", "innerW", "disableDrag", "big", "isArchive", "expanded"];
|
|
5
7
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
6
8
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
7
9
|
import React, { useState, useEffect } from "react";
|
|
@@ -20,7 +22,8 @@ var Table = function Table(_ref) {
|
|
|
20
22
|
big = _ref$big === void 0 ? false : _ref$big,
|
|
21
23
|
_ref$isArchive = _ref.isArchive,
|
|
22
24
|
isArchive = _ref$isArchive === void 0 ? false : _ref$isArchive,
|
|
23
|
-
expanded = _ref.expanded
|
|
25
|
+
expanded = _ref.expanded,
|
|
26
|
+
rest = _objectWithoutProperties(_ref, _excluded);
|
|
24
27
|
var getSavedOrder = function getSavedOrder(id) {
|
|
25
28
|
var savedOrder = Cookies.get("columnOrder_".concat(id));
|
|
26
29
|
return savedOrder ? savedOrder.split(",") : null;
|
|
@@ -192,7 +195,7 @@ var Table = function Table(_ref) {
|
|
|
192
195
|
};
|
|
193
196
|
return /*#__PURE__*/React.createElement("div", {
|
|
194
197
|
className: style.table_container
|
|
195
|
-
}, /*#__PURE__*/React.createElement(AntTable, {
|
|
198
|
+
}, /*#__PURE__*/React.createElement(AntTable, _extends({
|
|
196
199
|
rowClassName: function rowClassName(record) {
|
|
197
200
|
return record.className;
|
|
198
201
|
},
|
|
@@ -204,6 +207,6 @@ var Table = function Table(_ref) {
|
|
|
204
207
|
x: innerW * (Array.isArray(selectedColumns) ? selectedColumns.length - 1 : 0),
|
|
205
208
|
y: !isArchive ? "calc(88vh - ".concat(window.innerWidth > 1537 ? big === true ? "180px" : "260px" : big === true ? "200px" : "280px", ")") : "calc(88vh - ".concat(window.innerWidth > 1537 ? expanded ? "349px" : "280px" : expanded ? "368px" : "300px", ")")
|
|
206
209
|
}
|
|
207
|
-
}));
|
|
210
|
+
}, rest)));
|
|
208
211
|
};
|
|
209
212
|
export default Table;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { useMemo } from "react";
|
|
2
|
-
import { ContractsIcon, DocumentCirculationIcon, HRIcon, ArchiveIcon, TransportIcon, LabIcon, UserIcon } from "../../assets/icons";
|
|
2
|
+
import { ContractsIcon, DocumentCirculationIcon, HRIcon, ArchiveIcon, TransportIcon, LabIcon, UserIcon, ProcurementIcon } from "../../assets/icons";
|
|
3
3
|
import { useLang } from "../../hooks/useLang";
|
|
4
4
|
import text from "../../translations/index.json";
|
|
5
5
|
var getRootUrl = function getRootUrl() {
|
|
@@ -14,7 +14,7 @@ export function useEntryData() {
|
|
|
14
14
|
return getRootUrl();
|
|
15
15
|
}, []);
|
|
16
16
|
return useMemo(function () {
|
|
17
|
-
var _text$lang, _text$lang$pages$plat, _text$lang2, _text$lang$pages$plat2, _text$lang3, _text$lang$pages$plat3, _text$lang4, _text$lang$pages$plat4, _text$lang5, _text$lang$pages$plat5, _text$lang6, _text$lang$pages$plat6, _text$lang7;
|
|
17
|
+
var _text$lang, _text$lang$pages$plat, _text$lang2, _text$lang$pages$plat2, _text$lang3, _text$lang$pages$plat3, _text$lang4, _text$lang$pages$plat4, _text$lang5, _text$lang$pages$plat5, _text$lang6, _text$lang$pages$plat6, _text$lang7, _text$lang$pages$plat7, _text$lang8;
|
|
18
18
|
return [{
|
|
19
19
|
id: 1,
|
|
20
20
|
value: text === null || text === void 0 || (_text$lang = text[lang]) === null || _text$lang === void 0 || (_text$lang = _text$lang.pages) === null || _text$lang === void 0 || (_text$lang = _text$lang.platform) === null || _text$lang === void 0 || (_text$lang = _text$lang.projects) === null || _text$lang === void 0 ? void 0 : _text$lang.docflow,
|
|
@@ -57,6 +57,12 @@ export function useEntryData() {
|
|
|
57
57
|
pathname: "".concat(rootUrl, "/lab/flasks"),
|
|
58
58
|
icon: /*#__PURE__*/React.createElement(LabIcon, null),
|
|
59
59
|
scopes: "lab"
|
|
60
|
+
}, {
|
|
61
|
+
id: 8,
|
|
62
|
+
value: (_text$lang$pages$plat7 = text === null || text === void 0 || (_text$lang8 = text[lang]) === null || _text$lang8 === void 0 || (_text$lang8 = _text$lang8.pages) === null || _text$lang8 === void 0 || (_text$lang8 = _text$lang8.platform) === null || _text$lang8 === void 0 || (_text$lang8 = _text$lang8.projects) === null || _text$lang8 === void 0 ? void 0 : _text$lang8.procurement) !== null && _text$lang$pages$plat7 !== void 0 ? _text$lang$pages$plat7 : "Satınalma",
|
|
63
|
+
pathname: "".concat(rootUrl, "/procurement/budgets"),
|
|
64
|
+
icon: /*#__PURE__*/React.createElement(ProcurementIcon, null),
|
|
65
|
+
scopes: "procurement"
|
|
60
66
|
}];
|
|
61
67
|
}, [lang, rootUrl]);
|
|
62
68
|
}
|
|
@@ -1,4 +1,9 @@
|
|
|
1
|
+
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
|
+
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
1
3
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
4
|
+
var _excluded = ["children"];
|
|
5
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
6
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
2
7
|
import React, { useCallback, useEffect, useMemo, useRef, useState } from "react";
|
|
3
8
|
import style from "../Questionnaires.module.scss";
|
|
4
9
|
import { Form, Input, Layout, TreeSelect } from "antd";
|
|
@@ -36,12 +41,10 @@ var QuestionnairesInventoryCategoriesContent = function QuestionnairesInventoryC
|
|
|
36
41
|
var InventoryCategories = useSelector(function (state) {
|
|
37
42
|
return state.questionnaire.inventoryCategories;
|
|
38
43
|
});
|
|
39
|
-
|
|
40
|
-
// ✅ BUILD TREE WITH LEVEL
|
|
41
44
|
var buildTree = function buildTree(list) {
|
|
42
45
|
var map = {};
|
|
43
46
|
var roots = [];
|
|
44
|
-
list.forEach(function (item
|
|
47
|
+
list.forEach(function (item) {
|
|
45
48
|
map[item.id] = {
|
|
46
49
|
key: item.id,
|
|
47
50
|
id: item.id,
|
|
@@ -49,7 +52,6 @@ var QuestionnairesInventoryCategoriesContent = function QuestionnairesInventoryC
|
|
|
49
52
|
code: item.code,
|
|
50
53
|
parentId: item.parentId,
|
|
51
54
|
isActive: item.isActive,
|
|
52
|
-
// num: index + 1,
|
|
53
55
|
children: [],
|
|
54
56
|
level: 0,
|
|
55
57
|
className: "rowClassName1"
|
|
@@ -66,7 +68,21 @@ var QuestionnairesInventoryCategoriesContent = function QuestionnairesInventoryC
|
|
|
66
68
|
roots.push(map[item.id]);
|
|
67
69
|
}
|
|
68
70
|
});
|
|
69
|
-
|
|
71
|
+
|
|
72
|
+
// ✅ Remove empty children so Ant Design hides the +/- icon on leaf nodes
|
|
73
|
+
var _stripEmptyChildren = function stripEmptyChildren(nodes) {
|
|
74
|
+
return nodes.map(function (node) {
|
|
75
|
+
if (node.children.length === 0) {
|
|
76
|
+
var children = node.children,
|
|
77
|
+
rest = _objectWithoutProperties(node, _excluded);
|
|
78
|
+
return rest;
|
|
79
|
+
}
|
|
80
|
+
return _objectSpread(_objectSpread({}, node), {}, {
|
|
81
|
+
children: _stripEmptyChildren(node.children)
|
|
82
|
+
});
|
|
83
|
+
});
|
|
84
|
+
};
|
|
85
|
+
return _stripEmptyChildren(roots);
|
|
70
86
|
};
|
|
71
87
|
var treeData = useMemo(function () {
|
|
72
88
|
return buildTree((InventoryCategories === null || InventoryCategories === void 0 ? void 0 : InventoryCategories.items) || []);
|
|
@@ -37,6 +37,7 @@
|
|
|
37
37
|
"archive": "Arxiv",
|
|
38
38
|
"transport": "Nəqliyyat",
|
|
39
39
|
"lab": "Laboratoriya",
|
|
40
|
+
"procurement": "Satınalma",
|
|
40
41
|
"settings": "Tənzimləmələr"
|
|
41
42
|
}
|
|
42
43
|
},
|
|
@@ -159,6 +160,7 @@
|
|
|
159
160
|
"archive": "Archive",
|
|
160
161
|
"transport": "Transport",
|
|
161
162
|
"lab": "Laboratory",
|
|
163
|
+
"procurement": "Procurement",
|
|
162
164
|
"settings": "Settings"
|
|
163
165
|
}
|
|
164
166
|
},
|
|
@@ -279,6 +281,7 @@
|
|
|
279
281
|
"archive": "Архив",
|
|
280
282
|
"transport": "Автотранспорт",
|
|
281
283
|
"lab": "Лаборатория",
|
|
284
|
+
"procurement": "Закупки",
|
|
282
285
|
"settings": "Настройки"
|
|
283
286
|
}
|
|
284
287
|
},
|