@banch0u/core-project-test-repository 2.3.20 → 2.3.22
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/translations/index.json +1799 -367
- package/package.json +1 -1
|
@@ -24,9 +24,14 @@ import Loading from "../../../components/Loading";
|
|
|
24
24
|
import Table from "../../../components/Table";
|
|
25
25
|
import Filter from "../../../components/Filter";
|
|
26
26
|
import { addChassisType, chassisTypeVisibility, deleteChassisType, editChassisType, getChassisTypes } from "../../../store/slices/questionnaire";
|
|
27
|
+
import text from "../../../translations/index.json";
|
|
28
|
+
import { useLang } from "../../../hooks/useLang";
|
|
27
29
|
var Content = Layout.Content;
|
|
28
30
|
var Item = Form.Item;
|
|
29
31
|
var QuestionnairesChassisTypesContent = function QuestionnairesChassisTypesContent() {
|
|
32
|
+
var _text$lang, _t$common, _t$titles, _t$common2, _t$common3, _t$common4, _t$common5, _t$messages, _t$fields, _t$common6, _t$common7;
|
|
33
|
+
var lang = useLang();
|
|
34
|
+
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;
|
|
30
35
|
var _useState = useState(null),
|
|
31
36
|
_useState2 = _slicedToArray(_useState, 2),
|
|
32
37
|
innerW = _useState2[0],
|
|
@@ -129,8 +134,8 @@ var QuestionnairesChassisTypesContent = function QuestionnairesChassisTypesConte
|
|
|
129
134
|
});
|
|
130
135
|
}
|
|
131
136
|
var columns = useMemo(function () {
|
|
132
|
-
return getStreetColumns(onEditClick, onDelete, onStatusChange, dispatch);
|
|
133
|
-
}, [onEditClick, onDelete, onStatusChange, dispatch]);
|
|
137
|
+
return getStreetColumns(t, onEditClick, onDelete, onStatusChange, dispatch);
|
|
138
|
+
}, [t, onEditClick, onDelete, onStatusChange, dispatch]);
|
|
134
139
|
var _useState1 = useState(columns.map(function (col) {
|
|
135
140
|
return col.dataIndex;
|
|
136
141
|
})),
|
|
@@ -166,7 +171,7 @@ var QuestionnairesChassisTypesContent = function QuestionnairesChassisTypesConte
|
|
|
166
171
|
}, /*#__PURE__*/React.createElement(Button, {
|
|
167
172
|
onClick: onClickModal,
|
|
168
173
|
color: "green"
|
|
169
|
-
}, /*#__PURE__*/React.createElement(PlusIcon, null), "
|
|
174
|
+
}, /*#__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, {
|
|
170
175
|
columns: columns,
|
|
171
176
|
selectedColumns: selectedColumns,
|
|
172
177
|
setQuery: setQuery,
|
|
@@ -178,7 +183,7 @@ var QuestionnairesChassisTypesContent = function QuestionnairesChassisTypesConte
|
|
|
178
183
|
className: style.content
|
|
179
184
|
}, /*#__PURE__*/React.createElement("div", {
|
|
180
185
|
className: style.table_header
|
|
181
|
-
}, /*#__PURE__*/React.createElement("h2", null,
|
|
186
|
+
}, /*#__PURE__*/React.createElement("h2", null, t === null || t === void 0 || (_t$titles = t.titles) === null || _t$titles === void 0 ? void 0 : _t$titles.chassisType), /*#__PURE__*/React.createElement("div", {
|
|
182
187
|
className: style.buttons
|
|
183
188
|
}, /*#__PURE__*/React.createElement(ColSort, {
|
|
184
189
|
columns: columns,
|
|
@@ -203,10 +208,10 @@ var QuestionnairesChassisTypesContent = function QuestionnairesChassisTypesConte
|
|
|
203
208
|
})), /*#__PURE__*/React.createElement(FormModal, {
|
|
204
209
|
ref: ref,
|
|
205
210
|
width: 454,
|
|
206
|
-
title:
|
|
207
|
-
titleEdit:
|
|
208
|
-
okText:
|
|
209
|
-
cancelText:
|
|
211
|
+
title: t === null || t === void 0 || (_t$common2 = t.common) === null || _t$common2 === void 0 ? void 0 : _t$common2.createQuestionnaire,
|
|
212
|
+
titleEdit: t === null || t === void 0 || (_t$common3 = t.common) === null || _t$common3 === void 0 ? void 0 : _t$common3.editQuestionnaire,
|
|
213
|
+
okText: t === null || t === void 0 || (_t$common4 = t.common) === null || _t$common4 === void 0 ? void 0 : _t$common4.save,
|
|
214
|
+
cancelText: t === null || t === void 0 || (_t$common5 = t.common) === null || _t$common5 === void 0 ? void 0 : _t$common5.close,
|
|
210
215
|
onSubmit: onSubmit,
|
|
211
216
|
onEdit: onEdit,
|
|
212
217
|
className: "absolute",
|
|
@@ -217,10 +222,10 @@ var QuestionnairesChassisTypesContent = function QuestionnairesChassisTypesConte
|
|
|
217
222
|
message: ""
|
|
218
223
|
}, {
|
|
219
224
|
min: 3,
|
|
220
|
-
message:
|
|
225
|
+
message: t === null || t === void 0 || (_t$messages = t.messages) === null || _t$messages === void 0 ? void 0 : _t$messages.minChars3
|
|
221
226
|
}],
|
|
222
227
|
name: "name",
|
|
223
|
-
label:
|
|
228
|
+
label: t === null || t === void 0 || (_t$fields = t.fields) === null || _t$fields === void 0 ? void 0 : _t$fields.name
|
|
224
229
|
}, /*#__PURE__*/React.createElement(Input, {
|
|
225
230
|
className: style.modal_input
|
|
226
231
|
}))), /*#__PURE__*/React.createElement(DeleteModal, {
|
|
@@ -235,13 +240,13 @@ var QuestionnairesChassisTypesContent = function QuestionnairesChassisTypesConte
|
|
|
235
240
|
onCancel: function onCancel() {
|
|
236
241
|
return dispatch(setDeleteModalVisible(false));
|
|
237
242
|
},
|
|
238
|
-
value:
|
|
243
|
+
value: t === null || t === void 0 || (_t$common6 = t.common) === null || _t$common6 === void 0 ? void 0 : _t$common6.questionnaireAcc
|
|
239
244
|
})), /*#__PURE__*/React.createElement(ViewModal, {
|
|
240
245
|
onCancel: closeOnViewModal,
|
|
241
246
|
width: 695
|
|
242
247
|
}, /*#__PURE__*/React.createElement(Success, {
|
|
243
248
|
onClick: closeOnViewModal,
|
|
244
|
-
value:
|
|
249
|
+
value: t === null || t === void 0 || (_t$common7 = t.common) === null || _t$common7 === void 0 ? void 0 : _t$common7.questionnaire
|
|
245
250
|
}))))));
|
|
246
251
|
};
|
|
247
252
|
export default QuestionnairesChassisTypesContent;
|
|
@@ -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, _t$fields3, _t$fields4, _t$fields5;
|
|
7
8
|
return [{
|
|
8
9
|
title: "№",
|
|
9
10
|
dataIndex: "num",
|
|
@@ -11,35 +12,36 @@ 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.casNumber,
|
|
21
22
|
dataIndex: "casNumber",
|
|
22
23
|
width: innerW,
|
|
23
24
|
ellipsis: true
|
|
24
25
|
}, {
|
|
25
|
-
title:
|
|
26
|
+
title: t === null || t === void 0 || (_t$fields3 = t.fields) === null || _t$fields3 === void 0 ? void 0 : _t$fields3.measurementUnit,
|
|
26
27
|
dataIndex: "unit",
|
|
27
28
|
width: innerW,
|
|
28
29
|
ellipsis: true
|
|
29
30
|
}, {
|
|
30
|
-
title:
|
|
31
|
+
title: t === null || t === void 0 || (_t$fields4 = t.fields) === null || _t$fields4 === void 0 ? void 0 : _t$fields4.note,
|
|
31
32
|
dataIndex: "description",
|
|
32
33
|
width: innerW,
|
|
33
34
|
ellipsis: true
|
|
34
35
|
}, {
|
|
35
|
-
title:
|
|
36
|
+
title: t === null || t === void 0 || (_t$fields5 = t.fields) === null || _t$fields5 === void 0 ? void 0 : _t$fields5.status,
|
|
36
37
|
key: "status",
|
|
37
38
|
disabled: true,
|
|
38
39
|
filter: false,
|
|
39
40
|
render: function render(data) {
|
|
41
|
+
var _t$common;
|
|
40
42
|
return /*#__PURE__*/React.createElement(Tooltip, {
|
|
41
43
|
placement: "top",
|
|
42
|
-
title:
|
|
44
|
+
title: t === null || t === void 0 || (_t$common = t.common) === null || _t$common === void 0 ? void 0 : _t$common.changeStatus
|
|
43
45
|
}, /*#__PURE__*/React.createElement(Switch, {
|
|
44
46
|
size: "medium",
|
|
45
47
|
checked: data === null || data === void 0 ? void 0 : data.isActive,
|
|
@@ -25,9 +25,14 @@ import Table from "../../../components/Table";
|
|
|
25
25
|
import Filter from "../../../components/Filter";
|
|
26
26
|
import { addChemicals, chemicalsVisibility, deleteChemicals, editChemicals, getChemicals } from "../../../store/slices/questionnaire";
|
|
27
27
|
import Select from "../../../components/Select";
|
|
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 QuestionnairesChemicalsContent = function QuestionnairesChemicalsContent() {
|
|
33
|
+
var _text$lang, _t$common, _t$titles, _t$common2, _t$common3, _t$common4, _t$common5, _t$messages, _t$fields, _t$fields2, _t$fields3, _t$options, _t$fields4, _t$common6, _t$common7;
|
|
34
|
+
var lang = useLang();
|
|
35
|
+
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;
|
|
31
36
|
var _useState = useState(null),
|
|
32
37
|
_useState2 = _slicedToArray(_useState, 2),
|
|
33
38
|
innerW = _useState2[0],
|
|
@@ -140,8 +145,8 @@ var QuestionnairesChemicalsContent = function QuestionnairesChemicalsContent() {
|
|
|
140
145
|
});
|
|
141
146
|
}
|
|
142
147
|
var columns = useMemo(function () {
|
|
143
|
-
return getStreetColumns(onEditClick, onDelete, onStatusChange, dispatch);
|
|
144
|
-
}, [onEditClick, onDelete, onStatusChange, dispatch]);
|
|
148
|
+
return getStreetColumns(t, onEditClick, onDelete, onStatusChange, dispatch);
|
|
149
|
+
}, [t, onEditClick, onDelete, onStatusChange, dispatch]);
|
|
145
150
|
var _useState11 = useState(columns.map(function (col) {
|
|
146
151
|
return col.dataIndex;
|
|
147
152
|
})),
|
|
@@ -177,7 +182,7 @@ var QuestionnairesChemicalsContent = function QuestionnairesChemicalsContent() {
|
|
|
177
182
|
}, /*#__PURE__*/React.createElement(Button, {
|
|
178
183
|
onClick: onClickModal,
|
|
179
184
|
color: "green"
|
|
180
|
-
}, " ", /*#__PURE__*/React.createElement(PlusIcon, null), "
|
|
185
|
+
}, " ", /*#__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, {
|
|
181
186
|
columns: columns,
|
|
182
187
|
selectedColumns: selectedColumns,
|
|
183
188
|
setQuery: setQuery,
|
|
@@ -189,7 +194,7 @@ var QuestionnairesChemicalsContent = function QuestionnairesChemicalsContent() {
|
|
|
189
194
|
className: style.content
|
|
190
195
|
}, /*#__PURE__*/React.createElement("div", {
|
|
191
196
|
className: style.table_header
|
|
192
|
-
}, /*#__PURE__*/React.createElement("h2", null,
|
|
197
|
+
}, /*#__PURE__*/React.createElement("h2", null, t === null || t === void 0 || (_t$titles = t.titles) === null || _t$titles === void 0 ? void 0 : _t$titles.chemicals), /*#__PURE__*/React.createElement("div", {
|
|
193
198
|
className: style.buttons
|
|
194
199
|
}, /*#__PURE__*/React.createElement(ColSort, {
|
|
195
200
|
columns: columns,
|
|
@@ -214,10 +219,10 @@ var QuestionnairesChemicalsContent = function QuestionnairesChemicalsContent() {
|
|
|
214
219
|
})), /*#__PURE__*/React.createElement(FormModal, {
|
|
215
220
|
ref: ref,
|
|
216
221
|
width: 454,
|
|
217
|
-
title:
|
|
218
|
-
titleEdit:
|
|
219
|
-
okText:
|
|
220
|
-
cancelText:
|
|
222
|
+
title: t === null || t === void 0 || (_t$common2 = t.common) === null || _t$common2 === void 0 ? void 0 : _t$common2.createQuestionnaire,
|
|
223
|
+
titleEdit: t === null || t === void 0 || (_t$common3 = t.common) === null || _t$common3 === void 0 ? void 0 : _t$common3.editQuestionnaire,
|
|
224
|
+
okText: t === null || t === void 0 || (_t$common4 = t.common) === null || _t$common4 === void 0 ? void 0 : _t$common4.save,
|
|
225
|
+
cancelText: t === null || t === void 0 || (_t$common5 = t.common) === null || _t$common5 === void 0 ? void 0 : _t$common5.close,
|
|
221
226
|
onSubmit: onSubmit,
|
|
222
227
|
onEdit: onEdit,
|
|
223
228
|
className: "absolute",
|
|
@@ -228,10 +233,10 @@ var QuestionnairesChemicalsContent = function QuestionnairesChemicalsContent() {
|
|
|
228
233
|
message: ""
|
|
229
234
|
}, {
|
|
230
235
|
min: 3,
|
|
231
|
-
message:
|
|
236
|
+
message: t === null || t === void 0 || (_t$messages = t.messages) === null || _t$messages === void 0 ? void 0 : _t$messages.minChars3
|
|
232
237
|
}],
|
|
233
238
|
name: "name",
|
|
234
|
-
label:
|
|
239
|
+
label: t === null || t === void 0 || (_t$fields = t.fields) === null || _t$fields === void 0 ? void 0 : _t$fields.name
|
|
235
240
|
}, /*#__PURE__*/React.createElement(Input, {
|
|
236
241
|
className: style.modal_input
|
|
237
242
|
})), /*#__PURE__*/React.createElement(Item, {
|
|
@@ -240,7 +245,7 @@ var QuestionnairesChemicalsContent = function QuestionnairesChemicalsContent() {
|
|
|
240
245
|
message: ""
|
|
241
246
|
}],
|
|
242
247
|
name: "casNumber",
|
|
243
|
-
label:
|
|
248
|
+
label: t === null || t === void 0 || (_t$fields2 = t.fields) === null || _t$fields2 === void 0 ? void 0 : _t$fields2.casNumber
|
|
244
249
|
}, /*#__PURE__*/React.createElement(Input, {
|
|
245
250
|
className: style.modal_input
|
|
246
251
|
})), /*#__PURE__*/React.createElement(Item, {
|
|
@@ -249,10 +254,10 @@ var QuestionnairesChemicalsContent = function QuestionnairesChemicalsContent() {
|
|
|
249
254
|
message: ""
|
|
250
255
|
}],
|
|
251
256
|
name: "unit",
|
|
252
|
-
label:
|
|
257
|
+
label: t === null || t === void 0 || (_t$fields3 = t.fields) === null || _t$fields3 === void 0 ? void 0 : _t$fields3.measurementUnit
|
|
253
258
|
}, /*#__PURE__*/React.createElement(Select, null, /*#__PURE__*/React.createElement(AntdSelect.Option, {
|
|
254
259
|
value: 1
|
|
255
|
-
},
|
|
260
|
+
}, t === null || t === void 0 || (_t$options = t.options) === null || _t$options === void 0 ? void 0 : _t$options.ml), /*#__PURE__*/React.createElement(AntdSelect.Option, {
|
|
256
261
|
value: 2
|
|
257
262
|
}, "G"), /*#__PURE__*/React.createElement(AntdSelect.Option, {
|
|
258
263
|
value: 3
|
|
@@ -262,7 +267,7 @@ var QuestionnairesChemicalsContent = function QuestionnairesChemicalsContent() {
|
|
|
262
267
|
message: ""
|
|
263
268
|
}],
|
|
264
269
|
name: "description",
|
|
265
|
-
label:
|
|
270
|
+
label: t === null || t === void 0 || (_t$fields4 = t.fields) === null || _t$fields4 === void 0 ? void 0 : _t$fields4.note
|
|
266
271
|
}, /*#__PURE__*/React.createElement(Input, {
|
|
267
272
|
className: style.modal_input
|
|
268
273
|
}))), /*#__PURE__*/React.createElement(DeleteModal, {
|
|
@@ -277,13 +282,13 @@ var QuestionnairesChemicalsContent = function QuestionnairesChemicalsContent() {
|
|
|
277
282
|
onCancel: function onCancel() {
|
|
278
283
|
return dispatch(setDeleteModalVisible(false));
|
|
279
284
|
},
|
|
280
|
-
value:
|
|
285
|
+
value: t === null || t === void 0 || (_t$common6 = t.common) === null || _t$common6 === void 0 ? void 0 : _t$common6.questionnaireAcc
|
|
281
286
|
})), /*#__PURE__*/React.createElement(ViewModal, {
|
|
282
287
|
onCancel: closeOnViewModal,
|
|
283
288
|
width: 695
|
|
284
289
|
}, /*#__PURE__*/React.createElement(Success, {
|
|
285
290
|
onClick: closeOnViewModal,
|
|
286
|
-
value:
|
|
291
|
+
value: t === null || t === void 0 || (_t$common7 = t.common) === null || _t$common7 === void 0 ? void 0 : _t$common7.questionnaire
|
|
287
292
|
}))))));
|
|
288
293
|
};
|
|
289
294
|
export default QuestionnairesChemicalsContent;
|
|
@@ -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.color,
|
|
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,
|
|
@@ -24,9 +24,14 @@ import Loading from "../../../components/Loading";
|
|
|
24
24
|
import Table from "../../../components/Table";
|
|
25
25
|
import Filter from "../../../components/Filter";
|
|
26
26
|
import { addColor, colorVisibility, deleteColor, editColor, getColor } from "../../../store/slices/questionnaire";
|
|
27
|
+
import text from "../../../translations/index.json";
|
|
28
|
+
import { useLang } from "../../../hooks/useLang";
|
|
27
29
|
var Content = Layout.Content;
|
|
28
30
|
var Item = Form.Item;
|
|
29
31
|
var QuestionnairesColorsContent = function QuestionnairesColorsContent() {
|
|
32
|
+
var _text$lang, _t$common, _t$titles, _t$common2, _t$common3, _t$common4, _t$common5, _t$messages, _t$fields, _t$common6, _t$common7;
|
|
33
|
+
var lang = useLang();
|
|
34
|
+
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;
|
|
30
35
|
var _useState = useState(null),
|
|
31
36
|
_useState2 = _slicedToArray(_useState, 2),
|
|
32
37
|
innerW = _useState2[0],
|
|
@@ -129,8 +134,8 @@ var QuestionnairesColorsContent = function QuestionnairesColorsContent() {
|
|
|
129
134
|
});
|
|
130
135
|
}
|
|
131
136
|
var columns = useMemo(function () {
|
|
132
|
-
return getStreetColumns(onEditClick, onDelete, onStatusChange, dispatch);
|
|
133
|
-
}, [onEditClick, onDelete, onStatusChange, dispatch]);
|
|
137
|
+
return getStreetColumns(t, onEditClick, onDelete, onStatusChange, dispatch);
|
|
138
|
+
}, [t, onEditClick, onDelete, onStatusChange, dispatch]);
|
|
134
139
|
var _useState1 = useState(columns.map(function (col) {
|
|
135
140
|
return col.dataIndex;
|
|
136
141
|
})),
|
|
@@ -166,7 +171,7 @@ var QuestionnairesColorsContent = function QuestionnairesColorsContent() {
|
|
|
166
171
|
}, /*#__PURE__*/React.createElement(Button, {
|
|
167
172
|
onClick: onClickModal,
|
|
168
173
|
color: "green"
|
|
169
|
-
}, /*#__PURE__*/React.createElement(PlusIcon, null), "
|
|
174
|
+
}, /*#__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, {
|
|
170
175
|
columns: columns,
|
|
171
176
|
selectedColumns: selectedColumns,
|
|
172
177
|
setQuery: setQuery,
|
|
@@ -178,7 +183,7 @@ var QuestionnairesColorsContent = function QuestionnairesColorsContent() {
|
|
|
178
183
|
className: style.content
|
|
179
184
|
}, /*#__PURE__*/React.createElement("div", {
|
|
180
185
|
className: style.table_header
|
|
181
|
-
}, /*#__PURE__*/React.createElement("h2", null,
|
|
186
|
+
}, /*#__PURE__*/React.createElement("h2", null, t === null || t === void 0 || (_t$titles = t.titles) === null || _t$titles === void 0 ? void 0 : _t$titles.colors), /*#__PURE__*/React.createElement("div", {
|
|
182
187
|
className: style.buttons
|
|
183
188
|
}, /*#__PURE__*/React.createElement(ColSort, {
|
|
184
189
|
columns: columns,
|
|
@@ -203,10 +208,10 @@ var QuestionnairesColorsContent = function QuestionnairesColorsContent() {
|
|
|
203
208
|
})), /*#__PURE__*/React.createElement(FormModal, {
|
|
204
209
|
ref: ref,
|
|
205
210
|
width: 454,
|
|
206
|
-
title:
|
|
207
|
-
titleEdit:
|
|
208
|
-
okText:
|
|
209
|
-
cancelText:
|
|
211
|
+
title: t === null || t === void 0 || (_t$common2 = t.common) === null || _t$common2 === void 0 ? void 0 : _t$common2.createQuestionnaire,
|
|
212
|
+
titleEdit: t === null || t === void 0 || (_t$common3 = t.common) === null || _t$common3 === void 0 ? void 0 : _t$common3.editQuestionnaire,
|
|
213
|
+
okText: t === null || t === void 0 || (_t$common4 = t.common) === null || _t$common4 === void 0 ? void 0 : _t$common4.save,
|
|
214
|
+
cancelText: t === null || t === void 0 || (_t$common5 = t.common) === null || _t$common5 === void 0 ? void 0 : _t$common5.close,
|
|
210
215
|
onSubmit: onSubmit,
|
|
211
216
|
onEdit: onEdit,
|
|
212
217
|
className: "absolute",
|
|
@@ -217,10 +222,10 @@ var QuestionnairesColorsContent = function QuestionnairesColorsContent() {
|
|
|
217
222
|
message: ""
|
|
218
223
|
}, {
|
|
219
224
|
min: 2,
|
|
220
|
-
message:
|
|
225
|
+
message: t === null || t === void 0 || (_t$messages = t.messages) === null || _t$messages === void 0 ? void 0 : _t$messages.minChars2
|
|
221
226
|
}],
|
|
222
227
|
name: "name",
|
|
223
|
-
label:
|
|
228
|
+
label: t === null || t === void 0 || (_t$fields = t.fields) === null || _t$fields === void 0 ? void 0 : _t$fields.name
|
|
224
229
|
}, /*#__PURE__*/React.createElement(Input, {
|
|
225
230
|
className: style.modal_input
|
|
226
231
|
}))), /*#__PURE__*/React.createElement(DeleteModal, {
|
|
@@ -235,13 +240,13 @@ var QuestionnairesColorsContent = function QuestionnairesColorsContent() {
|
|
|
235
240
|
onCancel: function onCancel() {
|
|
236
241
|
return dispatch(setDeleteModalVisible(false));
|
|
237
242
|
},
|
|
238
|
-
value:
|
|
243
|
+
value: t === null || t === void 0 || (_t$common6 = t.common) === null || _t$common6 === void 0 ? void 0 : _t$common6.questionnaireAcc
|
|
239
244
|
})), /*#__PURE__*/React.createElement(ViewModal, {
|
|
240
245
|
onCancel: closeOnViewModal,
|
|
241
246
|
width: 695
|
|
242
247
|
}, /*#__PURE__*/React.createElement(Success, {
|
|
243
248
|
onClick: closeOnViewModal,
|
|
244
|
-
value:
|
|
249
|
+
value: t === null || t === void 0 || (_t$common7 = t.common) === null || _t$common7 === void 0 ? void 0 : _t$common7.questionnaire
|
|
245
250
|
}))))));
|
|
246
251
|
};
|
|
247
252
|
export default QuestionnairesColorsContent;
|
|
@@ -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, _t$fields3;
|
|
7
8
|
return [{
|
|
8
9
|
title: "№",
|
|
9
10
|
dataIndex: "num",
|
|
@@ -12,23 +13,24 @@ export var getStreetColumns = function getStreetColumns(onEditClick, onDelete, o
|
|
|
12
13
|
width: 35
|
|
13
14
|
}, {
|
|
14
15
|
key: "name",
|
|
15
|
-
title:
|
|
16
|
+
title: t === null || t === void 0 || (_t$fields = t.fields) === null || _t$fields === void 0 ? void 0 : _t$fields.name,
|
|
16
17
|
dataIndex: "name",
|
|
17
18
|
disabled: true
|
|
18
19
|
}, {
|
|
19
20
|
key: "fullName",
|
|
20
|
-
title:
|
|
21
|
+
title: t === null || t === void 0 || (_t$fields2 = t.fields) === null || _t$fields2 === void 0 ? void 0 : _t$fields2.fullName,
|
|
21
22
|
dataIndex: "fullName",
|
|
22
23
|
disabled: false
|
|
23
24
|
}, {
|
|
24
|
-
title:
|
|
25
|
+
title: t === null || t === void 0 || (_t$fields3 = t.fields) === null || _t$fields3 === void 0 ? void 0 : _t$fields3.status,
|
|
25
26
|
key: "status",
|
|
26
27
|
disabled: true,
|
|
27
28
|
filter: false,
|
|
28
29
|
render: function render(data) {
|
|
30
|
+
var _t$common;
|
|
29
31
|
return /*#__PURE__*/React.createElement(Tooltip, {
|
|
30
32
|
placement: "top",
|
|
31
|
-
title:
|
|
33
|
+
title: t === null || t === void 0 || (_t$common = t.common) === null || _t$common === void 0 ? void 0 : _t$common.changeStatus
|
|
32
34
|
}, /*#__PURE__*/React.createElement(Switch, {
|
|
33
35
|
size: "medium",
|
|
34
36
|
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 { addCompanies, deleteCompanies, companiesVisibility, editCompanies, getCompanies } 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$fields2, _t$options, _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],
|
|
@@ -147,8 +152,8 @@ var QuestionnairesDocumentTypeContent = function QuestionnairesDocumentTypeConte
|
|
|
147
152
|
});
|
|
148
153
|
}
|
|
149
154
|
var columns = useMemo(function () {
|
|
150
|
-
return getStreetColumns(onEditClick, onDelete, onStatusChange, dispatch);
|
|
151
|
-
}, [onEditClick, onDelete, onStatusChange, dispatch]);
|
|
155
|
+
return getStreetColumns(t, onEditClick, onDelete, onStatusChange, dispatch);
|
|
156
|
+
}, [t, onEditClick, onDelete, onStatusChange, dispatch]);
|
|
152
157
|
var _useState1 = useState(columns.map(function (col) {
|
|
153
158
|
return col.dataIndex;
|
|
154
159
|
})),
|
|
@@ -184,7 +189,7 @@ var QuestionnairesDocumentTypeContent = function QuestionnairesDocumentTypeConte
|
|
|
184
189
|
}, /*#__PURE__*/React.createElement(Button, {
|
|
185
190
|
onClick: onClickModal,
|
|
186
191
|
color: "green"
|
|
187
|
-
}, " ", /*#__PURE__*/React.createElement(PlusIcon, null), "
|
|
192
|
+
}, " ", /*#__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, {
|
|
188
193
|
columns: columns,
|
|
189
194
|
selectedColumns: selectedColumns,
|
|
190
195
|
setQuery: setQuery,
|
|
@@ -196,7 +201,7 @@ var QuestionnairesDocumentTypeContent = function QuestionnairesDocumentTypeConte
|
|
|
196
201
|
className: style.content
|
|
197
202
|
}, /*#__PURE__*/React.createElement("div", {
|
|
198
203
|
className: style.table_header
|
|
199
|
-
}, /*#__PURE__*/React.createElement("h2", null,
|
|
204
|
+
}, /*#__PURE__*/React.createElement("h2", null, t === null || t === void 0 || (_t$titles = t.titles) === null || _t$titles === void 0 ? void 0 : _t$titles.companies), /*#__PURE__*/React.createElement("div", {
|
|
200
205
|
className: style.buttons
|
|
201
206
|
}, /*#__PURE__*/React.createElement(ColSort, {
|
|
202
207
|
columns: columns,
|
|
@@ -221,10 +226,10 @@ var QuestionnairesDocumentTypeContent = function QuestionnairesDocumentTypeConte
|
|
|
221
226
|
})), /*#__PURE__*/React.createElement(FormModal, {
|
|
222
227
|
ref: ref,
|
|
223
228
|
width: 454,
|
|
224
|
-
title:
|
|
225
|
-
titleEdit:
|
|
226
|
-
okText:
|
|
227
|
-
cancelText:
|
|
229
|
+
title: t === null || t === void 0 || (_t$common2 = t.common) === null || _t$common2 === void 0 ? void 0 : _t$common2.createQuestionnaire,
|
|
230
|
+
titleEdit: t === null || t === void 0 || (_t$common3 = t.common) === null || _t$common3 === void 0 ? void 0 : _t$common3.editQuestionnaire,
|
|
231
|
+
okText: t === null || t === void 0 || (_t$common4 = t.common) === null || _t$common4 === void 0 ? void 0 : _t$common4.save,
|
|
232
|
+
cancelText: t === null || t === void 0 || (_t$common5 = t.common) === null || _t$common5 === void 0 ? void 0 : _t$common5.close,
|
|
228
233
|
onSubmit: onSubmit,
|
|
229
234
|
onEdit: onEdit,
|
|
230
235
|
className: "absolute",
|
|
@@ -236,7 +241,7 @@ var QuestionnairesDocumentTypeContent = function QuestionnairesDocumentTypeConte
|
|
|
236
241
|
message: ""
|
|
237
242
|
}],
|
|
238
243
|
name: "name",
|
|
239
|
-
label:
|
|
244
|
+
label: t === null || t === void 0 || (_t$fields = t.fields) === null || _t$fields === void 0 ? void 0 : _t$fields.name
|
|
240
245
|
}, /*#__PURE__*/React.createElement(Input, {
|
|
241
246
|
className: style.modal_input,
|
|
242
247
|
type: "text"
|
|
@@ -246,7 +251,7 @@ var QuestionnairesDocumentTypeContent = function QuestionnairesDocumentTypeConte
|
|
|
246
251
|
message: ""
|
|
247
252
|
}],
|
|
248
253
|
name: "fullName",
|
|
249
|
-
label:
|
|
254
|
+
label: t === null || t === void 0 || (_t$fields2 = t.fields) === null || _t$fields2 === void 0 ? void 0 : _t$fields2.fullName
|
|
250
255
|
}, /*#__PURE__*/React.createElement(Input, {
|
|
251
256
|
className: style.modal_input,
|
|
252
257
|
type: "text"
|
|
@@ -254,7 +259,7 @@ var QuestionnairesDocumentTypeContent = function QuestionnairesDocumentTypeConte
|
|
|
254
259
|
className: style.label,
|
|
255
260
|
name: "isCurrentCompany",
|
|
256
261
|
valuePropName: "checked"
|
|
257
|
-
}, /*#__PURE__*/React.createElement(Checkbox, null,
|
|
262
|
+
}, /*#__PURE__*/React.createElement(Checkbox, null, t === null || t === void 0 || (_t$options = t.options) === null || _t$options === void 0 ? void 0 : _t$options.currentCompany))), /*#__PURE__*/React.createElement(DeleteModal, {
|
|
258
263
|
onCancel: function onCancel() {
|
|
259
264
|
return dispatch(setDeleteModalVisible(false));
|
|
260
265
|
},
|
|
@@ -266,13 +271,13 @@ var QuestionnairesDocumentTypeContent = function QuestionnairesDocumentTypeConte
|
|
|
266
271
|
onCancel: function onCancel() {
|
|
267
272
|
return dispatch(setDeleteModalVisible(false));
|
|
268
273
|
},
|
|
269
|
-
value:
|
|
274
|
+
value: t === null || t === void 0 || (_t$common6 = t.common) === null || _t$common6 === void 0 ? void 0 : _t$common6.questionnaireAcc
|
|
270
275
|
})), /*#__PURE__*/React.createElement(ViewModal, {
|
|
271
276
|
onCancel: closeOnViewModal,
|
|
272
277
|
width: 695
|
|
273
278
|
}, /*#__PURE__*/React.createElement(Success, {
|
|
274
279
|
onClick: closeOnViewModal,
|
|
275
|
-
value:
|
|
280
|
+
value: t === null || t === void 0 || (_t$common7 = t.common) === null || _t$common7 === void 0 ? void 0 : _t$common7.questionnaire
|
|
276
281
|
}))))));
|
|
277
282
|
};
|
|
278
283
|
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$titles, _t$fields;
|
|
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$titles = t.titles) === null || _t$titles === void 0 ? void 0 : _t$titles.contractTopics,
|
|
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$fields = t.fields) === null || _t$fields === void 0 ? void 0 : _t$fields.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,
|