@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
|
@@ -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 { addPentions, deletePentions, editPentions, getPentions, pentionsVisibility } 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 QuestionnairesPentionsContent = function QuestionnairesPentionsContent() {
|
|
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 QuestionnairesPentionsContent = function QuestionnairesPentionsContent() {
|
|
|
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 QuestionnairesPentionsContent = function QuestionnairesPentionsContent() {
|
|
|
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 QuestionnairesPentionsContent = function QuestionnairesPentionsContent() {
|
|
|
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.pensionType), /*#__PURE__*/React.createElement("div", {
|
|
182
187
|
className: style.buttons
|
|
183
188
|
}, /*#__PURE__*/React.createElement(ColSort, {
|
|
184
189
|
columns: columns,
|
|
@@ -203,10 +208,10 @@ var QuestionnairesPentionsContent = function QuestionnairesPentionsContent() {
|
|
|
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 QuestionnairesPentionsContent = function QuestionnairesPentionsContent() {
|
|
|
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 QuestionnairesPentionsContent = function QuestionnairesPentionsContent() {
|
|
|
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 QuestionnairesPentionsContent;
|
|
@@ -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, positionOption, categoryOption) {
|
|
6
|
+
export var getStreetColumns = function getStreetColumns(t, onEditClick, onDelete, onStatusChange, dispatch, positionOption, categoryOption) {
|
|
7
|
+
var _t$fields, _t$common, _t$fields2, _t$fields3, _t$fields4;
|
|
7
8
|
return [{
|
|
8
9
|
title: "№",
|
|
9
10
|
dataIndex: "num",
|
|
@@ -12,33 +13,34 @@ export var getStreetColumns = function getStreetColumns(onEditClick, onDelete, o
|
|
|
12
13
|
width: 35
|
|
13
14
|
}, {
|
|
14
15
|
key: "position_name",
|
|
15
|
-
title:
|
|
16
|
+
title: t === null || t === void 0 || (_t$fields = t.fields) === null || _t$fields === void 0 ? void 0 : _t$fields.positionName,
|
|
16
17
|
filterKey: "ids",
|
|
17
18
|
dataIndex: "name"
|
|
18
19
|
}, {
|
|
19
20
|
key: "category_name",
|
|
20
|
-
title:
|
|
21
|
+
title: t === null || t === void 0 || (_t$common = t.common) === null || _t$common === void 0 ? void 0 : _t$common.category,
|
|
21
22
|
filterKey: "categories",
|
|
22
23
|
dataIndex: "categoryId"
|
|
23
24
|
}, {
|
|
24
25
|
key: "from",
|
|
25
|
-
title:
|
|
26
|
+
title: t === null || t === void 0 || (_t$fields2 = t.fields) === null || _t$fields2 === void 0 ? void 0 : _t$fields2.fromGrade,
|
|
26
27
|
filterKey: "ids",
|
|
27
28
|
dataIndex: "from"
|
|
28
29
|
}, {
|
|
29
30
|
key: "to",
|
|
30
|
-
title:
|
|
31
|
+
title: t === null || t === void 0 || (_t$fields3 = t.fields) === null || _t$fields3 === void 0 ? void 0 : _t$fields3.toGrade,
|
|
31
32
|
filterKey: "ids",
|
|
32
33
|
dataIndex: "to"
|
|
33
34
|
}, {
|
|
34
|
-
title:
|
|
35
|
+
title: t === null || t === void 0 || (_t$fields4 = t.fields) === null || _t$fields4 === void 0 ? void 0 : _t$fields4.status,
|
|
35
36
|
key: "status",
|
|
36
37
|
disabled: true,
|
|
37
38
|
filter: false,
|
|
38
39
|
render: function render(data) {
|
|
40
|
+
var _t$common2;
|
|
39
41
|
return /*#__PURE__*/React.createElement(Tooltip, {
|
|
40
42
|
placement: "top",
|
|
41
|
-
title:
|
|
43
|
+
title: t === null || t === void 0 || (_t$common2 = t.common) === null || _t$common2 === void 0 ? void 0 : _t$common2.changeStatus
|
|
42
44
|
}, /*#__PURE__*/React.createElement(Switch, {
|
|
43
45
|
size: "medium",
|
|
44
46
|
checked: data === null || data === void 0 ? void 0 : data.isActive,
|
|
@@ -29,9 +29,14 @@ import Filter from "../../../components/Filter";
|
|
|
29
29
|
import { addPositions, deletePositions, positionsVisibility, editPositions, getPositions, getPositionsAll, getCategoriesAll } from "../../../store/slices/questionnaire";
|
|
30
30
|
import api from "../../../utils/axios";
|
|
31
31
|
import dayjs from "dayjs";
|
|
32
|
+
import text from "../../../translations/index.json";
|
|
33
|
+
import { useLang } from "../../../hooks/useLang";
|
|
32
34
|
var Content = Layout.Content;
|
|
33
35
|
var Item = Form.Item;
|
|
34
36
|
var QuestionnairesDocumentTypeContent = function QuestionnairesDocumentTypeContent() {
|
|
37
|
+
var _text$lang, _t$common, _t$titles, _t$common2, _t$common3, _t$common4, _t$common5, _t$fields, _t$common6, _t$options, _t$common7, _t$common8;
|
|
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],
|
|
@@ -212,8 +217,8 @@ var QuestionnairesDocumentTypeContent = function QuestionnairesDocumentTypeConte
|
|
|
212
217
|
});
|
|
213
218
|
}
|
|
214
219
|
var columns = useMemo(function () {
|
|
215
|
-
return getStreetColumns(onEditClick, onDelete, onStatusChange, dispatch, positionOption, categoryOption);
|
|
216
|
-
}, [onEditClick, onDelete, onStatusChange, dispatch, positionOption, categoryOption]);
|
|
220
|
+
return getStreetColumns(t, onEditClick, onDelete, onStatusChange, dispatch, positionOption, categoryOption);
|
|
221
|
+
}, [t, onEditClick, onDelete, onStatusChange, dispatch, positionOption, categoryOption]);
|
|
217
222
|
var _useState1 = useState(columns.map(function (col) {
|
|
218
223
|
return col.dataIndex;
|
|
219
224
|
})),
|
|
@@ -257,7 +262,7 @@ var QuestionnairesDocumentTypeContent = function QuestionnairesDocumentTypeConte
|
|
|
257
262
|
}, /*#__PURE__*/React.createElement(Button, {
|
|
258
263
|
onClick: onClickModal,
|
|
259
264
|
color: "green"
|
|
260
|
-
}, " ", /*#__PURE__*/React.createElement(PlusIcon, null), "
|
|
265
|
+
}, " ", /*#__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, {
|
|
261
266
|
columns: columns,
|
|
262
267
|
selectedColumns: selectedColumns,
|
|
263
268
|
setQuery: setQuery,
|
|
@@ -269,7 +274,7 @@ var QuestionnairesDocumentTypeContent = function QuestionnairesDocumentTypeConte
|
|
|
269
274
|
className: style.content
|
|
270
275
|
}, /*#__PURE__*/React.createElement("div", {
|
|
271
276
|
className: style.table_header
|
|
272
|
-
}, /*#__PURE__*/React.createElement("h2", null,
|
|
277
|
+
}, /*#__PURE__*/React.createElement("h2", null, t === null || t === void 0 || (_t$titles = t.titles) === null || _t$titles === void 0 ? void 0 : _t$titles.positions), /*#__PURE__*/React.createElement("div", {
|
|
273
278
|
className: style.buttons
|
|
274
279
|
}, /*#__PURE__*/React.createElement(ColSort, {
|
|
275
280
|
columns: columns,
|
|
@@ -294,10 +299,10 @@ var QuestionnairesDocumentTypeContent = function QuestionnairesDocumentTypeConte
|
|
|
294
299
|
})), /*#__PURE__*/React.createElement(FormModal, {
|
|
295
300
|
ref: ref,
|
|
296
301
|
width: 454,
|
|
297
|
-
title:
|
|
298
|
-
titleEdit:
|
|
299
|
-
okText:
|
|
300
|
-
cancelText:
|
|
302
|
+
title: t === null || t === void 0 || (_t$common2 = t.common) === null || _t$common2 === void 0 ? void 0 : _t$common2.createQuestionnaire,
|
|
303
|
+
titleEdit: t === null || t === void 0 || (_t$common3 = t.common) === null || _t$common3 === void 0 ? void 0 : _t$common3.editQuestionnaire,
|
|
304
|
+
okText: t === null || t === void 0 || (_t$common4 = t.common) === null || _t$common4 === void 0 ? void 0 : _t$common4.save,
|
|
305
|
+
cancelText: t === null || t === void 0 || (_t$common5 = t.common) === null || _t$common5 === void 0 ? void 0 : _t$common5.close,
|
|
301
306
|
onSubmit: onSubmit,
|
|
302
307
|
onEdit: onEdit,
|
|
303
308
|
className: "absolute",
|
|
@@ -309,13 +314,13 @@ var QuestionnairesDocumentTypeContent = function QuestionnairesDocumentTypeConte
|
|
|
309
314
|
message: ""
|
|
310
315
|
}],
|
|
311
316
|
name: "name",
|
|
312
|
-
label:
|
|
317
|
+
label: t === null || t === void 0 || (_t$fields = t.fields) === null || _t$fields === void 0 ? void 0 : _t$fields.position
|
|
313
318
|
}, /*#__PURE__*/React.createElement(Input, {
|
|
314
319
|
className: style.modal_input,
|
|
315
320
|
type: "text"
|
|
316
321
|
})), /*#__PURE__*/React.createElement(Item, {
|
|
317
322
|
name: "categoryId",
|
|
318
|
-
label:
|
|
323
|
+
label: t === null || t === void 0 || (_t$common6 = t.common) === null || _t$common6 === void 0 ? void 0 : _t$common6.category,
|
|
319
324
|
className: style.modal_input
|
|
320
325
|
}, /*#__PURE__*/React.createElement(Select, {
|
|
321
326
|
className: style.modal_input,
|
|
@@ -328,7 +333,7 @@ var QuestionnairesDocumentTypeContent = function QuestionnairesDocumentTypeConte
|
|
|
328
333
|
style: {
|
|
329
334
|
marginTop: "25px"
|
|
330
335
|
}
|
|
331
|
-
},
|
|
336
|
+
}, t === null || t === void 0 || (_t$options = t.options) === null || _t$options === void 0 ? void 0 : _t$options.hasGrade)), /*#__PURE__*/React.createElement(Form.Item, {
|
|
332
337
|
shouldUpdate: function shouldUpdate(prev, curr) {
|
|
333
338
|
return prev.hasDegree !== curr.hasDegree;
|
|
334
339
|
}
|
|
@@ -416,13 +421,13 @@ var QuestionnairesDocumentTypeContent = function QuestionnairesDocumentTypeConte
|
|
|
416
421
|
onCancel: function onCancel() {
|
|
417
422
|
return dispatch(setDeleteModalVisible(false));
|
|
418
423
|
},
|
|
419
|
-
value:
|
|
424
|
+
value: t === null || t === void 0 || (_t$common7 = t.common) === null || _t$common7 === void 0 ? void 0 : _t$common7.questionnaireAcc
|
|
420
425
|
})), /*#__PURE__*/React.createElement(ViewModal, {
|
|
421
426
|
onCancel: closeOnViewModal,
|
|
422
427
|
width: 695
|
|
423
428
|
}, /*#__PURE__*/React.createElement(Success, {
|
|
424
429
|
onClick: closeOnViewModal,
|
|
425
|
-
value:
|
|
430
|
+
value: t === null || t === void 0 || (_t$common8 = t.common) === null || _t$common8 === void 0 ? void 0 : _t$common8.questionnaire
|
|
426
431
|
}))))));
|
|
427
432
|
};
|
|
428
433
|
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.projects,
|
|
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,
|
|
@@ -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 { addProjects, deleteProjects, editProjects, getProjects, projectsVisibility } 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 QuestionnairesProjectsContent = function QuestionnairesProjectsContent() {
|
|
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 QuestionnairesProjectsContent = function QuestionnairesProjectsContent() {
|
|
|
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 QuestionnairesProjectsContent = function QuestionnairesProjectsContent() {
|
|
|
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 QuestionnairesProjectsContent = function QuestionnairesProjectsContent() {
|
|
|
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.projects), /*#__PURE__*/React.createElement("div", {
|
|
182
187
|
className: style.buttons
|
|
183
188
|
}, /*#__PURE__*/React.createElement(ColSort, {
|
|
184
189
|
columns: columns,
|
|
@@ -203,10 +208,10 @@ var QuestionnairesProjectsContent = function QuestionnairesProjectsContent() {
|
|
|
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 QuestionnairesProjectsContent = function QuestionnairesProjectsContent() {
|
|
|
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 QuestionnairesProjectsContent = function QuestionnairesProjectsContent() {
|
|
|
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 QuestionnairesProjectsContent;
|
|
@@ -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;
|
|
7
8
|
return [{
|
|
8
9
|
title: "№",
|
|
9
10
|
dataIndex: "num",
|
|
@@ -11,30 +12,31 @@ 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
21
|
key: "zip",
|
|
21
|
-
title:
|
|
22
|
+
title: t === null || t === void 0 || (_t$fields2 = t.fields) === null || _t$fields2 === void 0 ? void 0 : _t$fields2.postalCode,
|
|
22
23
|
dataIndex: "zip",
|
|
23
24
|
ellipsis: true
|
|
24
25
|
}, {
|
|
25
26
|
key: "city_code",
|
|
26
|
-
title:
|
|
27
|
+
title: t === null || t === void 0 || (_t$fields3 = t.fields) === null || _t$fields3 === void 0 ? void 0 : _t$fields3.cityCode,
|
|
27
28
|
dataIndex: "parentDetailedName",
|
|
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.status,
|
|
31
32
|
key: "status",
|
|
32
33
|
disabled: true,
|
|
33
34
|
filter: false,
|
|
34
35
|
render: function render(data) {
|
|
36
|
+
var _t$common;
|
|
35
37
|
return /*#__PURE__*/React.createElement(Tooltip, {
|
|
36
38
|
placement: "top",
|
|
37
|
-
title:
|
|
39
|
+
title: t === null || t === void 0 || (_t$common = t.common) === null || _t$common === void 0 ? void 0 : _t$common.changeStatus
|
|
38
40
|
}, /*#__PURE__*/React.createElement(Switch, {
|
|
39
41
|
size: "medium",
|
|
40
42
|
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 { addRegions, deleteRegions, regionsVisibility, editRegions, getRegions, getRegionsChildren } 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$messages2, _t$fields2, _t$fields3, _t$fields4, _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],
|
|
@@ -157,8 +162,8 @@ var QuestionnairesDocumentTypeContent = function QuestionnairesDocumentTypeConte
|
|
|
157
162
|
});
|
|
158
163
|
}
|
|
159
164
|
var columns = useMemo(function () {
|
|
160
|
-
return getStreetColumns(onEditClick, onDelete, onStatusChange, dispatch);
|
|
161
|
-
}, [onEditClick, onDelete, onStatusChange, dispatch]);
|
|
165
|
+
return getStreetColumns(t, onEditClick, onDelete, onStatusChange, dispatch);
|
|
166
|
+
}, [t, onEditClick, onDelete, onStatusChange, dispatch]);
|
|
162
167
|
var _useState1 = useState(columns.map(function (col) {
|
|
163
168
|
return col.dataIndex;
|
|
164
169
|
})),
|
|
@@ -197,7 +202,7 @@ var QuestionnairesDocumentTypeContent = function QuestionnairesDocumentTypeConte
|
|
|
197
202
|
}, /*#__PURE__*/React.createElement(Button, {
|
|
198
203
|
onClick: onClickModal,
|
|
199
204
|
color: "green"
|
|
200
|
-
}, " ", /*#__PURE__*/React.createElement(PlusIcon, null), "
|
|
205
|
+
}, " ", /*#__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, {
|
|
201
206
|
columns: columns,
|
|
202
207
|
selectedColumns: selectedColumns,
|
|
203
208
|
setQuery: setQuery,
|
|
@@ -209,7 +214,7 @@ var QuestionnairesDocumentTypeContent = function QuestionnairesDocumentTypeConte
|
|
|
209
214
|
className: style.content
|
|
210
215
|
}, /*#__PURE__*/React.createElement("div", {
|
|
211
216
|
className: style.table_header
|
|
212
|
-
}, /*#__PURE__*/React.createElement("h2", null,
|
|
217
|
+
}, /*#__PURE__*/React.createElement("h2", null, t === null || t === void 0 || (_t$titles = t.titles) === null || _t$titles === void 0 ? void 0 : _t$titles.streets), /*#__PURE__*/React.createElement("div", {
|
|
213
218
|
className: style.buttons
|
|
214
219
|
}, /*#__PURE__*/React.createElement(ColSort, {
|
|
215
220
|
columns: columns,
|
|
@@ -234,10 +239,10 @@ var QuestionnairesDocumentTypeContent = function QuestionnairesDocumentTypeConte
|
|
|
234
239
|
})), /*#__PURE__*/React.createElement(FormModal, {
|
|
235
240
|
ref: ref,
|
|
236
241
|
width: 454,
|
|
237
|
-
title:
|
|
238
|
-
titleEdit:
|
|
239
|
-
okText:
|
|
240
|
-
cancelText:
|
|
242
|
+
title: t === null || t === void 0 || (_t$common2 = t.common) === null || _t$common2 === void 0 ? void 0 : _t$common2.createQuestionnaire,
|
|
243
|
+
titleEdit: t === null || t === void 0 || (_t$common3 = t.common) === null || _t$common3 === void 0 ? void 0 : _t$common3.editQuestionnaire,
|
|
244
|
+
okText: t === null || t === void 0 || (_t$common4 = t.common) === null || _t$common4 === void 0 ? void 0 : _t$common4.save,
|
|
245
|
+
cancelText: t === null || t === void 0 || (_t$common5 = t.common) === null || _t$common5 === void 0 ? void 0 : _t$common5.close,
|
|
241
246
|
onSubmit: onSubmit,
|
|
242
247
|
onEdit: onEdit,
|
|
243
248
|
className: "absolute",
|
|
@@ -248,10 +253,10 @@ var QuestionnairesDocumentTypeContent = function QuestionnairesDocumentTypeConte
|
|
|
248
253
|
message: ""
|
|
249
254
|
}, {
|
|
250
255
|
min: 3,
|
|
251
|
-
message:
|
|
256
|
+
message: t === null || t === void 0 || (_t$messages = t.messages) === null || _t$messages === void 0 ? void 0 : _t$messages.minChars3
|
|
252
257
|
}],
|
|
253
258
|
name: "name",
|
|
254
|
-
label:
|
|
259
|
+
label: t === null || t === void 0 || (_t$fields = t.fields) === null || _t$fields === void 0 ? void 0 : _t$fields.name
|
|
255
260
|
}, /*#__PURE__*/React.createElement(Input, {
|
|
256
261
|
className: style.modal_input
|
|
257
262
|
})), /*#__PURE__*/React.createElement(Item, {
|
|
@@ -260,10 +265,10 @@ var QuestionnairesDocumentTypeContent = function QuestionnairesDocumentTypeConte
|
|
|
260
265
|
message: ""
|
|
261
266
|
}, {
|
|
262
267
|
min: 3,
|
|
263
|
-
message:
|
|
268
|
+
message: t === null || t === void 0 || (_t$messages2 = t.messages) === null || _t$messages2 === void 0 ? void 0 : _t$messages2.minChars3
|
|
264
269
|
}],
|
|
265
270
|
name: "name",
|
|
266
|
-
label:
|
|
271
|
+
label: t === null || t === void 0 || (_t$fields2 = t.fields) === null || _t$fields2 === void 0 ? void 0 : _t$fields2.name
|
|
267
272
|
}, /*#__PURE__*/React.createElement(Input, {
|
|
268
273
|
className: style.modal_input
|
|
269
274
|
})), /*#__PURE__*/React.createElement(Item, {
|
|
@@ -272,7 +277,7 @@ var QuestionnairesDocumentTypeContent = function QuestionnairesDocumentTypeConte
|
|
|
272
277
|
message: ""
|
|
273
278
|
}],
|
|
274
279
|
name: "parentId",
|
|
275
|
-
label:
|
|
280
|
+
label: t === null || t === void 0 || (_t$fields3 = t.fields) === null || _t$fields3 === void 0 ? void 0 : _t$fields3.cityDistrict
|
|
276
281
|
}, /*#__PURE__*/React.createElement(TreeSelect, {
|
|
277
282
|
className: style.modal_input,
|
|
278
283
|
showSearch: true,
|
|
@@ -291,7 +296,7 @@ var QuestionnairesDocumentTypeContent = function QuestionnairesDocumentTypeConte
|
|
|
291
296
|
message: ""
|
|
292
297
|
}],
|
|
293
298
|
name: "zip",
|
|
294
|
-
label:
|
|
299
|
+
label: t === null || t === void 0 || (_t$fields4 = t.fields) === null || _t$fields4 === void 0 ? void 0 : _t$fields4.postalCode
|
|
295
300
|
}, /*#__PURE__*/React.createElement(Input, {
|
|
296
301
|
className: style.modal_input,
|
|
297
302
|
type: "number",
|
|
@@ -308,13 +313,13 @@ var QuestionnairesDocumentTypeContent = function QuestionnairesDocumentTypeConte
|
|
|
308
313
|
onCancel: function onCancel() {
|
|
309
314
|
return dispatch(setDeleteModalVisible(false));
|
|
310
315
|
},
|
|
311
|
-
value:
|
|
316
|
+
value: t === null || t === void 0 || (_t$common6 = t.common) === null || _t$common6 === void 0 ? void 0 : _t$common6.questionnaireAcc
|
|
312
317
|
})), /*#__PURE__*/React.createElement(ViewModal, {
|
|
313
318
|
onCancel: closeOnViewModal,
|
|
314
319
|
width: 695
|
|
315
320
|
}, /*#__PURE__*/React.createElement(Success, {
|
|
316
321
|
onClick: closeOnViewModal,
|
|
317
|
-
value:
|
|
322
|
+
value: t === null || t === void 0 || (_t$common7 = t.common) === null || _t$common7 === void 0 ? void 0 : _t$common7.questionnaire
|
|
318
323
|
}))))));
|
|
319
324
|
};
|
|
320
325
|
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,
|