@banch0u/core-project-test-repository 2.3.10 → 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.
@@ -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
  };
@@ -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, index) {
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
- return roots;
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
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@banch0u/core-project-test-repository",
3
- "version": "2.3.10",
3
+ "version": "2.3.11",
4
4
  "description": "Shared core features for all projects",
5
5
  "main": "dist/index.js",
6
6
  "files": [