rename vsp.number to vsp.staff_count #19
@ -26,7 +26,7 @@ import { useRealtime } from './contexts/RealtimeContext';
|
|||||||
import { toast } from 'react-toastify';
|
import { toast } from 'react-toastify';
|
||||||
import { CircularProgress } from '@mui/material';
|
import { CircularProgress } from '@mui/material';
|
||||||
import { additionVspRowTable } from './constants/addingRowConfig';
|
import { additionVspRowTable } from './constants/addingRowConfig';
|
||||||
import { SelectVspModal } from './Modals/selectVspModal';
|
import { SelectVspModal } from './Modals/SelectVspModal';
|
||||||
import { getRowId } from './utils/rowUtils';
|
import { getRowId } from './utils/rowUtils';
|
||||||
|
|
||||||
const RealtimeTable = ({ formType, formId, sheetName, direction }) => {
|
const RealtimeTable = ({ formType, formId, sheetName, direction }) => {
|
||||||
|
|||||||
@ -95,7 +95,7 @@ const ModalEditAddVsp = ({
|
|||||||
: null,
|
: null,
|
||||||
notes: initialData.notes || '',
|
notes: initialData.notes || '',
|
||||||
location_form: initialData.location_form || '',
|
location_form: initialData.location_form || '',
|
||||||
numbers: initialData.numbers?.toString() || '',
|
numbers: initialData.staff_count?.toString() || '',
|
||||||
area: initialData.area || null,
|
area: initialData.area || null,
|
||||||
rent_contract_num: initialData.rent_contract_num || '',
|
rent_contract_num: initialData.rent_contract_num || '',
|
||||||
rent_end_date: initialData.rent_end_date
|
rent_end_date: initialData.rent_end_date
|
||||||
@ -215,7 +215,7 @@ const ModalEditAddVsp = ({
|
|||||||
|
|
||||||
const submitData = {
|
const submitData = {
|
||||||
...formData,
|
...formData,
|
||||||
numbers: formData.numbers ? parseInt(formData.numbers, 10) : null,
|
numbers: formData.staff_count ? parseInt(formData.staff_count, 10) : null,
|
||||||
area: formData.area ? parseFloat(formData.area) : null,
|
area: formData.area ? parseFloat(formData.area) : null,
|
||||||
open_date: formData.open_date
|
open_date: formData.open_date
|
||||||
? formData.open_date.toLocaleDateString('en-CA')
|
? formData.open_date.toLocaleDateString('en-CA')
|
||||||
@ -495,11 +495,11 @@ const ModalEditAddVsp = ({
|
|||||||
<FieldLabel>Штатная численность ВСП</FieldLabel>
|
<FieldLabel>Штатная численность ВСП</FieldLabel>
|
||||||
<StyledTextField
|
<StyledTextField
|
||||||
type="text"
|
type="text"
|
||||||
value={formData.numbers}
|
value={formData.staff_count}
|
||||||
onChange={handleNumberChange('numbers')}
|
onChange={handleNumberChange('numbers')}
|
||||||
placeholder="Введите численность"
|
placeholder="Введите численность"
|
||||||
error={!!errors.numbers}
|
error={!!errors.staff_count}
|
||||||
helperText={errors.numbers}
|
helperText={errors.staff_count}
|
||||||
disabled={loading}
|
disabled={loading}
|
||||||
slotProps={{
|
slotProps={{
|
||||||
htmlInput: { min: 1, step: 1 },
|
htmlInput: { min: 1, step: 1 },
|
||||||
|
|||||||
@ -204,7 +204,7 @@ const TableDictVsp = ({
|
|||||||
enableSorting: false,
|
enableSorting: false,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
accessorKey: 'numbers',
|
accessorKey: 'staff_count',
|
||||||
header: 'Штатная численность ВСП',
|
header: 'Штатная численность ВСП',
|
||||||
size: 170,
|
size: 170,
|
||||||
minSize: 140,
|
minSize: 140,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user