fix-vsp rename fields

This commit is contained in:
PotapovaA 2026-07-02 18:10:35 +03:00
parent 944fbe4d7e
commit 2cc53b6846
3 changed files with 19 additions and 21 deletions

View File

@ -12,8 +12,8 @@ export const EVENT_CONFIGS = {
format: 'Утвержденный формат',
opened_at: 'Дата открытия ВСП',
notes: 'Примечания',
location_form: 'Форма расположения ВСП',
numbers: 'Штатная численность ВСП',
placement_type: 'Форма расположения ВСП',
staff_count: 'Штатная численность ВСП',
total_area: 'Площадь помещений ВСП',
rent_contract_num: 'Номер договора аренды',
rent_end_date: 'Срок окончания договора аренды',
@ -22,7 +22,6 @@ export const EVENT_CONFIGS = {
closed_at: 'Дата закрытия ВСП',
user_email: 'Почта пользователя',
staff_count: 'Кол-во работников',
placement_type: 'Тип размещение',
is_active: 'Активный',
},
VSP_UPDATE: {
@ -32,8 +31,8 @@ export const EVENT_CONFIGS = {
format: 'Утвержденный формат',
opened_at: 'Дата открытия ВСП',
notes: 'Примечания',
location_form: 'Форма расположения ВСП',
numbers: 'Штатная численность ВСП',
placement_type: 'Форма расположения ВСП',
staff_count: 'Штатная численность ВСП',
total_area: 'Площадь помещений ВСП',
rent_contract_num: 'Номер договора аренды',
rent_end_date: 'Срок окончания договора аренды',
@ -42,7 +41,6 @@ export const EVENT_CONFIGS = {
closed_at: 'Дата закрытия ВСП',
user_email: 'Почта пользователя',
staff_count: 'Кол-во работников',
placement_type: 'Тип размещение',
is_active: 'Активный',
},
USER_ACCESS_GRANTED: {

View File

@ -43,8 +43,8 @@ const ModalEditAddVsp = ({
open_date: null,
close_date: null,
notes: '',
location_form: '',
numbers: '',
placement_type: '',
staff_count: '',
area: null,
rent_contract_num: '',
rent_end_date: null,
@ -94,8 +94,8 @@ const ModalEditAddVsp = ({
? new Date(initialData.close_date)
: null,
notes: initialData.notes || '',
location_form: initialData.location_form || '',
numbers: initialData.staff_count?.toString() || '',
placement_type: initialData.placement_type || '',
staff_count: initialData.staff_count?.toString() || '',
area: initialData.area || null,
rent_contract_num: initialData.rent_contract_num || '',
rent_end_date: initialData.rent_end_date
@ -114,8 +114,8 @@ const ModalEditAddVsp = ({
open_date: null,
close_date: null,
notes: '',
location_form: '',
numbers: '',
placement_type: '',
staff_count: '',
area: null,
rent_contract_num: '',
rent_end_date: null,
@ -215,7 +215,7 @@ const ModalEditAddVsp = ({
const submitData = {
...formData,
numbers: formData.staff_count ? parseInt(formData.staff_count, 10) : null,
staff_count: formData.staff_count ? parseInt(formData.staff_count, 10) : null,
area: formData.area ? parseFloat(formData.area) : null,
open_date: formData.open_date
? formData.open_date.toLocaleDateString('en-CA')
@ -255,8 +255,8 @@ const ModalEditAddVsp = ({
open_date: null,
close_date: null,
notes: '',
location_form: '',
numbers: '',
placement_type: '',
staff_count: '',
area: '',
rent_contract_num: '',
rent_end_date: null,
@ -461,11 +461,11 @@ const ModalEditAddVsp = ({
<FieldLabel>Форма расположения ВСП</FieldLabel>
<StyledTextField
select
value={formData.location_form}
onChange={handleChange('location_form')}
value={formData.placement_type}
onChange={handleChange('placement_type')}
placeholder="Выберите форму расположения"
error={!!errors.location_form}
helperText={errors.location_form}
error={!!errors.placement_type}
helperText={errors.placement_type}
disabled={loading}
slotProps={{
select: {
@ -496,7 +496,7 @@ const ModalEditAddVsp = ({
<StyledTextField
type="text"
value={formData.staff_count}
onChange={handleNumberChange('numbers')}
onChange={handleNumberChange('staff_count')}
placeholder="Введите численность"
error={!!errors.staff_count}
helperText={errors.staff_count}

View File

@ -192,7 +192,7 @@ const TableDictVsp = ({
enableSorting: false,
},
{
accessorKey: 'location_form',
accessorKey: 'placement_type',
header: 'Форма расположения ВСП',
size: 170,
minSize: 140,