add constants for projet types
This commit is contained in:
parent
088f3b3d30
commit
3481e76b7c
@ -44,6 +44,8 @@ export const FORM_TYPE_TRANSLATE = {
|
|||||||
};
|
};
|
||||||
export const DIRECTION_TRANSLATE = { Support: 'Поддержка', Development: 'Развитие' };
|
export const DIRECTION_TRANSLATE = { Support: 'Поддержка', Development: 'Развитие' };
|
||||||
|
|
||||||
|
export const PROJECT_TYPES = ['Открытие ВСП', 'Закрытие ВСП', 'Переезд ВСП', 'Реновация РФ', 'Открытие УРМ'];
|
||||||
|
|
||||||
export const ORG_UNIT_TYPE_OPTIONS = [
|
export const ORG_UNIT_TYPE_OPTIONS = [
|
||||||
{ value: 'ssp', label: 'ССП' },
|
{ value: 'ssp', label: 'ССП' },
|
||||||
{ value: 'rf', label: 'Региональный филиал' },
|
{ value: 'rf', label: 'Региональный филиал' },
|
||||||
|
|||||||
@ -1,3 +1,5 @@
|
|||||||
|
import { PROJECT_TYPES } from './constants';
|
||||||
|
|
||||||
export const DEFAULT_PROJECT_CONFIG = {
|
export const DEFAULT_PROJECT_CONFIG = {
|
||||||
'ССП/РФ': {
|
'ССП/РФ': {
|
||||||
type: 'multiselect',
|
type: 'multiselect',
|
||||||
@ -16,7 +18,7 @@ export const DEFAULT_PROJECT_CONFIG = {
|
|||||||
},
|
},
|
||||||
'Тип проекта развития': {
|
'Тип проекта развития': {
|
||||||
type: 'multiselect',
|
type: 'multiselect',
|
||||||
options: ['Открытие ВСП', 'Закрытие ВСП', 'Переезд ВСП', 'Реновация РФ', 'Открытие УРМ'],
|
options: PROJECT_TYPES,
|
||||||
placeholder: 'Выберите тип проекта',
|
placeholder: 'Выберите тип проекта',
|
||||||
defaultValue: null,
|
defaultValue: null,
|
||||||
required_field: true,
|
required_field: true,
|
||||||
|
|||||||
@ -15,6 +15,7 @@ import { NameTask, TaskInfoContainer } from '../components/common/SwitchFormTask
|
|||||||
import TableList from '../components/common/TableList/TableList';
|
import TableList from '../components/common/TableList/TableList';
|
||||||
import { TableIcon } from '../components/common/icons/icons';
|
import { TableIcon } from '../components/common/icons/icons';
|
||||||
import { Chip } from '../components/styles/StyledChip';
|
import { Chip } from '../components/styles/StyledChip';
|
||||||
|
import { PROJECT_TYPES } from '../constants/constants';
|
||||||
|
|
||||||
const FormInfo = ({ form }) => {
|
const FormInfo = ({ form }) => {
|
||||||
const portalContent = (
|
const portalContent = (
|
||||||
@ -123,7 +124,7 @@ export default function FormPage() {
|
|||||||
add_projects_data: {
|
add_projects_data: {
|
||||||
'Тип проекта развития': {
|
'Тип проекта развития': {
|
||||||
type: 'multiselect',
|
type: 'multiselect',
|
||||||
options: ['Открытие ВСП', 'Закрытие ВСП', 'Переезд ВСП', 'Реновация РФ', 'Открытие УРМ'],
|
options: PROJECT_TYPES,
|
||||||
placeholder: '',
|
placeholder: '',
|
||||||
defaultValue: null,
|
defaultValue: null,
|
||||||
},
|
},
|
||||||
|
|||||||
@ -3,6 +3,7 @@ import { Box, Dialog, DialogActions, DialogContent, DialogTitle, IconButton, Men
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { useAuth } from '../../../../app/context/AuthProvider';
|
import { useAuth } from '../../../../app/context/AuthProvider';
|
||||||
import { DangerOutlinedButton, PrimaryButton } from '../../../../components/common/Buttons/Buttons';
|
import { DangerOutlinedButton, PrimaryButton } from '../../../../components/common/Buttons/Buttons';
|
||||||
|
import { PROJECT_TYPES } from '../../../../constants/constants';
|
||||||
import { DEVELOMENT_BLOCK, FUNDING_BY_DECISION } from '../../constants';
|
import { DEVELOMENT_BLOCK, FUNDING_BY_DECISION } from '../../constants';
|
||||||
import { canEditFirstTableField, hasReserveValuesInChildSmetas, isFirstTableFieldDependencySatisfied } from '../../constants/fieldAccess';
|
import { canEditFirstTableField, hasReserveValuesInChildSmetas, isFirstTableFieldDependencySatisfied } from '../../constants/fieldAccess';
|
||||||
|
|
||||||
@ -56,7 +57,7 @@ const EditModal = ({ open, onClose, rowData, onSave, isSaving = false, orgUnitNa
|
|||||||
{ key: 'status', label: 'Статус', options: [['created', 'Создан'], ['agreed', 'Согласован'], ['archived', 'В архиве']] },
|
{ key: 'status', label: 'Статус', options: [['created', 'Создан'], ['agreed', 'Согласован'], ['archived', 'В архиве']] },
|
||||||
{ key: 'technical_number', label: 'Технический номер проекта' },
|
{ key: 'technical_number', label: 'Технический номер проекта' },
|
||||||
{ key: 'org_unit_id', label: 'ССП/РФ', valueType: 'number', options: Object.entries(orgUnitNames).map(([id, title]) => [Number(id), title]) },
|
{ key: 'org_unit_id', label: 'ССП/РФ', valueType: 'number', options: Object.entries(orgUnitNames).map(([id, title]) => [Number(id), title]) },
|
||||||
{ key: 'project_type', label: 'Тип проекта', options: ['Открытие ВСП', 'Закрытие ВСП', 'Переезд ВСП', 'Реновация РФ', 'Открытие УРМ'] },
|
{ key: 'project_type', label: 'Тип проекта', options: PROJECT_TYPES },
|
||||||
{ key: 'vsp_format', label: 'Формат ВСП', options: ['Флагманский', 'Типовой', 'Розничный', 'МСБ', 'Лёгкий', 'Мини', 'Розничный-киоск', 'МБО', 'Офис самообслуживания', 'Другое'] },
|
{ key: 'vsp_format', label: 'Формат ВСП', options: ['Флагманский', 'Типовой', 'Розничный', 'МСБ', 'Лёгкий', 'Мини', 'Розничный-киоск', 'МБО', 'Офис самообслуживания', 'Другое'] },
|
||||||
{ key: 'placement_type', label: 'Размещение', options: ['Собственность', 'Аренда', 'Субаренда'] },
|
{ key: 'placement_type', label: 'Размещение', options: ['Собственность', 'Аренда', 'Субаренда'] },
|
||||||
{ key: 'staff_count', label: 'Количество сотрудников', type: 'number', valueType: 'number', min: 0 },
|
{ key: 'staff_count', label: 'Количество сотрудников', type: 'number', valueType: 'number', min: 0 },
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user