fix required problem for project fields

This commit is contained in:
maxim 2025-03-19 21:25:28 +03:00
parent 6db769f598
commit 497d6a3dd3
16 changed files with 37 additions and 37 deletions

View File

@ -43,7 +43,7 @@ export const ArticleCreate = () => {
fullWidth fullWidth
InputLabelProps={{shrink: true}} InputLabelProps={{shrink: true}}
type="text" type="text"
label={'Заголовок'} label={'Заголовок *'}
name="heading" name="heading"
/> />

View File

@ -43,7 +43,7 @@ export const ArticleEdit = () => {
fullWidth fullWidth
InputLabelProps={{shrink: true}} InputLabelProps={{shrink: true}}
type="text" type="text"
label="Заголовок" label="Заголовок *"
name="heading" name="heading"
/> />

View File

@ -73,7 +73,7 @@ export const CarrierCreate = () => {
fullWidth fullWidth
InputLabelProps={{shrink: true}} InputLabelProps={{shrink: true}}
type="text" type="text"
label={'Полное имя'} label={'Полное имя *'}
name="full_name" name="full_name"
/> />
@ -87,7 +87,7 @@ export const CarrierCreate = () => {
fullWidth fullWidth
InputLabelProps={{shrink: true}} InputLabelProps={{shrink: true}}
type="text" type="text"
label={'Короткое имя'} label={'Короткое имя *'}
name="short_name" name="short_name"
/> />
@ -101,7 +101,7 @@ export const CarrierCreate = () => {
fullWidth fullWidth
InputLabelProps={{shrink: true}} InputLabelProps={{shrink: true}}
type="color" type="color"
label={'Основной цвет'} label={'Основной цвет *'}
name="main_color" name="main_color"
sx={{ sx={{
'& input': { '& input': {
@ -123,7 +123,7 @@ export const CarrierCreate = () => {
fullWidth fullWidth
InputLabelProps={{shrink: true}} InputLabelProps={{shrink: true}}
type="color" type="color"
label={'Цвет левого виджета'} label={'Цвет левого виджета *'}
name="left_color" name="left_color"
sx={{ sx={{
'& input': { '& input': {
@ -144,7 +144,7 @@ export const CarrierCreate = () => {
fullWidth fullWidth
InputLabelProps={{shrink: true}} InputLabelProps={{shrink: true}}
type="color" type="color"
label={'Цвет правого виджета'} label={'Цвет правого виджета *'}
name="right_color" name="right_color"
sx={{ sx={{
'& input': { '& input': {
@ -166,7 +166,7 @@ export const CarrierCreate = () => {
fullWidth fullWidth
InputLabelProps={{shrink: true}} InputLabelProps={{shrink: true}}
type="text" type="text"
label={'Слоган'} label={'Слоган *'}
name="slogan" name="slogan"
/> />

View File

@ -72,7 +72,7 @@ export const CarrierEdit = () => {
fullWidth fullWidth
InputLabelProps={{shrink: true}} InputLabelProps={{shrink: true}}
type="text" type="text"
label={'Полное имя'} label={'Полное имя *'}
name="full_name" name="full_name"
/> />
@ -86,7 +86,7 @@ export const CarrierEdit = () => {
fullWidth fullWidth
InputLabelProps={{shrink: true}} InputLabelProps={{shrink: true}}
type="text" type="text"
label={'Короткое имя'} label={'Короткое имя *'}
name="short_name" name="short_name"
/> />
@ -100,7 +100,7 @@ export const CarrierEdit = () => {
fullWidth fullWidth
InputLabelProps={{shrink: true}} InputLabelProps={{shrink: true}}
type="color" type="color"
label={'Основной цвет'} label={'Основной цвет *'}
name="main_color" name="main_color"
sx={{ sx={{
'& input': { '& input': {
@ -122,7 +122,7 @@ export const CarrierEdit = () => {
fullWidth fullWidth
InputLabelProps={{shrink: true}} InputLabelProps={{shrink: true}}
type="color" type="color"
label={'Цвет левого виджета'} label={'Цвет левого виджета *'}
name="left_color" name="left_color"
sx={{ sx={{
'& input': { '& input': {
@ -143,7 +143,7 @@ export const CarrierEdit = () => {
fullWidth fullWidth
InputLabelProps={{shrink: true}} InputLabelProps={{shrink: true}}
type="color" type="color"
label={'Цвет правого виджета'} label={'Цвет правого виджета *'}
name="right_color" name="right_color"
sx={{ sx={{
'& input': { '& input': {
@ -165,7 +165,7 @@ export const CarrierEdit = () => {
fullWidth fullWidth
InputLabelProps={{shrink: true}} InputLabelProps={{shrink: true}}
type="text" type="text"
label={'Слоган'} label={'Слоган *'}
name="slogan" name="slogan"
/> />

View File

@ -63,7 +63,7 @@ export const CityCreate = () => {
fullWidth fullWidth
InputLabelProps={{shrink: true}} InputLabelProps={{shrink: true}}
type="text" type="text"
label={'Название'} label={'Название *'}
name="name" name="name"
/> />

View File

@ -62,7 +62,7 @@ export const CityEdit = () => {
fullWidth fullWidth
InputLabelProps={{shrink: true}} InputLabelProps={{shrink: true}}
type="text" type="text"
label={'Название'} label={'Название *'}
name="name" name="name"
/> />

View File

@ -23,7 +23,7 @@ export const CountryCreate = () => {
fullWidth fullWidth
InputLabelProps={{shrink: true}} InputLabelProps={{shrink: true}}
type="text" type="text"
label={'Код'} label={'Код *'}
name="code" name="code"
/> />
<TextField <TextField
@ -36,7 +36,7 @@ export const CountryCreate = () => {
fullWidth fullWidth
InputLabelProps={{shrink: true}} InputLabelProps={{shrink: true}}
type="text" type="text"
label={'Название'} label={'Название *'}
name="name" name="name"
/> />
</Box> </Box>

View File

@ -22,7 +22,7 @@ export const CountryEdit = () => {
fullWidth fullWidth
InputLabelProps={{shrink: true}} InputLabelProps={{shrink: true}}
type="text" type="text"
label={'Код'} label={'Код *'}
name="code" name="code"
/> />
<TextField <TextField
@ -35,7 +35,7 @@ export const CountryEdit = () => {
fullWidth fullWidth
InputLabelProps={{shrink: true}} InputLabelProps={{shrink: true}}
type="text" type="text"
label={'Название'} label={'Название *'}
name="name" name="name"
/> />
</Box> </Box>

View File

@ -87,7 +87,7 @@ export const MediaCreate = () => {
fullWidth fullWidth
InputLabelProps={{shrink: true}} InputLabelProps={{shrink: true}}
type="text" type="text"
label="Название" label="Название *"
name="filename" name="filename"
/> />

View File

@ -106,7 +106,7 @@ export const MediaEdit = () => {
fullWidth fullWidth
InputLabelProps={{shrink: true}} InputLabelProps={{shrink: true}}
type="text" type="text"
label="Название" label="Название *"
name="filename" name="filename"
/> />

View File

@ -67,14 +67,14 @@ export const RouteCreate = () => {
fullWidth fullWidth
InputLabelProps={{shrink: true}} InputLabelProps={{shrink: true}}
type="text" type="text"
label={'Номер маршрута'} label={'Номер маршрута *'}
name="route_number" name="route_number"
/> />
<Controller <Controller
name="route_direction" // boolean name="route_direction" // boolean
control={control} control={control}
defaultValue={false} defaultValue={false}
render={({field}: {field: any}) => <FormControlLabel label="Прямой маршрут?" control={<Checkbox {...field} checked={field.value} onChange={(e) => field.onChange(e.target.checked)} />} />} render={({field}: {field: any}) => <FormControlLabel label="Прямой маршрут? *" control={<Checkbox {...field} checked={field.value} onChange={(e) => field.onChange(e.target.checked)} />} />}
/> />
<Typography variant="caption" color="textSecondary" sx={{mt: 0, mb: 1}}> <Typography variant="caption" color="textSecondary" sx={{mt: 0, mb: 1}}>
@ -109,7 +109,7 @@ export const RouteCreate = () => {
fullWidth fullWidth
InputLabelProps={{shrink: true}} InputLabelProps={{shrink: true}}
type="text" type="text"
label={'Координаты маршрута'} label={'Координаты маршрута *'}
name="path" name="path"
placeholder="[[1.1, 2.2], [2.1, 4.5]]" placeholder="[[1.1, 2.2], [2.1, 4.5]]"
/> />

View File

@ -40,7 +40,7 @@ export const SightCreate = () => {
fullWidth fullWidth
InputLabelProps={{shrink: true}} InputLabelProps={{shrink: true}}
type="text" type="text"
label={'Название'} label={'Название *'}
name="name" name="name"
/> />
<TextField <TextField
@ -54,7 +54,7 @@ export const SightCreate = () => {
fullWidth fullWidth
InputLabelProps={{shrink: true}} InputLabelProps={{shrink: true}}
type="number" type="number"
label={'Широта'} label={'Широта *'}
name="latitude" name="latitude"
/> />
<TextField <TextField
@ -68,7 +68,7 @@ export const SightCreate = () => {
fullWidth fullWidth
InputLabelProps={{shrink: true}} InputLabelProps={{shrink: true}}
type="number" type="number"
label={'Долгота'} label={'Долгота *'}
name="longitude" name="longitude"
/> />

View File

@ -40,7 +40,7 @@ export const SightEdit = () => {
fullWidth fullWidth
InputLabelProps={{shrink: true}} InputLabelProps={{shrink: true}}
type="text" type="text"
label={'Название'} label={'Название *'}
name="name" name="name"
/> />
<TextField <TextField
@ -54,7 +54,7 @@ export const SightEdit = () => {
fullWidth fullWidth
InputLabelProps={{shrink: true}} InputLabelProps={{shrink: true}}
type="number" type="number"
label={'Широта'} label={'Широта *'}
name="latitude" name="latitude"
/> />
<TextField <TextField
@ -68,7 +68,7 @@ export const SightEdit = () => {
fullWidth fullWidth
InputLabelProps={{shrink: true}} InputLabelProps={{shrink: true}}
type="number" type="number"
label={'Долгота'} label={'Долгота *'}
name="longitude" name="longitude"
/> />

View File

@ -27,7 +27,7 @@ export const StationCreate = () => {
fullWidth fullWidth
InputLabelProps={{shrink: true}} InputLabelProps={{shrink: true}}
type="text" type="text"
label={'Название'} label={'Название *'}
name="name" name="name"
/> />
<TextField <TextField
@ -40,7 +40,7 @@ export const StationCreate = () => {
fullWidth fullWidth
InputLabelProps={{shrink: true}} InputLabelProps={{shrink: true}}
type="text" type="text"
label={'Описание'} label={'Описание *'}
name="description" name="description"
/> />
<TextField <TextField
@ -54,7 +54,7 @@ export const StationCreate = () => {
fullWidth fullWidth
InputLabelProps={{shrink: true}} InputLabelProps={{shrink: true}}
type="number" type="number"
label={'Широта'} label={'Широта *'}
name="latitude" name="latitude"
/> />
<TextField <TextField
@ -68,7 +68,7 @@ export const StationCreate = () => {
fullWidth fullWidth
InputLabelProps={{shrink: true}} InputLabelProps={{shrink: true}}
type="number" type="number"
label={'Долгота'} label={'Долгота *'}
name="longitude" name="longitude"
/> />
</Box> </Box>

View File

@ -39,7 +39,7 @@ export const VehicleCreate = () => {
fullWidth fullWidth
InputLabelProps={{shrink: true}} InputLabelProps={{shrink: true}}
type="number" type="number"
label="Бортовой номер" label="Бортовой номер *"
name="tail_number" name="tail_number"
/> />

View File

@ -44,7 +44,7 @@ export const VehicleEdit = () => {
fullWidth fullWidth
InputLabelProps={{shrink: true}} InputLabelProps={{shrink: true}}
type="number" type="number"
label="Бортовой номер" label="Бортовой номер *"
name="tail_number" name="tail_number"
/> />