BOD-58 WIP For testing classes. No success.

This commit is contained in:
Patrick Fic
2020-03-24 11:27:30 -07:00
parent 7d33484294
commit c095ba68eb
15 changed files with 376 additions and 97 deletions

View File

@@ -9,10 +9,7 @@ const mapStateToProps = createStructuredSelector({
bodyshop: selectBodyshop
});
export default connect(
mapStateToProps,
null
)(function AllocationsAssignmentComponent({
export function AllocationsAssignmentComponent({
bodyshop,
handleAssignment,
assignment,
@@ -30,16 +27,15 @@ export default connect(
const popContent = (
<div>
<Select
<Select id="employeeSelector"
showSearch
style={{ width: 200 }}
placeholder="Select a person"
optionFilterProp="children"
placeholder='Select a person'
optionFilterProp='children'
onChange={onChange}
filterOption={(input, option) =>
option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0
}
>
}>
{bodyshop.employees.map(emp => (
<Select.Option value={emp.id} key={emp.id}>
{`${emp.first_name} ${emp.last_name}`}
@@ -55,10 +51,9 @@ export default connect(
/>
<Button
type="primary"
type='primary'
disabled={!assignment.employeeid}
onClick={handleAssignment}
>
onClick={handleAssignment}>
Assign
</Button>
<Button onClick={() => setVisibility(false)}>Close</Button>
@@ -72,4 +67,6 @@ export default connect(
</Button>
</Popover>
);
});
}
export default connect(mapStateToProps, null)(AllocationsAssignmentComponent);