-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Landlord Listing Form + Unit Details Updates (#106)
## Tracking Info Resolves #98 ## Changes 1. Updated Unit Details page such that only HLs can update the HL column for a referral 2. Added utilities component to landlord listing form and unit details ## Testing <!-- How did you confirm your changes worked? --> Looked at a unit details page from both a HL account and a non-HL account to verify the referral table. Went through entire workflow of landlord listing form to create unit - validated that utilities were successfully added and showing up on unit details. ## Confirmation of Change <!-- Upload a screenshot, if possible. Otherwise, please provide instructions on how to see the change. --> ![Screenshot 2024-05-29 at 2 10 51 AM](https://github.com/TritonSE/USHS-Housing-Portal/assets/63521936/3ec4d12c-febe-40c0-8ee7-a9e5519f1e4e) HL Account: ![Screenshot 2024-05-29 at 2 11 08 AM](https://github.com/TritonSE/USHS-Housing-Portal/assets/63521936/6c713217-3db9-43cf-93d4-a7cf3d4a466c) Non-HL Account: ![Screenshot 2024-05-29 at 2 11 51 AM](https://github.com/TritonSE/USHS-Housing-Portal/assets/63521936/a3116e3c-245d-49f0-af0f-e26afa9652f5) ---------
- Loading branch information
1 parent
58d2c42
commit fd5e714
Showing
7 changed files
with
124 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
import { | ||
CustomCheckboxRadio, | ||
FieldHeader, | ||
Margin32, | ||
OptionLabel, | ||
RadioCheckBoxContainer, | ||
RadioCheckboxCol, | ||
Required, | ||
} from "@/components/ListingForm/CommonStyles"; | ||
|
||
type UtilitiesProps = { | ||
utilities: string[]; | ||
setUtilities: React.Dispatch<React.SetStateAction<string[]>>; | ||
handleCheckBoxNA: ( | ||
option: string, | ||
getter: string[], | ||
setter: React.Dispatch<React.SetStateAction<string[]>>, | ||
) => void; | ||
}; | ||
|
||
export const Utilities = (props: UtilitiesProps) => { | ||
return ( | ||
<Margin32> | ||
<FieldHeader> | ||
Utilities Included <Required>*</Required> | ||
</FieldHeader> | ||
<RadioCheckBoxContainer> | ||
<RadioCheckboxCol> | ||
<OptionLabel> | ||
<CustomCheckboxRadio | ||
type="checkbox" | ||
name="Electricity" | ||
value="Electricity" | ||
checked={props.utilities.includes("Electricity")} | ||
onChange={() => { | ||
props.handleCheckBoxNA("Electricity", props.utilities, props.setUtilities); | ||
}} | ||
/> | ||
Electricity | ||
</OptionLabel> | ||
|
||
<OptionLabel> | ||
<CustomCheckboxRadio | ||
type="checkbox" | ||
name="Water" | ||
value="Water" | ||
checked={props.utilities.includes("Water")} | ||
onChange={() => { | ||
props.handleCheckBoxNA("Water", props.utilities, props.setUtilities); | ||
}} | ||
/> | ||
Water | ||
</OptionLabel> | ||
|
||
<OptionLabel> | ||
<CustomCheckboxRadio | ||
type="checkbox" | ||
name="Gas" | ||
value="Gas" | ||
checked={props.utilities.includes("Gas")} | ||
onChange={() => { | ||
props.handleCheckBoxNA("Gas", props.utilities, props.setUtilities); | ||
}} | ||
/> | ||
Gas | ||
</OptionLabel> | ||
|
||
<OptionLabel> | ||
<CustomCheckboxRadio | ||
type="checkbox" | ||
name="Trash" | ||
value="Trash" | ||
checked={props.utilities.includes("Trash")} | ||
onChange={() => { | ||
props.handleCheckBoxNA("Trash", props.utilities, props.setUtilities); | ||
}} | ||
/> | ||
Trash | ||
</OptionLabel> | ||
</RadioCheckboxCol> | ||
</RadioCheckBoxContainer> | ||
</Margin32> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters