Skip to content
Snippets Groups Projects
Unverified Commit 6b54f753 authored by meskio's avatar meskio :tent:
Browse files

Disable inventary submit button if no inventary entries

parent 48e37b1d
No related branches found
No related tags found
No related merge requests found
...@@ -38,7 +38,7 @@ function CreateInventary() { ...@@ -38,7 +38,7 @@ function CreateInventary() {
}; };
}; };
const disabled = !picks; const disabled = picks.length == 0;
const supplierOptions = [<option key=""></option>].concat( const supplierOptions = [<option key=""></option>].concat(
suppliers.map((s) => <option key={s.ID}>{s.name}</option>) suppliers.map((s) => <option key={s.ID}>{s.name}</option>)
...@@ -77,7 +77,7 @@ function CreateInventary() { ...@@ -77,7 +77,7 @@ function CreateInventary() {
<Form.Group as={Row}> <Form.Group as={Row}>
<Col> <Col>
<div className="text-right"> <div className="text-right">
<Button type="submit" disabled={disabled}> <Button variant="primary" type="submit" disabled={disabled}>
Añadir entrada Añadir entrada
</Button> </Button>
</div> </div>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment