Skip to content

Commit

Permalink
fix(admin): title header css
Browse files Browse the repository at this point in the history
  • Loading branch information
Ealenn committed Jun 26, 2022
1 parent 33f90a4 commit 05c86ff
Showing 1 changed file with 14 additions and 13 deletions.
27 changes: 14 additions & 13 deletions admin/src/views/varieties.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ import {
ReferenceArrayField
} from "react-admin";
import { RichTextInput } from 'ra-input-rich-text';
import Typography from '@mui/material/Typography';
import { StringToLabelObject } from '../helpers/StringToLabelObject';
import { GetPermissions } from "../helpers/GetPermissions";

Expand Down Expand Up @@ -66,27 +67,27 @@ export const VarietyCreate = (props) => (
<RichTextInput source="description" multiline fullWidth />
</FormTab>
<FormTab label="Requirement">
<h2>Water</h2>
<Typography variant="h5" component="h5">Water</Typography>
<SelectInput source="requirement.water.needs" choices={[
{ id: 'LOW', name: 'LOW' },
{ id: 'MEDIUM', name: 'MEDIUM' },
{ id: 'HIGH', name: 'HIGH' }
]} />
<RichTextInput source="requirement.water.comment" multiline fullWidth />
<h2>Sun</h2>
<Typography variant="h5" component="h5">Sun</Typography>
<SelectInput source="requirement.sun.needs" choices={[
{ id: 'FULLSUN', name: 'FULLSUN' },
{ id: 'SEMISHADE', name: 'SEMISHADE' },
{ id: 'SHADOW', name: 'SHADOW' }
]} />
<RichTextInput source="requirement.sun.comment" multiline fullWidth />
<h2>Floors</h2>
<Typography variant="h5" component="h5">Floors</Typography>
<ReferenceArrayInput source="requirement.floors" reference="floors">
<SelectArrayInput optionText="name" />
</ReferenceArrayInput>
</FormTab>
<FormTab label="Culture">
<h2>Types</h2>
<Typography variant="h5" component="h5">Types</Typography>
<SelectArrayInput source="culture.cultureTypes" choices={[
{ id: 'DIRECT_SOW', name: 'DIRECT_SOW' },
{ id: 'GREEN_HOUSE', name: 'GREEN_HOUSE' },
Expand Down Expand Up @@ -122,27 +123,27 @@ export const VarietyEdit = (props) => (
<RichTextInput source="description" multiline fullWidth />
</FormTab>
<FormTab label="Requirement">
<h2>Water</h2>
<Typography variant="h5" component="h5">Water</Typography>
<SelectInput source="requirement.water.needs" choices={[
{ id: 'LOW', name: 'LOW' },
{ id: 'MEDIUM', name: 'MEDIUM' },
{ id: 'HIGH', name: 'HIGH' }
]} />
<RichTextInput source="requirement.water.comment" multiline fullWidth />
<h2>Sun</h2>
<Typography variant="h5" component="h5">Sun</Typography>
<SelectInput source="requirement.sun.needs" choices={[
{ id: 'FULLSUN', name: 'FULLSUN' },
{ id: 'SEMISHADE', name: 'SEMISHADE' },
{ id: 'SHADOW', name: 'SHADOW' }
]} />
<RichTextInput source="requirement.sun.comment" multiline fullWidth />
<h2>Floors</h2>
<Typography variant="h5" component="h5">Floors</Typography>
<ReferenceArrayInput source="requirement.floors" reference="floors">
<SelectArrayInput optionText="name" />
</ReferenceArrayInput>
</FormTab>
<FormTab label="Culture">
<h2>Types</h2>
<Typography variant="h5" component="h5">Types</Typography>
<SelectArrayInput source="culture.cultureTypes" choices={[
{ id: 'DIRECT_SOW', name: 'DIRECT_SOW' },
{ id: 'GREEN_HOUSE', name: 'GREEN_HOUSE' },
Expand Down Expand Up @@ -193,13 +194,13 @@ export const VarietyShow = (props) => (
<RichTextField source="description" />
</Tab>
<Tab label="requirement">
<h2>Water</h2>
<Typography variant="h5" component="h5">Water</Typography>
<TextField source="requirement.water.needs" />
<RichTextField source="requirement.water.comment" />
<h2>Sun</h2>
<Typography variant="h5" component="h5">Sun</Typography>
<TextField source="requirement.sun.needs" />
<RichTextField source="requirement.sun.comment" />
<h2>Floors</h2>
<Typography variant="h5" component="h5">Floors</Typography>
<ReferenceArrayField source="requirement.floors" reference="floors">
<SingleFieldList>
<ChipField source="name" />
Expand All @@ -214,8 +215,8 @@ export const VarietyShow = (props) => (
</StringToLabelObject>
</SingleFieldList>
</ArrayField>
<TextField source="description" />
<TextField source="spacingBetweenPlants" />
<TextField source="culture.description" />
<TextField source="culture.spacingBetweenPlants" />
<ArrayField source="culture.sowingPeriod">
<SingleFieldList>
<StringToLabelObject>
Expand Down

0 comments on commit 05c86ff

Please sign in to comment.