@banch0u/core-project-test-repository 2.2.0 → 2.2.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.
@@ -1,51 +1,62 @@
1
- import React from "react";
1
+ import React, { useMemo } from "react";
2
2
  import { ContractsIcon, DocumentCirculationIcon, HRIcon, ArchiveIcon, TransportIcon, LabIcon, UserIcon } from "../../assets/icons";
3
- var rootUrl;
4
- if (window.location.hostname === "localhost") {
5
- rootUrl = "http://localhost:" + window.location.port;
6
- } else {
7
- rootUrl = window.location.origin;
8
- }
9
- export var entryData = [{
10
- id: 1,
11
- value: "Sənəd Dövriyyəsi",
12
- pathname: "".concat(rootUrl, "/docflow/document-circulation/unread-docs"),
13
- icon: /*#__PURE__*/React.createElement(DocumentCirculationIcon, null),
14
- scopes: "docflow"
15
- }, {
16
- id: 2,
17
- value: "Kadrlar sistemi",
18
- pathname: "".concat(rootUrl, "/hr/hr"),
19
- icon: /*#__PURE__*/React.createElement(HRIcon, null),
20
- scopes: "hr"
21
- }, {
22
- id: 3,
23
- value: "Müqavilələr",
24
- pathname: "".concat(rootUrl, "/contracts/unread-contract"),
25
- icon: /*#__PURE__*/React.createElement(ContractsIcon, null),
26
- scopes: "contracts"
27
- }, {
28
- id: 4,
29
- value: "Şəxsi Kabinet",
30
- pathname: "".concat(rootUrl, "/accounts/private"),
31
- icon: /*#__PURE__*/React.createElement(UserIcon, null),
32
- scopes: "account"
33
- }, {
34
- id: 5,
35
- value: "Arxiv",
36
- pathname: "".concat(rootUrl, "/archive/search"),
37
- icon: /*#__PURE__*/React.createElement(ArchiveIcon, null),
38
- scopes: "archive"
39
- }, {
40
- id: 6,
41
- value: "Nəqliyyat",
42
- pathname: "".concat(rootUrl, "/transport/personnel"),
43
- icon: /*#__PURE__*/React.createElement(TransportIcon, null),
44
- scopes: "transport"
45
- }, {
46
- id: 7,
47
- value: "Laboratoriya",
48
- pathname: "".concat(rootUrl, "/lab/flasks"),
49
- icon: /*#__PURE__*/React.createElement(LabIcon, null),
50
- scopes: "lab"
51
- }];
3
+ import { useLang } from "../../hooks/useLang";
4
+ import text from "../../translations/index.json";
5
+ var getRootUrl = function getRootUrl() {
6
+ if (window.location.hostname === "localhost") {
7
+ return "http://localhost:".concat(window.location.port);
8
+ }
9
+ return window.location.origin;
10
+ };
11
+ export function useEntryData() {
12
+ var lang = useLang();
13
+ var rootUrl = useMemo(function () {
14
+ return getRootUrl();
15
+ }, []);
16
+ return useMemo(function () {
17
+ var _text$lang, _text$lang$pages$plat, _text$lang2, _text$lang$pages$plat2, _text$lang3, _text$lang$pages$plat3, _text$lang4, _text$lang$pages$plat4, _text$lang5, _text$lang$pages$plat5, _text$lang6, _text$lang$pages$plat6, _text$lang7;
18
+ return [{
19
+ id: 1,
20
+ value: text === null || text === void 0 || (_text$lang = text[lang]) === null || _text$lang === void 0 || (_text$lang = _text$lang.pages) === null || _text$lang === void 0 || (_text$lang = _text$lang.platform) === null || _text$lang === void 0 || (_text$lang = _text$lang.projects) === null || _text$lang === void 0 ? void 0 : _text$lang.docflow,
21
+ pathname: "".concat(rootUrl, "/docflow/document-circulation/unread-docs"),
22
+ icon: /*#__PURE__*/React.createElement(DocumentCirculationIcon, null),
23
+ scopes: "docflow"
24
+ }, {
25
+ id: 2,
26
+ value: (_text$lang$pages$plat = 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) !== null && _text$lang$pages$plat !== void 0 ? _text$lang$pages$plat : "Kadrlar sistemi",
27
+ pathname: "".concat(rootUrl, "/hr/hr"),
28
+ icon: /*#__PURE__*/React.createElement(HRIcon, null),
29
+ scopes: "hr"
30
+ }, {
31
+ id: 3,
32
+ value: (_text$lang$pages$plat2 = 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) !== null && _text$lang$pages$plat2 !== void 0 ? _text$lang$pages$plat2 : "Müqavilələr",
33
+ pathname: "".concat(rootUrl, "/contracts/unread-contract"),
34
+ icon: /*#__PURE__*/React.createElement(ContractsIcon, null),
35
+ scopes: "contracts"
36
+ }, {
37
+ id: 4,
38
+ value: (_text$lang$pages$plat3 = 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.accounts) !== null && _text$lang$pages$plat3 !== void 0 ? _text$lang$pages$plat3 : "Şəxsi Kabinet",
39
+ pathname: "".concat(rootUrl, "/accounts/private"),
40
+ icon: /*#__PURE__*/React.createElement(UserIcon, null),
41
+ scopes: "account"
42
+ }, {
43
+ id: 5,
44
+ value: (_text$lang$pages$plat4 = 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.platform) === null || _text$lang5 === void 0 || (_text$lang5 = _text$lang5.projects) === null || _text$lang5 === void 0 ? void 0 : _text$lang5.archive) !== null && _text$lang$pages$plat4 !== void 0 ? _text$lang$pages$plat4 : "Arxiv",
45
+ pathname: "".concat(rootUrl, "/archive/search"),
46
+ icon: /*#__PURE__*/React.createElement(ArchiveIcon, null),
47
+ scopes: "archive"
48
+ }, {
49
+ id: 6,
50
+ value: (_text$lang$pages$plat5 = 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.platform) === null || _text$lang6 === void 0 || (_text$lang6 = _text$lang6.projects) === null || _text$lang6 === void 0 ? void 0 : _text$lang6.transport) !== null && _text$lang$pages$plat5 !== void 0 ? _text$lang$pages$plat5 : "Nəqliyyat",
51
+ pathname: "".concat(rootUrl, "/transport/personnel"),
52
+ icon: /*#__PURE__*/React.createElement(TransportIcon, null),
53
+ scopes: "transport"
54
+ }, {
55
+ id: 7,
56
+ value: (_text$lang$pages$plat6 = 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.platform) === null || _text$lang7 === void 0 || (_text$lang7 = _text$lang7.projects) === null || _text$lang7 === void 0 ? void 0 : _text$lang7.lab) !== null && _text$lang$pages$plat6 !== void 0 ? _text$lang$pages$plat6 : "Laboratoriya",
57
+ pathname: "".concat(rootUrl, "/lab/flasks"),
58
+ icon: /*#__PURE__*/React.createElement(LabIcon, null),
59
+ scopes: "lab"
60
+ }];
61
+ }, [lang, rootUrl]);
62
+ }
@@ -3,14 +3,21 @@ import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
3
3
  import _regeneratorRuntime from "@babel/runtime/regenerator";
4
4
  import React, { useEffect, useState, useCallback } from "react";
5
5
  import style from "./index.module.scss";
6
- import { entryData } from "./constant";
6
+ import { useEntryData } from "./constant"; // ✅ change this
7
+
7
8
  import { Link } from "react-router-dom";
8
9
  import { getProfileInfo, scopes } from "../../store/slices/auth";
9
10
  import { useSelector, useDispatch } from "react-redux";
10
11
  import { DsgLogo, SettingsCogIcon, ConstructionRibbon } from "../../assets/icons";
11
12
  import { getCompanyInfo } from "../../store/slices/companyInfo";
12
13
  import api from "../../utils/axios";
14
+ import { useLang } from "../../hooks/useLang";
15
+ import text from "../../translations/index.json";
13
16
  var Platform = function Platform() {
17
+ var _text$lang;
18
+ var lang = useLang();
19
+ var entryData = useEntryData(); // ✅ add this (hook call inside component)
20
+
14
21
  var dispatch = useDispatch();
15
22
  var _useSelector = useSelector(function (state) {
16
23
  return state.auth;
@@ -23,12 +30,8 @@ var Platform = function Platform() {
23
30
  _useState2 = _slicedToArray(_useState, 2),
24
31
  imageSrc = _useState2[0],
25
32
  setImageSrc = _useState2[1];
26
- var rootUrl;
27
- if (window.location.hostname === "localhost") {
28
- rootUrl = "http://localhost:" + window.location.port;
29
- } else {
30
- rootUrl = window.location.origin;
31
- }
33
+ var rootUrl = window.location.origin; // ✅ this already includes port on localhost
34
+
32
35
  var getBase64FromURL = useCallback(/*#__PURE__*/function () {
33
36
  var _ref = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee(url) {
34
37
  var res;
@@ -130,6 +133,6 @@ var Platform = function Platform() {
130
133
  to: "".concat(rootUrl, "/settings")
131
134
  }, /*#__PURE__*/React.createElement(SettingsCogIcon, null), /*#__PURE__*/React.createElement("div", {
132
135
  "data-no-invert": true
133
- }, "T\u0259nziml\u0259m\u0259l\u0259r")) : null));
136
+ }, 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.settings)) : null));
134
137
  };
135
138
  export default Platform;
@@ -19,7 +19,13 @@ export var getStreetColumns = function getStreetColumns(onEditClick, onDelete, d
19
19
  title: "Qrup №",
20
20
  dataIndex: "rank",
21
21
  width: innerW,
22
- disabled: true,
22
+ disabled: false,
23
+ ellipsis: true
24
+ }, {
25
+ title: "Daxili Struktur",
26
+ dataIndex: "internalStructure",
27
+ width: innerW,
28
+ disabled: false,
23
29
  ellipsis: true
24
30
  }, {
25
31
  title: "",
@@ -23,8 +23,8 @@ import Button from "../../../components/Button";
23
23
  import Loading from "../../../components/Loading";
24
24
  import Table from "../../../components/Table";
25
25
  import Filter from "../../../components/Filter";
26
- import { addDefaultAgreementPlans, deleteDefaultAgreementPlans, editDefaultAgreementPlans, getDefaultAgreementPlans, getDefaultAgreementPlansAll } from "../../../store/slices/questionnaire";
27
- import { getExecutiveMembersAll } from "../../../store/slices/employees";
26
+ import { addDefaultAgreementPlans, deleteDefaultAgreementPlans, editDefaultAgreementPlans, getDefaultAgreementPlans, getDefaultAgreementPlansAll, getInternalStructureAll } from "../../../store/slices/questionnaire";
27
+ import { getContractUsersAll } from "../../../store/slices/employees";
28
28
  import Select from "../../../components/Select";
29
29
  import Input from "../../../components/Input";
30
30
  var Content = Layout.Content;
@@ -66,11 +66,13 @@ var QuestionnairesDefaultAgreementPlansContent = function QuestionnairesDefaultA
66
66
  var DefaultAgreementPlansAll = useSelector(function (state) {
67
67
  return state.questionnaire.defaultAgreementPlansAll;
68
68
  });
69
- var executiveMemmbersAll = useSelector(function (state) {
70
- return state.employees.executiveMembersAll;
69
+ var internalStructureAll = useSelector(function (state) {
70
+ return state.questionnaire.internalStructureAll;
71
+ });
72
+ console.log(internalStructureAll);
73
+ var contractUsersAll = useSelector(function (state) {
74
+ return state.employees.contractUsersAll;
71
75
  });
72
-
73
- // ⭐ NEW — store current editing record (not inside modal)
74
76
  var _useState11 = useState(null),
75
77
  _useState12 = _slicedToArray(_useState11, 2),
76
78
  editingRecord = _useState12[0],
@@ -97,7 +99,10 @@ var QuestionnairesDefaultAgreementPlansContent = function QuestionnairesDefaultA
97
99
  var data = {
98
100
  id: id,
99
101
  responsiblePersonId: record === null || record === void 0 ? void 0 : record.responsiblePersonId,
100
- rank: record === null || record === void 0 ? void 0 : record.rank
102
+ flowPriority: record === null || record === void 0 ? void 0 : record.flowPriority,
103
+ // ✅ include it for edit
104
+ rank: record === null || record === void 0 ? void 0 : record.rank,
105
+ internalStructureId: record === null || record === void 0 ? void 0 : record.internalStructureId
101
106
  };
102
107
  dispatch(editDefaultAgreementPlans(data));
103
108
  setEditingRecord(null);
@@ -133,13 +138,17 @@ var QuestionnairesDefaultAgreementPlansContent = function QuestionnairesDefaultA
133
138
  if (DefaultAgreementPlans !== null && DefaultAgreementPlans !== void 0 && DefaultAgreementPlans.items) {
134
139
  var _DefaultAgreementPlan;
135
140
  data = DefaultAgreementPlans === null || DefaultAgreementPlans === void 0 || (_DefaultAgreementPlan = DefaultAgreementPlans.items) === null || _DefaultAgreementPlan === void 0 ? void 0 : _DefaultAgreementPlan.map(function (dataObj, i) {
136
- var _dataObj$responsibleP;
141
+ var _dataObj$responsibleP, _dataObj$internalStru, _dataObj$internalStru2;
137
142
  return {
138
143
  num: (DefaultAgreementPlans === null || DefaultAgreementPlans === void 0 ? void 0 : DefaultAgreementPlans.size) * (DefaultAgreementPlans === null || DefaultAgreementPlans === void 0 ? void 0 : DefaultAgreementPlans.page) + i + 1 - (DefaultAgreementPlans === null || DefaultAgreementPlans === void 0 ? void 0 : DefaultAgreementPlans.size),
139
144
  id: dataObj === null || dataObj === void 0 ? void 0 : dataObj.id,
140
145
  responsiblePerson: dataObj === null || dataObj === void 0 ? void 0 : dataObj.responsiblePerson.fullName,
141
146
  responsiblePersonId: dataObj === null || dataObj === void 0 || (_dataObj$responsibleP = dataObj.responsiblePerson) === null || _dataObj$responsibleP === void 0 ? void 0 : _dataObj$responsibleP.id,
147
+ flowPriority: dataObj === null || dataObj === void 0 ? void 0 : dataObj.flowPriority,
148
+ // ✅ so edit modal knows what to show
142
149
  rank: dataObj === null || dataObj === void 0 ? void 0 : dataObj.rank,
150
+ internalStructure: dataObj === null || dataObj === void 0 || (_dataObj$internalStru = dataObj.internalStructure) === null || _dataObj$internalStru === void 0 ? void 0 : _dataObj$internalStru.text,
151
+ internalStructureId: dataObj === null || dataObj === void 0 || (_dataObj$internalStru2 = dataObj.internalStructure) === null || _dataObj$internalStru2 === void 0 ? void 0 : _dataObj$internalStru2.id,
143
152
  className: "rowClassName1"
144
153
  };
145
154
  });
@@ -167,9 +176,10 @@ var QuestionnairesDefaultAgreementPlansContent = function QuestionnairesDefaultA
167
176
  };
168
177
  dispatch(getDefaultAgreementPlans(data));
169
178
  dispatch(getDefaultAgreementPlansAll("onlyactive"));
179
+ dispatch(getInternalStructureAll("onlyactive"));
170
180
  }, [dispatch, page, DefaultAgreementPlansRender, query, size]);
171
181
  useEffect(function () {
172
- dispatch(getExecutiveMembersAll());
182
+ dispatch(getContractUsersAll());
173
183
  }, [dispatch]);
174
184
  var updateSize = function updateSize(newSize) {
175
185
  setSize(newSize);
@@ -183,16 +193,6 @@ var QuestionnairesDefaultAgreementPlansContent = function QuestionnairesDefaultA
183
193
  return (_item$responsiblePers = item.responsiblePerson) === null || _item$responsiblePers === void 0 ? void 0 : _item$responsiblePers.id;
184
194
  });
185
195
  }, [DefaultAgreementPlansAll]);
186
-
187
- // ⭐ UPDATED — correct filtering with edit support
188
- var availableExecutiveMembers = useMemo(function () {
189
- return executiveMemmbersAll === null || executiveMemmbersAll === void 0 ? void 0 : executiveMemmbersAll.filter(function (person) {
190
- if (editingRecord && person.id === editingRecord.responsiblePersonId) {
191
- return true; // allow current person
192
- }
193
- return !(assignedIds !== null && assignedIds !== void 0 && assignedIds.includes(person.id));
194
- });
195
- }, [executiveMemmbersAll, assignedIds, editingRecord]);
196
196
  return /*#__PURE__*/React.createElement(React.Fragment, null, loading ? /*#__PURE__*/React.createElement(Loading, null) : null, /*#__PURE__*/React.createElement(Layout, {
197
197
  className: style.layout
198
198
  }, /*#__PURE__*/React.createElement(Content, {
@@ -254,31 +254,74 @@ var QuestionnairesDefaultAgreementPlansContent = function QuestionnairesDefaultA
254
254
  }],
255
255
  name: "responsiblePersonId",
256
256
  label: "Məsul şəxs"
257
- }, /*#__PURE__*/React.createElement(Select, null, availableExecutiveMembers === null || availableExecutiveMembers === void 0 ? void 0 : availableExecutiveMembers.map(function (item) {
257
+ }, /*#__PURE__*/React.createElement(Select, null, contractUsersAll === null || contractUsersAll === void 0 ? void 0 : contractUsersAll.map(function (item) {
258
258
  return /*#__PURE__*/React.createElement(Option, {
259
259
  key: item.id,
260
260
  value: item.id
261
- }, item.text);
261
+ }, "".concat(item.firstName, " ").concat(item.lastName, " ").concat(item.patronymic));
262
262
  }))), /*#__PURE__*/React.createElement(Item, {
263
- name: "rank",
264
- label: "Qrup \u2116",
263
+ name: "flowPriority",
264
+ label: "D\xF6vriyy\u0259 prioriteti",
265
265
  rules: [{
266
266
  required: true,
267
267
  message: ""
268
- }, {
269
- validator: function validator(_, value) {
270
- if (!value) return Promise.resolve();
271
- var numericValue = Number(value);
272
- if (numericValue !== 1) return Promise.resolve();
273
- var existsRank1 = DefaultAgreementPlansAll === null || DefaultAgreementPlansAll === void 0 ? void 0 : DefaultAgreementPlansAll.some(function (item) {
274
- return item.rank === 1 && (!editingRecord || item.id !== editingRecord.id);
275
- });
276
- return existsRank1 ? Promise.reject("Yalnız bir qrup 1 ola bilər!") : Promise.resolve();
277
- }
278
268
  }]
279
- }, /*#__PURE__*/React.createElement(Input, {
280
- type: "number"
281
- }))), /*#__PURE__*/React.createElement(DeleteModal, {
269
+ }, /*#__PURE__*/React.createElement(Select, {
270
+ size: "md"
271
+ }, /*#__PURE__*/React.createElement(Option, {
272
+ value: 0
273
+ }, "S\u0259n\u0259d yaradan"), /*#__PURE__*/React.createElement(Option, {
274
+ value: 1
275
+ }, "Birinci baxan"), /*#__PURE__*/React.createElement(Option, {
276
+ value: 2
277
+ }, "\u0130kinci baxan"), /*#__PURE__*/React.createElement(Option, {
278
+ value: 3
279
+ }, "Dig\u0259r baxanlar"))), /*#__PURE__*/React.createElement(Item, {
280
+ noStyle: true,
281
+ shouldUpdate: function shouldUpdate(prev, cur) {
282
+ return prev.flowPriority !== cur.flowPriority;
283
+ }
284
+ }, function (_ref2) {
285
+ var getFieldValue = _ref2.getFieldValue;
286
+ var flowPriority = getFieldValue("flowPriority");
287
+ if (flowPriority !== 3) return null;
288
+ return /*#__PURE__*/React.createElement(Item, {
289
+ preserve: false,
290
+ name: "rank",
291
+ label: "Qrup \u2116",
292
+ rules: [{
293
+ required: false,
294
+ message: ""
295
+ }, {
296
+ validator: function validator(_, value) {
297
+ if (!value) return Promise.resolve();
298
+ var numericValue = Number(value);
299
+ if (numericValue !== 1) return Promise.resolve();
300
+ var existsRank1 = DefaultAgreementPlansAll === null || DefaultAgreementPlansAll === void 0 ? void 0 : DefaultAgreementPlansAll.some(function (item) {
301
+ return item.rank === 1 && (!editingRecord || item.id !== editingRecord.id);
302
+ });
303
+ return existsRank1 ? Promise.reject("Yalnız bir qrup 1 ola bilər!") : Promise.resolve();
304
+ }
305
+ }]
306
+ }, /*#__PURE__*/React.createElement(Input, {
307
+ type: "number",
308
+ size: "md"
309
+ }));
310
+ }), /*#__PURE__*/React.createElement(Item, {
311
+ rules: [{
312
+ required: true,
313
+ message: ""
314
+ }],
315
+ name: "internalStructureId",
316
+ label: "Daxili Struktur"
317
+ }, /*#__PURE__*/React.createElement(Select, {
318
+ size: "md"
319
+ }, internalStructureAll === null || internalStructureAll === void 0 ? void 0 : internalStructureAll.map(function (item) {
320
+ return /*#__PURE__*/React.createElement(Option, {
321
+ key: item.id,
322
+ value: item.id
323
+ }, item.name);
324
+ })))), /*#__PURE__*/React.createElement(DeleteModal, {
282
325
  onCancel: function onCancel() {
283
326
  return dispatch(setDeleteModalVisible(false));
284
327
  },
@@ -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: "Daxili Strukturlar",
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
+ };