Commit ba6e8a22 authored by Théophile BORNON's avatar Théophile BORNON

textbox in header

parent b7e1fe71
...@@ -81,22 +81,22 @@ function Category(props) { ...@@ -81,22 +81,22 @@ function Category(props) {
expandIcon={<ExpandMoreIcon />} expandIcon={<ExpandMoreIcon />}
aria-controls="panel1a-content" aria-controls="panel1a-content"
id="panel1a-header" id="panel1a-header"
> > <TextField
<Typography className={classes.heading}>{category.name} ({Math.round(category.coeff / props.totalCoeff * 10000) / 100}%)</Typography> id="name"
label="Nom de la categorie"
value={category.name}
onChange={handleChange}
className={classes.textField}
margin="normal"
variant="outlined"
fullWidth
/>
<Typography className={classes.heading}>({Math.round(category.coeff / props.totalCoeff * 10000) / 100}%)</Typography>
</ExpansionPanelSummary> </ExpansionPanelSummary>
<ExpansionPanelDetails> <ExpansionPanelDetails>
<Grid container spacing={2}> <Grid container spacing={2}>
<Grid item xs={12} md={8}> <Grid item xs={12} md={8}>
<TextField
id="name"
label="Nom de la categorie"
value={category.name}
onChange={handleChange}
className={classes.textField}
margin="normal"
variant="outlined"
fullWidth
/>
</Grid> </Grid>
<Grid item xs={12} md={4}> <Grid item xs={12} md={4}>
<TextField <TextField
......
...@@ -79,22 +79,21 @@ function Section(props) { ...@@ -79,22 +79,21 @@ function Section(props) {
expandIcon={<ExpandMoreIcon />} expandIcon={<ExpandMoreIcon />}
aria-controls="panel1a-content" aria-controls="panel1a-content"
id="panel1a-header" id="panel1a-header"
> ><TextField
<Typography className={classes.heading}>{props.section.name}</Typography> id="name"
label="Nom de la section"
value={section.name}
onChange={handleChange}
className={classes.textField}
margin="normal"
variant="outlined"
fullWidth
/>
</ExpansionPanelSummary> </ExpansionPanelSummary>
<ExpansionPanelDetails> <ExpansionPanelDetails>
<Grid container spacing={2}> <Grid container spacing={2}>
<Grid item xs={12}> <Grid item xs={12}>
<TextField
id="name"
label="Nom de la section"
value={section.name}
onChange={handleChange}
className={classes.textField}
margin="normal"
variant="outlined"
fullWidth
/>
</Grid> </Grid>
<Grid item xs={12}> <Grid item xs={12}>
......
...@@ -73,7 +73,17 @@ function SubCategory(props) { ...@@ -73,7 +73,17 @@ function SubCategory(props) {
aria-controls="panel1a-content" aria-controls="panel1a-content"
id="panel1a-header" id="panel1a-header"
> >
<Typography className={classes.heading}>{subCategory.name} <TextField
id="name"
label="Nom de la sous categorie"
value={subCategory.name}
onChange={handleChange}
className={classes.textField}
margin="normal"
variant="outlined"
fullWidth
/>
<Typography className={classes.heading}>
{subCategory.coeff !== 0 && {subCategory.coeff !== 0 &&
<> <>
({Math.round(subCategory.coeff / props.totalCoeff * 10000) / 100} %) ({Math.round(subCategory.coeff / props.totalCoeff * 10000) / 100} %)
...@@ -85,16 +95,6 @@ function SubCategory(props) { ...@@ -85,16 +95,6 @@ function SubCategory(props) {
<ExpansionPanelDetails> <ExpansionPanelDetails>
<Grid container justify="flex-end" alignItems="center" className={classes.root} spacing={2}> <Grid container justify="flex-end" alignItems="center" className={classes.root} spacing={2}>
<Grid item xs={12} md={10}> <Grid item xs={12} md={10}>
<TextField
id="name"
label="Nom de la sous categorie"
value={subCategory.name}
onChange={handleChange}
className={classes.textField}
margin="normal"
variant="outlined"
fullWidth
/>
</Grid> </Grid>
{subCategory.type === "" && {subCategory.type === "" &&
<Grid item xs={12} md={4}> <Grid item xs={12} md={4}>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment