@banch0u/core-project-test-repository 1.9.0 → 1.9.1
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/components/Button/index.module.scss +5 -5
- package/dist/components/ColSort/index.module.scss +22 -0
- package/dist/components/Input/index.js +35 -6
- package/dist/components/Input/index.module.scss +45 -22
- package/dist/components/Select/index.js +47 -60
- package/dist/components/Select/index.module.scss +32 -0
- package/dist/layout/QuestionnairesSidebar/index.js +52 -16
- package/dist/pages/Questionnnaires/QuestionnairesBrandsContent/constant.js +58 -0
- package/dist/pages/Questionnnaires/QuestionnairesBrandsContent/index.js +247 -0
- package/dist/pages/Questionnnaires/QuestionnairesChassisTypesContent/constant.js +58 -0
- package/dist/pages/Questionnnaires/QuestionnairesChassisTypesContent/index.js +247 -0
- package/dist/pages/Questionnnaires/QuestionnairesColorsContent/constant.js +58 -0
- package/dist/pages/Questionnnaires/QuestionnairesColorsContent/index.js +247 -0
- package/dist/pages/Questionnnaires/QuestionnairesEngineTypesContent/constant.js +58 -0
- package/dist/pages/Questionnnaires/QuestionnairesEngineTypesContent/index.js +247 -0
- package/dist/pages/Questionnnaires/QuestionnairesGearboxTypesContent/constant.js +58 -0
- package/dist/pages/Questionnnaires/QuestionnairesGearboxTypesContent/index.js +247 -0
- package/dist/pages/Questionnnaires/QuestionnairesIssuedAuthoritiesContent/constant.js +58 -0
- package/dist/pages/Questionnnaires/QuestionnairesIssuedAuthoritiesContent/index.js +247 -0
- package/dist/pages/Questionnnaires/QuestionnairesModelsContent/constant.js +58 -0
- package/dist/pages/Questionnnaires/QuestionnairesModelsContent/index.js +290 -0
- package/dist/pages/Questionnnaires/QuestionnairesOwnershipTypesContent/constant.js +58 -0
- package/dist/pages/Questionnnaires/QuestionnairesOwnershipTypesContent/index.js +247 -0
- package/dist/pages/Questionnnaires/QuestionnairesTransmitterTypesContent/constant.js +58 -0
- package/dist/pages/Questionnnaires/QuestionnairesTransmitterTypesContent/index.js +247 -0
- package/dist/pages/Questionnnaires/QuestionnairesVehicleTypesContent/constant.js +58 -0
- package/dist/pages/Questionnnaires/QuestionnairesVehicleTypesContent/index.js +247 -0
- package/dist/routes/QuestionnaireRoutes.js +83 -13
- package/dist/store/slices/global/index.js +81 -3
- package/dist/store/slices/questionnaire/index.js +2686 -47
- package/dist/store/slices/questionnaire/service.js +1475 -2
- package/dist/utils/path.js +34 -15
- package/package.json +1 -1
|
@@ -70,13 +70,13 @@
|
|
|
70
70
|
|
|
71
71
|
.button_green {
|
|
72
72
|
border-radius: 6px;
|
|
73
|
-
background: #
|
|
73
|
+
background: #18b503;
|
|
74
74
|
padding: 5px 10px;
|
|
75
75
|
font-size: 16px;
|
|
76
76
|
font-weight: 400;
|
|
77
77
|
line-height: 24px;
|
|
78
78
|
letter-spacing: 0.5px;
|
|
79
|
-
border: 1px solid #
|
|
79
|
+
border: 1px solid #18b503;
|
|
80
80
|
color: #fff;
|
|
81
81
|
cursor: pointer;
|
|
82
82
|
transition: 250ms;
|
|
@@ -124,8 +124,8 @@
|
|
|
124
124
|
font-weight: 400;
|
|
125
125
|
line-height: 24px;
|
|
126
126
|
letter-spacing: 0.5px;
|
|
127
|
-
border: 1px solid #
|
|
128
|
-
color: #
|
|
127
|
+
border: 1px solid #18b503;
|
|
128
|
+
color: #18b503;
|
|
129
129
|
cursor: pointer;
|
|
130
130
|
transition: 250ms;
|
|
131
131
|
|
|
@@ -136,7 +136,7 @@
|
|
|
136
136
|
svg {
|
|
137
137
|
path {
|
|
138
138
|
transition: 250ms;
|
|
139
|
-
stroke: #
|
|
139
|
+
stroke: #18b503;
|
|
140
140
|
}
|
|
141
141
|
}
|
|
142
142
|
}
|
|
@@ -5,7 +5,29 @@
|
|
|
5
5
|
box-shadow: 0px 4px 4px 0px #0000001a !important;
|
|
6
6
|
border: 1px solid #d1d1d1 !important;
|
|
7
7
|
background: #deeaf6 !important;
|
|
8
|
+
max-height: 518px;
|
|
9
|
+
overflow-y: auto;
|
|
10
|
+
/* Scrollbar styles for WebKit browsers */
|
|
11
|
+
&::-webkit-scrollbar {
|
|
12
|
+
width: 6px;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
&::-webkit-scrollbar-track {
|
|
16
|
+
background: transparent;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
&::-webkit-scrollbar-thumb {
|
|
20
|
+
background-color: #fff !important; // 👈 your custom scrollbar color
|
|
21
|
+
border-radius: 3px;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
&::-webkit-scrollbar-thumb:hover {
|
|
25
|
+
background-color: #fff !important;
|
|
26
|
+
}
|
|
8
27
|
|
|
28
|
+
/* Scrollbar styles for Firefox */
|
|
29
|
+
scrollbar-width: thin;
|
|
30
|
+
scrollbar-color: #fff transparent !important;
|
|
9
31
|
.count {
|
|
10
32
|
margin-bottom: 24px;
|
|
11
33
|
display: flex;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
|
-
var _excluded = ["type", "size", "className", "disabledDate", "placeholder"];
|
|
3
|
+
var _excluded = ["type", "size", "className", "disabledDate", "placeholder", "allowDecimal"];
|
|
4
4
|
import React from "react";
|
|
5
5
|
import style from "./index.module.scss";
|
|
6
6
|
import { InputNumber, Input as AntdInput, DatePicker } from "antd";
|
|
@@ -13,13 +13,41 @@ var Input = function Input(_ref) {
|
|
|
13
13
|
disabledDate = _ref.disabledDate,
|
|
14
14
|
_ref$placeholder = _ref.placeholder,
|
|
15
15
|
placeholder = _ref$placeholder === void 0 ? "" : _ref$placeholder,
|
|
16
|
+
_ref$allowDecimal = _ref.allowDecimal,
|
|
17
|
+
allowDecimal = _ref$allowDecimal === void 0 ? false : _ref$allowDecimal,
|
|
16
18
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
19
|
+
var getClassName = function getClassName(baseType) {
|
|
20
|
+
if (className) return className;
|
|
21
|
+
switch (size) {
|
|
22
|
+
case "sm":
|
|
23
|
+
return style["".concat(baseType, "_sm")];
|
|
24
|
+
case "md":
|
|
25
|
+
return style["".concat(baseType, "_md")];
|
|
26
|
+
case "xs":
|
|
27
|
+
return style["".concat(baseType, "_xs")];
|
|
28
|
+
default:
|
|
29
|
+
return style[baseType];
|
|
30
|
+
}
|
|
31
|
+
};
|
|
17
32
|
return /*#__PURE__*/React.createElement(React.Fragment, null, type === "number" ? /*#__PURE__*/React.createElement(InputNumber, _extends({
|
|
18
|
-
className:
|
|
33
|
+
className: getClassName("input"),
|
|
19
34
|
min: 1,
|
|
20
|
-
placeholder: placeholder
|
|
35
|
+
placeholder: placeholder,
|
|
36
|
+
onKeyPress: function onKeyPress(event) {
|
|
37
|
+
var isDigit = /[0-9]/.test(event.key);
|
|
38
|
+
var isDot = event.key === ".";
|
|
39
|
+
var alreadyHasDot = event.currentTarget.value.includes(".");
|
|
40
|
+
if (!isDigit && (!allowDecimal || !isDot || alreadyHasDot)) {
|
|
41
|
+
event.preventDefault();
|
|
42
|
+
}
|
|
43
|
+
},
|
|
44
|
+
onKeyDown: function onKeyDown(e) {
|
|
45
|
+
if (["e", "E", "+", "-"].includes(e.key)) {
|
|
46
|
+
e.preventDefault();
|
|
47
|
+
}
|
|
48
|
+
}
|
|
21
49
|
}, rest)) : type === "textarea" ? /*#__PURE__*/React.createElement(TextArea, _extends({
|
|
22
|
-
className:
|
|
50
|
+
className: getClassName("textarea"),
|
|
23
51
|
autoSize: {
|
|
24
52
|
minRows: 2,
|
|
25
53
|
maxRows: 4
|
|
@@ -27,7 +55,7 @@ var Input = function Input(_ref) {
|
|
|
27
55
|
maxLength: 500,
|
|
28
56
|
placeholder: placeholder
|
|
29
57
|
}, rest)) : type === "date" ? /*#__PURE__*/React.createElement(DatePicker, _extends({
|
|
30
|
-
className:
|
|
58
|
+
className: getClassName("date"),
|
|
31
59
|
format: "DD.MM.YYYY",
|
|
32
60
|
disabledDate: disabledDate === "until" ? function (current) {
|
|
33
61
|
return current && current > dayjs().endOf("day");
|
|
@@ -36,7 +64,8 @@ var Input = function Input(_ref) {
|
|
|
36
64
|
} : false,
|
|
37
65
|
placeholder: placeholder
|
|
38
66
|
}, rest)) : /*#__PURE__*/React.createElement(AntdInput, _extends({
|
|
39
|
-
className:
|
|
67
|
+
className: getClassName("input"),
|
|
68
|
+
placeholder: placeholder
|
|
40
69
|
}, rest)));
|
|
41
70
|
};
|
|
42
71
|
export default Input;
|
|
@@ -7,6 +7,21 @@
|
|
|
7
7
|
text-align: left !important;
|
|
8
8
|
height: 48px;
|
|
9
9
|
width: 100%;
|
|
10
|
+
input {
|
|
11
|
+
padding: 0 !important;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
.input_xs {
|
|
15
|
+
border-radius: 6px !important;
|
|
16
|
+
font-size: 14px !important;
|
|
17
|
+
font-weight: 500 !important;
|
|
18
|
+
line-height: 24px !important;
|
|
19
|
+
text-align: left !important;
|
|
20
|
+
height: 26px;
|
|
21
|
+
width: 100%;
|
|
22
|
+
input {
|
|
23
|
+
padding: 0 !important;
|
|
24
|
+
}
|
|
10
25
|
}
|
|
11
26
|
.input_sm {
|
|
12
27
|
padding: 9px 16px !important;
|
|
@@ -17,7 +32,24 @@
|
|
|
17
32
|
text-align: left !important;
|
|
18
33
|
height: 34px;
|
|
19
34
|
width: 100%;
|
|
35
|
+
input {
|
|
36
|
+
padding: 0 !important;
|
|
37
|
+
}
|
|
20
38
|
}
|
|
39
|
+
.input_md {
|
|
40
|
+
padding: 9px 16px !important;
|
|
41
|
+
border-radius: 6px !important;
|
|
42
|
+
font-size: 16px !important;
|
|
43
|
+
font-weight: 500 !important;
|
|
44
|
+
line-height: 24px !important;
|
|
45
|
+
text-align: left !important;
|
|
46
|
+
height: 42px;
|
|
47
|
+
width: 100%;
|
|
48
|
+
input {
|
|
49
|
+
padding: 0 !important;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
|
|
21
53
|
.textarea {
|
|
22
54
|
padding: 9px 16px !important;
|
|
23
55
|
border-radius: 6px !important;
|
|
@@ -39,13 +71,12 @@
|
|
|
39
71
|
text-align: left !important;
|
|
40
72
|
}
|
|
41
73
|
}
|
|
42
|
-
|
|
43
|
-
.date_sm {
|
|
74
|
+
.date_xs {
|
|
44
75
|
padding: 8px 16px !important;
|
|
45
76
|
// border: 1px solid #bdbdbd !important;
|
|
46
77
|
border-radius: 6px !important;
|
|
47
78
|
width: 100%;
|
|
48
|
-
height:
|
|
79
|
+
height: 26px;
|
|
49
80
|
input {
|
|
50
81
|
font-size: 16px !important;
|
|
51
82
|
font-weight: 500 !important;
|
|
@@ -53,32 +84,24 @@
|
|
|
53
84
|
text-align: left !important;
|
|
54
85
|
}
|
|
55
86
|
}
|
|
56
|
-
.
|
|
87
|
+
.date_sm {
|
|
57
88
|
padding: 8px 16px !important;
|
|
89
|
+
// border: 1px solid #bdbdbd !important;
|
|
58
90
|
border-radius: 6px !important;
|
|
59
|
-
font-size: 16px !important;
|
|
60
|
-
font-weight: 500 !important;
|
|
61
|
-
line-height: 24px !important;
|
|
62
|
-
text-align: left !important;
|
|
63
|
-
height: 34px;
|
|
64
|
-
width: 100%;
|
|
65
|
-
}
|
|
66
|
-
.input_xs {
|
|
67
|
-
// padding: 9px 16px !important;
|
|
68
|
-
border-radius: 6px !important;
|
|
69
|
-
font-size: 14px !important;
|
|
70
|
-
font-weight: 500 !important;
|
|
71
|
-
line-height: 24px !important;
|
|
72
|
-
text-align: left !important;
|
|
73
|
-
height: 26px;
|
|
74
91
|
width: 100%;
|
|
92
|
+
height: 34px;
|
|
93
|
+
input {
|
|
94
|
+
font-size: 16px !important;
|
|
95
|
+
font-weight: 500 !important;
|
|
96
|
+
line-height: 24px !important;
|
|
97
|
+
text-align: left !important;
|
|
98
|
+
}
|
|
75
99
|
}
|
|
76
|
-
.
|
|
100
|
+
.date_md {
|
|
77
101
|
padding: 8px 16px !important;
|
|
78
|
-
// border: 1px solid #bdbdbd !important;
|
|
79
102
|
border-radius: 6px !important;
|
|
80
103
|
width: 100%;
|
|
81
|
-
height:
|
|
104
|
+
height: 42px;
|
|
82
105
|
input {
|
|
83
106
|
font-size: 16px !important;
|
|
84
107
|
font-weight: 500 !important;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
1
2
|
import React from "react";
|
|
2
3
|
import style from "./index.module.scss";
|
|
3
4
|
import { Select as AntdSelect, Divider } from "antd";
|
|
@@ -21,76 +22,62 @@ var Select = function Select(_ref) {
|
|
|
21
22
|
_ref$allowClear = _ref.allowClear,
|
|
22
23
|
allowClear = _ref$allowClear === void 0 ? true : _ref$allowClear,
|
|
23
24
|
width = _ref.width;
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
onChange: onChange,
|
|
34
|
-
disabled: disabled,
|
|
35
|
-
value: value,
|
|
36
|
-
defaultValue: defaultValue,
|
|
37
|
-
mode: "multiple",
|
|
38
|
-
optionLabelProp: "label"
|
|
39
|
-
}, children) : mode === "divider" ? /*#__PURE__*/React.createElement(AntdSelect, {
|
|
40
|
-
className: className ? className : size === "sm" ? style.select_sm : style.select,
|
|
41
|
-
style: {
|
|
42
|
-
width: width ? width + "px" : "100%"
|
|
43
|
-
},
|
|
44
|
-
showSearch: true,
|
|
45
|
-
allowClear: true,
|
|
46
|
-
placeholder: placeholder,
|
|
47
|
-
optionFilterProp: "children",
|
|
48
|
-
filterOption: function filterOption(input, option) {
|
|
49
|
-
if (!(option !== null && option !== void 0 && option.children) || typeof option.children !== "string") return false;
|
|
50
|
-
var normalizeAz = function normalizeAz(str) {
|
|
51
|
-
return str.replace(/I/g, "i").toLocaleLowerCase("az").normalize("NFD").replace(/[\u0300-\u036f]/g, "").replace(/ç/g, "c").replace(/ş/g, "s").replace(/ğ/g, "g").replace(/ü/g, "u").replace(/ö/g, "o").replace(/ə/g, "e");
|
|
52
|
-
};
|
|
53
|
-
var normalizedInput = normalizeAz(input);
|
|
54
|
-
var normalizedOption = normalizeAz(option.children);
|
|
55
|
-
return normalizedOption.includes(normalizedInput);
|
|
56
|
-
},
|
|
57
|
-
onChange: onChange,
|
|
58
|
-
disabled: disabled,
|
|
59
|
-
value: value,
|
|
60
|
-
defaultValue: defaultValue,
|
|
61
|
-
dropdownRender: function dropdownRender(menu) {
|
|
62
|
-
return /*#__PURE__*/React.createElement("div", null, menu, /*#__PURE__*/React.createElement(Divider, {
|
|
63
|
-
style: {
|
|
64
|
-
margin: "4px 0"
|
|
65
|
-
}
|
|
66
|
-
}), /*#__PURE__*/React.createElement("div", {
|
|
67
|
-
className: style.select_add_button
|
|
68
|
-
}, /*#__PURE__*/React.createElement(Button, {
|
|
69
|
-
onClick: onOpen
|
|
70
|
-
}, text)));
|
|
25
|
+
var getClassName = function getClassName() {
|
|
26
|
+
if (className) return className;
|
|
27
|
+
switch (size) {
|
|
28
|
+
case "sm":
|
|
29
|
+
return style.select_sm;
|
|
30
|
+
case "md":
|
|
31
|
+
return style.select_md;
|
|
32
|
+
default:
|
|
33
|
+
return style.select;
|
|
71
34
|
}
|
|
72
|
-
}
|
|
73
|
-
|
|
35
|
+
};
|
|
36
|
+
var commonProps = {
|
|
37
|
+
className: getClassName(),
|
|
74
38
|
style: {
|
|
75
|
-
width: width ? width
|
|
39
|
+
width: width ? "".concat(width, "px") : "100%"
|
|
76
40
|
},
|
|
77
41
|
showSearch: true,
|
|
78
42
|
allowClear: allowClear,
|
|
79
43
|
placeholder: placeholder,
|
|
80
44
|
optionFilterProp: "children",
|
|
81
|
-
filterOption: function filterOption(input, option) {
|
|
82
|
-
if (!(option !== null && option !== void 0 && option.children) || typeof option.children !== "string") return false;
|
|
83
|
-
var normalizeAz = function normalizeAz(str) {
|
|
84
|
-
return str.replace(/I/g, "i").toLocaleLowerCase("az").normalize("NFD").replace(/[\u0300-\u036f]/g, "").replace(/ç/g, "c").replace(/ş/g, "s").replace(/ğ/g, "g").replace(/ü/g, "u").replace(/ö/g, "o").replace(/ə/g, "e");
|
|
85
|
-
};
|
|
86
|
-
var normalizedInput = normalizeAz(input);
|
|
87
|
-
var normalizedOption = normalizeAz(option.children);
|
|
88
|
-
return normalizedOption.includes(normalizedInput);
|
|
89
|
-
},
|
|
90
45
|
onChange: onChange,
|
|
91
46
|
disabled: disabled,
|
|
92
47
|
value: value,
|
|
93
48
|
defaultValue: defaultValue
|
|
94
|
-
}
|
|
49
|
+
};
|
|
50
|
+
var normalizeAz = function normalizeAz(str) {
|
|
51
|
+
return str.replace(/I/g, "i").toLocaleLowerCase("az").normalize("NFD").replace(/[\u0300-\u036f]/g, "").replace(/ç/g, "c").replace(/ş/g, "s").replace(/ğ/g, "g").replace(/ü/g, "u").replace(/ö/g, "o").replace(/ə/g, "e");
|
|
52
|
+
};
|
|
53
|
+
var filterOption = function filterOption(input, option) {
|
|
54
|
+
if (!(option !== null && option !== void 0 && option.children) || typeof option.children !== "string") return false;
|
|
55
|
+
return normalizeAz(option.children).includes(normalizeAz(input));
|
|
56
|
+
};
|
|
57
|
+
if (mode === "multiple") {
|
|
58
|
+
return /*#__PURE__*/React.createElement(AntdSelect, _extends({}, commonProps, {
|
|
59
|
+
mode: "multiple",
|
|
60
|
+
optionLabelProp: "label"
|
|
61
|
+
}), children);
|
|
62
|
+
}
|
|
63
|
+
if (mode === "divider") {
|
|
64
|
+
return /*#__PURE__*/React.createElement(AntdSelect, _extends({}, commonProps, {
|
|
65
|
+
filterOption: filterOption,
|
|
66
|
+
dropdownRender: function dropdownRender(menu) {
|
|
67
|
+
return /*#__PURE__*/React.createElement("div", null, menu, /*#__PURE__*/React.createElement(Divider, {
|
|
68
|
+
style: {
|
|
69
|
+
margin: "4px 0"
|
|
70
|
+
}
|
|
71
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
72
|
+
className: style.select_add_button
|
|
73
|
+
}, /*#__PURE__*/React.createElement(Button, {
|
|
74
|
+
onClick: onOpen
|
|
75
|
+
}, text)));
|
|
76
|
+
}
|
|
77
|
+
}), children);
|
|
78
|
+
}
|
|
79
|
+
return /*#__PURE__*/React.createElement(AntdSelect, _extends({}, commonProps, {
|
|
80
|
+
filterOption: filterOption
|
|
81
|
+
}), children);
|
|
95
82
|
};
|
|
96
83
|
export default Select;
|
|
@@ -14,6 +14,22 @@
|
|
|
14
14
|
text-align: left !important;
|
|
15
15
|
}
|
|
16
16
|
}
|
|
17
|
+
.select_xs > div {
|
|
18
|
+
padding: 5px 16px !important;
|
|
19
|
+
border-radius: 6px !important;
|
|
20
|
+
height: 26px;
|
|
21
|
+
}
|
|
22
|
+
.select_xs {
|
|
23
|
+
width: 100%;
|
|
24
|
+
height: auto;
|
|
25
|
+
height: 26px;
|
|
26
|
+
span {
|
|
27
|
+
font-size: 16px !important;
|
|
28
|
+
font-weight: 500 !important;
|
|
29
|
+
line-height: 24px !important;
|
|
30
|
+
text-align: left !important;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
17
33
|
|
|
18
34
|
.select_sm > div {
|
|
19
35
|
padding: 5px 16px !important;
|
|
@@ -31,6 +47,22 @@
|
|
|
31
47
|
text-align: left !important;
|
|
32
48
|
}
|
|
33
49
|
}
|
|
50
|
+
.select_md > div {
|
|
51
|
+
padding: 5px 16px !important;
|
|
52
|
+
border-radius: 6px !important;
|
|
53
|
+
height: 42px;
|
|
54
|
+
}
|
|
55
|
+
.select_md {
|
|
56
|
+
width: 100%;
|
|
57
|
+
height: auto;
|
|
58
|
+
height: 42px;
|
|
59
|
+
span {
|
|
60
|
+
font-size: 16px !important;
|
|
61
|
+
font-weight: 500 !important;
|
|
62
|
+
line-height: 24px !important;
|
|
63
|
+
text-align: left !important;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
34
66
|
.select_add_button {
|
|
35
67
|
display: inline-flex;
|
|
36
68
|
flex-wrap: nowrap;
|
|
@@ -3,7 +3,7 @@ import React, { useState } from "react";
|
|
|
3
3
|
import { Link, useLocation } from "react-router-dom";
|
|
4
4
|
import style from "./index.module.scss";
|
|
5
5
|
import { Layout, Menu, Input } from "antd";
|
|
6
|
-
import {
|
|
6
|
+
import { QUESTIONNAIRES_APPLICATION_FORMS, QUESTIONNAIRES_BRANDS, QUESTIONNAIRES_CHASSIS_TYPES, QUESTIONNAIRES_COLORS, QUESTIONNAIRES_COUNTRIES, QUESTIONNAIRES_DOCUMENT_RECIEVE_METHODS, QUESTIONNAIRES_DOCUMENT_TYPES, QUESTIONNAIRES_DOCUMENT_WHOM, QUESTIONNAIRES_ENGINE_TYPES, QUESTIONNAIRES_EXECUTION_RULES, QUESTIONNAIRES_GEARBOX_TYPES, QUESTIONNAIRES_ISSUED_AUTHORITIES, QUESTIONNAIRES_MARGIN_NOTE_TEXTS, QUESTIONNAIRES_MODELS, QUESTIONNAIRES_ORGANIZATIONS, QUESTIONNAIRES_OWNERSHIP_TYPES, QUESTIONNAIRES_STREETS, QUESTIONNAIRES_STRUCTURES, QUESTIONNAIRES_SUBTOPIC, QUESTIONNAIRES_TOPIC, QUESTIONNAIRES_TRANSMITTER_TYPES, QUESTIONNAIRES_VEHICLE_TYPES, SETTINGS_QUESTIONNAIRES_APPLICATION_FORMS, SETTINGS_QUESTIONNAIRES_BRANDS, SETTINGS_QUESTIONNAIRES_CHASSISTYPES, SETTINGS_QUESTIONNAIRES_COLORS, SETTINGS_QUESTIONNAIRES_COUNTRIES, SETTINGS_QUESTIONNAIRES_DOCUMENT_RECIEVE_METHODS, SETTINGS_QUESTIONNAIRES_DOCUMENT_TYPES, SETTINGS_QUESTIONNAIRES_DOCUMENT_WHOM, SETTINGS_QUESTIONNAIRES_ENGINETYPES, SETTINGS_QUESTIONNAIRES_EXECUTION_RULES, SETTINGS_QUESTIONNAIRES_GEARBOXTYPES, SETTINGS_QUESTIONNAIRES_ISSUEDAUTHORITIES, SETTINGS_QUESTIONNAIRES_MARGIN_NOTE_TEXTS, SETTINGS_QUESTIONNAIRES_MODELS, SETTINGS_QUESTIONNAIRES_ORGANIZATIONS, SETTINGS_QUESTIONNAIRES_OWNERSHIPTYPES, SETTINGS_QUESTIONNAIRES_STREETS, SETTINGS_QUESTIONNAIRES_STRUCTURES, SETTINGS_QUESTIONNAIRES_SUBTOPIC, SETTINGS_QUESTIONNAIRES_TOPIC, SETTINGS_QUESTIONNAIRES_TRANSMITTERTYPES, SETTINGS_QUESTIONNAIRES_VEHICLETYPES } from "../../utils/path";
|
|
7
7
|
import { SearchIcon } from "../../assets/icons";
|
|
8
8
|
var Sider = Layout.Sider;
|
|
9
9
|
var SubMenu = Menu.SubMenu;
|
|
@@ -20,55 +20,91 @@ var QuestionnairesSidebar = function QuestionnairesSidebar(_ref) {
|
|
|
20
20
|
var items = [{
|
|
21
21
|
key: "topic",
|
|
22
22
|
label: "Mövzular",
|
|
23
|
-
link: mainPath === "/settings" ? SETTINGS_QUESTIONNAIRES_TOPIC :
|
|
23
|
+
link: mainPath === "/settings" ? SETTINGS_QUESTIONNAIRES_TOPIC : QUESTIONNAIRES_TOPIC
|
|
24
24
|
}, {
|
|
25
25
|
key: "subtopic",
|
|
26
26
|
label: "Alt mövzular",
|
|
27
|
-
link: mainPath === "/settings" ? SETTINGS_QUESTIONNAIRES_SUBTOPIC :
|
|
27
|
+
link: mainPath === "/settings" ? SETTINGS_QUESTIONNAIRES_SUBTOPIC : QUESTIONNAIRES_SUBTOPIC
|
|
28
28
|
}, {
|
|
29
29
|
key: "executionRules",
|
|
30
30
|
label: "İcra qaydaları",
|
|
31
|
-
link: mainPath === "/settings" ? SETTINGS_QUESTIONNAIRES_EXECUTION_RULES :
|
|
31
|
+
link: mainPath === "/settings" ? SETTINGS_QUESTIONNAIRES_EXECUTION_RULES : QUESTIONNAIRES_EXECUTION_RULES
|
|
32
32
|
}, {
|
|
33
33
|
key: "document-recieve-methods",
|
|
34
34
|
label: "Daxil olma yolları",
|
|
35
|
-
link: mainPath === "/settings" ? SETTINGS_QUESTIONNAIRES_DOCUMENT_RECIEVE_METHODS :
|
|
35
|
+
link: mainPath === "/settings" ? SETTINGS_QUESTIONNAIRES_DOCUMENT_RECIEVE_METHODS : QUESTIONNAIRES_DOCUMENT_RECIEVE_METHODS
|
|
36
36
|
}, {
|
|
37
37
|
key: "documentType",
|
|
38
38
|
label: "Sənəd Növləri",
|
|
39
|
-
link: mainPath === "/settings" ? SETTINGS_QUESTIONNAIRES_DOCUMENT_TYPES :
|
|
39
|
+
link: mainPath === "/settings" ? SETTINGS_QUESTIONNAIRES_DOCUMENT_TYPES : QUESTIONNAIRES_DOCUMENT_TYPES
|
|
40
40
|
}, {
|
|
41
41
|
key: "country",
|
|
42
42
|
label: "Ölkələr",
|
|
43
|
-
link: mainPath === "/settings" ? SETTINGS_QUESTIONNAIRES_COUNTRIES :
|
|
43
|
+
link: mainPath === "/settings" ? SETTINGS_QUESTIONNAIRES_COUNTRIES : QUESTIONNAIRES_COUNTRIES
|
|
44
44
|
}, {
|
|
45
45
|
key: "street",
|
|
46
46
|
label: "Küçələr",
|
|
47
|
-
link: mainPath === "/settings" ? SETTINGS_QUESTIONNAIRES_STREETS :
|
|
47
|
+
link: mainPath === "/settings" ? SETTINGS_QUESTIONNAIRES_STREETS : QUESTIONNAIRES_STREETS
|
|
48
48
|
}, {
|
|
49
49
|
key: "organization",
|
|
50
50
|
label: "Təşkilatlar",
|
|
51
|
-
link: mainPath === "/settings" ? SETTINGS_QUESTIONNAIRES_ORGANIZATIONS :
|
|
51
|
+
link: mainPath === "/settings" ? SETTINGS_QUESTIONNAIRES_ORGANIZATIONS : QUESTIONNAIRES_ORGANIZATIONS
|
|
52
52
|
}, {
|
|
53
53
|
key: "structure",
|
|
54
54
|
label: "Strukturlar",
|
|
55
|
-
link: mainPath === "/settings" ? SETTINGS_QUESTIONNAIRES_STRUCTURES :
|
|
55
|
+
link: mainPath === "/settings" ? SETTINGS_QUESTIONNAIRES_STRUCTURES : QUESTIONNAIRES_STRUCTURES
|
|
56
56
|
}, {
|
|
57
57
|
key: "application_form",
|
|
58
58
|
label: "Müraciət formaları",
|
|
59
|
-
link: mainPath === "/settings" ? SETTINGS_QUESTIONNAIRES_APPLICATION_FORMS :
|
|
59
|
+
link: mainPath === "/settings" ? SETTINGS_QUESTIONNAIRES_APPLICATION_FORMS : QUESTIONNAIRES_APPLICATION_FORMS
|
|
60
60
|
}, {
|
|
61
61
|
key: "document_whom",
|
|
62
62
|
label: "Şəxslər",
|
|
63
|
-
link: mainPath === "/settings" ? SETTINGS_QUESTIONNAIRES_DOCUMENT_WHOM :
|
|
63
|
+
link: mainPath === "/settings" ? SETTINGS_QUESTIONNAIRES_DOCUMENT_WHOM : QUESTIONNAIRES_DOCUMENT_WHOM
|
|
64
64
|
}, {
|
|
65
65
|
key: "margin_note_texts",
|
|
66
66
|
label: "Dərkənar mətni",
|
|
67
|
-
link: mainPath === "/settings" ? SETTINGS_QUESTIONNAIRES_MARGIN_NOTE_TEXTS :
|
|
67
|
+
link: mainPath === "/settings" ? SETTINGS_QUESTIONNAIRES_MARGIN_NOTE_TEXTS : QUESTIONNAIRES_MARGIN_NOTE_TEXTS
|
|
68
68
|
}, {
|
|
69
69
|
key: "brands",
|
|
70
|
-
label: "
|
|
71
|
-
link: mainPath === "/settings" ?
|
|
70
|
+
label: "Markalar",
|
|
71
|
+
link: mainPath === "/settings" ? SETTINGS_QUESTIONNAIRES_BRANDS : QUESTIONNAIRES_BRANDS
|
|
72
|
+
}, {
|
|
73
|
+
key: "chassis-types",
|
|
74
|
+
label: "Şassi növləri",
|
|
75
|
+
link: mainPath === "/settings" ? SETTINGS_QUESTIONNAIRES_CHASSISTYPES : QUESTIONNAIRES_CHASSIS_TYPES
|
|
76
|
+
}, {
|
|
77
|
+
key: "engine-types",
|
|
78
|
+
label: "Mühərrik növləri",
|
|
79
|
+
link: mainPath === "/settings" ? SETTINGS_QUESTIONNAIRES_ENGINETYPES : QUESTIONNAIRES_ENGINE_TYPES
|
|
80
|
+
}, {
|
|
81
|
+
key: "gearbox-types",
|
|
82
|
+
label: "Sürətlər qutusu",
|
|
83
|
+
link: mainPath === "/settings" ? SETTINGS_QUESTIONNAIRES_GEARBOXTYPES : QUESTIONNAIRES_GEARBOX_TYPES
|
|
84
|
+
}, {
|
|
85
|
+
key: "issued-authorities",
|
|
86
|
+
label: "Verən orqanlar",
|
|
87
|
+
link: mainPath === "/settings" ? SETTINGS_QUESTIONNAIRES_ISSUEDAUTHORITIES : QUESTIONNAIRES_ISSUED_AUTHORITIES
|
|
88
|
+
}, {
|
|
89
|
+
key: "models",
|
|
90
|
+
label: "Modellər",
|
|
91
|
+
link: mainPath === "/settings" ? SETTINGS_QUESTIONNAIRES_MODELS : QUESTIONNAIRES_MODELS
|
|
92
|
+
}, {
|
|
93
|
+
key: "ownership-types",
|
|
94
|
+
label: "Mülkiyyət növləri",
|
|
95
|
+
link: mainPath === "/settings" ? SETTINGS_QUESTIONNAIRES_OWNERSHIPTYPES : QUESTIONNAIRES_OWNERSHIP_TYPES
|
|
96
|
+
}, {
|
|
97
|
+
key: "transmitter-types",
|
|
98
|
+
label: "Ötürücü növləri",
|
|
99
|
+
link: mainPath === "/settings" ? SETTINGS_QUESTIONNAIRES_TRANSMITTERTYPES : QUESTIONNAIRES_TRANSMITTER_TYPES
|
|
100
|
+
}, {
|
|
101
|
+
key: "vehicle-types",
|
|
102
|
+
label: "Nəqliyyat növləri",
|
|
103
|
+
link: mainPath === "/settings" ? SETTINGS_QUESTIONNAIRES_VEHICLETYPES : QUESTIONNAIRES_VEHICLE_TYPES
|
|
104
|
+
}, {
|
|
105
|
+
key: "colors",
|
|
106
|
+
label: "Rənglər",
|
|
107
|
+
link: mainPath === "/settings" ? SETTINGS_QUESTIONNAIRES_COLORS : QUESTIONNAIRES_COLORS
|
|
72
108
|
}];
|
|
73
109
|
var sortedItems = items.sort(function (a, b) {
|
|
74
110
|
return a.label.localeCompare(b.label);
|
|
@@ -115,7 +151,7 @@ var QuestionnairesSidebar = function QuestionnairesSidebar(_ref) {
|
|
|
115
151
|
className: "questionnaires_menu",
|
|
116
152
|
style: {
|
|
117
153
|
overflowY: "auto",
|
|
118
|
-
maxHeight: "calc(100vh -
|
|
154
|
+
maxHeight: "calc(100vh - 225px)"
|
|
119
155
|
}
|
|
120
156
|
}, /*#__PURE__*/React.createElement(Menu, {
|
|
121
157
|
defaultSelectedKeys: [selectedKey],
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { Switch, Tooltip } from "antd";
|
|
3
|
+
import style from "../Questionnaires.module.scss";
|
|
4
|
+
import { setDeleteModalVisible } from "../../../store/slices/global";
|
|
5
|
+
import { DeleteIconQ, EditIcon } from "../../../assets/icons";
|
|
6
|
+
export var getStreetColumns = function getStreetColumns(onEditClick, onDelete, onStatusChange, dispatch, innerW) {
|
|
7
|
+
return [{
|
|
8
|
+
title: "№",
|
|
9
|
+
dataIndex: "num",
|
|
10
|
+
showCheckbox: false,
|
|
11
|
+
ellipsis: true,
|
|
12
|
+
width: 35
|
|
13
|
+
}, {
|
|
14
|
+
title: "Brend",
|
|
15
|
+
dataIndex: "name",
|
|
16
|
+
width: innerW,
|
|
17
|
+
disabled: true,
|
|
18
|
+
ellipsis: true
|
|
19
|
+
}, {
|
|
20
|
+
title: "Status",
|
|
21
|
+
key: "status",
|
|
22
|
+
disabled: true,
|
|
23
|
+
filter: false,
|
|
24
|
+
render: function render(data) {
|
|
25
|
+
return /*#__PURE__*/React.createElement(Tooltip, {
|
|
26
|
+
placement: "top",
|
|
27
|
+
title: "Statusu d\u0259yi\u015F"
|
|
28
|
+
}, /*#__PURE__*/React.createElement(Switch, {
|
|
29
|
+
size: "medium",
|
|
30
|
+
checked: data === null || data === void 0 ? void 0 : data.isActive,
|
|
31
|
+
onChange: function onChange(checked) {
|
|
32
|
+
return onStatusChange(data, checked, dispatch);
|
|
33
|
+
}
|
|
34
|
+
}));
|
|
35
|
+
}
|
|
36
|
+
}, {
|
|
37
|
+
title: "",
|
|
38
|
+
key: "actions",
|
|
39
|
+
showCheckbox: false,
|
|
40
|
+
width: 80,
|
|
41
|
+
render: function render(data) {
|
|
42
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
43
|
+
className: style.number
|
|
44
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
45
|
+
className: style.actions
|
|
46
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
47
|
+
onClick: function onClick() {
|
|
48
|
+
return onEditClick(data);
|
|
49
|
+
}
|
|
50
|
+
}, /*#__PURE__*/React.createElement(EditIcon, null)), /*#__PURE__*/React.createElement("div", {
|
|
51
|
+
onClick: function onClick() {
|
|
52
|
+
onDelete(data === null || data === void 0 ? void 0 : data.id);
|
|
53
|
+
dispatch(setDeleteModalVisible(true));
|
|
54
|
+
}
|
|
55
|
+
}, /*#__PURE__*/React.createElement(DeleteIconQ, null)))));
|
|
56
|
+
}
|
|
57
|
+
}];
|
|
58
|
+
};
|