@banch0u/core-project-test-repository 2.3.19 → 2.3.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/Delete/Delete.js +8 -3
- package/dist/components/Filter/index.js +7 -2
- package/dist/components/Success/Success.js +7 -2
- package/dist/hooks/useLang.js +31 -17
- package/dist/layout/QuestionnairesSidebar/index.js +94 -92
- package/dist/pages/Questionnnaires/QuestionnairesAcademicdegreesContent/constant.js +6 -4
- package/dist/pages/Questionnnaires/QuestionnairesAcademicdegreesContent/index.js +17 -12
- package/dist/pages/Questionnnaires/QuestionnairesApplicationFormContent/constant.js +6 -4
- package/dist/pages/Questionnnaires/QuestionnairesApplicationFormContent/index.js +17 -12
- package/dist/pages/Questionnnaires/QuestionnairesAreasContent/constant.js +7 -5
- package/dist/pages/Questionnnaires/QuestionnairesAreasContent/index.js +17 -12
- package/dist/pages/Questionnnaires/QuestionnairesAttestationsContent/constant.js +8 -6
- package/dist/pages/Questionnnaires/QuestionnairesAttestationsContent/index.js +19 -14
- package/dist/pages/Questionnnaires/QuestionnairesBarrelContent/constant.js +8 -6
- package/dist/pages/Questionnnaires/QuestionnairesBarrelContent/index.js +20 -15
- package/dist/pages/Questionnnaires/QuestionnairesBrandsContent/constant.js +6 -4
- package/dist/pages/Questionnnaires/QuestionnairesBrandsContent/index.js +17 -12
- package/dist/pages/Questionnnaires/QuestionnairesBudgetComponentsContent/constant.js +7 -5
- package/dist/pages/Questionnnaires/QuestionnairesBudgetComponentsContent/index.js +19 -14
- package/dist/pages/Questionnnaires/QuestionnairesCategoriesContent/constant.js +8 -6
- package/dist/pages/Questionnnaires/QuestionnairesCategoriesContent/index.js +18 -13
- package/dist/pages/Questionnnaires/QuestionnairesChassisTypesContent/constant.js +6 -4
- package/dist/pages/Questionnnaires/QuestionnairesChassisTypesContent/index.js +17 -12
- package/dist/pages/Questionnnaires/QuestionnairesChemicalsContent/constant.js +9 -7
- package/dist/pages/Questionnnaires/QuestionnairesChemicalsContent/index.js +21 -16
- package/dist/pages/Questionnnaires/QuestionnairesColorsContent/constant.js +6 -4
- package/dist/pages/Questionnnaires/QuestionnairesColorsContent/index.js +17 -12
- package/dist/pages/Questionnnaires/QuestionnairesCompaniesContent/constant.js +7 -5
- package/dist/pages/Questionnnaires/QuestionnairesCompaniesContent/index.js +18 -13
- package/dist/pages/Questionnnaires/QuestionnairesContractTopicsContent/constant.js +6 -4
- package/dist/pages/Questionnnaires/QuestionnairesContractTopicsContent/index.js +17 -12
- package/dist/pages/Questionnnaires/QuestionnairesContractTypesSubtypesContent/constant.js +6 -4
- package/dist/pages/Questionnnaires/QuestionnairesContractTypesSubtypesContent/index.js +17 -12
- package/dist/pages/Questionnnaires/QuestionnairesContractcurrenciesContent/constant.js +6 -4
- package/dist/pages/Questionnnaires/QuestionnairesContractcurrenciesContent/index.js +16 -11
- package/dist/pages/Questionnnaires/QuestionnairesContracttypesContent/constant.js +7 -5
- package/dist/pages/Questionnnaires/QuestionnairesContracttypesContent/index.js +16 -11
- package/dist/pages/Questionnnaires/QuestionnairesContragenttypesContent/constant.js +7 -5
- package/dist/pages/Questionnnaires/QuestionnairesContragenttypesContent/index.js +17 -12
- package/dist/pages/Questionnnaires/QuestionnairesCountriesContent/constant.js +6 -4
- package/dist/pages/Questionnnaires/QuestionnairesCountriesContent/index.js +17 -12
- package/dist/pages/Questionnnaires/QuestionnairesCrushReasonsContent/constant.js +6 -4
- package/dist/pages/Questionnnaires/QuestionnairesCrushReasonsContent/index.js +16 -11
- package/dist/pages/Questionnnaires/QuestionnairesCustomersContent/constant.js +8 -6
- package/dist/pages/Questionnnaires/QuestionnairesCustomersContent/index.js +20 -15
- package/dist/pages/Questionnnaires/QuestionnairesDefaultAgreementPlansContent/constant.js +4 -3
- package/dist/pages/Questionnnaires/QuestionnairesDefaultAgreementPlansContent/index.js +50 -43
- package/dist/pages/Questionnnaires/QuestionnairesDeliveryMethodContent/constant.js +6 -4
- package/dist/pages/Questionnnaires/QuestionnairesDeliveryMethodContent/index.js +17 -12
- package/dist/pages/Questionnnaires/QuestionnairesDepartmentsContent/constant.js +7 -5
- package/dist/pages/Questionnnaires/QuestionnairesDepartmentsContent/index.js +19 -14
- package/dist/pages/Questionnnaires/QuestionnairesDetailPartsContent/constant.js +6 -4
- package/dist/pages/Questionnnaires/QuestionnairesDetailPartsContent/index.js +17 -12
- package/dist/pages/Questionnnaires/QuestionnairesDisabilitystatusesContent/constant.js +6 -4
- package/dist/pages/Questionnnaires/QuestionnairesDisabilitystatusesContent/index.js +17 -12
- package/dist/pages/Questionnnaires/QuestionnairesDocumentRecieveMethodsContent/constant.js +6 -4
- package/dist/pages/Questionnnaires/QuestionnairesDocumentRecieveMethodsContent/index.js +17 -12
- package/dist/pages/Questionnnaires/QuestionnairesDocumentTypeContent/constant.js +6 -4
- package/dist/pages/Questionnnaires/QuestionnairesDocumentTypeContent/index.js +19 -14
- package/dist/pages/Questionnnaires/QuestionnairesDocumentWhomContent/constant.js +10 -8
- package/dist/pages/Questionnnaires/QuestionnairesDocumentWhomContent/index.js +26 -21
- package/dist/pages/Questionnnaires/QuestionnairesDrivingcategoriesContent/constant.js +6 -4
- package/dist/pages/Questionnnaires/QuestionnairesDrivingcategoriesContent/index.js +16 -11
- package/dist/pages/Questionnnaires/QuestionnairesEducationinstitutionsContent/constant.js +6 -4
- package/dist/pages/Questionnnaires/QuestionnairesEducationinstitutionsContent/index.js +17 -12
- package/dist/pages/Questionnnaires/QuestionnairesEducationlevelsContent/constant.js +6 -4
- package/dist/pages/Questionnnaires/QuestionnairesEducationlevelsContent/index.js +17 -12
- package/dist/pages/Questionnnaires/QuestionnairesEducationpaymentsContent/constant.js +6 -4
- package/dist/pages/Questionnnaires/QuestionnairesEducationpaymentsContent/index.js +17 -12
- package/dist/pages/Questionnnaires/QuestionnairesEmployeeConfigurations/constant.js +10 -9
- package/dist/pages/Questionnnaires/QuestionnairesEmployeeConfigurations/index.js +23 -18
- package/dist/pages/Questionnnaires/QuestionnairesEngineTypesContent/constant.js +6 -4
- package/dist/pages/Questionnnaires/QuestionnairesEngineTypesContent/index.js +17 -12
- package/dist/pages/Questionnnaires/QuestionnairesExecutionRulesContent/constant.js +6 -4
- package/dist/pages/Questionnnaires/QuestionnairesExecutionRulesContent/index.js +17 -12
- package/dist/pages/Questionnnaires/QuestionnairesExtraServicesContent/constant.js +6 -4
- package/dist/pages/Questionnnaires/QuestionnairesExtraServicesContent/index.js +16 -11
- package/dist/pages/Questionnnaires/QuestionnairesFieldContent/constant.js +7 -5
- package/dist/pages/Questionnnaires/QuestionnairesFieldContent/index.js +19 -14
- package/dist/pages/Questionnnaires/QuestionnairesFuelTypesContent/constant.js +6 -4
- package/dist/pages/Questionnnaires/QuestionnairesFuelTypesContent/index.js +16 -11
- package/dist/pages/Questionnnaires/QuestionnairesGearboxTypesContent/constant.js +6 -4
- package/dist/pages/Questionnnaires/QuestionnairesGearboxTypesContent/index.js +17 -12
- package/dist/pages/Questionnnaires/QuestionnairesGeneralstructurestatusesContent/constant.js +6 -4
- package/dist/pages/Questionnnaires/QuestionnairesGeneralstructurestatusesContent/index.js +17 -12
- package/dist/pages/Questionnnaires/QuestionnairesGeneralstructuretypesContent/constant.js +6 -4
- package/dist/pages/Questionnnaires/QuestionnairesGeneralstructuretypesContent/index.js +17 -12
- package/dist/pages/Questionnnaires/QuestionnairesHallsContent/constant.js +8 -6
- package/dist/pages/Questionnnaires/QuestionnairesHallsContent/index.js +20 -15
- package/dist/pages/Questionnnaires/QuestionnairesHonorarytitlesContent/constant.js +6 -4
- package/dist/pages/Questionnnaires/QuestionnairesHonorarytitlesContent/index.js +17 -12
- package/dist/pages/Questionnnaires/QuestionnairesInsurancetypesContent/constant.js +6 -4
- package/dist/pages/Questionnnaires/QuestionnairesInsurancetypesContent/index.js +16 -11
- package/dist/pages/Questionnnaires/QuestionnairesInternalStructureContent/constant.js +6 -4
- package/dist/pages/Questionnnaires/QuestionnairesInternalStructureContent/index.js +17 -12
- package/dist/pages/Questionnnaires/QuestionnairesInventoryBrandsContent/constant.js +6 -4
- package/dist/pages/Questionnnaires/QuestionnairesInventoryBrandsContent/index.js +17 -12
- package/dist/pages/Questionnnaires/QuestionnairesInventoryCategoriesContent/constant.js +6 -4
- package/dist/pages/Questionnnaires/QuestionnairesInventoryCategoriesContent/index.js +18 -13
- package/dist/pages/Questionnnaires/QuestionnairesInventoryModelsContent/constant.js +6 -4
- package/dist/pages/Questionnnaires/QuestionnairesInventoryModelsContent/index.js +17 -12
- package/dist/pages/Questionnnaires/QuestionnairesInventoryTechnicalDetailsContent/constant.js +6 -5
- package/dist/pages/Questionnnaires/QuestionnairesInventoryTechnicalDetailsContent/index.js +17 -12
- package/dist/pages/Questionnnaires/QuestionnairesIssuedAuthoritiesContent/constant.js +6 -4
- package/dist/pages/Questionnnaires/QuestionnairesIssuedAuthoritiesContent/index.js +17 -12
- package/dist/pages/Questionnnaires/QuestionnairesMarginNoteTextsContent/constant.js +6 -4
- package/dist/pages/Questionnnaires/QuestionnairesMarginNoteTextsContent/index.js +17 -12
- package/dist/pages/Questionnnaires/QuestionnairesMeasurementTypesContent/constant.js +6 -4
- package/dist/pages/Questionnnaires/QuestionnairesMeasurementTypesContent/index.js +17 -12
- package/dist/pages/Questionnnaires/QuestionnairesMilitarycategoriesContent/constant.js +6 -4
- package/dist/pages/Questionnnaires/QuestionnairesMilitarycategoriesContent/index.js +17 -12
- package/dist/pages/Questionnnaires/QuestionnairesMilitarygroupsContent/constant.js +6 -4
- package/dist/pages/Questionnnaires/QuestionnairesMilitarygroupsContent/index.js +17 -12
- package/dist/pages/Questionnnaires/QuestionnairesMilitaryranksContent/constant.js +6 -4
- package/dist/pages/Questionnnaires/QuestionnairesMilitaryranksContent/index.js +17 -12
- package/dist/pages/Questionnnaires/QuestionnairesMilitarystaffsContent/constant.js +6 -4
- package/dist/pages/Questionnnaires/QuestionnairesMilitarystaffsContent/index.js +17 -12
- package/dist/pages/Questionnnaires/QuestionnairesModelsContent/constant.js +8 -6
- package/dist/pages/Questionnnaires/QuestionnairesModelsContent/index.js +19 -14
- package/dist/pages/Questionnnaires/QuestionnairesOilFieldsContent/constant.js +6 -4
- package/dist/pages/Questionnnaires/QuestionnairesOilFieldsContent/index.js +16 -11
- package/dist/pages/Questionnnaires/QuestionnairesOrdersContent/constant.js +6 -4
- package/dist/pages/Questionnnaires/QuestionnairesOrdersContent/index.js +16 -11
- package/dist/pages/Questionnnaires/QuestionnairesOrganizationsContent/constant.js +11 -9
- package/dist/pages/Questionnnaires/QuestionnairesOrganizationsContent/index.js +26 -21
- package/dist/pages/Questionnnaires/QuestionnairesOwnersContent/constant.js +6 -4
- package/dist/pages/Questionnnaires/QuestionnairesOwnersContent/index.js +17 -12
- package/dist/pages/Questionnnaires/QuestionnairesOwnershipTypesContent/constant.js +6 -4
- package/dist/pages/Questionnnaires/QuestionnairesOwnershipTypesContent/index.js +17 -12
- package/dist/pages/Questionnnaires/QuestionnairesPenaltyTypesContent/constant.js +6 -4
- package/dist/pages/Questionnnaires/QuestionnairesPenaltyTypesContent/index.js +16 -11
- package/dist/pages/Questionnnaires/QuestionnairesPentionsContent/constant.js +6 -4
- package/dist/pages/Questionnnaires/QuestionnairesPentionsContent/index.js +17 -12
- package/dist/pages/Questionnnaires/QuestionnairesPositionsContent/constant.js +9 -7
- package/dist/pages/Questionnnaires/QuestionnairesPositionsContent/index.js +18 -13
- package/dist/pages/Questionnnaires/QuestionnairesProjectsContent/constant.js +6 -4
- package/dist/pages/Questionnnaires/QuestionnairesProjectsContent/index.js +17 -12
- package/dist/pages/Questionnnaires/QuestionnairesRegionsContent/constant.js +8 -6
- package/dist/pages/Questionnnaires/QuestionnairesRegionsContent/index.js +21 -16
- package/dist/pages/Questionnnaires/QuestionnairesRepairTypesContent/constant.js +6 -4
- package/dist/pages/Questionnnaires/QuestionnairesRepairTypesContent/index.js +17 -12
- package/dist/pages/Questionnnaires/QuestionnairesRepairmentWorkTypesContent/constant.js +6 -4
- package/dist/pages/Questionnnaires/QuestionnairesRepairmentWorkTypesContent/index.js +17 -12
- package/dist/pages/Questionnnaires/QuestionnairesReprimandtypesContent/constant.js +6 -4
- package/dist/pages/Questionnnaires/QuestionnairesReprimandtypesContent/index.js +17 -12
- package/dist/pages/Questionnnaires/QuestionnairesRouteLocationsContent/constant.js +6 -4
- package/dist/pages/Questionnnaires/QuestionnairesRouteLocationsContent/index.js +17 -12
- package/dist/pages/Questionnnaires/QuestionnairesSpecialdaysContent/constant.js +6 -4
- package/dist/pages/Questionnnaires/QuestionnairesSpecialdaysContent/index.js +17 -12
- package/dist/pages/Questionnnaires/QuestionnairesSpecializationsContent/constant.js +6 -4
- package/dist/pages/Questionnnaires/QuestionnairesSpecializationsContent/index.js +17 -12
- package/dist/pages/Questionnnaires/QuestionnairesStructuresContent/constant.js +6 -4
- package/dist/pages/Questionnnaires/QuestionnairesStructuresContent/index.js +17 -12
- package/dist/pages/Questionnnaires/QuestionnairesSubtopicContent/constant.js +6 -4
- package/dist/pages/Questionnnaires/QuestionnairesSubtopicContent/index.js +19 -14
- package/dist/pages/Questionnnaires/QuestionnairesTopicContent/constant.js +6 -4
- package/dist/pages/Questionnnaires/QuestionnairesTopicContent/index.js +19 -14
- package/dist/pages/Questionnnaires/QuestionnairesTransmitterTypesContent/constant.js +6 -4
- package/dist/pages/Questionnnaires/QuestionnairesTransmitterTypesContent/index.js +17 -12
- package/dist/pages/Questionnnaires/QuestionnairesVehicleCategoriesContent/constant.js +6 -4
- package/dist/pages/Questionnnaires/QuestionnairesVehicleCategoriesContent/index.js +16 -11
- package/dist/pages/Questionnnaires/QuestionnairesVehicleGroupsContent/constant.js +6 -4
- package/dist/pages/Questionnnaires/QuestionnairesVehicleGroupsContent/index.js +17 -12
- package/dist/pages/Questionnnaires/QuestionnairesVehicleTypesContent/constant.js +9 -6
- package/dist/pages/Questionnnaires/QuestionnairesVehicleTypesContent/index.js +17 -12
- package/dist/pages/Questionnnaires/QuestionnairesVendorCategoriesContent/constant.js +6 -4
- package/dist/pages/Questionnnaires/QuestionnairesVendorCategoriesContent/index.js +18 -13
- package/dist/pages/Questionnnaires/QuestionnairesWarparticipantsContent/constant.js +6 -4
- package/dist/pages/Questionnnaires/QuestionnairesWarparticipantsContent/index.js +17 -12
- package/dist/pages/Questionnnaires/QuestionnairesWellContent/constant.js +7 -5
- package/dist/pages/Questionnnaires/QuestionnairesWellContent/index.js +17 -12
- package/dist/pages/Questionnnaires/QuestionnairesWorkModesContent/constant.js +8 -6
- package/dist/pages/Questionnnaires/QuestionnairesWorkModesContent/index.js +18 -13
- package/dist/pages/Questionnnaires/QuestionnairesWorkschedulesContent/constant.js +6 -4
- package/dist/pages/Questionnnaires/QuestionnairesWorkschedulesContent/index.js +17 -12
- package/dist/pages/Questionnnaires/QuestionnairesinventoryPackageTypesContent/constant.js +6 -4
- package/dist/pages/Questionnnaires/QuestionnairesinventoryPackageTypesContent/index.js +17 -12
- package/dist/store/slices/questionnaire/index.js +380 -372
- package/dist/store/slices/questionnaire/service.js +7 -7
- package/dist/translations/index.json +1784 -367
- package/package.json +1 -1
|
@@ -3,7 +3,8 @@ import { Switch, Tooltip } from "antd";
|
|
|
3
3
|
import style from "../Questionnaires.module.scss";
|
|
4
4
|
import { setDeleteModalVisible } from "../../../store/slices/global";
|
|
5
5
|
import { DeleteIconQ, EditIcon } from "../../../assets/icons";
|
|
6
|
-
export var getStreetColumns = function getStreetColumns(onEditClick, onDelete, onStatusChange, dispatch, innerW) {
|
|
6
|
+
export var getStreetColumns = function getStreetColumns(t, onEditClick, onDelete, onStatusChange, dispatch, innerW) {
|
|
7
|
+
var _t$fields, _t$fields2;
|
|
7
8
|
return [{
|
|
8
9
|
title: "№",
|
|
9
10
|
dataIndex: "num",
|
|
@@ -11,20 +12,21 @@ export var getStreetColumns = function getStreetColumns(onEditClick, onDelete, o
|
|
|
11
12
|
ellipsis: true,
|
|
12
13
|
width: 35
|
|
13
14
|
}, {
|
|
14
|
-
title:
|
|
15
|
+
title: t === null || t === void 0 || (_t$fields = t.fields) === null || _t$fields === void 0 ? void 0 : _t$fields.name,
|
|
15
16
|
dataIndex: "name",
|
|
16
17
|
width: innerW,
|
|
17
18
|
disabled: true,
|
|
18
19
|
ellipsis: true
|
|
19
20
|
}, {
|
|
20
|
-
title:
|
|
21
|
+
title: t === null || t === void 0 || (_t$fields2 = t.fields) === null || _t$fields2 === void 0 ? void 0 : _t$fields2.status,
|
|
21
22
|
key: "status",
|
|
22
23
|
disabled: true,
|
|
23
24
|
filter: false,
|
|
24
25
|
render: function render(data) {
|
|
26
|
+
var _t$common;
|
|
25
27
|
return /*#__PURE__*/React.createElement(Tooltip, {
|
|
26
28
|
placement: "top",
|
|
27
|
-
title:
|
|
29
|
+
title: t === null || t === void 0 || (_t$common = t.common) === null || _t$common === void 0 ? void 0 : _t$common.changeStatus
|
|
28
30
|
}, /*#__PURE__*/React.createElement(Switch, {
|
|
29
31
|
size: "medium",
|
|
30
32
|
checked: data === null || data === void 0 ? void 0 : data.isActive,
|
|
@@ -28,10 +28,15 @@ import Loading from "../../../components/Loading";
|
|
|
28
28
|
import Table from "../../../components/Table";
|
|
29
29
|
import Filter from "../../../components/Filter";
|
|
30
30
|
import { addDocumentTypes, deleteDocumentTypes, documentTypesVisibility, editDocumentTypes, getDocumentTypes } from "../../../store/slices/questionnaire";
|
|
31
|
+
import text from "../../../translations/index.json";
|
|
32
|
+
import { useLang } from "../../../hooks/useLang";
|
|
31
33
|
var Content = Layout.Content;
|
|
32
34
|
var Item = Form.Item;
|
|
33
35
|
var Option = AntdSelect.Option;
|
|
34
36
|
var QuestionnairesDocumentTypeContent = function QuestionnairesDocumentTypeContent() {
|
|
37
|
+
var _text$lang, _t$common, _t$titles, _t$options, _t$options2, _t$common2, _t$common3, _t$common4, _t$common5, _t$messages, _t$fields, _t$common6, _t$common7;
|
|
38
|
+
var lang = useLang();
|
|
39
|
+
var t = text === null || text === void 0 || (_text$lang = text[lang]) === null || _text$lang === void 0 || (_text$lang = _text$lang.pages) === null || _text$lang === void 0 ? void 0 : _text$lang.questionnaires;
|
|
35
40
|
var _useState = useState(null),
|
|
36
41
|
_useState2 = _slicedToArray(_useState, 2),
|
|
37
42
|
innerW = _useState2[0],
|
|
@@ -152,8 +157,8 @@ var QuestionnairesDocumentTypeContent = function QuestionnairesDocumentTypeConte
|
|
|
152
157
|
});
|
|
153
158
|
}
|
|
154
159
|
var columns = useMemo(function () {
|
|
155
|
-
return getStreetColumns(onEditClick, onDelete, onStatusChange, dispatch);
|
|
156
|
-
}, [onEditClick, onDelete, onStatusChange, dispatch]);
|
|
160
|
+
return getStreetColumns(t, onEditClick, onDelete, onStatusChange, dispatch);
|
|
161
|
+
}, [t, onEditClick, onDelete, onStatusChange, dispatch]);
|
|
157
162
|
var _useState11 = useState(columns.map(function (col) {
|
|
158
163
|
return col.dataIndex;
|
|
159
164
|
})),
|
|
@@ -190,7 +195,7 @@ var QuestionnairesDocumentTypeContent = function QuestionnairesDocumentTypeConte
|
|
|
190
195
|
}, /*#__PURE__*/React.createElement(Button, {
|
|
191
196
|
onClick: onClickModal,
|
|
192
197
|
color: "green"
|
|
193
|
-
}, " ", /*#__PURE__*/React.createElement(PlusIcon, null), "
|
|
198
|
+
}, " ", /*#__PURE__*/React.createElement(PlusIcon, null), " ", t === null || t === void 0 || (_t$common = t.common) === null || _t$common === void 0 ? void 0 : _t$common.addQuestionnaire), /*#__PURE__*/React.createElement(Filter, {
|
|
194
199
|
columns: columns,
|
|
195
200
|
selectedColumns: selectedColumns,
|
|
196
201
|
setQuery: setQuery,
|
|
@@ -202,7 +207,7 @@ var QuestionnairesDocumentTypeContent = function QuestionnairesDocumentTypeConte
|
|
|
202
207
|
className: style.content
|
|
203
208
|
}, /*#__PURE__*/React.createElement("div", {
|
|
204
209
|
className: style.table_header
|
|
205
|
-
}, /*#__PURE__*/React.createElement("h2", null,
|
|
210
|
+
}, /*#__PURE__*/React.createElement("h2", null, t === null || t === void 0 || (_t$titles = t.titles) === null || _t$titles === void 0 ? void 0 : _t$titles.documentTypes), /*#__PURE__*/React.createElement("div", {
|
|
206
211
|
className: style.buttons
|
|
207
212
|
}, /*#__PURE__*/React.createElement(Select, {
|
|
208
213
|
size: "sm",
|
|
@@ -215,9 +220,9 @@ var QuestionnairesDocumentTypeContent = function QuestionnairesDocumentTypeConte
|
|
|
215
220
|
}
|
|
216
221
|
}, /*#__PURE__*/React.createElement(Option, {
|
|
217
222
|
value: 1
|
|
218
|
-
},
|
|
223
|
+
}, t === null || t === void 0 || (_t$options = t.options) === null || _t$options === void 0 ? void 0 : _t$options.incomingDocuments), /*#__PURE__*/React.createElement(Option, {
|
|
219
224
|
value: 2
|
|
220
|
-
},
|
|
225
|
+
}, t === null || t === void 0 || (_t$options2 = t.options) === null || _t$options2 === void 0 ? void 0 : _t$options2.outgoingDocuments)), /*#__PURE__*/React.createElement(ColSort, {
|
|
221
226
|
columns: columns,
|
|
222
227
|
selectedColumns: selectedColumns,
|
|
223
228
|
handleColumnToggle: handleColumnToggle
|
|
@@ -240,10 +245,10 @@ var QuestionnairesDocumentTypeContent = function QuestionnairesDocumentTypeConte
|
|
|
240
245
|
})), /*#__PURE__*/React.createElement(FormModal, {
|
|
241
246
|
ref: ref,
|
|
242
247
|
width: 454,
|
|
243
|
-
title:
|
|
244
|
-
titleEdit:
|
|
245
|
-
okText:
|
|
246
|
-
cancelText:
|
|
248
|
+
title: t === null || t === void 0 || (_t$common2 = t.common) === null || _t$common2 === void 0 ? void 0 : _t$common2.createQuestionnaire,
|
|
249
|
+
titleEdit: t === null || t === void 0 || (_t$common3 = t.common) === null || _t$common3 === void 0 ? void 0 : _t$common3.editQuestionnaire,
|
|
250
|
+
okText: t === null || t === void 0 || (_t$common4 = t.common) === null || _t$common4 === void 0 ? void 0 : _t$common4.save,
|
|
251
|
+
cancelText: t === null || t === void 0 || (_t$common5 = t.common) === null || _t$common5 === void 0 ? void 0 : _t$common5.close,
|
|
247
252
|
onSubmit: onSubmit,
|
|
248
253
|
onEdit: onEdit,
|
|
249
254
|
className: "absolute",
|
|
@@ -254,10 +259,10 @@ var QuestionnairesDocumentTypeContent = function QuestionnairesDocumentTypeConte
|
|
|
254
259
|
message: ""
|
|
255
260
|
}, {
|
|
256
261
|
min: 3,
|
|
257
|
-
message:
|
|
262
|
+
message: t === null || t === void 0 || (_t$messages = t.messages) === null || _t$messages === void 0 ? void 0 : _t$messages.minChars3
|
|
258
263
|
}],
|
|
259
264
|
name: "name",
|
|
260
|
-
label:
|
|
265
|
+
label: t === null || t === void 0 || (_t$fields = t.fields) === null || _t$fields === void 0 ? void 0 : _t$fields.name
|
|
261
266
|
}, /*#__PURE__*/React.createElement(Input, {
|
|
262
267
|
className: style.modal_input
|
|
263
268
|
}))), /*#__PURE__*/React.createElement(DeleteModal, {
|
|
@@ -272,13 +277,13 @@ var QuestionnairesDocumentTypeContent = function QuestionnairesDocumentTypeConte
|
|
|
272
277
|
onCancel: function onCancel() {
|
|
273
278
|
return dispatch(setDeleteModalVisible(false));
|
|
274
279
|
},
|
|
275
|
-
value:
|
|
280
|
+
value: t === null || t === void 0 || (_t$common6 = t.common) === null || _t$common6 === void 0 ? void 0 : _t$common6.questionnaireAcc
|
|
276
281
|
})), /*#__PURE__*/React.createElement(ViewModal, {
|
|
277
282
|
onCancel: closeOnViewModal,
|
|
278
283
|
width: 695
|
|
279
284
|
}, /*#__PURE__*/React.createElement(Success, {
|
|
280
285
|
onClick: closeOnViewModal,
|
|
281
|
-
value:
|
|
286
|
+
value: t === null || t === void 0 || (_t$common7 = t.common) === null || _t$common7 === void 0 ? void 0 : _t$common7.questionnaire
|
|
282
287
|
}))))));
|
|
283
288
|
};
|
|
284
289
|
export default QuestionnairesDocumentTypeContent;
|
|
@@ -3,7 +3,8 @@ import { Switch, Tooltip } from "antd";
|
|
|
3
3
|
import style from "../Questionnaires.module.scss";
|
|
4
4
|
import { setDeleteModalVisible } from "../../../store/slices/global";
|
|
5
5
|
import { DeleteIconQ, EditIcon } from "../../../assets/icons";
|
|
6
|
-
export var getStreetColumns = function getStreetColumns(onEditClick, onDelete, onStatusChange, dispatch, organizationsAll) {
|
|
6
|
+
export var getStreetColumns = function getStreetColumns(t, onEditClick, onDelete, onStatusChange, dispatch, organizationsAll) {
|
|
7
|
+
var _t$fields, _t$fields2, _t$fields3, _t$fields4, _t$fields5, _t$fields6;
|
|
7
8
|
return [{
|
|
8
9
|
title: "№",
|
|
9
10
|
dataIndex: "num",
|
|
@@ -11,44 +12,45 @@ export var getStreetColumns = function getStreetColumns(onEditClick, onDelete, o
|
|
|
11
12
|
ellipsis: true,
|
|
12
13
|
width: 35
|
|
13
14
|
}, {
|
|
14
|
-
title:
|
|
15
|
+
title: t === null || t === void 0 || (_t$fields = t.fields) === null || _t$fields === void 0 ? void 0 : _t$fields.firstName,
|
|
15
16
|
dataIndex: "name",
|
|
16
17
|
width: 150,
|
|
17
18
|
disabled: true,
|
|
18
19
|
ellipsis: true
|
|
19
20
|
}, {
|
|
20
|
-
title:
|
|
21
|
+
title: t === null || t === void 0 || (_t$fields2 = t.fields) === null || _t$fields2 === void 0 ? void 0 : _t$fields2.lastName,
|
|
21
22
|
dataIndex: "surname",
|
|
22
23
|
width: 150,
|
|
23
24
|
disabled: true,
|
|
24
25
|
ellipsis: true
|
|
25
26
|
}, {
|
|
26
|
-
title:
|
|
27
|
+
title: t === null || t === void 0 || (_t$fields3 = t.fields) === null || _t$fields3 === void 0 ? void 0 : _t$fields3.patronymic,
|
|
27
28
|
dataIndex: "patronymic",
|
|
28
29
|
width: 150,
|
|
29
30
|
disabled: true,
|
|
30
31
|
ellipsis: true
|
|
31
32
|
}, {
|
|
32
|
-
title:
|
|
33
|
+
title: t === null || t === void 0 || (_t$fields4 = t.fields) === null || _t$fields4 === void 0 ? void 0 : _t$fields4.organization,
|
|
33
34
|
dataIndex: "organisationName",
|
|
34
35
|
width: 150,
|
|
35
36
|
disabled: true,
|
|
36
37
|
ellipsis: true
|
|
37
38
|
}, {
|
|
38
|
-
title:
|
|
39
|
+
title: t === null || t === void 0 || (_t$fields5 = t.fields) === null || _t$fields5 === void 0 ? void 0 : _t$fields5.position,
|
|
39
40
|
dataIndex: "positionName",
|
|
40
41
|
width: 150,
|
|
41
42
|
disabled: true,
|
|
42
43
|
ellipsis: true
|
|
43
44
|
}, {
|
|
44
|
-
title:
|
|
45
|
+
title: t === null || t === void 0 || (_t$fields6 = t.fields) === null || _t$fields6 === void 0 ? void 0 : _t$fields6.status,
|
|
45
46
|
key: "status",
|
|
46
47
|
disabled: true,
|
|
47
48
|
filter: false,
|
|
48
49
|
render: function render(data) {
|
|
50
|
+
var _t$common;
|
|
49
51
|
return /*#__PURE__*/React.createElement(Tooltip, {
|
|
50
52
|
placement: "top",
|
|
51
|
-
title:
|
|
53
|
+
title: t === null || t === void 0 || (_t$common = t.common) === null || _t$common === void 0 ? void 0 : _t$common.changeStatus
|
|
52
54
|
}, /*#__PURE__*/React.createElement(Switch, {
|
|
53
55
|
size: "medium",
|
|
54
56
|
checked: data === null || data === void 0 ? void 0 : data.isActive,
|
|
@@ -25,10 +25,15 @@ import Loading from "../../../components/Loading";
|
|
|
25
25
|
import Table from "../../../components/Table";
|
|
26
26
|
import Filter from "../../../components/Filter";
|
|
27
27
|
import { addDocumentWhom, deleteTopic, documentWhomVisibility, editDocumentWhom, getDocumentWhom, getOrganizationsAll } from "../../../store/slices/questionnaire";
|
|
28
|
+
import text from "../../../translations/index.json";
|
|
29
|
+
import { useLang } from "../../../hooks/useLang";
|
|
28
30
|
var Content = Layout.Content;
|
|
29
31
|
var Item = Form.Item;
|
|
30
32
|
var Option = AntdSelect.Option;
|
|
31
33
|
var QuestionnairesDocumentWhomContent = function QuestionnairesDocumentWhomContent() {
|
|
34
|
+
var _text$lang, _t$common, _t$titles, _t$options, _t$options2, _t$common2, _t$common3, _t$common4, _t$common5, _t$messages, _t$fields, _t$messages2, _t$fields2, _t$messages3, _t$fields3, _t$fields4, _t$messages4, _t$fields5, _t$common6, _t$common7;
|
|
35
|
+
var lang = useLang();
|
|
36
|
+
var t = text === null || text === void 0 || (_text$lang = text[lang]) === null || _text$lang === void 0 || (_text$lang = _text$lang.pages) === null || _text$lang === void 0 ? void 0 : _text$lang.questionnaires;
|
|
32
37
|
var _useState = useState(null),
|
|
33
38
|
_useState2 = _slicedToArray(_useState, 2),
|
|
34
39
|
innerW = _useState2[0],
|
|
@@ -156,8 +161,8 @@ var QuestionnairesDocumentWhomContent = function QuestionnairesDocumentWhomConte
|
|
|
156
161
|
});
|
|
157
162
|
}
|
|
158
163
|
var columns = useMemo(function () {
|
|
159
|
-
return getStreetColumns(onEditClick, onDelete, onStatusChange, dispatch, organizationsAll);
|
|
160
|
-
}, [onEditClick, onDelete, onStatusChange, dispatch, organizationsAll]);
|
|
164
|
+
return getStreetColumns(t, onEditClick, onDelete, onStatusChange, dispatch, organizationsAll);
|
|
165
|
+
}, [t, onEditClick, onDelete, onStatusChange, dispatch, organizationsAll]);
|
|
161
166
|
var _useState11 = useState(columns.map(function (col) {
|
|
162
167
|
return col.dataIndex;
|
|
163
168
|
})),
|
|
@@ -199,7 +204,7 @@ var QuestionnairesDocumentWhomContent = function QuestionnairesDocumentWhomConte
|
|
|
199
204
|
}, /*#__PURE__*/React.createElement(Button, {
|
|
200
205
|
onClick: onClickModal,
|
|
201
206
|
color: "green"
|
|
202
|
-
}, " ", /*#__PURE__*/React.createElement(PlusIcon, null), "
|
|
207
|
+
}, " ", /*#__PURE__*/React.createElement(PlusIcon, null), " ", t === null || t === void 0 || (_t$common = t.common) === null || _t$common === void 0 ? void 0 : _t$common.addQuestionnaire), /*#__PURE__*/React.createElement(Filter, {
|
|
203
208
|
columns: columns,
|
|
204
209
|
selectedColumns: selectedColumns,
|
|
205
210
|
setQuery: setQuery,
|
|
@@ -211,7 +216,7 @@ var QuestionnairesDocumentWhomContent = function QuestionnairesDocumentWhomConte
|
|
|
211
216
|
className: style.content
|
|
212
217
|
}, /*#__PURE__*/React.createElement("div", {
|
|
213
218
|
className: style.table_header
|
|
214
|
-
}, /*#__PURE__*/React.createElement("h2", null,
|
|
219
|
+
}, /*#__PURE__*/React.createElement("h2", null, t === null || t === void 0 || (_t$titles = t.titles) === null || _t$titles === void 0 ? void 0 : _t$titles.persons), /*#__PURE__*/React.createElement("div", {
|
|
215
220
|
className: style.buttons
|
|
216
221
|
}, /*#__PURE__*/React.createElement(Select, {
|
|
217
222
|
size: "sm",
|
|
@@ -224,9 +229,9 @@ var QuestionnairesDocumentWhomContent = function QuestionnairesDocumentWhomConte
|
|
|
224
229
|
}
|
|
225
230
|
}, /*#__PURE__*/React.createElement(Option, {
|
|
226
231
|
value: 1
|
|
227
|
-
},
|
|
232
|
+
}, t === null || t === void 0 || (_t$options = t.options) === null || _t$options === void 0 ? void 0 : _t$options.person), /*#__PURE__*/React.createElement(Option, {
|
|
228
233
|
value: 2
|
|
229
|
-
},
|
|
234
|
+
}, t === null || t === void 0 || (_t$options2 = t.options) === null || _t$options2 === void 0 ? void 0 : _t$options2.enterprise)), /*#__PURE__*/React.createElement(ColSort, {
|
|
230
235
|
columns: columns,
|
|
231
236
|
selectedColumns: selectedColumns,
|
|
232
237
|
handleColumnToggle: handleColumnToggle
|
|
@@ -249,10 +254,10 @@ var QuestionnairesDocumentWhomContent = function QuestionnairesDocumentWhomConte
|
|
|
249
254
|
})), /*#__PURE__*/React.createElement(FormModal, {
|
|
250
255
|
ref: ref,
|
|
251
256
|
width: 454,
|
|
252
|
-
title:
|
|
253
|
-
titleEdit:
|
|
254
|
-
okText:
|
|
255
|
-
cancelText:
|
|
257
|
+
title: t === null || t === void 0 || (_t$common2 = t.common) === null || _t$common2 === void 0 ? void 0 : _t$common2.createQuestionnaire,
|
|
258
|
+
titleEdit: t === null || t === void 0 || (_t$common3 = t.common) === null || _t$common3 === void 0 ? void 0 : _t$common3.editQuestionnaire,
|
|
259
|
+
okText: t === null || t === void 0 || (_t$common4 = t.common) === null || _t$common4 === void 0 ? void 0 : _t$common4.save,
|
|
260
|
+
cancelText: t === null || t === void 0 || (_t$common5 = t.common) === null || _t$common5 === void 0 ? void 0 : _t$common5.close,
|
|
256
261
|
onSubmit: onSubmit,
|
|
257
262
|
onEdit: onEdit,
|
|
258
263
|
className: "absolute",
|
|
@@ -263,10 +268,10 @@ var QuestionnairesDocumentWhomContent = function QuestionnairesDocumentWhomConte
|
|
|
263
268
|
message: ""
|
|
264
269
|
}, {
|
|
265
270
|
min: 3,
|
|
266
|
-
message:
|
|
271
|
+
message: t === null || t === void 0 || (_t$messages = t.messages) === null || _t$messages === void 0 ? void 0 : _t$messages.minChars3
|
|
267
272
|
}],
|
|
268
273
|
name: "name",
|
|
269
|
-
label:
|
|
274
|
+
label: t === null || t === void 0 || (_t$fields = t.fields) === null || _t$fields === void 0 ? void 0 : _t$fields.firstName
|
|
270
275
|
}, /*#__PURE__*/React.createElement(Input, {
|
|
271
276
|
className: style.modal_input
|
|
272
277
|
})), /*#__PURE__*/React.createElement(Item, {
|
|
@@ -275,10 +280,10 @@ var QuestionnairesDocumentWhomContent = function QuestionnairesDocumentWhomConte
|
|
|
275
280
|
message: ""
|
|
276
281
|
}, {
|
|
277
282
|
min: 3,
|
|
278
|
-
message:
|
|
283
|
+
message: t === null || t === void 0 || (_t$messages2 = t.messages) === null || _t$messages2 === void 0 ? void 0 : _t$messages2.minChars3
|
|
279
284
|
}],
|
|
280
285
|
name: "surname",
|
|
281
|
-
label:
|
|
286
|
+
label: t === null || t === void 0 || (_t$fields2 = t.fields) === null || _t$fields2 === void 0 ? void 0 : _t$fields2.lastName
|
|
282
287
|
}, /*#__PURE__*/React.createElement(Input, {
|
|
283
288
|
className: style.modal_input
|
|
284
289
|
})), /*#__PURE__*/React.createElement(Item, {
|
|
@@ -287,15 +292,15 @@ var QuestionnairesDocumentWhomContent = function QuestionnairesDocumentWhomConte
|
|
|
287
292
|
message: ""
|
|
288
293
|
}, {
|
|
289
294
|
min: 3,
|
|
290
|
-
message:
|
|
295
|
+
message: t === null || t === void 0 || (_t$messages3 = t.messages) === null || _t$messages3 === void 0 ? void 0 : _t$messages3.minChars3
|
|
291
296
|
}],
|
|
292
297
|
name: "patronymic",
|
|
293
|
-
label:
|
|
298
|
+
label: t === null || t === void 0 || (_t$fields3 = t.fields) === null || _t$fields3 === void 0 ? void 0 : _t$fields3.patronymic
|
|
294
299
|
}, /*#__PURE__*/React.createElement(Input, {
|
|
295
300
|
className: style.modal_input
|
|
296
301
|
})), /*#__PURE__*/React.createElement(Item, {
|
|
297
302
|
name: "organisationId",
|
|
298
|
-
label:
|
|
303
|
+
label: t === null || t === void 0 || (_t$fields4 = t.fields) === null || _t$fields4 === void 0 ? void 0 : _t$fields4.organizationName,
|
|
299
304
|
rules: [{
|
|
300
305
|
required: true,
|
|
301
306
|
message: ""
|
|
@@ -311,10 +316,10 @@ var QuestionnairesDocumentWhomContent = function QuestionnairesDocumentWhomConte
|
|
|
311
316
|
message: ""
|
|
312
317
|
}, {
|
|
313
318
|
min: 3,
|
|
314
|
-
message:
|
|
319
|
+
message: t === null || t === void 0 || (_t$messages4 = t.messages) === null || _t$messages4 === void 0 ? void 0 : _t$messages4.minChars3
|
|
315
320
|
}],
|
|
316
321
|
name: "positionName",
|
|
317
|
-
label:
|
|
322
|
+
label: t === null || t === void 0 || (_t$fields5 = t.fields) === null || _t$fields5 === void 0 ? void 0 : _t$fields5.position
|
|
318
323
|
}, /*#__PURE__*/React.createElement(Input, {
|
|
319
324
|
className: style.modal_input
|
|
320
325
|
}))), /*#__PURE__*/React.createElement(DeleteModal, {
|
|
@@ -329,13 +334,13 @@ var QuestionnairesDocumentWhomContent = function QuestionnairesDocumentWhomConte
|
|
|
329
334
|
onCancel: function onCancel() {
|
|
330
335
|
return dispatch(setDeleteModalVisible(false));
|
|
331
336
|
},
|
|
332
|
-
value:
|
|
337
|
+
value: t === null || t === void 0 || (_t$common6 = t.common) === null || _t$common6 === void 0 ? void 0 : _t$common6.questionnaireAcc
|
|
333
338
|
})), /*#__PURE__*/React.createElement(ViewModal, {
|
|
334
339
|
onCancel: closeOnViewModal,
|
|
335
340
|
width: 695
|
|
336
341
|
}, /*#__PURE__*/React.createElement(Success, {
|
|
337
342
|
onClick: closeOnViewModal,
|
|
338
|
-
value:
|
|
343
|
+
value: t === null || t === void 0 || (_t$common7 = t.common) === null || _t$common7 === void 0 ? void 0 : _t$common7.questionnaire
|
|
339
344
|
}))))));
|
|
340
345
|
};
|
|
341
346
|
export default QuestionnairesDocumentWhomContent;
|
|
@@ -3,7 +3,8 @@ import { Switch, Tooltip } from "antd";
|
|
|
3
3
|
import style from "../Questionnaires.module.scss";
|
|
4
4
|
import { setDeleteModalVisible } from "../../../store/slices/global";
|
|
5
5
|
import { DeleteIconQ, EditIcon } from "../../../assets/icons";
|
|
6
|
-
export var getStreetColumns = function getStreetColumns(onEditClick, onDelete, onStatusChange, dispatch, innerW) {
|
|
6
|
+
export var getStreetColumns = function getStreetColumns(t, onEditClick, onDelete, onStatusChange, dispatch, innerW) {
|
|
7
|
+
var _t$fields, _t$fields2;
|
|
7
8
|
return [{
|
|
8
9
|
title: "№",
|
|
9
10
|
dataIndex: "num",
|
|
@@ -11,20 +12,21 @@ export var getStreetColumns = function getStreetColumns(onEditClick, onDelete, o
|
|
|
11
12
|
ellipsis: true,
|
|
12
13
|
width: 35
|
|
13
14
|
}, {
|
|
14
|
-
title:
|
|
15
|
+
title: t === null || t === void 0 || (_t$fields = t.fields) === null || _t$fields === void 0 ? void 0 : _t$fields.name,
|
|
15
16
|
dataIndex: "name",
|
|
16
17
|
width: innerW,
|
|
17
18
|
disabled: true,
|
|
18
19
|
ellipsis: true
|
|
19
20
|
}, {
|
|
20
|
-
title:
|
|
21
|
+
title: t === null || t === void 0 || (_t$fields2 = t.fields) === null || _t$fields2 === void 0 ? void 0 : _t$fields2.status,
|
|
21
22
|
key: "status",
|
|
22
23
|
disabled: true,
|
|
23
24
|
filter: false,
|
|
24
25
|
render: function render(data) {
|
|
26
|
+
var _t$common;
|
|
25
27
|
return /*#__PURE__*/React.createElement(Tooltip, {
|
|
26
28
|
placement: "top",
|
|
27
|
-
title:
|
|
29
|
+
title: t === null || t === void 0 || (_t$common = t.common) === null || _t$common === void 0 ? void 0 : _t$common.changeStatus
|
|
28
30
|
}, /*#__PURE__*/React.createElement(Switch, {
|
|
29
31
|
size: "medium",
|
|
30
32
|
checked: data === null || data === void 0 ? void 0 : data.isActive,
|
|
@@ -27,9 +27,14 @@ import Loading from "../../../components/Loading";
|
|
|
27
27
|
import Table from "../../../components/Table";
|
|
28
28
|
import Filter from "../../../components/Filter";
|
|
29
29
|
import { addDrivingcategories, deleteDrivingcategories, drivingcategoriesVisibility, editDrivingcategories, getDrivingcategories } from "../../../store/slices/questionnaire";
|
|
30
|
+
import text from "../../../translations/index.json";
|
|
31
|
+
import { useLang } from "../../../hooks/useLang";
|
|
30
32
|
var Content = Layout.Content;
|
|
31
33
|
var Item = Form.Item;
|
|
32
34
|
var QuestionnairesDocumentTypeContent = function QuestionnairesDocumentTypeContent() {
|
|
35
|
+
var _text$lang, _t$common, _t$titles, _t$common2, _t$common3, _t$common4, _t$common5, _t$fields, _t$common6, _t$common7;
|
|
36
|
+
var lang = useLang();
|
|
37
|
+
var t = text === null || text === void 0 || (_text$lang = text[lang]) === null || _text$lang === void 0 || (_text$lang = _text$lang.pages) === null || _text$lang === void 0 ? void 0 : _text$lang.questionnaires;
|
|
33
38
|
var _useState = useState(null),
|
|
34
39
|
_useState2 = _slicedToArray(_useState, 2),
|
|
35
40
|
innerW = _useState2[0],
|
|
@@ -133,8 +138,8 @@ var QuestionnairesDocumentTypeContent = function QuestionnairesDocumentTypeConte
|
|
|
133
138
|
});
|
|
134
139
|
}
|
|
135
140
|
var columns = useMemo(function () {
|
|
136
|
-
return getStreetColumns(onEditClick, onDelete, onStatusChange, dispatch);
|
|
137
|
-
}, [onEditClick, onDelete, onStatusChange, dispatch]);
|
|
141
|
+
return getStreetColumns(t, onEditClick, onDelete, onStatusChange, dispatch);
|
|
142
|
+
}, [t, onEditClick, onDelete, onStatusChange, dispatch]);
|
|
138
143
|
var _useState1 = useState(columns.map(function (col) {
|
|
139
144
|
return col.dataIndex;
|
|
140
145
|
})),
|
|
@@ -170,7 +175,7 @@ var QuestionnairesDocumentTypeContent = function QuestionnairesDocumentTypeConte
|
|
|
170
175
|
}, /*#__PURE__*/React.createElement(Button, {
|
|
171
176
|
onClick: onClickModal,
|
|
172
177
|
color: "green"
|
|
173
|
-
}, " ", /*#__PURE__*/React.createElement(PlusIcon, null), "
|
|
178
|
+
}, " ", /*#__PURE__*/React.createElement(PlusIcon, null), " ", t === null || t === void 0 || (_t$common = t.common) === null || _t$common === void 0 ? void 0 : _t$common.addQuestionnaire), /*#__PURE__*/React.createElement(Filter, {
|
|
174
179
|
columns: columns,
|
|
175
180
|
selectedColumns: selectedColumns,
|
|
176
181
|
setQuery: setQuery,
|
|
@@ -182,7 +187,7 @@ var QuestionnairesDocumentTypeContent = function QuestionnairesDocumentTypeConte
|
|
|
182
187
|
className: style.content
|
|
183
188
|
}, /*#__PURE__*/React.createElement("div", {
|
|
184
189
|
className: style.table_header
|
|
185
|
-
}, /*#__PURE__*/React.createElement("h2", null,
|
|
190
|
+
}, /*#__PURE__*/React.createElement("h2", null, t === null || t === void 0 || (_t$titles = t.titles) === null || _t$titles === void 0 ? void 0 : _t$titles.drivingCategories), /*#__PURE__*/React.createElement("div", {
|
|
186
191
|
className: style.buttons
|
|
187
192
|
}, /*#__PURE__*/React.createElement(ColSort, {
|
|
188
193
|
columns: columns,
|
|
@@ -207,10 +212,10 @@ var QuestionnairesDocumentTypeContent = function QuestionnairesDocumentTypeConte
|
|
|
207
212
|
})), /*#__PURE__*/React.createElement(FormModal, {
|
|
208
213
|
ref: ref,
|
|
209
214
|
width: 454,
|
|
210
|
-
title:
|
|
211
|
-
titleEdit:
|
|
212
|
-
okText:
|
|
213
|
-
cancelText:
|
|
215
|
+
title: t === null || t === void 0 || (_t$common2 = t.common) === null || _t$common2 === void 0 ? void 0 : _t$common2.createQuestionnaire,
|
|
216
|
+
titleEdit: t === null || t === void 0 || (_t$common3 = t.common) === null || _t$common3 === void 0 ? void 0 : _t$common3.editQuestionnaire,
|
|
217
|
+
okText: t === null || t === void 0 || (_t$common4 = t.common) === null || _t$common4 === void 0 ? void 0 : _t$common4.save,
|
|
218
|
+
cancelText: t === null || t === void 0 || (_t$common5 = t.common) === null || _t$common5 === void 0 ? void 0 : _t$common5.close,
|
|
214
219
|
onSubmit: onSubmit,
|
|
215
220
|
onEdit: onEdit,
|
|
216
221
|
className: "absolute",
|
|
@@ -222,7 +227,7 @@ var QuestionnairesDocumentTypeContent = function QuestionnairesDocumentTypeConte
|
|
|
222
227
|
message: ""
|
|
223
228
|
}],
|
|
224
229
|
name: "name",
|
|
225
|
-
label:
|
|
230
|
+
label: t === null || t === void 0 || (_t$fields = t.fields) === null || _t$fields === void 0 ? void 0 : _t$fields.name
|
|
226
231
|
}, /*#__PURE__*/React.createElement(Input, {
|
|
227
232
|
className: style.modal_input,
|
|
228
233
|
type: "text"
|
|
@@ -238,13 +243,13 @@ var QuestionnairesDocumentTypeContent = function QuestionnairesDocumentTypeConte
|
|
|
238
243
|
onCancel: function onCancel() {
|
|
239
244
|
return dispatch(setDeleteModalVisible(false));
|
|
240
245
|
},
|
|
241
|
-
value:
|
|
246
|
+
value: t === null || t === void 0 || (_t$common6 = t.common) === null || _t$common6 === void 0 ? void 0 : _t$common6.questionnaireAcc
|
|
242
247
|
})), /*#__PURE__*/React.createElement(ViewModal, {
|
|
243
248
|
onCancel: closeOnViewModal,
|
|
244
249
|
width: 695
|
|
245
250
|
}, /*#__PURE__*/React.createElement(Success, {
|
|
246
251
|
onClick: closeOnViewModal,
|
|
247
|
-
value:
|
|
252
|
+
value: t === null || t === void 0 || (_t$common7 = t.common) === null || _t$common7 === void 0 ? void 0 : _t$common7.questionnaire
|
|
248
253
|
}))))));
|
|
249
254
|
};
|
|
250
255
|
export default QuestionnairesDocumentTypeContent;
|
|
@@ -3,7 +3,8 @@ import { Switch, Tooltip } from "antd";
|
|
|
3
3
|
import style from "../Questionnaires.module.scss";
|
|
4
4
|
import { setDeleteModalVisible } from "../../../store/slices/global";
|
|
5
5
|
import { DeleteIconQ, EditIcon } from "../../../assets/icons";
|
|
6
|
-
export var getStreetColumns = function getStreetColumns(onEditClick, onDelete, onStatusChange, dispatch, innerW) {
|
|
6
|
+
export var getStreetColumns = function getStreetColumns(t, onEditClick, onDelete, onStatusChange, dispatch, innerW) {
|
|
7
|
+
var _t$fields, _t$fields2;
|
|
7
8
|
return [{
|
|
8
9
|
title: "№",
|
|
9
10
|
dataIndex: "num",
|
|
@@ -11,20 +12,21 @@ export var getStreetColumns = function getStreetColumns(onEditClick, onDelete, o
|
|
|
11
12
|
ellipsis: true,
|
|
12
13
|
width: 35
|
|
13
14
|
}, {
|
|
14
|
-
title:
|
|
15
|
+
title: t === null || t === void 0 || (_t$fields = t.fields) === null || _t$fields === void 0 ? void 0 : _t$fields.name,
|
|
15
16
|
dataIndex: "name",
|
|
16
17
|
width: innerW,
|
|
17
18
|
disabled: true,
|
|
18
19
|
ellipsis: true
|
|
19
20
|
}, {
|
|
20
|
-
title:
|
|
21
|
+
title: t === null || t === void 0 || (_t$fields2 = t.fields) === null || _t$fields2 === void 0 ? void 0 : _t$fields2.status,
|
|
21
22
|
key: "status",
|
|
22
23
|
disabled: true,
|
|
23
24
|
filter: false,
|
|
24
25
|
render: function render(data) {
|
|
26
|
+
var _t$common;
|
|
25
27
|
return /*#__PURE__*/React.createElement(Tooltip, {
|
|
26
28
|
placement: "top",
|
|
27
|
-
title:
|
|
29
|
+
title: t === null || t === void 0 || (_t$common = t.common) === null || _t$common === void 0 ? void 0 : _t$common.changeStatus
|
|
28
30
|
}, /*#__PURE__*/React.createElement(Switch, {
|
|
29
31
|
size: "medium",
|
|
30
32
|
checked: data === null || data === void 0 ? void 0 : data.isActive,
|
|
@@ -27,9 +27,14 @@ import Loading from "../../../components/Loading";
|
|
|
27
27
|
import Table from "../../../components/Table";
|
|
28
28
|
import Filter from "../../../components/Filter";
|
|
29
29
|
import { addEducationinstitutions, deleteEducationinstitutions, educationinstitutionsVisibility, editEducationinstitutions, getEducationinstitutions } from "../../../store/slices/questionnaire";
|
|
30
|
+
import text from "../../../translations/index.json";
|
|
31
|
+
import { useLang } from "../../../hooks/useLang";
|
|
30
32
|
var Content = Layout.Content;
|
|
31
33
|
var Item = Form.Item;
|
|
32
34
|
var QuestionnairesDocumentTypeContent = function QuestionnairesDocumentTypeContent() {
|
|
35
|
+
var _text$lang, _t$common, _t$titles, _t$common2, _t$common3, _t$common4, _t$common5, _t$messages, _t$fields, _t$common6, _t$common7;
|
|
36
|
+
var lang = useLang();
|
|
37
|
+
var t = text === null || text === void 0 || (_text$lang = text[lang]) === null || _text$lang === void 0 || (_text$lang = _text$lang.pages) === null || _text$lang === void 0 ? void 0 : _text$lang.questionnaires;
|
|
33
38
|
var _useState = useState(null),
|
|
34
39
|
_useState2 = _slicedToArray(_useState, 2),
|
|
35
40
|
innerW = _useState2[0],
|
|
@@ -150,8 +155,8 @@ var QuestionnairesDocumentTypeContent = function QuestionnairesDocumentTypeConte
|
|
|
150
155
|
});
|
|
151
156
|
}
|
|
152
157
|
var columns = useMemo(function () {
|
|
153
|
-
return getStreetColumns(onEditClick, onDelete, onStatusChange, dispatch);
|
|
154
|
-
}, [onEditClick, onDelete, onStatusChange, dispatch]);
|
|
158
|
+
return getStreetColumns(t, onEditClick, onDelete, onStatusChange, dispatch);
|
|
159
|
+
}, [t, onEditClick, onDelete, onStatusChange, dispatch]);
|
|
155
160
|
var _useState11 = useState(columns.map(function (col) {
|
|
156
161
|
return col.dataIndex;
|
|
157
162
|
})),
|
|
@@ -188,7 +193,7 @@ var QuestionnairesDocumentTypeContent = function QuestionnairesDocumentTypeConte
|
|
|
188
193
|
}, /*#__PURE__*/React.createElement(Button, {
|
|
189
194
|
onClick: onClickModal,
|
|
190
195
|
color: "green"
|
|
191
|
-
}, " ", /*#__PURE__*/React.createElement(PlusIcon, null), "
|
|
196
|
+
}, " ", /*#__PURE__*/React.createElement(PlusIcon, null), " ", t === null || t === void 0 || (_t$common = t.common) === null || _t$common === void 0 ? void 0 : _t$common.addQuestionnaire), /*#__PURE__*/React.createElement(Filter, {
|
|
192
197
|
columns: columns,
|
|
193
198
|
selectedColumns: selectedColumns,
|
|
194
199
|
setQuery: setQuery,
|
|
@@ -200,7 +205,7 @@ var QuestionnairesDocumentTypeContent = function QuestionnairesDocumentTypeConte
|
|
|
200
205
|
className: style.content
|
|
201
206
|
}, /*#__PURE__*/React.createElement("div", {
|
|
202
207
|
className: style.table_header
|
|
203
|
-
}, /*#__PURE__*/React.createElement("h2", null,
|
|
208
|
+
}, /*#__PURE__*/React.createElement("h2", null, t === null || t === void 0 || (_t$titles = t.titles) === null || _t$titles === void 0 ? void 0 : _t$titles.educationInstitutions), /*#__PURE__*/React.createElement("div", {
|
|
204
209
|
className: style.buttons
|
|
205
210
|
}, /*#__PURE__*/React.createElement(ColSort, {
|
|
206
211
|
columns: columns,
|
|
@@ -225,10 +230,10 @@ var QuestionnairesDocumentTypeContent = function QuestionnairesDocumentTypeConte
|
|
|
225
230
|
})), /*#__PURE__*/React.createElement(FormModal, {
|
|
226
231
|
ref: ref,
|
|
227
232
|
width: 454,
|
|
228
|
-
title:
|
|
229
|
-
titleEdit:
|
|
230
|
-
okText:
|
|
231
|
-
cancelText:
|
|
233
|
+
title: t === null || t === void 0 || (_t$common2 = t.common) === null || _t$common2 === void 0 ? void 0 : _t$common2.createQuestionnaire,
|
|
234
|
+
titleEdit: t === null || t === void 0 || (_t$common3 = t.common) === null || _t$common3 === void 0 ? void 0 : _t$common3.editQuestionnaire,
|
|
235
|
+
okText: t === null || t === void 0 || (_t$common4 = t.common) === null || _t$common4 === void 0 ? void 0 : _t$common4.save,
|
|
236
|
+
cancelText: t === null || t === void 0 || (_t$common5 = t.common) === null || _t$common5 === void 0 ? void 0 : _t$common5.close,
|
|
232
237
|
onSubmit: onSubmit,
|
|
233
238
|
onEdit: onEdit,
|
|
234
239
|
className: "absolute",
|
|
@@ -239,10 +244,10 @@ var QuestionnairesDocumentTypeContent = function QuestionnairesDocumentTypeConte
|
|
|
239
244
|
message: ""
|
|
240
245
|
}, {
|
|
241
246
|
min: 3,
|
|
242
|
-
message:
|
|
247
|
+
message: t === null || t === void 0 || (_t$messages = t.messages) === null || _t$messages === void 0 ? void 0 : _t$messages.minChars3
|
|
243
248
|
}],
|
|
244
249
|
name: "name",
|
|
245
|
-
label:
|
|
250
|
+
label: t === null || t === void 0 || (_t$fields = t.fields) === null || _t$fields === void 0 ? void 0 : _t$fields.name
|
|
246
251
|
}, /*#__PURE__*/React.createElement(Input, {
|
|
247
252
|
className: style.modal_input
|
|
248
253
|
}))), /*#__PURE__*/React.createElement(DeleteModal, {
|
|
@@ -257,13 +262,13 @@ var QuestionnairesDocumentTypeContent = function QuestionnairesDocumentTypeConte
|
|
|
257
262
|
onCancel: function onCancel() {
|
|
258
263
|
return dispatch(setDeleteModalVisible(false));
|
|
259
264
|
},
|
|
260
|
-
value:
|
|
265
|
+
value: t === null || t === void 0 || (_t$common6 = t.common) === null || _t$common6 === void 0 ? void 0 : _t$common6.questionnaireAcc
|
|
261
266
|
})), /*#__PURE__*/React.createElement(ViewModal, {
|
|
262
267
|
onCancel: closeOnViewModal,
|
|
263
268
|
width: 695
|
|
264
269
|
}, /*#__PURE__*/React.createElement(Success, {
|
|
265
270
|
onClick: closeOnViewModal,
|
|
266
|
-
value:
|
|
271
|
+
value: t === null || t === void 0 || (_t$common7 = t.common) === null || _t$common7 === void 0 ? void 0 : _t$common7.questionnaire
|
|
267
272
|
}))))));
|
|
268
273
|
};
|
|
269
274
|
export default QuestionnairesDocumentTypeContent;
|
|
@@ -3,7 +3,8 @@ import { Switch, Tooltip } from "antd";
|
|
|
3
3
|
import style from "../Questionnaires.module.scss";
|
|
4
4
|
import { setDeleteModalVisible } from "../../../store/slices/global";
|
|
5
5
|
import { DeleteIconQ, EditIcon } from "../../../assets/icons";
|
|
6
|
-
export var getStreetColumns = function getStreetColumns(onEditClick, onDelete, onStatusChange, dispatch, innerW) {
|
|
6
|
+
export var getStreetColumns = function getStreetColumns(t, onEditClick, onDelete, onStatusChange, dispatch, innerW) {
|
|
7
|
+
var _t$fields, _t$fields2;
|
|
7
8
|
return [{
|
|
8
9
|
title: "№",
|
|
9
10
|
dataIndex: "num",
|
|
@@ -11,20 +12,21 @@ export var getStreetColumns = function getStreetColumns(onEditClick, onDelete, o
|
|
|
11
12
|
ellipsis: true,
|
|
12
13
|
width: 35
|
|
13
14
|
}, {
|
|
14
|
-
title:
|
|
15
|
+
title: t === null || t === void 0 || (_t$fields = t.fields) === null || _t$fields === void 0 ? void 0 : _t$fields.name,
|
|
15
16
|
dataIndex: "name",
|
|
16
17
|
width: innerW,
|
|
17
18
|
disabled: true,
|
|
18
19
|
ellipsis: true
|
|
19
20
|
}, {
|
|
20
|
-
title:
|
|
21
|
+
title: t === null || t === void 0 || (_t$fields2 = t.fields) === null || _t$fields2 === void 0 ? void 0 : _t$fields2.status,
|
|
21
22
|
key: "status",
|
|
22
23
|
disabled: true,
|
|
23
24
|
filter: false,
|
|
24
25
|
render: function render(data) {
|
|
26
|
+
var _t$common;
|
|
25
27
|
return /*#__PURE__*/React.createElement(Tooltip, {
|
|
26
28
|
placement: "top",
|
|
27
|
-
title:
|
|
29
|
+
title: t === null || t === void 0 || (_t$common = t.common) === null || _t$common === void 0 ? void 0 : _t$common.changeStatus
|
|
28
30
|
}, /*#__PURE__*/React.createElement(Switch, {
|
|
29
31
|
size: "medium",
|
|
30
32
|
checked: data === null || data === void 0 ? void 0 : data.isActive,
|