@banch0u/core-project-test-repository 1.8.0 → 1.8.2
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 +7 -0
- package/dist/components/Filter/index.js +9 -18
- package/dist/components/Input/index.js +43 -0
- package/dist/components/Input/index.module.scss +79 -0
- package/dist/components/NotificationSettingsContent/index.js +1 -0
- package/dist/components/Select/index.js +56 -22
- package/dist/components/Select/index.module.scss +17 -1
- package/dist/index.css +33 -0
- package/dist/index.js +6 -0
- package/dist/layout/Header/index.js +75 -7
- package/dist/pages/Login/index.js +76 -8
- package/dist/pages/NotFound/index.js +23 -0
- package/dist/pages/NotFound/index.module.scss +50 -0
- package/dist/pages/Platform/index.js +78 -11
- package/dist/store/slices/companyInfo/index.js +51 -0
- package/dist/store/slices/companyInfo/service.js +26 -0
- package/dist/store/store.js +2 -1
- package/package.json +5 -2
|
@@ -4,11 +4,12 @@ import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
|
4
4
|
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; }
|
|
5
5
|
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; }
|
|
6
6
|
import React, { useState } from "react";
|
|
7
|
-
import { Dropdown, Menu, Form, Input, Select, DatePicker, TreeSelect } from "antd";
|
|
7
|
+
import { Dropdown, Menu, Form, Input, Select as AntdSelect, DatePicker, TreeSelect } from "antd";
|
|
8
8
|
import style from "./index.module.scss";
|
|
9
|
-
import Button from "../Button";
|
|
10
9
|
import { FilterIcon } from "../../assets/icons";
|
|
11
|
-
|
|
10
|
+
import Select from "../Select";
|
|
11
|
+
import Button from "../Button";
|
|
12
|
+
var Option = AntdSelect.Option;
|
|
12
13
|
var RangePicker = DatePicker.RangePicker;
|
|
13
14
|
var Filter = function Filter(_ref) {
|
|
14
15
|
var columns = _ref.columns,
|
|
@@ -87,22 +88,14 @@ var Filter = function Filter(_ref) {
|
|
|
87
88
|
label: col.title,
|
|
88
89
|
name: col.queryName ? col.queryName : col.dataIndex,
|
|
89
90
|
className: gridSpanClass // Dynamically apply grid class
|
|
90
|
-
}, /*#__PURE__*/React.createElement(Select
|
|
91
|
-
|
|
92
|
-
|
|
91
|
+
}, /*#__PURE__*/React.createElement(Select
|
|
92
|
+
// showSearch={col.isDouble}
|
|
93
|
+
, {
|
|
94
|
+
size: "sm",
|
|
93
95
|
onChange: function onChange(value) {
|
|
94
96
|
if (col.dataIndex === "topic") {
|
|
95
97
|
setSelectedTopic(value);
|
|
96
98
|
}
|
|
97
|
-
},
|
|
98
|
-
filterOption: function filterOption(input, option) {
|
|
99
|
-
if (!option || !option.children) return false; // Ensure option and children exist
|
|
100
|
-
|
|
101
|
-
var optionText = String(option.children); // Convert to string if needed
|
|
102
|
-
var normalizedInput = input.toLowerCase(); // Normalize input to lowercase
|
|
103
|
-
var normalizedOption = optionText.replace(/İ/g, "I").toLowerCase(); // Normalize option text
|
|
104
|
-
|
|
105
|
-
return normalizedOption.includes(normalizedInput);
|
|
106
99
|
}
|
|
107
100
|
}, /*#__PURE__*/React.createElement(Option, {
|
|
108
101
|
value: ""
|
|
@@ -132,9 +125,7 @@ var Filter = function Filter(_ref) {
|
|
|
132
125
|
label: col.title,
|
|
133
126
|
name: col.queryName ? col.queryName : col.dataIndex,
|
|
134
127
|
className: gridSpanClass // Dynamically apply grid class
|
|
135
|
-
}, /*#__PURE__*/React.createElement(TreeSelect
|
|
136
|
-
// style={{ width: "230px", marginTop: "5px" }}
|
|
137
|
-
, {
|
|
128
|
+
}, /*#__PURE__*/React.createElement(TreeSelect, {
|
|
138
129
|
showSearch: true,
|
|
139
130
|
popupMatchSelectWidth: false,
|
|
140
131
|
allowClear: true,
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
+
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
|
+
var _excluded = ["type", "size", "className", "disabledDate", "placeholder"];
|
|
4
|
+
import React from "react";
|
|
5
|
+
import style from "./index.module.scss";
|
|
6
|
+
import { InputNumber, Input as AntdInput, DatePicker } from "antd";
|
|
7
|
+
import dayjs from "dayjs";
|
|
8
|
+
var TextArea = AntdInput.TextArea;
|
|
9
|
+
var Input = function Input(_ref) {
|
|
10
|
+
var type = _ref.type,
|
|
11
|
+
size = _ref.size,
|
|
12
|
+
className = _ref.className,
|
|
13
|
+
disabledDate = _ref.disabledDate,
|
|
14
|
+
_ref$placeholder = _ref.placeholder,
|
|
15
|
+
placeholder = _ref$placeholder === void 0 ? "" : _ref$placeholder,
|
|
16
|
+
rest = _objectWithoutProperties(_ref, _excluded);
|
|
17
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, type === "number" ? /*#__PURE__*/React.createElement(InputNumber, _extends({
|
|
18
|
+
className: className ? className : size === "sm" ? style.input_sm : size === "xs" ? style.input_xs : style.input,
|
|
19
|
+
min: 1,
|
|
20
|
+
placeholder: placeholder
|
|
21
|
+
}, rest)) : type === "textarea" ? /*#__PURE__*/React.createElement(TextArea, _extends({
|
|
22
|
+
className: style.textarea,
|
|
23
|
+
autoSize: {
|
|
24
|
+
minRows: 2,
|
|
25
|
+
maxRows: 4
|
|
26
|
+
},
|
|
27
|
+
maxLength: 500,
|
|
28
|
+
placeholder: placeholder
|
|
29
|
+
}, rest)) : type === "date" ? /*#__PURE__*/React.createElement(DatePicker, _extends({
|
|
30
|
+
className: className ? className : size === "sm" ? style.date_sm : size === "xs" ? style.date_xs : style.date,
|
|
31
|
+
format: "DD.MM.YYYY",
|
|
32
|
+
disabledDate: disabledDate === "until" ? function (current) {
|
|
33
|
+
return current && current > dayjs().endOf("day");
|
|
34
|
+
} : disabledDate === "after" ? function (current) {
|
|
35
|
+
return current && current < dayjs().startOf("day");
|
|
36
|
+
} : false,
|
|
37
|
+
placeholder: placeholder
|
|
38
|
+
}, rest)) : /*#__PURE__*/React.createElement(AntdInput, _extends({
|
|
39
|
+
className: style.input,
|
|
40
|
+
placeholder: placeholder
|
|
41
|
+
}, rest)));
|
|
42
|
+
};
|
|
43
|
+
export default Input;
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
.input {
|
|
2
|
+
padding: 9px 16px !important;
|
|
3
|
+
border-radius: 6px !important;
|
|
4
|
+
font-size: 16px !important;
|
|
5
|
+
font-weight: 500 !important;
|
|
6
|
+
line-height: 24px !important;
|
|
7
|
+
text-align: left !important;
|
|
8
|
+
height: 48px;
|
|
9
|
+
width: 100%;
|
|
10
|
+
}
|
|
11
|
+
.textarea {
|
|
12
|
+
padding: 9px 16px !important;
|
|
13
|
+
border-radius: 6px !important;
|
|
14
|
+
font-size: 16px !important;
|
|
15
|
+
font-weight: 500 !important;
|
|
16
|
+
line-height: 24px !important;
|
|
17
|
+
text-align: left !important;
|
|
18
|
+
}
|
|
19
|
+
.date {
|
|
20
|
+
padding: 8px 16px !important;
|
|
21
|
+
// border: 1px solid #bdbdbd !important;
|
|
22
|
+
border-radius: 6px !important;
|
|
23
|
+
width: 100%;
|
|
24
|
+
height: 48px;
|
|
25
|
+
input {
|
|
26
|
+
font-size: 16px !important;
|
|
27
|
+
font-weight: 500 !important;
|
|
28
|
+
line-height: 24px !important;
|
|
29
|
+
text-align: left !important;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.input_sm {
|
|
34
|
+
padding: 9px 16px !important;
|
|
35
|
+
border-radius: 6px !important;
|
|
36
|
+
font-size: 16px !important;
|
|
37
|
+
font-weight: 500 !important;
|
|
38
|
+
line-height: 24px !important;
|
|
39
|
+
text-align: left !important;
|
|
40
|
+
height: 34;
|
|
41
|
+
width: 100%;
|
|
42
|
+
}
|
|
43
|
+
.date_sm {
|
|
44
|
+
padding: 8px 16px !important;
|
|
45
|
+
// border: 1px solid #bdbdbd !important;
|
|
46
|
+
border-radius: 6px !important;
|
|
47
|
+
width: 100%;
|
|
48
|
+
height: 34;
|
|
49
|
+
input {
|
|
50
|
+
font-size: 16px !important;
|
|
51
|
+
font-weight: 500 !important;
|
|
52
|
+
line-height: 24px !important;
|
|
53
|
+
text-align: left !important;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.input_xs {
|
|
58
|
+
// padding: 9px 16px !important;
|
|
59
|
+
border-radius: 6px !important;
|
|
60
|
+
font-size: 14px !important;
|
|
61
|
+
font-weight: 500 !important;
|
|
62
|
+
line-height: 24px !important;
|
|
63
|
+
text-align: left !important;
|
|
64
|
+
height: 26px;
|
|
65
|
+
width: 100%;
|
|
66
|
+
}
|
|
67
|
+
.date_xs {
|
|
68
|
+
padding: 8px 16px !important;
|
|
69
|
+
// border: 1px solid #bdbdbd !important;
|
|
70
|
+
border-radius: 6px !important;
|
|
71
|
+
width: 100%;
|
|
72
|
+
height: 26px;
|
|
73
|
+
input {
|
|
74
|
+
font-size: 16px !important;
|
|
75
|
+
font-weight: 500 !important;
|
|
76
|
+
line-height: 24px !important;
|
|
77
|
+
text-align: left !important;
|
|
78
|
+
}
|
|
79
|
+
}
|
|
@@ -40,6 +40,7 @@ var NotificationSettingsContent = /*#__PURE__*/React.forwardRef(function (props,
|
|
|
40
40
|
var initialValues = useSelector(function (state) {
|
|
41
41
|
return state.notification.notificationSettings;
|
|
42
42
|
});
|
|
43
|
+
console.log(initialValues);
|
|
43
44
|
var getDefaultProjectFromPath = function getDefaultProjectFromPath(path) {
|
|
44
45
|
if (path.includes("/contract")) return "contractSettings";
|
|
45
46
|
return "docFlowSettings";
|
|
@@ -1,33 +1,48 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import style from "./index.module.scss";
|
|
3
|
+
import { Select as AntdSelect, Divider } from "antd";
|
|
3
4
|
import Button from "../Button";
|
|
4
|
-
import { Divider, Select as AntdSelect } from "antd";
|
|
5
5
|
var Select = function Select(_ref) {
|
|
6
6
|
var children = _ref.children,
|
|
7
7
|
className = _ref.className,
|
|
8
|
+
size = _ref.size,
|
|
8
9
|
_ref$placeholder = _ref.placeholder,
|
|
9
10
|
placeholder = _ref$placeholder === void 0 ? "" : _ref$placeholder,
|
|
10
|
-
_ref$divider = _ref.divider,
|
|
11
|
-
divider = _ref$divider === void 0 ? false : _ref$divider,
|
|
12
|
-
_ref$dividerButtonNam = _ref.dividerButtonName,
|
|
13
|
-
dividerButtonName = _ref$dividerButtonNam === void 0 ? "" : _ref$dividerButtonNam,
|
|
14
|
-
_ref$onOpen = _ref.onOpen,
|
|
15
|
-
onOpen = _ref$onOpen === void 0 ? function () {} : _ref$onOpen,
|
|
16
11
|
_ref$onChange = _ref.onChange,
|
|
17
12
|
onChange = _ref$onChange === void 0 ? function () {} : _ref$onChange,
|
|
13
|
+
_ref$onOpen = _ref.onOpen,
|
|
14
|
+
onOpen = _ref$onOpen === void 0 ? function () {} : _ref$onOpen,
|
|
18
15
|
_ref$disabled = _ref.disabled,
|
|
19
16
|
disabled = _ref$disabled === void 0 ? false : _ref$disabled,
|
|
20
|
-
_ref$mode = _ref.mode,
|
|
21
|
-
mode = _ref$mode === void 0 ? "single" : _ref$mode,
|
|
22
|
-
_ref$optionLabelProp = _ref.optionLabelProp,
|
|
23
|
-
optionLabelProp = _ref$optionLabelProp === void 0 ? "children" : _ref$optionLabelProp,
|
|
24
|
-
_ref$tagRender = _ref.tagRender,
|
|
25
|
-
tagRender = _ref$tagRender === void 0 ? function () {} : _ref$tagRender,
|
|
26
17
|
value = _ref.value,
|
|
27
|
-
defaultValue = _ref.defaultValue
|
|
28
|
-
|
|
29
|
-
|
|
18
|
+
defaultValue = _ref.defaultValue,
|
|
19
|
+
mode = _ref.mode,
|
|
20
|
+
text = _ref.text,
|
|
21
|
+
_ref$allowClear = _ref.allowClear,
|
|
22
|
+
allowClear = _ref$allowClear === void 0 ? true : _ref$allowClear,
|
|
23
|
+
width = _ref.width;
|
|
24
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, mode === "multiple" ? /*#__PURE__*/React.createElement(AntdSelect, {
|
|
25
|
+
className: className ? className : size === "sm" ? style.select_sm : style.select,
|
|
26
|
+
style: {
|
|
27
|
+
width: width ? width + "px" : "100%"
|
|
28
|
+
},
|
|
29
|
+
showSearch: true,
|
|
30
|
+
allowClear: true,
|
|
31
|
+
placeholder: placeholder,
|
|
32
|
+
optionFilterProp: "children",
|
|
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
|
+
},
|
|
30
44
|
showSearch: true,
|
|
45
|
+
allowClear: true,
|
|
31
46
|
placeholder: placeholder,
|
|
32
47
|
optionFilterProp: "children",
|
|
33
48
|
filterOption: function filterOption(input, option) {
|
|
@@ -39,8 +54,12 @@ var Select = function Select(_ref) {
|
|
|
39
54
|
var normalizedOption = normalizeAz(option.children);
|
|
40
55
|
return normalizedOption.includes(normalizedInput);
|
|
41
56
|
},
|
|
57
|
+
onChange: onChange,
|
|
58
|
+
disabled: disabled,
|
|
59
|
+
value: value,
|
|
60
|
+
defaultValue: defaultValue,
|
|
42
61
|
dropdownRender: function dropdownRender(menu) {
|
|
43
|
-
return /*#__PURE__*/React.createElement(
|
|
62
|
+
return /*#__PURE__*/React.createElement("div", null, menu, /*#__PURE__*/React.createElement(Divider, {
|
|
44
63
|
style: {
|
|
45
64
|
margin: "4px 0"
|
|
46
65
|
}
|
|
@@ -48,15 +67,30 @@ var Select = function Select(_ref) {
|
|
|
48
67
|
className: style.select_add_button
|
|
49
68
|
}, /*#__PURE__*/React.createElement(Button, {
|
|
50
69
|
onClick: onOpen
|
|
51
|
-
},
|
|
70
|
+
}, text)));
|
|
71
|
+
}
|
|
72
|
+
}, children) : /*#__PURE__*/React.createElement(AntdSelect, {
|
|
73
|
+
className: className ? className : size === "sm" ? style.select_sm : style.select,
|
|
74
|
+
style: {
|
|
75
|
+
width: width ? width + "px" : "100%"
|
|
76
|
+
},
|
|
77
|
+
showSearch: true,
|
|
78
|
+
allowClear: allowClear,
|
|
79
|
+
placeholder: placeholder,
|
|
80
|
+
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);
|
|
52
89
|
},
|
|
53
90
|
onChange: onChange,
|
|
54
91
|
disabled: disabled,
|
|
55
|
-
mode: mode,
|
|
56
|
-
optionLabelProp: optionLabelProp,
|
|
57
|
-
tagRender: tagRender,
|
|
58
92
|
value: value,
|
|
59
93
|
defaultValue: defaultValue
|
|
60
|
-
}, children);
|
|
94
|
+
}, children));
|
|
61
95
|
};
|
|
62
96
|
export default Select;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
.select > div {
|
|
2
2
|
padding: 5px 16px !important;
|
|
3
|
-
// border-color: #bdbdbd !important;
|
|
4
3
|
border-radius: 6px !important;
|
|
5
4
|
height: 48px;
|
|
6
5
|
}
|
|
@@ -15,6 +14,23 @@
|
|
|
15
14
|
text-align: left !important;
|
|
16
15
|
}
|
|
17
16
|
}
|
|
17
|
+
|
|
18
|
+
.select_sm > div {
|
|
19
|
+
padding: 5px 16px !important;
|
|
20
|
+
border-radius: 6px !important;
|
|
21
|
+
height: 34px;
|
|
22
|
+
}
|
|
23
|
+
.select_sm {
|
|
24
|
+
width: 100%;
|
|
25
|
+
height: auto;
|
|
26
|
+
height: 34px;
|
|
27
|
+
span {
|
|
28
|
+
font-size: 16px !important;
|
|
29
|
+
font-weight: 500 !important;
|
|
30
|
+
line-height: 24px !important;
|
|
31
|
+
text-align: left !important;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
18
34
|
.select_add_button {
|
|
19
35
|
display: inline-flex;
|
|
20
36
|
flex-wrap: nowrap;
|
package/dist/index.css
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
body * {
|
|
2
|
+
font-family: var(--defaultFont) !important;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
/* Apply styles globally to all scrollbars */
|
|
6
|
+
* {
|
|
7
|
+
/* For modern browsers (Firefox) */
|
|
8
|
+
scrollbar-width: thin !important;
|
|
9
|
+
scrollbar-color: #eaeaea transparent !important;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
/* For WebKit-based browsers (Chrome, Edge, Safari) */
|
|
13
|
+
*::-webkit-scrollbar {
|
|
14
|
+
width: 6px !important;
|
|
15
|
+
/* Vertical scrollbar width */
|
|
16
|
+
height: 6px !important;
|
|
17
|
+
/* Horizontal scrollbar height */
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
*::-webkit-scrollbar-thumb {
|
|
21
|
+
background: #eaeaea !important;
|
|
22
|
+
border-radius: 3px !important;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
*::-webkit-scrollbar-thumb:hover {
|
|
26
|
+
background: #cccccc !important;
|
|
27
|
+
/* Darker color on hover */
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
*::-webkit-scrollbar-track {
|
|
31
|
+
background: transparent !important;
|
|
32
|
+
/* Transparent track */
|
|
33
|
+
}
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
+
import "./assets/fonts/fonts.css";
|
|
3
|
+
import "./assets/css/antd.css";
|
|
4
|
+
import "./index.css";
|
|
2
5
|
export { default as Button } from "./components/Button";
|
|
3
6
|
export { default as ColSort } from "./components/ColSort";
|
|
4
7
|
export { default as Filter } from "./components/Filter";
|
|
@@ -9,6 +12,9 @@ export { default as useNotification } from "./hooks/useNotification";
|
|
|
9
12
|
export { default as message } from "./utils/message";
|
|
10
13
|
export { default as Table } from "./components/Table";
|
|
11
14
|
export { default as Select } from "./components/Select";
|
|
15
|
+
export { default as Input } from "./components/Input";
|
|
16
|
+
export { default as api } from "./utils/axios";
|
|
17
|
+
export { default as NotFound } from "./pages/NotFound";
|
|
12
18
|
import LoginPage from "./pages/Login";
|
|
13
19
|
import PlatformPage from "./pages/Platform";
|
|
14
20
|
import HeaderLayout from "./layout/Header";
|
|
@@ -1,34 +1,102 @@
|
|
|
1
|
+
import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
|
|
1
2
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
2
|
-
import
|
|
3
|
+
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
4
|
+
import React, { useEffect, useState, useCallback } from "react";
|
|
3
5
|
import style from "./index.module.scss";
|
|
4
6
|
import { DsgLogo } from "../../assets/icons";
|
|
5
7
|
import ProfileOptions from "../../components/ProfileOptions";
|
|
6
8
|
import { Link } from "react-router-dom";
|
|
7
9
|
import { PLATFORM_PATH } from "../../utils/path";
|
|
8
|
-
import
|
|
10
|
+
import { useDispatch, useSelector } from "react-redux";
|
|
11
|
+
import { getCompanyInfo } from "../../store/slices/companyInfo";
|
|
12
|
+
import api from "../../utils/axios";
|
|
9
13
|
var Header = function Header() {
|
|
10
|
-
var currentUrl = window.location.href;
|
|
11
14
|
var _useState = useState(localStorage.getItem("theme") || "light"),
|
|
12
15
|
_useState2 = _slicedToArray(_useState, 2),
|
|
13
16
|
theme = _useState2[0],
|
|
14
17
|
setTheme = _useState2[1];
|
|
18
|
+
var _useState3 = useState(null),
|
|
19
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
20
|
+
imageSrc = _useState4[0],
|
|
21
|
+
setImageSrc = _useState4[1];
|
|
22
|
+
var dispatch = useDispatch();
|
|
23
|
+
var companyInfo = useSelector(function (state) {
|
|
24
|
+
return state.companyInfo.companyInfo;
|
|
25
|
+
});
|
|
15
26
|
var updateTheme = function updateTheme() {
|
|
16
27
|
var newTheme = localStorage.getItem("theme") || "light";
|
|
17
28
|
setTheme(newTheme);
|
|
18
29
|
};
|
|
30
|
+
var getBase64FromURL = useCallback(/*#__PURE__*/function () {
|
|
31
|
+
var _ref = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee(url) {
|
|
32
|
+
var res;
|
|
33
|
+
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
34
|
+
while (1) switch (_context.prev = _context.next) {
|
|
35
|
+
case 0:
|
|
36
|
+
_context.prev = 0;
|
|
37
|
+
_context.next = 3;
|
|
38
|
+
return api.get(url);
|
|
39
|
+
case 3:
|
|
40
|
+
res = _context.sent;
|
|
41
|
+
return _context.abrupt("return", res === null || res === void 0 ? void 0 : res.data);
|
|
42
|
+
case 7:
|
|
43
|
+
_context.prev = 7;
|
|
44
|
+
_context.t0 = _context["catch"](0);
|
|
45
|
+
console.error("Error loading logo:", _context.t0);
|
|
46
|
+
return _context.abrupt("return", null);
|
|
47
|
+
case 11:
|
|
48
|
+
case "end":
|
|
49
|
+
return _context.stop();
|
|
50
|
+
}
|
|
51
|
+
}, _callee, null, [[0, 7]]);
|
|
52
|
+
}));
|
|
53
|
+
return function (_x) {
|
|
54
|
+
return _ref.apply(this, arguments);
|
|
55
|
+
};
|
|
56
|
+
}(), []);
|
|
19
57
|
useEffect(function () {
|
|
58
|
+
dispatch(getCompanyInfo());
|
|
20
59
|
window.addEventListener("themeChange", updateTheme);
|
|
21
60
|
return function () {
|
|
22
61
|
return window.removeEventListener("themeChange", updateTheme);
|
|
23
62
|
};
|
|
24
|
-
}, []);
|
|
63
|
+
}, [dispatch]);
|
|
64
|
+
useEffect(function () {
|
|
65
|
+
var fetchImage = /*#__PURE__*/function () {
|
|
66
|
+
var _ref2 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee2() {
|
|
67
|
+
var _companyInfo$;
|
|
68
|
+
var base64;
|
|
69
|
+
return _regeneratorRuntime.wrap(function _callee2$(_context2) {
|
|
70
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
71
|
+
case 0:
|
|
72
|
+
if (!(companyInfo !== null && companyInfo !== void 0 && (_companyInfo$ = companyInfo[0]) !== null && _companyInfo$ !== void 0 && _companyInfo$.filePath)) {
|
|
73
|
+
_context2.next = 5;
|
|
74
|
+
break;
|
|
75
|
+
}
|
|
76
|
+
_context2.next = 3;
|
|
77
|
+
return getBase64FromURL(companyInfo[0].filePath);
|
|
78
|
+
case 3:
|
|
79
|
+
base64 = _context2.sent;
|
|
80
|
+
setImageSrc(base64);
|
|
81
|
+
case 5:
|
|
82
|
+
case "end":
|
|
83
|
+
return _context2.stop();
|
|
84
|
+
}
|
|
85
|
+
}, _callee2);
|
|
86
|
+
}));
|
|
87
|
+
return function fetchImage() {
|
|
88
|
+
return _ref2.apply(this, arguments);
|
|
89
|
+
};
|
|
90
|
+
}();
|
|
91
|
+
fetchImage();
|
|
92
|
+
}, [companyInfo, getBase64FromURL]);
|
|
25
93
|
return /*#__PURE__*/React.createElement("header", {
|
|
26
94
|
className: style.header
|
|
27
95
|
}, /*#__PURE__*/React.createElement(Link, {
|
|
28
96
|
to: PLATFORM_PATH
|
|
29
|
-
},
|
|
30
|
-
src:
|
|
31
|
-
alt: "
|
|
97
|
+
}, imageSrc ? /*#__PURE__*/React.createElement("img", {
|
|
98
|
+
src: imageSrc,
|
|
99
|
+
alt: "Company Logo"
|
|
32
100
|
}) : theme === "dark" ? /*#__PURE__*/React.createElement(DsgLogo, {
|
|
33
101
|
dark: true
|
|
34
102
|
}) : /*#__PURE__*/React.createElement(DsgLogo, null)), /*#__PURE__*/React.createElement(ProfileOptions, null));
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
+
import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
|
|
1
2
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
2
|
-
import
|
|
3
|
+
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
4
|
+
import React, { useEffect, useCallback, useState } from "react";
|
|
3
5
|
import style from "./index.module.scss";
|
|
4
6
|
import { Form, Input } from "antd";
|
|
5
|
-
import { useCallback } from "react";
|
|
6
7
|
import { Link, useNavigate } from "react-router-dom";
|
|
7
8
|
import { DsgLogo } from "../../assets/icons";
|
|
8
9
|
import Loading from "../../components/Loading";
|
|
@@ -11,7 +12,9 @@ import { useDispatch, useSelector } from "react-redux";
|
|
|
11
12
|
import AsanImza from "../../assets/icons/AsanImza.png";
|
|
12
13
|
import Sima from "../../assets/icons/Sima.png";
|
|
13
14
|
import Ldap from "../../assets/icons/Ldap.png";
|
|
14
|
-
import
|
|
15
|
+
import { getCompanyInfo } from "../../store/slices/companyInfo";
|
|
16
|
+
import api from "../../utils/axios"; // 💡 Make sure this points to your axios instance
|
|
17
|
+
|
|
15
18
|
var Label = Form.Item,
|
|
16
19
|
useForm = Form.useForm;
|
|
17
20
|
var Password = Input.Password;
|
|
@@ -20,11 +23,17 @@ var Login = function Login() {
|
|
|
20
23
|
_useForm2 = _slicedToArray(_useForm, 1),
|
|
21
24
|
form = _useForm2[0];
|
|
22
25
|
var navigate = useNavigate();
|
|
26
|
+
var dispatch = useDispatch();
|
|
23
27
|
var loading = useSelector(function (state) {
|
|
24
28
|
return state.global.loading;
|
|
25
29
|
});
|
|
26
|
-
var
|
|
27
|
-
|
|
30
|
+
var companyInfo = useSelector(function (state) {
|
|
31
|
+
return state.companyInfo.companyInfo;
|
|
32
|
+
});
|
|
33
|
+
var _useState = useState(null),
|
|
34
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
35
|
+
imageSrc = _useState2[0],
|
|
36
|
+
setImageSrc = _useState2[1];
|
|
28
37
|
var loginValue = useCallback(function (formdata) {
|
|
29
38
|
var data = {
|
|
30
39
|
formdata: formdata,
|
|
@@ -32,14 +41,73 @@ var Login = function Login() {
|
|
|
32
41
|
};
|
|
33
42
|
dispatch(login(data));
|
|
34
43
|
}, [dispatch, navigate]);
|
|
44
|
+
var getBase64FromURL = useCallback(/*#__PURE__*/function () {
|
|
45
|
+
var _ref = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee(url) {
|
|
46
|
+
var res;
|
|
47
|
+
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
48
|
+
while (1) switch (_context.prev = _context.next) {
|
|
49
|
+
case 0:
|
|
50
|
+
_context.prev = 0;
|
|
51
|
+
_context.next = 3;
|
|
52
|
+
return api.get(url);
|
|
53
|
+
case 3:
|
|
54
|
+
res = _context.sent;
|
|
55
|
+
return _context.abrupt("return", res === null || res === void 0 ? void 0 : res.data);
|
|
56
|
+
case 7:
|
|
57
|
+
_context.prev = 7;
|
|
58
|
+
_context.t0 = _context["catch"](0);
|
|
59
|
+
console.error("Error loading logo:", _context.t0);
|
|
60
|
+
return _context.abrupt("return", null);
|
|
61
|
+
case 11:
|
|
62
|
+
case "end":
|
|
63
|
+
return _context.stop();
|
|
64
|
+
}
|
|
65
|
+
}, _callee, null, [[0, 7]]);
|
|
66
|
+
}));
|
|
67
|
+
return function (_x) {
|
|
68
|
+
return _ref.apply(this, arguments);
|
|
69
|
+
};
|
|
70
|
+
}(), []);
|
|
71
|
+
useEffect(function () {
|
|
72
|
+
dispatch(getCompanyInfo());
|
|
73
|
+
}, [dispatch]);
|
|
74
|
+
useEffect(function () {
|
|
75
|
+
var fetchImage = /*#__PURE__*/function () {
|
|
76
|
+
var _ref2 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee2() {
|
|
77
|
+
var _companyInfo$;
|
|
78
|
+
var base64;
|
|
79
|
+
return _regeneratorRuntime.wrap(function _callee2$(_context2) {
|
|
80
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
81
|
+
case 0:
|
|
82
|
+
if (!(companyInfo !== null && companyInfo !== void 0 && (_companyInfo$ = companyInfo[0]) !== null && _companyInfo$ !== void 0 && _companyInfo$.filePath)) {
|
|
83
|
+
_context2.next = 5;
|
|
84
|
+
break;
|
|
85
|
+
}
|
|
86
|
+
_context2.next = 3;
|
|
87
|
+
return getBase64FromURL(companyInfo[0].filePath);
|
|
88
|
+
case 3:
|
|
89
|
+
base64 = _context2.sent;
|
|
90
|
+
setImageSrc(base64);
|
|
91
|
+
case 5:
|
|
92
|
+
case "end":
|
|
93
|
+
return _context2.stop();
|
|
94
|
+
}
|
|
95
|
+
}, _callee2);
|
|
96
|
+
}));
|
|
97
|
+
return function fetchImage() {
|
|
98
|
+
return _ref2.apply(this, arguments);
|
|
99
|
+
};
|
|
100
|
+
}();
|
|
101
|
+
fetchImage();
|
|
102
|
+
}, [companyInfo, getBase64FromURL]);
|
|
35
103
|
if (loading) return /*#__PURE__*/React.createElement(Loading, null);
|
|
36
104
|
return /*#__PURE__*/React.createElement("div", {
|
|
37
105
|
className: style.login
|
|
38
106
|
}, /*#__PURE__*/React.createElement("div", {
|
|
39
107
|
className: style.logo
|
|
40
|
-
},
|
|
41
|
-
src:
|
|
42
|
-
alt: ""
|
|
108
|
+
}, imageSrc ? /*#__PURE__*/React.createElement("img", {
|
|
109
|
+
src: imageSrc,
|
|
110
|
+
alt: "Company Logo"
|
|
43
111
|
}) : localStorage.getItem("theme") === "dark" ? /*#__PURE__*/React.createElement(DsgLogo, {
|
|
44
112
|
dark: true
|
|
45
113
|
}) : /*#__PURE__*/React.createElement(DsgLogo, null)), /*#__PURE__*/React.createElement(Form, {
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import style from "./index.module.scss";
|
|
3
|
+
import { Button } from "antd";
|
|
4
|
+
import { useNavigate } from "react-router-dom";
|
|
5
|
+
var NotFound = function NotFound() {
|
|
6
|
+
var navigate = useNavigate();
|
|
7
|
+
var navigateHome = function navigateHome() {
|
|
8
|
+
navigate("/");
|
|
9
|
+
};
|
|
10
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
11
|
+
className: style.container
|
|
12
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
13
|
+
className: style.allMess
|
|
14
|
+
}, /*#__PURE__*/React.createElement("h1", {
|
|
15
|
+
className: style.errMess
|
|
16
|
+
}, "404 Not Found"), /*#__PURE__*/React.createElement("span", {
|
|
17
|
+
className: style.errMessAz
|
|
18
|
+
}, "S\u0259hif\u0259 tap\u0131lmad\u0131"), /*#__PURE__*/React.createElement(Button, {
|
|
19
|
+
type: "primary",
|
|
20
|
+
onClick: navigateHome
|
|
21
|
+
}, "Ana S\u0259hif\u0259")));
|
|
22
|
+
};
|
|
23
|
+
export default NotFound;
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
.container {
|
|
2
|
+
background: #f5f5f500;
|
|
3
|
+
display: flex;
|
|
4
|
+
flex-direction: column;
|
|
5
|
+
position: absolute;
|
|
6
|
+
left: 50%;
|
|
7
|
+
top: 50%;
|
|
8
|
+
transform: translate(-50%,-50%);
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.notFound {
|
|
12
|
+
background: #fff;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.allMess {
|
|
16
|
+
display: flex;
|
|
17
|
+
align-items: center;
|
|
18
|
+
justify-content: center;
|
|
19
|
+
text-align: center;
|
|
20
|
+
flex-direction: column;
|
|
21
|
+
padding: 50px 0 50px 50px;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.errMess {
|
|
25
|
+
height: 100px;
|
|
26
|
+
width: 500px;
|
|
27
|
+
font-size: 60px;
|
|
28
|
+
text-align: center;
|
|
29
|
+
padding: 20px 0;
|
|
30
|
+
font-weight: 700;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.errMessAz {
|
|
34
|
+
height: 30px;
|
|
35
|
+
width: 400px;
|
|
36
|
+
font-size: 30px;
|
|
37
|
+
text-align: center;
|
|
38
|
+
margin-bottom: 20px;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.submitBtn {
|
|
42
|
+
margin-top: 10px;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.img {
|
|
46
|
+
& img {
|
|
47
|
+
height: 250px;
|
|
48
|
+
// width: 500px;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
@@ -1,36 +1,103 @@
|
|
|
1
|
-
import
|
|
1
|
+
import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
|
|
2
|
+
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
3
|
+
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
4
|
+
import React, { useEffect, useState, useCallback } from "react";
|
|
2
5
|
import style from "./index.module.scss";
|
|
3
6
|
import { entryData } from "./constant";
|
|
4
7
|
import { Link } from "react-router-dom";
|
|
5
8
|
import { getProfileInfo, scopes } from "../../store/slices/auth";
|
|
6
|
-
import { useSelector } from "react-redux";
|
|
7
|
-
import { useDispatch } from "react-redux";
|
|
9
|
+
import { useSelector, useDispatch } from "react-redux";
|
|
8
10
|
import { DsgLogo, SettingsCogIcon, UserIcon } from "../../assets/icons";
|
|
9
11
|
import { SETTINGS_PERMISSIONS } from "../../utils/path";
|
|
10
|
-
import
|
|
12
|
+
import { getCompanyInfo } from "../../store/slices/companyInfo";
|
|
13
|
+
import api from "../../utils/axios";
|
|
11
14
|
var Platform = function Platform() {
|
|
12
15
|
var dispatch = useDispatch();
|
|
16
|
+
var _useSelector = useSelector(function (state) {
|
|
17
|
+
return state.auth;
|
|
18
|
+
}),
|
|
19
|
+
scopesData = _useSelector.scopesData;
|
|
20
|
+
var companyInfo = useSelector(function (state) {
|
|
21
|
+
return state.companyInfo.companyInfo;
|
|
22
|
+
});
|
|
23
|
+
var _useState = useState(null),
|
|
24
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
25
|
+
imageSrc = _useState2[0],
|
|
26
|
+
setImageSrc = _useState2[1];
|
|
13
27
|
var rootUrl;
|
|
14
28
|
if (window.location.hostname === "localhost") {
|
|
15
29
|
rootUrl = "http://localhost:" + window.location.port;
|
|
16
30
|
} else {
|
|
17
31
|
rootUrl = window.location.origin;
|
|
18
32
|
}
|
|
19
|
-
var
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
33
|
+
var getBase64FromURL = useCallback(/*#__PURE__*/function () {
|
|
34
|
+
var _ref = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee(url) {
|
|
35
|
+
var res;
|
|
36
|
+
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
37
|
+
while (1) switch (_context.prev = _context.next) {
|
|
38
|
+
case 0:
|
|
39
|
+
_context.prev = 0;
|
|
40
|
+
_context.next = 3;
|
|
41
|
+
return api.get(url);
|
|
42
|
+
case 3:
|
|
43
|
+
res = _context.sent;
|
|
44
|
+
return _context.abrupt("return", res === null || res === void 0 ? void 0 : res.data);
|
|
45
|
+
case 7:
|
|
46
|
+
_context.prev = 7;
|
|
47
|
+
_context.t0 = _context["catch"](0);
|
|
48
|
+
console.error("Error loading logo:", _context.t0);
|
|
49
|
+
return _context.abrupt("return", null);
|
|
50
|
+
case 11:
|
|
51
|
+
case "end":
|
|
52
|
+
return _context.stop();
|
|
53
|
+
}
|
|
54
|
+
}, _callee, null, [[0, 7]]);
|
|
55
|
+
}));
|
|
56
|
+
return function (_x) {
|
|
57
|
+
return _ref.apply(this, arguments);
|
|
58
|
+
};
|
|
59
|
+
}(), []);
|
|
23
60
|
useEffect(function () {
|
|
24
61
|
dispatch(scopes());
|
|
25
62
|
dispatch(getProfileInfo());
|
|
63
|
+
dispatch(getCompanyInfo());
|
|
26
64
|
}, [dispatch]);
|
|
65
|
+
useEffect(function () {
|
|
66
|
+
var fetchLogo = /*#__PURE__*/function () {
|
|
67
|
+
var _ref2 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee2() {
|
|
68
|
+
var _companyInfo$;
|
|
69
|
+
var base64;
|
|
70
|
+
return _regeneratorRuntime.wrap(function _callee2$(_context2) {
|
|
71
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
72
|
+
case 0:
|
|
73
|
+
if (!(companyInfo !== null && companyInfo !== void 0 && (_companyInfo$ = companyInfo[0]) !== null && _companyInfo$ !== void 0 && _companyInfo$.filePath)) {
|
|
74
|
+
_context2.next = 5;
|
|
75
|
+
break;
|
|
76
|
+
}
|
|
77
|
+
_context2.next = 3;
|
|
78
|
+
return getBase64FromURL(companyInfo[0].filePath);
|
|
79
|
+
case 3:
|
|
80
|
+
base64 = _context2.sent;
|
|
81
|
+
setImageSrc(base64);
|
|
82
|
+
case 5:
|
|
83
|
+
case "end":
|
|
84
|
+
return _context2.stop();
|
|
85
|
+
}
|
|
86
|
+
}, _callee2);
|
|
87
|
+
}));
|
|
88
|
+
return function fetchLogo() {
|
|
89
|
+
return _ref2.apply(this, arguments);
|
|
90
|
+
};
|
|
91
|
+
}();
|
|
92
|
+
fetchLogo();
|
|
93
|
+
}, [companyInfo, getBase64FromURL]);
|
|
27
94
|
return /*#__PURE__*/React.createElement("div", {
|
|
28
95
|
className: style.platform
|
|
29
96
|
}, /*#__PURE__*/React.createElement("div", {
|
|
30
97
|
className: style.logo
|
|
31
|
-
},
|
|
32
|
-
src:
|
|
33
|
-
alt: ""
|
|
98
|
+
}, imageSrc ? /*#__PURE__*/React.createElement("img", {
|
|
99
|
+
src: imageSrc,
|
|
100
|
+
alt: "Company Logo"
|
|
34
101
|
}) : localStorage.getItem("theme") === "dark" ? /*#__PURE__*/React.createElement(DsgLogo, {
|
|
35
102
|
dark: true
|
|
36
103
|
}) : /*#__PURE__*/React.createElement(DsgLogo, null)), /*#__PURE__*/React.createElement("div", {
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
|
|
2
|
+
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
3
|
+
import { createAsyncThunk, createSlice } from "@reduxjs/toolkit";
|
|
4
|
+
import Services from "./service";
|
|
5
|
+
import { setLoading } from "../global";
|
|
6
|
+
import { errorMessage } from "../../../utils/message";
|
|
7
|
+
var initialState = {
|
|
8
|
+
companyInfo: []
|
|
9
|
+
};
|
|
10
|
+
export var getCompanyInfo = createAsyncThunk("/getCompanyInfo", /*#__PURE__*/function () {
|
|
11
|
+
var _ref2 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee(_, _ref) {
|
|
12
|
+
var dispatch, response;
|
|
13
|
+
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
14
|
+
while (1) switch (_context.prev = _context.next) {
|
|
15
|
+
case 0:
|
|
16
|
+
dispatch = _ref.dispatch;
|
|
17
|
+
_context.prev = 1;
|
|
18
|
+
dispatch(setLoading(true));
|
|
19
|
+
_context.next = 5;
|
|
20
|
+
return Services.getCompanyInfo();
|
|
21
|
+
case 5:
|
|
22
|
+
response = _context.sent;
|
|
23
|
+
dispatch(setLoading(false));
|
|
24
|
+
return _context.abrupt("return", response === null || response === void 0 ? void 0 : response.data);
|
|
25
|
+
case 10:
|
|
26
|
+
_context.prev = 10;
|
|
27
|
+
_context.t0 = _context["catch"](1);
|
|
28
|
+
errorMessage(_context.t0.response.data.message);
|
|
29
|
+
dispatch(setLoading(false));
|
|
30
|
+
case 14:
|
|
31
|
+
case "end":
|
|
32
|
+
return _context.stop();
|
|
33
|
+
}
|
|
34
|
+
}, _callee, null, [[1, 10]]);
|
|
35
|
+
}));
|
|
36
|
+
return function (_x, _x2) {
|
|
37
|
+
return _ref2.apply(this, arguments);
|
|
38
|
+
};
|
|
39
|
+
}());
|
|
40
|
+
export var companyInfo = createSlice({
|
|
41
|
+
name: "companyInfo",
|
|
42
|
+
initialState: initialState,
|
|
43
|
+
extraReducers: function extraReducers(builder) {
|
|
44
|
+
builder.addCase(getCompanyInfo.fulfilled, function (state, _ref3) {
|
|
45
|
+
var payload = _ref3.payload;
|
|
46
|
+
state.companyInfo = payload;
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
});
|
|
50
|
+
var setPage = companyInfo.actions.setPage;
|
|
51
|
+
export { setPage };
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
|
|
2
|
+
import _createClass from "@babel/runtime/helpers/createClass";
|
|
3
|
+
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
4
|
+
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
5
|
+
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
6
|
+
import api from "../../../utils/axios";
|
|
7
|
+
var Services = /*#__PURE__*/_createClass(function Services() {
|
|
8
|
+
_classCallCheck(this, Services);
|
|
9
|
+
});
|
|
10
|
+
_defineProperty(Services, "getCompanyInfo", /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
|
|
11
|
+
var response;
|
|
12
|
+
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
13
|
+
while (1) switch (_context.prev = _context.next) {
|
|
14
|
+
case 0:
|
|
15
|
+
_context.next = 2;
|
|
16
|
+
return api.get("/companyinfos");
|
|
17
|
+
case 2:
|
|
18
|
+
response = _context.sent;
|
|
19
|
+
return _context.abrupt("return", response === null || response === void 0 ? void 0 : response.data);
|
|
20
|
+
case 4:
|
|
21
|
+
case "end":
|
|
22
|
+
return _context.stop();
|
|
23
|
+
}
|
|
24
|
+
}, _callee);
|
|
25
|
+
})));
|
|
26
|
+
export default Services;
|
package/dist/store/store.js
CHANGED
|
@@ -3,7 +3,8 @@ import { configureStore } from "@reduxjs/toolkit";
|
|
|
3
3
|
import { global } from "./slices/global";
|
|
4
4
|
import { auth } from "./slices/auth";
|
|
5
5
|
import { notification } from "./slices/notification";
|
|
6
|
+
import { companyInfo } from "./slices/companyInfo";
|
|
6
7
|
export var store = configureStore({
|
|
7
|
-
reducer: _defineProperty(_defineProperty(_defineProperty({}, notification.name, notification.reducer), global.name, global.reducer), auth.name, auth.reducer)
|
|
8
|
+
reducer: _defineProperty(_defineProperty(_defineProperty(_defineProperty({}, notification.name, notification.reducer), global.name, global.reducer), auth.name, auth.reducer), companyInfo.name, companyInfo.reducer)
|
|
8
9
|
});
|
|
9
10
|
export default store;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@banch0u/core-project-test-repository",
|
|
3
|
-
"version": "1.8.
|
|
3
|
+
"version": "1.8.2",
|
|
4
4
|
"description": "Shared core features for all projects",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"files": [
|
|
@@ -30,9 +30,12 @@
|
|
|
30
30
|
"@reduxjs/toolkit": "^2.6.1",
|
|
31
31
|
"antd": "^5.16.0",
|
|
32
32
|
"axios": "^1.8.4",
|
|
33
|
+
"dayjs": "^1.11.13",
|
|
33
34
|
"js-cookie": "^3.0.5",
|
|
35
|
+
"next": "^15.3.0",
|
|
34
36
|
"react-beautiful-dnd": "^13.1.1",
|
|
35
|
-
"react-redux": "^9.2.0"
|
|
37
|
+
"react-redux": "^9.2.0",
|
|
38
|
+
"sass": "^1.86.3"
|
|
36
39
|
},
|
|
37
40
|
"peerDependencies": {
|
|
38
41
|
"react": "^18.0.0 || ^19.0.0",
|