Improve page appearance

This commit is contained in:
Pierre HUBERT 2021-07-12 18:55:28 +02:00
parent e7ab1f1837
commit 322969daa7

View File

@ -102,6 +102,30 @@ export class ComunicUserRoute extends React.Component<
}
build() {
const properties = this.userProperties.map((p) => {
return (
<TableRow key={p.name} hover>
<TableCell
style={{
fontWeight: "bold",
}}
>
{p.name}
</TableCell>
<TableCell>
{p.child != null
? p.child
: p.bool != null
? p.bool
? "Yes"
: "No"
: p.value == null
? "Undefined"
: p.value}
</TableCell>
</TableRow>
);
});
return (
<>
<PageTitle
@ -109,36 +133,29 @@ export class ComunicUserRoute extends React.Component<
/>
<Grid container spacing={3}>
<Grid item xs={6}>
<Grid item xs={12}>
<CustomCard title="General information">
<Table>
<TableBody>
{this.userProperties.map((p) => {
return (
<TableRow key={p.name}>
<TableCell
style={{
fontWeight: "bold",
}}
>
{p.name}
</TableCell>
<TableCell>
{p.child != null
? p.child
: p.bool != null
? p.bool
? "Yes"
: "No"
: p.value == null
? "Undefined"
: p.value}
</TableCell>
</TableRow>
);
})}
</TableBody>
</Table>
<Grid container>
<Grid item xs={6}>
<Table>
<TableBody>
{properties.slice(
0,
properties.length / 2
)}
</TableBody>
</Table>
</Grid>
<Grid item xs={6}>
<Table>
<TableBody>
{properties.slice(
properties.length / 2
)}
</TableBody>
</Table>
</Grid>
</Grid>
</CustomCard>
</Grid>
</Grid>