1
0
Fork 0

Workbench now also lets you preload a set of 'withBreasts' measurements

This commit is contained in:
Joost De Cock 2019-09-06 10:28:29 +02:00
parent 0b4df34a6b
commit 93e82d70ed
2 changed files with 18 additions and 264 deletions

View file

@ -3,7 +3,7 @@ import PropTypes from "prop-types";
import Button from "@material-ui/core/Button";
import { FormattedMessage, FormattedHTMLMessage } from "react-intl";
import FormFieldMeasurement from "../../.form/FormFieldMeasurement";
import { withoutBreasts } from "@freesewing/models";
import { withBreasts, withoutBreasts } from "@freesewing/models";
const Measurements = props => {
const styles = {
@ -111,7 +111,17 @@ const Measurements = props => {
<h4>
<FormattedMessage id="app.withBreasts" />
</h4>
<p>FIXME</p>
<ul>
{Object.keys(withBreasts).map(m => (
<li key={m}>
<Button onClick={() => props.preloadMeasurements(withBreasts[m])}>
<FormattedMessage id="cfp.size" />
&nbsp;
{m.slice(-2)}
</Button>
</li>
))}
</ul>
</div>
</div>
);