@banch0u/core-project-test-repository 2.2.0 → 2.2.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.
@@ -9,10 +9,12 @@ import style from "./index.module.scss";
9
9
  import NotificationSettingsContent from "../NotificationSettingsContent";
10
10
  import FormModal from "../FormModal";
11
11
  var NotificationDropdown = function NotificationDropdown(_ref) {
12
- var _notifications$notifi;
12
+ var _notifications$notifi, _text$lang, _text$lang2, _text$lang3, _text$lang4, _text$lang5, _text$lang6, _text$lang7, _text$lang11;
13
13
  var size = _ref.size,
14
14
  setSize = _ref.setSize,
15
- setPage = _ref.setPage;
15
+ setPage = _ref.setPage,
16
+ lang = _ref.lang,
17
+ text = _ref.text;
16
18
  var dispatch = useDispatch();
17
19
  var modalRef = useRef(); // ⬅️ Modal ref
18
20
  var contentRef = useRef(); // ⬅️ NotificationSettingsContent ref
@@ -24,7 +26,7 @@ var NotificationDropdown = function NotificationDropdown(_ref) {
24
26
  var totalCount = notifications === null || notifications === void 0 ? void 0 : notifications.totalCount;
25
27
  var items = (notifications === null || notifications === void 0 || (_notifications$notifi = notifications.notifications) === null || _notifications$notifi === void 0 ? void 0 : _notifications$notifi.items) || [];
26
28
  var hasMore = items.length < totalCount;
27
- var projects = ["", "Sənəd dövriyyəsi", "Kadrlar sistemi", "Müqavilələr", "Şəxsi kabinet"];
29
+ var projects = ["", 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, text === null || text === void 0 || (_text$lang2 = text[lang]) === null || _text$lang2 === void 0 || (_text$lang2 = _text$lang2.pages) === null || _text$lang2 === void 0 || (_text$lang2 = _text$lang2.platform) === null || _text$lang2 === void 0 || (_text$lang2 = _text$lang2.projects) === null || _text$lang2 === void 0 ? void 0 : _text$lang2.hr, text === null || text === void 0 || (_text$lang3 = text[lang]) === null || _text$lang3 === void 0 || (_text$lang3 = _text$lang3.pages) === null || _text$lang3 === void 0 || (_text$lang3 = _text$lang3.platform) === null || _text$lang3 === void 0 || (_text$lang3 = _text$lang3.projects) === null || _text$lang3 === void 0 ? void 0 : _text$lang3.contracts, text === null || text === void 0 || (_text$lang4 = text[lang]) === null || _text$lang4 === void 0 || (_text$lang4 = _text$lang4.pages) === null || _text$lang4 === void 0 || (_text$lang4 = _text$lang4.platform) === null || _text$lang4 === void 0 || (_text$lang4 = _text$lang4.projects) === null || _text$lang4 === void 0 ? void 0 : _text$lang4.privateAccount];
28
30
  var parseNotification = function parseNotification(value) {
29
31
  try {
30
32
  return JSON.parse(value);
@@ -93,14 +95,14 @@ var NotificationDropdown = function NotificationDropdown(_ref) {
93
95
  className: style.header
94
96
  }, /*#__PURE__*/React.createElement(Typography.Text, {
95
97
  strong: true
96
- }, "Bildiri\u015Fl\u0259r (", totalCount, ")"), /*#__PURE__*/React.createElement("div", {
98
+ }, text === null || text === void 0 || (_text$lang5 = text[lang]) === null || _text$lang5 === void 0 || (_text$lang5 = _text$lang5.pages) === null || _text$lang5 === void 0 || (_text$lang5 = _text$lang5.header) === null || _text$lang5 === void 0 || (_text$lang5 = _text$lang5.notifications) === null || _text$lang5 === void 0 ? void 0 : _text$lang5.title, " (", totalCount, ")"), /*#__PURE__*/React.createElement("div", {
97
99
  className: style.headerActions
98
100
  }, notReadenCount > 0 && /*#__PURE__*/React.createElement(Button, {
99
101
  size: "small",
100
102
  icon: /*#__PURE__*/React.createElement(CheckOutlined, null),
101
103
  onClick: handleReadAll,
102
104
  type: "text"
103
- }, "Ham\u0131s\u0131n\u0131 oxu"), /*#__PURE__*/React.createElement(Button, {
105
+ }, text === null || text === void 0 || (_text$lang6 = text[lang]) === null || _text$lang6 === void 0 || (_text$lang6 = _text$lang6.pages) === null || _text$lang6 === void 0 || (_text$lang6 = _text$lang6.header) === null || _text$lang6 === void 0 || (_text$lang6 = _text$lang6.notifications) === null || _text$lang6 === void 0 ? void 0 : _text$lang6.readAll), /*#__PURE__*/React.createElement(Button, {
104
106
  size: "small",
105
107
  icon: /*#__PURE__*/React.createElement(SettingOutlined, null),
106
108
  type: "text",
@@ -108,14 +110,15 @@ var NotificationDropdown = function NotificationDropdown(_ref) {
108
110
  }))), /*#__PURE__*/React.createElement(List, {
109
111
  dataSource: items,
110
112
  locale: {
111
- emptyText: "Bildiriş yoxdur"
113
+ emptyText: text === null || text === void 0 || (_text$lang7 = text[lang]) === null || _text$lang7 === void 0 || (_text$lang7 = _text$lang7.pages) === null || _text$lang7 === void 0 || (_text$lang7 = _text$lang7.header) === null || _text$lang7 === void 0 || (_text$lang7 = _text$lang7.notifications) === null || _text$lang7 === void 0 ? void 0 : _text$lang7.nonotification
112
114
  },
113
115
  renderItem: function renderItem(item) {
116
+ var _text$lang8, _text$lang9, _text$lang10;
114
117
  var parsed = parseNotification(item.text);
115
118
  return /*#__PURE__*/React.createElement(List.Item, {
116
119
  className: "".concat(style.notificationItem, " ").concat(item.isReaden ? style.read : style.unread),
117
120
  actions: [!item.isReaden && /*#__PURE__*/React.createElement(Tooltip, {
118
- title: "Oxu"
121
+ title: 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.header) === null || _text$lang8 === void 0 || (_text$lang8 = _text$lang8.notifications) === null || _text$lang8 === void 0 ? void 0 : _text$lang8.read
119
122
  }, /*#__PURE__*/React.createElement(Button, {
120
123
  size: "small",
121
124
  type: "link",
@@ -132,7 +135,7 @@ var NotificationDropdown = function NotificationDropdown(_ref) {
132
135
  style: {
133
136
  cursor: "pointer"
134
137
  }
135
- }, projects[parsed.Project] || "Bildiriş"),
138
+ }, projects[parsed.Project] || (text === null || text === void 0 || (_text$lang9 = text[lang]) === null || _text$lang9 === void 0 || (_text$lang9 = _text$lang9.pages) === null || _text$lang9 === void 0 || (_text$lang9 = _text$lang9.header) === null || _text$lang9 === void 0 || (_text$lang9 = _text$lang9.notifications) === null || _text$lang9 === void 0 ? void 0 : _text$lang9.title)),
136
139
  description: /*#__PURE__*/React.createElement("div", {
137
140
  className: style.ellipsisText,
138
141
  onClick: function onClick() {
@@ -141,7 +144,7 @@ var NotificationDropdown = function NotificationDropdown(_ref) {
141
144
  style: {
142
145
  cursor: "pointer"
143
146
  }
144
- }, parsed.Text || "Bildiriş")
147
+ }, parsed.Text || (text === null || text === void 0 || (_text$lang10 = text[lang]) === null || _text$lang10 === void 0 || (_text$lang10 = _text$lang10.pages) === null || _text$lang10 === void 0 || (_text$lang10 = _text$lang10.header) === null || _text$lang10 === void 0 || (_text$lang10 = _text$lang10.notifications) === null || _text$lang10 === void 0 ? void 0 : _text$lang10.title))
145
148
  }));
146
149
  }
147
150
  }), hasMore && /*#__PURE__*/React.createElement("div", {
@@ -150,13 +153,15 @@ var NotificationDropdown = function NotificationDropdown(_ref) {
150
153
  size: "small",
151
154
  type: "text",
152
155
  onClick: handleLoadMore
153
- }, "Daha \xE7ox g\xF6st\u0259r"))), /*#__PURE__*/React.createElement(FormModal, {
156
+ }, text === null || text === void 0 || (_text$lang11 = text[lang]) === null || _text$lang11 === void 0 || (_text$lang11 = _text$lang11.pages) === null || _text$lang11 === void 0 || (_text$lang11 = _text$lang11.header) === null || _text$lang11 === void 0 || (_text$lang11 = _text$lang11.notifications) === null || _text$lang11 === void 0 ? void 0 : _text$lang11.showMore))), /*#__PURE__*/React.createElement(FormModal, {
154
157
  ref: modalRef,
155
158
  width: 695,
156
159
  showButtons: false
157
160
  }, /*#__PURE__*/React.createElement(NotificationSettingsContent, {
158
161
  ref: contentRef,
159
- onClose: onCloseModal
162
+ onClose: onCloseModal,
163
+ lang: lang,
164
+ text: text
160
165
  })));
161
166
  };
162
167
  export default NotificationDropdown;
@@ -12,36 +12,8 @@ import Button from "../Button";
12
12
  var Title = Typography.Title,
13
13
  Text = Typography.Text;
14
14
  var Option = Select.Option;
15
- var labels = {
16
- internalIsActive: "Daxili bildirişlər",
17
- emailIsActive: "Email bildirişləri",
18
- visa: "Viza üçün",
19
- sign: "İmza üçün",
20
- reject: "İmtina üçün",
21
- print: "Çap üçün",
22
- accouncement: "Elanlar",
23
- news: "Xəbərlər",
24
- reservations: "Tədbir/İclas",
25
- surveys: "Sorğular",
26
- timeOffRequest: "İcazələr",
27
- tutorials: "Təlimatlar və video"
28
- };
29
- var projectOptions = {
30
- docFlowSettings: {
31
- label: "Sənəd Dövriyyəsi",
32
- keys: ["visa", "sign", "reject", "print"]
33
- },
34
- contractSettings: {
35
- label: "Müqavilələr",
36
- keys: ["visa", "sign", "reject"]
37
- },
38
- accountSettings: {
39
- label: "Şəxsi kabinet",
40
- keys: ["accouncement", "news", "reservations", "surveys", "timeOffRequest", "tutorials"]
41
- }
42
- };
43
15
  var NotificationSettingsContent = /*#__PURE__*/React.forwardRef(function (props, ref) {
44
- var _allValues$generalSet, _allValues$generalSet2, _allValues$generalSet3, _allValues$generalSet4;
16
+ var _props$text, _props$text2, _props$text3, _props$text4, _props$text5, _allValues$generalSet, _allValues$generalSet2, _allValues$generalSet3, _allValues$generalSet4, _props$text6, _props$text7, _props$text8, _props$text9;
45
17
  var _Form$useForm = Form.useForm(),
46
18
  _Form$useForm2 = _slicedToArray(_Form$useForm, 1),
47
19
  form = _Form$useForm2[0];
@@ -50,7 +22,21 @@ var NotificationSettingsContent = /*#__PURE__*/React.forwardRef(function (props,
50
22
  var initialValues = useSelector(function (state) {
51
23
  return state.notification.notificationSettings;
52
24
  });
53
- // console.log(initialValues);
25
+ var labels = props === null || props === void 0 || (_props$text = props.text) === null || _props$text === void 0 || (_props$text = _props$text[props === null || props === void 0 ? void 0 : props.lang]) === null || _props$text === void 0 || (_props$text = _props$text.pages) === null || _props$text === void 0 || (_props$text = _props$text.header) === null || _props$text === void 0 || (_props$text = _props$text.notifications) === null || _props$text === void 0 || (_props$text = _props$text.notificationsettings) === null || _props$text === void 0 ? void 0 : _props$text.labels;
26
+ var projectOptions = {
27
+ docFlowSettings: {
28
+ label: props === null || props === void 0 || (_props$text2 = props.text) === null || _props$text2 === void 0 || (_props$text2 = _props$text2[props === null || props === void 0 ? void 0 : props.lang]) === null || _props$text2 === void 0 || (_props$text2 = _props$text2.pages) === null || _props$text2 === void 0 || (_props$text2 = _props$text2.platform) === null || _props$text2 === void 0 || (_props$text2 = _props$text2.projects) === null || _props$text2 === void 0 ? void 0 : _props$text2.docflow,
29
+ keys: ["visa", "sign", "reject", "print"]
30
+ },
31
+ contractSettings: {
32
+ label: props === null || props === void 0 || (_props$text3 = props.text) === null || _props$text3 === void 0 || (_props$text3 = _props$text3[props === null || props === void 0 ? void 0 : props.lang]) === null || _props$text3 === void 0 || (_props$text3 = _props$text3.pages) === null || _props$text3 === void 0 || (_props$text3 = _props$text3.platform) === null || _props$text3 === void 0 || (_props$text3 = _props$text3.projects) === null || _props$text3 === void 0 ? void 0 : _props$text3.contracts,
33
+ keys: ["visa", "sign", "reject"]
34
+ },
35
+ accountSettings: {
36
+ label: props === null || props === void 0 || (_props$text4 = props.text) === null || _props$text4 === void 0 || (_props$text4 = _props$text4[props === null || props === void 0 ? void 0 : props.lang]) === null || _props$text4 === void 0 || (_props$text4 = _props$text4.pages) === null || _props$text4 === void 0 || (_props$text4 = _props$text4.platform) === null || _props$text4 === void 0 || (_props$text4 = _props$text4.projects) === null || _props$text4 === void 0 ? void 0 : _props$text4.accounts,
37
+ keys: ["accouncement", "news", "reservations", "surveys", "timeOffRequest", "tutorials"]
38
+ }
39
+ };
54
40
  var getDefaultProjectFromPath = function getDefaultProjectFromPath(path) {
55
41
  if (path.includes("/contract")) return "contractSettings";
56
42
  return "docFlowSettings";
@@ -174,7 +160,7 @@ var NotificationSettingsContent = /*#__PURE__*/React.forwardRef(function (props,
174
160
  }, /*#__PURE__*/React.createElement(Title, {
175
161
  level: 5,
176
162
  className: style.sectionTitle
177
- }, "\xDCmumi Bildiri\u015F Ayarlar\u0131"), /*#__PURE__*/React.createElement(Row, {
163
+ }, props === null || props === void 0 || (_props$text5 = props.text) === null || _props$text5 === void 0 || (_props$text5 = _props$text5[props === null || props === void 0 ? void 0 : props.lang]) === null || _props$text5 === void 0 || (_props$text5 = _props$text5.pages) === null || _props$text5 === void 0 || (_props$text5 = _props$text5.header) === null || _props$text5 === void 0 || (_props$text5 = _props$text5.notifications) === null || _props$text5 === void 0 || (_props$text5 = _props$text5.notificationsettings) === null || _props$text5 === void 0 ? void 0 : _props$text5.title), /*#__PURE__*/React.createElement(Row, {
178
164
  gutter: [40, 0]
179
165
  }, /*#__PURE__*/React.createElement(Col, {
180
166
  span: 12
@@ -218,11 +204,11 @@ var NotificationSettingsContent = /*#__PURE__*/React.forwardRef(function (props,
218
204
  }, label);
219
205
  }))), /*#__PURE__*/React.createElement(Text, {
220
206
  className: style.settingGroupTitle
221
- }, "Daxili"), /*#__PURE__*/React.createElement(Row, {
207
+ }, props === null || props === void 0 || (_props$text6 = props.text) === null || _props$text6 === void 0 || (_props$text6 = _props$text6[props === null || props === void 0 ? void 0 : props.lang]) === null || _props$text6 === void 0 || (_props$text6 = _props$text6.pages) === null || _props$text6 === void 0 || (_props$text6 = _props$text6.header) === null || _props$text6 === void 0 || (_props$text6 = _props$text6.notifications) === null || _props$text6 === void 0 || (_props$text6 = _props$text6.notificationsettings) === null || _props$text6 === void 0 ? void 0 : _props$text6.internal), /*#__PURE__*/React.createElement(Row, {
222
208
  gutter: [24, 24]
223
209
  }, renderSwitches("internalSettings")), /*#__PURE__*/React.createElement(Text, {
224
210
  className: style.settingGroupTitle
225
- }, "Email"), /*#__PURE__*/React.createElement(Row, {
211
+ }, props === null || props === void 0 || (_props$text7 = props.text) === null || _props$text7 === void 0 || (_props$text7 = _props$text7[props === null || props === void 0 ? void 0 : props.lang]) === null || _props$text7 === void 0 || (_props$text7 = _props$text7.pages) === null || _props$text7 === void 0 || (_props$text7 = _props$text7.header) === null || _props$text7 === void 0 || (_props$text7 = _props$text7.notifications) === null || _props$text7 === void 0 || (_props$text7 = _props$text7.notificationsettings) === null || _props$text7 === void 0 ? void 0 : _props$text7.email), /*#__PURE__*/React.createElement(Row, {
226
212
  gutter: [24, 24]
227
213
  }, renderSwitches("emailSettings")), /*#__PURE__*/React.createElement("div", {
228
214
  className: style.next_buttons_
@@ -233,11 +219,11 @@ var NotificationSettingsContent = /*#__PURE__*/React.forwardRef(function (props,
233
219
  e.preventDefault();
234
220
  },
235
221
  color: "white"
236
- }, "L\u0259\u011Fv et"), /*#__PURE__*/React.createElement(Button, {
222
+ }, props === null || props === void 0 || (_props$text8 = props.text) === null || _props$text8 === void 0 || (_props$text8 = _props$text8[props === null || props === void 0 ? void 0 : props.lang]) === null || _props$text8 === void 0 || (_props$text8 = _props$text8.pages) === null || _props$text8 === void 0 || (_props$text8 = _props$text8.common) === null || _props$text8 === void 0 ? void 0 : _props$text8.cancel), /*#__PURE__*/React.createElement(Button, {
237
223
  color: "green",
238
224
  onClick: function onClick() {
239
225
  return onSubmit(allValues);
240
226
  }
241
- }, "Yadda saxla")));
227
+ }, props === null || props === void 0 || (_props$text9 = props.text) === null || _props$text9 === void 0 || (_props$text9 = _props$text9[props === null || props === void 0 ? void 0 : props.lang]) === null || _props$text9 === void 0 || (_props$text9 = _props$text9.pages) === null || _props$text9 === void 0 || (_props$text9 = _props$text9.common) === null || _props$text9 === void 0 ? void 0 : _props$text9.save)));
242
228
  });
243
229
  export default NotificationSettingsContent;
@@ -14,8 +14,9 @@ import Button from "../Button";
14
14
  import Select from "../Select";
15
15
  var Option = AntdSelect.Option;
16
16
  import { useLang } from "../../hooks/useLang";
17
+ import text from "../../translations/index.json";
17
18
  var ProfileOptions = function ProfileOptions() {
18
- var _profileInfo$name;
19
+ var _text$lang, _text$lang2, _text$lang3, _profileInfo$name, _text$lang4, _text$lang5, _text$lang6, _text$lang7, _text$lang8, _text$lang9, _text$lang16, _text$lang18, _text$lang19;
19
20
  var dispatch = useDispatch();
20
21
  var navigate = useNavigate();
21
22
  var lang = useLang();
@@ -170,18 +171,20 @@ var ProfileOptions = function ProfileOptions() {
170
171
  size: size,
171
172
  page: page,
172
173
  setSize: setSize,
173
- setPage: setPage
174
+ setPage: setPage,
175
+ lang: lang,
176
+ text: text
174
177
  }),
175
178
  trigger: ["click"],
176
179
  placement: "bottomRight",
177
180
  overlayClassName: style.notificationDropdown
178
181
  }, /*#__PURE__*/React.createElement(Tooltip, {
179
- title: "Bildirişlər"
182
+ title: 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.header) === null || _text$lang === void 0 || (_text$lang = _text$lang.notifications) === null || _text$lang === void 0 ? void 0 : _text$lang.title
180
183
  }, /*#__PURE__*/React.createElement("button", {
181
184
  "data-no-invert": true,
182
185
  className: style.button
183
186
  }, /*#__PURE__*/React.createElement(NotificationIcon, null)))), /*#__PURE__*/React.createElement(Tooltip, {
184
- title: theme === "dark" ? "Gündüz modu" : "Gecə modu"
187
+ title: theme === "dark" ? text === null || text === void 0 || (_text$lang2 = text[lang]) === null || _text$lang2 === void 0 || (_text$lang2 = _text$lang2.pages) === null || _text$lang2 === void 0 || (_text$lang2 = _text$lang2.header) === null || _text$lang2 === void 0 ? void 0 : _text$lang2.lightMode : text === null || text === void 0 || (_text$lang3 = text[lang]) === null || _text$lang3 === void 0 || (_text$lang3 = _text$lang3.pages) === null || _text$lang3 === void 0 || (_text$lang3 = _text$lang3.header) === null || _text$lang3 === void 0 ? void 0 : _text$lang3.darkMode
185
188
  }, /*#__PURE__*/React.createElement("button", {
186
189
  onClick: toggleTheme,
187
190
  "data-no-invert": true,
@@ -221,25 +224,25 @@ var ProfileOptions = function ProfileOptions() {
221
224
  }, scopesData === "*" && /*#__PURE__*/React.createElement(Link, {
222
225
  className: style.menuItem,
223
226
  to: "".concat(rootUrl, "/settings")
224
- }, /*#__PURE__*/React.createElement(SettingsCogIcon, null), /*#__PURE__*/React.createElement("span", null, "T\u0259nziml\u0259m\u0259l\u0259r")), loginType === 0 ? /*#__PURE__*/React.createElement("div", {
227
+ }, /*#__PURE__*/React.createElement(SettingsCogIcon, null), /*#__PURE__*/React.createElement("span", null, text === null || text === void 0 || (_text$lang4 = text[lang]) === null || _text$lang4 === void 0 || (_text$lang4 = _text$lang4.pages) === null || _text$lang4 === void 0 || (_text$lang4 = _text$lang4.header) === null || _text$lang4 === void 0 ? void 0 : _text$lang4.settings)), loginType === 0 ? /*#__PURE__*/React.createElement("div", {
225
228
  className: style.menuItem,
226
229
  onClick: openPasswordModal
227
- }, /*#__PURE__*/React.createElement(ChangePasswordIcon, null), /*#__PURE__*/React.createElement("span", null, "\u015Eifr\u0259ni d\u0259yi\u015F")) : null, /*#__PURE__*/React.createElement("div", {
230
+ }, /*#__PURE__*/React.createElement(ChangePasswordIcon, null), /*#__PURE__*/React.createElement("span", null, text === null || text === void 0 || (_text$lang5 = text[lang]) === null || _text$lang5 === void 0 || (_text$lang5 = _text$lang5.pages) === null || _text$lang5 === void 0 || (_text$lang5 = _text$lang5.header) === null || _text$lang5 === void 0 || (_text$lang5 = _text$lang5.changePassword) === null || _text$lang5 === void 0 ? void 0 : _text$lang5.title)) : null, /*#__PURE__*/React.createElement("div", {
228
231
  className: style.menuItem,
229
232
  onClick: handleLogout
230
233
  }, /*#__PURE__*/React.createElement(LogOutIcon, null), /*#__PURE__*/React.createElement("span", {
231
234
  className: style.logoutText
232
- }, "\xC7\u0131x\u0131\u015F et")))), /*#__PURE__*/React.createElement(Modal, {
235
+ }, text === null || text === void 0 || (_text$lang6 = text[lang]) === null || _text$lang6 === void 0 || (_text$lang6 = _text$lang6.pages) === null || _text$lang6 === void 0 || (_text$lang6 = _text$lang6.header) === null || _text$lang6 === void 0 ? void 0 : _text$lang6.logOut)))), /*#__PURE__*/React.createElement(Modal, {
233
236
  open: isPasswordModalOpen,
234
237
  onCancel: closePasswordModal,
235
238
  footer: null,
236
239
  centered: true,
237
- title: "\u015Eifr\u0259ni d\u0259yi\u015F"
240
+ title: text === null || text === void 0 || (_text$lang7 = text[lang]) === null || _text$lang7 === void 0 || (_text$lang7 = _text$lang7.pages) === null || _text$lang7 === void 0 || (_text$lang7 = _text$lang7.header) === null || _text$lang7 === void 0 || (_text$lang7 = _text$lang7.changePassword) === null || _text$lang7 === void 0 ? void 0 : _text$lang7.title
238
241
  }, /*#__PURE__*/React.createElement(Form, {
239
242
  form: form,
240
243
  layout: "vertical"
241
244
  }, /*#__PURE__*/React.createElement(Form.Item, {
242
- label: "K\xF6hn\u0259 \u015Fifr\u0259",
245
+ label: 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.header) === null || _text$lang8 === void 0 || (_text$lang8 = _text$lang8.changePassword) === null || _text$lang8 === void 0 ? void 0 : _text$lang8.oldPassword,
243
246
  name: "currentPassword",
244
247
  rules: [{
245
248
  required: true,
@@ -250,7 +253,7 @@ var ProfileOptions = function ProfileOptions() {
250
253
  height: "48px"
251
254
  }
252
255
  })), /*#__PURE__*/React.createElement(Form.Item, {
253
- label: "Yeni \u015Fifr\u0259",
256
+ label: text === null || text === void 0 || (_text$lang9 = text[lang]) === null || _text$lang9 === void 0 || (_text$lang9 = _text$lang9.pages) === null || _text$lang9 === void 0 || (_text$lang9 = _text$lang9.header) === null || _text$lang9 === void 0 || (_text$lang9 = _text$lang9.changePassword) === null || _text$lang9 === void 0 ? void 0 : _text$lang9.newPassword,
254
257
  name: "newPassword",
255
258
  rules: [{
256
259
  required: true,
@@ -262,22 +265,28 @@ var ProfileOptions = function ProfileOptions() {
262
265
  if (!value) return Promise.resolve();
263
266
  var errors = [];
264
267
  if (value.length < 8) {
265
- errors.push("Şifrə ən azı 8 simvoldan ibarət olmalıdır");
268
+ var _text$lang10;
269
+ errors.push(text === null || text === void 0 || (_text$lang10 = text[lang]) === null || _text$lang10 === void 0 || (_text$lang10 = _text$lang10.pages) === null || _text$lang10 === void 0 || (_text$lang10 = _text$lang10.header) === null || _text$lang10 === void 0 || (_text$lang10 = _text$lang10.changePassword) === null || _text$lang10 === void 0 || (_text$lang10 = _text$lang10.hints) === null || _text$lang10 === void 0 ? void 0 : _text$lang10.passwordLength);
266
270
  }
267
271
  if (!/[A-Z]/.test(value)) {
268
- errors.push("Şifrə ən azı bir böyük hərf daxil etməlidir");
272
+ var _text$lang11;
273
+ errors.push(text === null || text === void 0 || (_text$lang11 = text[lang]) === null || _text$lang11 === void 0 || (_text$lang11 = _text$lang11.pages) === null || _text$lang11 === void 0 || (_text$lang11 = _text$lang11.header) === null || _text$lang11 === void 0 || (_text$lang11 = _text$lang11.changePassword) === null || _text$lang11 === void 0 || (_text$lang11 = _text$lang11.hints) === null || _text$lang11 === void 0 ? void 0 : _text$lang11.passwordUppercase);
269
274
  }
270
275
  if (!/[a-z]/.test(value)) {
271
- errors.push("Şifrə ən azı bir kiçik hərf daxil etməlidir");
276
+ var _text$lang12;
277
+ errors.push(text === null || text === void 0 || (_text$lang12 = text[lang]) === null || _text$lang12 === void 0 || (_text$lang12 = _text$lang12.pages) === null || _text$lang12 === void 0 || (_text$lang12 = _text$lang12.header) === null || _text$lang12 === void 0 || (_text$lang12 = _text$lang12.changePassword) === null || _text$lang12 === void 0 || (_text$lang12 = _text$lang12.hints) === null || _text$lang12 === void 0 ? void 0 : _text$lang12.passwordLowercase);
272
278
  }
273
279
  if (!/[0-9]/.test(value)) {
274
- errors.push("Şifrə ən azı bir rəqəm daxil etməlidir");
280
+ var _text$lang13;
281
+ errors.push(text === null || text === void 0 || (_text$lang13 = text[lang]) === null || _text$lang13 === void 0 || (_text$lang13 = _text$lang13.pages) === null || _text$lang13 === void 0 || (_text$lang13 = _text$lang13.header) === null || _text$lang13 === void 0 || (_text$lang13 = _text$lang13.changePassword) === null || _text$lang13 === void 0 || (_text$lang13 = _text$lang13.hints) === null || _text$lang13 === void 0 ? void 0 : _text$lang13.passwordDigit);
275
282
  }
276
283
  if (!/[!@#$%^&*]/.test(value)) {
277
- errors.push("Şifrə ən azı bir xüsusi simvol daxil etməlidir (!@#$%^&*)");
284
+ var _text$lang14;
285
+ errors.push(text === null || text === void 0 || (_text$lang14 = text[lang]) === null || _text$lang14 === void 0 || (_text$lang14 = _text$lang14.pages) === null || _text$lang14 === void 0 || (_text$lang14 = _text$lang14.header) === null || _text$lang14 === void 0 || (_text$lang14 = _text$lang14.changePassword) === null || _text$lang14 === void 0 || (_text$lang14 = _text$lang14.hints) === null || _text$lang14 === void 0 ? void 0 : _text$lang14.passwordSpecialChar);
278
286
  }
279
287
  if (value && getFieldValue("currentPassword") === value) {
280
- errors.push("Yeni şifrə köhnə şifrə ilə eyni ola bilməz!");
288
+ var _text$lang15;
289
+ errors.push(text === null || text === void 0 || (_text$lang15 = text[lang]) === null || _text$lang15 === void 0 || (_text$lang15 = _text$lang15.pages) === null || _text$lang15 === void 0 || (_text$lang15 = _text$lang15.header) === null || _text$lang15 === void 0 || (_text$lang15 = _text$lang15.changePassword) === null || _text$lang15 === void 0 || (_text$lang15 = _text$lang15.hints) === null || _text$lang15 === void 0 ? void 0 : _text$lang15.passwordDifferent);
281
290
  }
282
291
 
283
292
  // 🔥 Return each message as its own Error → AntD shows them line by line
@@ -292,7 +301,7 @@ var ProfileOptions = function ProfileOptions() {
292
301
  height: "48px"
293
302
  }
294
303
  })), /*#__PURE__*/React.createElement(Form.Item, {
295
- label: "Yeni \u015Fifr\u0259nin t\u0259sdiqi",
304
+ label: text === null || text === void 0 || (_text$lang16 = text[lang]) === null || _text$lang16 === void 0 || (_text$lang16 = _text$lang16.pages) === null || _text$lang16 === void 0 || (_text$lang16 = _text$lang16.header) === null || _text$lang16 === void 0 || (_text$lang16 = _text$lang16.changePassword) === null || _text$lang16 === void 0 ? void 0 : _text$lang16.newPasswordConfirmation,
296
305
  name: "confirmPassword",
297
306
  dependencies: ["newPassword"],
298
307
  rules: [{
@@ -302,10 +311,11 @@ var ProfileOptions = function ProfileOptions() {
302
311
  var getFieldValue = _ref2.getFieldValue;
303
312
  return {
304
313
  validator: function validator(_, value) {
314
+ var _text$lang17;
305
315
  if (!value || getFieldValue("newPassword") === value) {
306
316
  return Promise.resolve();
307
317
  }
308
- return Promise.reject("Şifrələr uyğun deyil!");
318
+ return Promise.reject(text === null || text === void 0 || (_text$lang17 = text[lang]) === null || _text$lang17 === void 0 || (_text$lang17 = _text$lang17.pages) === null || _text$lang17 === void 0 || (_text$lang17 = _text$lang17.header) === null || _text$lang17 === void 0 || (_text$lang17 = _text$lang17.changePassword) === null || _text$lang17 === void 0 || (_text$lang17 = _text$lang17.hints) === null || _text$lang17 === void 0 ? void 0 : _text$lang17.passwordMismatch);
309
319
  }
310
320
  };
311
321
  }]
@@ -324,10 +334,10 @@ var ProfileOptions = function ProfileOptions() {
324
334
  className: style.cancelBtn,
325
335
  onClick: closePasswordModal,
326
336
  color: "white"
327
- }, "Geri"), /*#__PURE__*/React.createElement(Button, {
337
+ }, text === null || text === void 0 || (_text$lang18 = text[lang]) === null || _text$lang18 === void 0 || (_text$lang18 = _text$lang18.pages) === null || _text$lang18 === void 0 || (_text$lang18 = _text$lang18.common) === null || _text$lang18 === void 0 ? void 0 : _text$lang18.cancel), /*#__PURE__*/React.createElement(Button, {
328
338
  className: style.confirmBtn,
329
339
  onClick: handlePasswordSubmit,
330
340
  color: "green"
331
- }, "T\u0259sdiql\u0259")))));
341
+ }, text === null || text === void 0 || (_text$lang19 = text[lang]) === null || _text$lang19 === void 0 || (_text$lang19 = _text$lang19.pages) === null || _text$lang19 === void 0 || (_text$lang19 = _text$lang19.common) === null || _text$lang19 === void 0 ? void 0 : _text$lang19.confirm)))));
332
342
  };
333
343
  export default ProfileOptions;
@@ -5,9 +5,23 @@ import { useLocation } from "react-router-dom";
5
5
  import { Collapse } from "antd";
6
6
  import { RightOutlined, SettingOutlined } from "@ant-design/icons";
7
7
  import style from "./index.module.scss";
8
- import { entryData } from "../../../pages/Platform/constant";
8
+ import { useEntryData } from "../../../pages/Platform/constant";
9
9
  import Portal from "../../Portal";
10
10
  var Panel = Collapse.Panel;
11
+
12
+ // ✅ handles both absolute ("http://localhost:3004/contracts/...") and relative ("/contracts/...")
13
+ var getPathnameFromAny = function getPathnameFromAny(value) {
14
+ if (!value) return "";
15
+ try {
16
+ return new URL(value, window.location.origin).pathname || "";
17
+ } catch (_unused) {
18
+ return String(value);
19
+ }
20
+ };
21
+ var getFirstSegment = function getFirstSegment(value) {
22
+ var pathname = getPathnameFromAny(value);
23
+ return (pathname.split("/")[1] || "").trim();
24
+ };
11
25
  var AppSelect = function AppSelect(_ref) {
12
26
  var mainPage = _ref.mainPage;
13
27
  var location = useLocation();
@@ -15,6 +29,7 @@ var AppSelect = function AppSelect(_ref) {
15
29
  return state.auth;
16
30
  }),
17
31
  scopesData = _useSelector.scopesData;
32
+ var entryData = useEntryData();
18
33
  var accordionRef = useRef(null);
19
34
  var dropdownRef = useRef(null);
20
35
  var _useState = useState([]),
@@ -25,26 +40,36 @@ var AppSelect = function AppSelect(_ref) {
25
40
  _useState4 = _slicedToArray(_useState3, 2),
26
41
  dropdownStyle = _useState4[0],
27
42
  setDropdownStyle = _useState4[1];
28
-
29
- // ✅ if mainPage is provided => disable dropdown behavior
30
- var isDisabled = !!mainPage;
31
43
  var filteredOptions = useMemo(function () {
32
- return entryData.filter(function (item) {
44
+ // Filter by scopes first
45
+ var scopeFiltered = (entryData || []).filter(function (item) {
33
46
  return item.scopes === "account" || scopesData === "*" || (scopesData === null || scopesData === void 0 ? void 0 : scopesData.includes(item.scopes));
34
47
  });
35
- }, [scopesData]);
48
+
49
+ // If mainPage is true, remove "account" option
50
+ if (mainPage) {
51
+ return scopeFiltered.filter(function (item) {
52
+ return item.scopes !== "account";
53
+ });
54
+ }
55
+ return scopeFiltered;
56
+ }, [entryData, scopesData, mainPage]);
57
+
58
+ // ✅ IMPORTANT: use real browser path so basename won't hide "/contracts"
36
59
  var baseSegment = useMemo(function () {
37
- return window.location.pathname.split("/")[1];
60
+ // dependency uses location.pathname to re-run on route changes
61
+ return getFirstSegment(window.location.pathname || location.pathname || "");
38
62
  }, [location.pathname]);
39
63
  var active = useMemo(function () {
40
- return filteredOptions.find(function (opt) {
41
- return opt.pathname.includes("/".concat(baseSegment));
42
- }) || null;
64
+ // match by first segment (contracts, hr, docflow, settings...)
65
+ var found = filteredOptions.find(function (opt) {
66
+ return getFirstSegment(opt.pathname) === baseSegment;
67
+ });
68
+ return found || null;
43
69
  }, [filteredOptions, baseSegment]);
44
70
  useEffect(function () {
45
71
  var handleClickOutside = function handleClickOutside(e) {
46
72
  var _dropdownRef$current;
47
- if (isDisabled) return;
48
73
  if (accordionRef.current && !accordionRef.current.contains(e.target) && !((_dropdownRef$current = dropdownRef.current) !== null && _dropdownRef$current !== void 0 && _dropdownRef$current.contains(e.target))) {
49
74
  setActiveKey([]);
50
75
  }
@@ -53,9 +78,8 @@ var AppSelect = function AppSelect(_ref) {
53
78
  return function () {
54
79
  return document.removeEventListener("mousedown", handleClickOutside);
55
80
  };
56
- }, [isDisabled]);
81
+ }, []);
57
82
  useEffect(function () {
58
- if (isDisabled) return;
59
83
  if (activeKey.length > 0 && accordionRef.current) {
60
84
  var rect = accordionRef.current.getBoundingClientRect();
61
85
  setDropdownStyle({
@@ -66,20 +90,18 @@ var AppSelect = function AppSelect(_ref) {
66
90
  zIndex: 9999
67
91
  });
68
92
  }
69
- }, [activeKey, isDisabled]);
70
-
71
- // ✅ make sure dropdown is closed if it becomes disabled
93
+ }, [activeKey]);
72
94
  useEffect(function () {
73
- if (isDisabled) setActiveKey([]);
74
- }, [isDisabled]);
95
+ // Clear active key when mainPage changes if needed
96
+ setActiveKey([]);
97
+ }, [mainPage]);
75
98
  return /*#__PURE__*/React.createElement("div", {
76
99
  ref: accordionRef
77
100
  }, /*#__PURE__*/React.createElement(Collapse, {
78
101
  bordered: false,
79
- activeKey: isDisabled ? [] : activeKey,
102
+ activeKey: activeKey,
80
103
  onChange: function onChange(key) {
81
- if (isDisabled) return;
82
- setActiveKey(key);
104
+ return setActiveKey(key);
83
105
  },
84
106
  expandIconPosition: "end",
85
107
  expandIcon: function expandIcon(_ref2) {
@@ -88,37 +110,31 @@ var AppSelect = function AppSelect(_ref) {
88
110
  "data-no-invert": true
89
111
  }, /*#__PURE__*/React.createElement(RightOutlined, {
90
112
  style: {
91
- transform: "rotate(".concat(!isDisabled && isActive ? 270 : 90, "deg)"),
113
+ transform: "rotate(".concat(isActive ? 270 : 90, "deg)"),
92
114
  transition: "transform 0.2s ease",
93
115
  color: "white",
94
- fontSize: "14px",
95
- opacity: isDisabled ? 0.5 : 1,
96
- cursor: isDisabled ? "not-allowed" : "pointer"
116
+ fontSize: "14px"
97
117
  }
98
118
  }));
99
119
  },
100
120
  className: style.accordion
101
121
  }, /*#__PURE__*/React.createElement(Panel, {
102
122
  header: /*#__PURE__*/React.createElement("div", {
103
- className: style.accordionHeader,
104
- style: {
105
- opacity: isDisabled ? 0.8 : 1,
106
- cursor: isDisabled ? "default" : "pointer"
107
- }
123
+ className: style.accordionHeader
108
124
  }, baseSegment === "settings" ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(SettingOutlined, null)), /*#__PURE__*/React.createElement("span", null, "T\u0259nziml\u0259m\u0259l\u0259r")) : /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", null, active === null || active === void 0 ? void 0 : active.icon), /*#__PURE__*/React.createElement("span", null, active === null || active === void 0 ? void 0 : active.value))),
109
125
  key: "1"
110
- })), !isDisabled && activeKey.length > 0 && /*#__PURE__*/React.createElement(Portal, null, /*#__PURE__*/React.createElement("div", {
126
+ })), activeKey.length > 0 && /*#__PURE__*/React.createElement(Portal, null, /*#__PURE__*/React.createElement("div", {
111
127
  "data-no-invert": true,
112
128
  ref: dropdownRef,
113
129
  className: style.accordionBody,
114
130
  style: dropdownStyle
115
131
  }, filteredOptions.filter(function (opt) {
116
- return opt.pathname !== (active === null || active === void 0 ? void 0 : active.pathname);
132
+ return getFirstSegment(opt.pathname) !== baseSegment;
117
133
  }).map(function (option) {
118
134
  return /*#__PURE__*/React.createElement("a", {
119
135
  key: option.id,
120
136
  href: option.pathname,
121
- className: "".concat(style.accordionOption, " ").concat(baseSegment === option.pathname.split("/")[1] ? style.selected : "")
137
+ className: "".concat(style.accordionOption, " ").concat(getFirstSegment(option.pathname) === baseSegment ? style.selected : "")
122
138
  }, option.icon, /*#__PURE__*/React.createElement("span", null, option.value));
123
139
  }))));
124
140
  };
@@ -5,7 +5,7 @@ import style from "./index.module.scss";
5
5
  import { Layout, Menu, Input } from "antd";
6
6
  import { QUESTIONNAIRES_ACADEMIC_DEGREES, QUESTIONNAIRES_APPLICATION_FORMS, QUESTIONNAIRES_AREAS, QUESTIONNAIRES_BRANDS, QUESTIONNAIRES_CATEGORIES, QUESTIONNAIRES_CHASSIS_TYPES, QUESTIONNAIRES_CHEMICALS, QUESTIONNAIRES_COLORS, QUESTIONNAIRES_COMPANIES, QUESTIONNAIRES_CONTRACTCURRENCIES, QUESTIONNAIRES_CONTRACTTYPES, QUESTIONNAIRES_CONTRAGENTTYPES, QUESTIONNAIRES_COUNTRIES, QUESTIONNAIRES_CRUSH_REASONS, QUESTIONNAIRES_DETAIL_PARTS, QUESTIONNAIRES_DISABILITY_STATUSES, QUESTIONNAIRES_DOCUMENT_RECIEVE_METHODS, QUESTIONNAIRES_DOCUMENT_TYPES, QUESTIONNAIRES_DOCUMENT_WHOM, QUESTIONNAIRES_DRIVING_CATEGORIES, QUESTIONNAIRES_EDUCATION_INSTITUTIONS, QUESTIONNAIRES_EDUCATION_LEVELS, QUESTIONNAIRES_EDUCATION_PAYMENTS, QUESTIONNAIRES_EMPLOYEE_CONFIGURATIONS, QUESTIONNAIRES_ENGINE_TYPES, QUESTIONNAIRES_EXECUTION_RULES, QUESTIONNAIRES_EXTRA_SERVICES, QUESTIONNAIRES_FUEL_TYPES, QUESTIONNAIRES_GEARBOX_TYPES, QUESTIONNAIRES_GENERAL_STRUCTURE_STATUSES, QUESTIONNAIRES_GENERAL_STRUCTURE_TYPES, QUESTIONNAIRES_HALLS, QUESTIONNAIRES_HONORARY_TITLES, QUESTIONNAIRES_INSURANCE_TYPES, QUESTIONNAIRES_ISSUED_AUTHORITIES, QUESTIONNAIRES_MARGIN_NOTE_TEXTS, QUESTIONNAIRES_MEASUREMENT_TYPES, QUESTIONNAIRES_MILITARY_CATEGORIES, QUESTIONNAIRES_MILITARY_GROUPS, QUESTIONNAIRES_MILITARY_RANKS, QUESTIONNAIRES_MILITARY_STAFFS, QUESTIONNAIRES_MODELS, QUESTIONNAIRES_OIL_FIELDS, QUESTIONNAIRES_ORDERS, QUESTIONNAIRES_ORGANIZATIONS, QUESTIONNAIRES_OWNERSHIP_TYPES, QUESTIONNAIRES_PENALTY_TYPES, QUESTIONNAIRES_POSITIONS, QUESTIONNAIRES_REPAIR_TYPES, QUESTIONNAIRES_REPAIRMENT_WORK_TYPES,
7
7
  // QUESTIONNAIRES_REGIONS,
8
- QUESTIONNAIRES_REPRIMAND_TYPES, QUESTIONNAIRES_SPECIAL_DAYS, QUESTIONNAIRES_SPECIALIZATIONS, QUESTIONNAIRES_STRUCTURES, QUESTIONNAIRES_SUBTOPIC, QUESTIONNAIRES_TOPIC, QUESTIONNAIRES_TRANSMITTER_TYPES, QUESTIONNAIRES_VEHICLE_CATEGORIES, QUESTIONNAIRES_VEHICLE_GROUPS, QUESTIONNAIRES_VEHICLE_TYPES, QUESTIONNAIRES_WAR_PARTICIPANTS, QUESTIONNAIRES_WORK_MODES, QUESTIONNAIRES_WORK_SCHEDULES, QUESTIONNAIRES_OWNERS, QUESTIONNAIRES_CONTRACTTOPICS, QUESTIONNAIRES_CONTRACTTYPESSUBTYPES, QUESTIONNAIRES_DEFAULTAGREEMENTPLANS, QUESTIONNAIRES_ROUTELOCATIONS } from "../../utils/path";
8
+ QUESTIONNAIRES_REPRIMAND_TYPES, QUESTIONNAIRES_SPECIAL_DAYS, QUESTIONNAIRES_SPECIALIZATIONS, QUESTIONNAIRES_STRUCTURES, QUESTIONNAIRES_SUBTOPIC, QUESTIONNAIRES_TOPIC, QUESTIONNAIRES_TRANSMITTER_TYPES, QUESTIONNAIRES_VEHICLE_CATEGORIES, QUESTIONNAIRES_VEHICLE_GROUPS, QUESTIONNAIRES_VEHICLE_TYPES, QUESTIONNAIRES_WAR_PARTICIPANTS, QUESTIONNAIRES_WORK_MODES, QUESTIONNAIRES_WORK_SCHEDULES, QUESTIONNAIRES_OWNERS, QUESTIONNAIRES_CONTRACTTOPICS, QUESTIONNAIRES_CONTRACTTYPESSUBTYPES, QUESTIONNAIRES_DEFAULTAGREEMENTPLANS, QUESTIONNAIRES_ROUTELOCATIONS, QUESTIONNAIRES_INTERNALSTRUCTURE } from "../../utils/path";
9
9
  import { SearchIcon } from "../../assets/icons";
10
10
  var Sider = Layout.Sider;
11
11
  var SubMenu = Menu.SubMenu;
@@ -308,8 +308,16 @@ var QuestionnairesSidebar = function QuestionnairesSidebar(_ref) {
308
308
  //delete the "/" at the start of string
309
309
  label: "Göndərilən yerlər",
310
310
  link: QUESTIONNAIRES_ROUTELOCATIONS
311
- }
311
+ },
312
312
  // ---- generated sidebar item by questionnaireGenerator: RouteLocations ----
313
+
314
+ {
315
+ key: "internalstructures",
316
+ //delete the "/" at the start of string
317
+ label: "Daxili Strukturlar",
318
+ link: QUESTIONNAIRES_INTERNALSTRUCTURE
319
+ }
320
+ // ---- generated sidebar item by questionnaireGenerator: InternalStructure ----
313
321
  ];
314
322
  var sortedItems = items.sort(function (a, b) {
315
323
  return a.label.localeCompare(b.label);
@@ -14,16 +14,19 @@ import { useDispatch, useSelector } from "react-redux";
14
14
  // import Ldap from "../../assets/icons/Ldap.png";
15
15
  import { getCompanyInfo } from "../../store/slices/companyInfo";
16
16
  import api from "../../utils/axios"; // 💡 Make sure this points to your axios instance
17
-
17
+ import { useLang } from "../../hooks/useLang";
18
+ import text from "../../translations/index.json";
18
19
  var Label = Form.Item,
19
20
  useForm = Form.useForm;
20
21
  var Password = Input.Password;
21
22
  var Login = function Login() {
23
+ var _text$lang, _text$lang2, _text$lang3, _text$lang4;
22
24
  var _useForm = useForm(),
23
25
  _useForm2 = _slicedToArray(_useForm, 1),
24
26
  form = _useForm2[0];
25
27
  var navigate = useNavigate();
26
28
  var dispatch = useDispatch();
29
+ var lang = useLang();
27
30
  var loading = useSelector(function (state) {
28
31
  return state.global.loading;
29
32
  });
@@ -120,7 +123,7 @@ var Login = function Login() {
120
123
  requiredMark: false
121
124
  }, /*#__PURE__*/React.createElement("h2", {
122
125
  className: style.title
123
- }, "Daxil ol"), /*#__PURE__*/React.createElement("div", {
126
+ }, 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.login) === null || _text$lang === void 0 ? void 0 : _text$lang.title), /*#__PURE__*/React.createElement("div", {
124
127
  className: style.control
125
128
  }, /*#__PURE__*/React.createElement(Label, {
126
129
  name: "username",
@@ -133,7 +136,7 @@ var Login = function Login() {
133
136
  }
134
137
  }, /*#__PURE__*/React.createElement(Input, {
135
138
  type: "text",
136
- placeholder: "\u0130stifad\u0259\xE7i ad\u0131",
139
+ placeholder: text === null || text === void 0 || (_text$lang2 = text[lang]) === null || _text$lang2 === void 0 || (_text$lang2 = _text$lang2.pages) === null || _text$lang2 === void 0 || (_text$lang2 = _text$lang2.login) === null || _text$lang2 === void 0 || (_text$lang2 = _text$lang2.fields) === null || _text$lang2 === void 0 || (_text$lang2 = _text$lang2.username) === null || _text$lang2 === void 0 ? void 0 : _text$lang2.placeholder,
137
140
  className: style.control_input
138
141
  }))), /*#__PURE__*/React.createElement("div", {
139
142
  className: style.control
@@ -150,7 +153,7 @@ var Login = function Login() {
150
153
  style: {
151
154
  padding: 0
152
155
  },
153
- placeholder: "\u015Eifr\u0259",
156
+ placeholder: text === null || text === void 0 || (_text$lang3 = text[lang]) === null || _text$lang3 === void 0 || (_text$lang3 = _text$lang3.pages) === null || _text$lang3 === void 0 || (_text$lang3 = _text$lang3.login) === null || _text$lang3 === void 0 || (_text$lang3 = _text$lang3.fields) === null || _text$lang3 === void 0 || (_text$lang3 = _text$lang3.password) === null || _text$lang3 === void 0 ? void 0 : _text$lang3.placeholder,
154
157
  className: style.control_input
155
158
  }))), /*#__PURE__*/React.createElement("div", {
156
159
  className: style.button
@@ -159,6 +162,6 @@ var Login = function Login() {
159
162
  "data-no-invert": true
160
163
  }, /*#__PURE__*/React.createElement("button", {
161
164
  type: "submit"
162
- }, "Daxil Ol")))));
165
+ }, text === null || text === void 0 || (_text$lang4 = text[lang]) === null || _text$lang4 === void 0 || (_text$lang4 = _text$lang4.pages) === null || _text$lang4 === void 0 || (_text$lang4 = _text$lang4.login) === null || _text$lang4 === void 0 || (_text$lang4 = _text$lang4.buttons) === null || _text$lang4 === void 0 ? void 0 : _text$lang4.login)))));
163
166
  };
164
167
  export default Login;