-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Voucher dropdown + Miscellaneous fixes #133
base: main
Are you sure you want to change the base?
Changes from all commits
6d204fc
d4c6c4f
21e1711
813a4ce
742d366
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,11 @@ | ||
import React from "react"; | ||
import "../style/SearchTool.css"; | ||
import { Container, Row, Col, Form } from "react-bootstrap"; | ||
import { Container, Row, Col, Form, InputGroup } from "react-bootstrap"; | ||
import { setSearchfieldsQuery, searchProperties } from "../actions/search"; | ||
import { connect } from "react-redux"; | ||
|
||
const SearchTool = (props) => { | ||
return ( | ||
<div className="size border"> | ||
<> | ||
<div style={{ height: "50px", display: "flex", alignItems: "center" }}> | ||
<h5 | ||
style={{ | ||
|
@@ -22,10 +21,9 @@ const SearchTool = (props) => { | |
</h5> | ||
</div> | ||
<hr style={{ borderWidth: "3px" }} /> | ||
<div> | ||
<div className="px-3"> | ||
<p | ||
style={{ | ||
paddingLeft: "15px", | ||
fontFamily: "Roboto", | ||
fontSize: "14px", | ||
marginBottom: "5px", | ||
|
@@ -37,8 +35,6 @@ const SearchTool = (props) => { | |
<Form> | ||
<Form.Row | ||
style={{ | ||
paddingLeft: "15px", | ||
paddingRight: "15px", | ||
marginBottom: "5px", | ||
}} | ||
> | ||
|
@@ -52,6 +48,9 @@ const SearchTool = (props) => { | |
) | ||
} | ||
/> | ||
<Form.Text id="minHelp" muted style={{ paddingLeft: "0.5em" }}> | ||
Min | ||
</Form.Text> | ||
</Col> | ||
<Col> | ||
<Form.Control | ||
|
@@ -62,36 +61,13 @@ const SearchTool = (props) => { | |
) | ||
} | ||
/> | ||
</Col> | ||
</Form.Row> | ||
<Row> | ||
<Col> | ||
<p | ||
style={{ | ||
paddingLeft: "20px", | ||
fontFamily: "Roboto", | ||
fontSize: "13px", | ||
}} | ||
> | ||
Min | ||
</p> | ||
</Col> | ||
<Col> | ||
<p | ||
style={{ | ||
paddingLeft: "0px", | ||
fontFamily: "Roboto", | ||
fontSize: "13px", | ||
}} | ||
> | ||
<Form.Text id="maxHelp" muted style={{ paddingLeft: "0.5em" }}> | ||
Max | ||
</p> | ||
</Form.Text> | ||
</Col> | ||
</Row> | ||
</Form.Row> | ||
<Form.Row | ||
style={{ | ||
paddingLeft: "15px", | ||
paddingRight: "15px", | ||
marginTop: "17px", | ||
}} | ||
> | ||
|
@@ -105,22 +81,19 @@ const SearchTool = (props) => { | |
setSearchfieldsQuery("date_available", e.target.value) | ||
) | ||
} | ||
></Form.Control> | ||
/> | ||
</div> | ||
</Form.Row> | ||
|
||
<Form.Group | ||
controlId="bedrooms" | ||
style={{ | ||
marginTop: "24px", | ||
paddingLeft: "9px", | ||
paddingRight: "9px", | ||
}} | ||
> | ||
<Form.Label>Bedrooms</Form.Label> | ||
<Form.Control | ||
as="select" | ||
id="numBeds" | ||
onChange={(e) => | ||
props.dispatch( | ||
setSearchfieldsQuery("bedrooms", parseInt(e.target.value)) | ||
|
@@ -142,15 +115,12 @@ const SearchTool = (props) => { | |
controlId="bathrooms" | ||
style={{ | ||
marginTop: "15px", | ||
paddingLeft: "9px", | ||
paddingRight: "9px", | ||
}} | ||
> | ||
<Form.Label>Bathrooms</Form.Label> | ||
<Form.Control | ||
as="select" | ||
custom | ||
id="numBath" | ||
onChange={(e) => | ||
props.dispatch( | ||
setSearchfieldsQuery("bathrooms", parseFloat(e.target.value)) | ||
|
@@ -170,9 +140,7 @@ const SearchTool = (props) => { | |
</Form.Control> | ||
</Form.Group> | ||
<Form.Row style={{ marginTop: "20px" }}> | ||
<Col xs="10" style={{ paddingLeft: "15px" }}> | ||
Deposit Needed | ||
</Col> | ||
<Col xs="10">Deposit Needed</Col> | ||
<Col xs="1"> | ||
<Form.Check | ||
onChange={(e) => | ||
|
@@ -185,9 +153,7 @@ const SearchTool = (props) => { | |
</Col> | ||
</Form.Row> | ||
<Form.Row style={{ marginTop: "4px" }}> | ||
<Col xs="10" style={{ paddingLeft: "15px" }}> | ||
Credit Report Needed | ||
</Col> | ||
<Col xs="10">Credit Report Needed</Col> | ||
<Col xs="1"> | ||
<Form.Check | ||
onChange={(e) => | ||
|
@@ -200,9 +166,7 @@ const SearchTool = (props) => { | |
</Col> | ||
</Form.Row> | ||
<Form.Row style={{ marginTop: "4px" }}> | ||
<Col xs="10" style={{ paddingLeft: "15px" }}> | ||
Near Bus Stop | ||
</Col> | ||
<Col xs="10">Near Bus Stop</Col> | ||
<Col xs="1"> | ||
<Form.Check | ||
onChange={(e) => | ||
|
@@ -215,9 +179,7 @@ const SearchTool = (props) => { | |
</Col> | ||
</Form.Row> | ||
<Form.Row style={{ marginTop: "4px", marginBottom: "30px" }}> | ||
<Col xs="10" style={{ paddingLeft: "15px" }}> | ||
Pets allowed | ||
</Col> | ||
<Col xs="10">Pets allowed</Col> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Did it not need the padding anymore? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I moved the padding "up a level"- the class name |
||
<Col xs="1"> | ||
<Form.Check | ||
onChange={(e) => | ||
|
@@ -233,15 +195,12 @@ const SearchTool = (props) => { | |
<hr | ||
style={{ | ||
borderWidth: "2px", | ||
margin: "15px", | ||
}} | ||
/> | ||
<Form.Group | ||
controlId="schoolDistrict" | ||
style={{ | ||
marginTop: "15px", | ||
paddingLeft: "9px", | ||
paddingRight: "9px", | ||
}} | ||
> | ||
<Form.Label>School District</Form.Label> | ||
|
@@ -262,15 +221,12 @@ const SearchTool = (props) => { | |
<hr | ||
style={{ | ||
borderWidth: "2px", | ||
margin: "15px", | ||
}} | ||
/> | ||
<Form.Group | ||
controlId="leaseType" | ||
style={{ | ||
marginTop: "15px", | ||
paddingLeft: "9px", | ||
paddingRight: "9px", | ||
}} | ||
> | ||
<Form.Label>Lease Type</Form.Label> | ||
|
@@ -285,37 +241,35 @@ const SearchTool = (props) => { | |
<hr | ||
style={{ | ||
borderWidth: "2px", | ||
margin: "15px", | ||
}} | ||
/> | ||
<Form.Group | ||
controlId="vouchers" | ||
style={{ | ||
marginTop: "15px", | ||
paddingLeft: "9px", | ||
paddingRight: "9px", | ||
}} | ||
> | ||
<Form.Label>Vouchers Accepted</Form.Label> | ||
<Form.Control | ||
onChange={(e) => | ||
props.dispatch( | ||
setSearchfieldsQuery("school_district", e.target.value) | ||
) | ||
} | ||
as="select" | ||
custom | ||
> | ||
<option>Any</option> | ||
<option>2</option> | ||
<option>3</option> | ||
<option>4</option> | ||
<option>5</option> | ||
</Form.Control> | ||
<Form.Row> | ||
<Form.Check | ||
onChange={(e) => | ||
props.dispatch( | ||
setSearchfieldsQuery("school_district", e.target.value) | ||
) | ||
} | ||
inline | ||
defaultChecked={true} | ||
label="2" | ||
id="voucher-2" | ||
/> | ||
<Form.Check inline defaultChecked={true} label="3" id="voucher-3" /> | ||
<Form.Check inline defaultChecked={true} label="4" id="voucher-4" /> | ||
<Form.Check inline defaultChecked={true} label="5" id="voucher-5" /> | ||
</Form.Row> | ||
</Form.Group> | ||
</Form> | ||
</div> | ||
</div> | ||
</> | ||
); | ||
}; | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure what is going on here. You are setting the prop to index? Should you be setting state?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not exactly sure- maybe it's intended as a Redux update? Was someone working on fixing the pagination? Otherwise I can look into this