diff --git a/cloud-haven-react-app/src/components/TabSystem/TabSystem.js b/cloud-haven-react-app/src/components/TabSystem/TabSystem.js index 5cd4f59..a4e59fc 100644 --- a/cloud-haven-react-app/src/components/TabSystem/TabSystem.js +++ b/cloud-haven-react-app/src/components/TabSystem/TabSystem.js @@ -4,15 +4,16 @@ import profile from "../../images/profile-user.png"; import chatBubble from "../../images/chat.png"; import calendar from "../../images/calendar.png"; import "./TabSystem.css"; +import UserProfile from "../UserProfile/UserProfile"; const TabSystem = () => { return ( User Profile }> - User profile goes here. + Messages }> - Messages goes here. + Messages goes here. Calendar }> Calendar goes here. diff --git a/cloud-haven-react-app/src/components/UserProfile/UserProfile.css b/cloud-haven-react-app/src/components/UserProfile/UserProfile.css new file mode 100644 index 0000000..51bd9e0 --- /dev/null +++ b/cloud-haven-react-app/src/components/UserProfile/UserProfile.css @@ -0,0 +1,69 @@ +.UserProfileWrapper { + margin-top: 2%; +} + +.EditButton { + background-color: #EDEDED; + color: #000000; + width: 6em; + height: 3em; + border-color: #EDEDED; +} + +.EditButton:hover { + background-color: #E5E5E5; + color: #000000; + border-color: #EDEDED; + outline: none; +} + +.InfoAccordion { + margin-top: 0.5%; + margin-bottom: 3%; + width: 100%; +} + +.AccordionCard { + background-color: #e5e5e5; +} + +.AccordionHeaderText { + margin-top: 2%; + font-weight: bold; + color: #254e70; +} + +.AccordionHeader { + margin-top: 2em; + font-size: 18px; + color: #254E70; + font-weight: bold;; + text-align: start; +} + +.SettingsIcon { + margin-top: 0.7em; +} + +.ManageDataText { + font-size: 22px; + color: #254E70; +} + +.Caret { + float: right; +} + +.card-body { + padding: .5em; +} + +.collapse { + padding: 1em; + padding-top: 0; +} + +.collapsing { + padding: 1em; + padding-top: 0; +} diff --git a/cloud-haven-react-app/src/components/UserProfile/UserProfile.js b/cloud-haven-react-app/src/components/UserProfile/UserProfile.js new file mode 100644 index 0000000..b4c3b33 --- /dev/null +++ b/cloud-haven-react-app/src/components/UserProfile/UserProfile.js @@ -0,0 +1,194 @@ +import React from "react"; +import { Container, Row, Col, Button, Nav } from 'react-bootstrap'; +import Accordion from 'react-bootstrap/Accordion' +import Card from 'react-bootstrap/Card' +import Form from 'react-bootstrap/Form' +import profile from "../../images/profile-user.png"; +import settings from "../../images/settings.png" +import invisible from "../../images/invisible.png"; +import caretDown from "../../images/caretDown.png"; +import './UserProfile.css' + +const UserProfile = () => { + + const [ editing, setEditing ] = React.useState(false); + + // TO DO: pull user info from passport/backend + const [ firstName, setFirstName ] = React.useState('Johnald'); + const [ lastName, setLastName ] = React.useState('Testman'); + const [ email, setEmail ] = React.useState('test@test.gov'); + const [ phoneNumber, setPhoneNumber ] = React.useState('555-555-5555'); + const [ birthDate, setBirthDate ] = React.useState('2021-01-01'); + const [ buttonText, setButtonText ] = React.useState("Edit") + + const [ firstNameFormData, setFirstNameFormData ] = React.useState({ + controlId: 'formFirstName', + label: 'First Name', + type: 'name', + focus: null + }) + const [ lastNameFormData, setlastNameFormData ] = React.useState({ + controlId: 'formlastName', + label: 'Last Name', + type: 'name', + focus: null + }) + const [ emailFormData, setEmailFormData ] = React.useState({ + controlId: 'formEmail', + label: 'Email Address', + type: 'email', + focus: null + }) + const [ phoneFormData, setPhoneFormData ] = React.useState({ + controlId: 'formPhone', + label: 'Phone Number', + type: 'tel', + focus: null + }) + const [ birthFormData, setBirthFormData ] = React.useState({ + controlId: 'formBirth', + label: 'Date of Birth', + type: 'date', + focus: null + }) + + const toggleEditing = () => { + setEditing(!editing); + + if (!editing) { + setButtonText("Save") + } + else { + setButtonText("Edit") + } + }; + + const ProfileHeader = () => { + return ( + + + + + + ) + } + + const EditButton = () => { + return ( + + ) + } + + const ManageDataButton = () => { + return ( + + ) + } + + + return ( + + +
Personal Information
+ + + + + + + +
+ + + + {firstNameFormData.label} + setFirstName(e.target.value)} + disabled={!editing} /> + + + + + + {lastNameFormData.label} + setLastName(e.target.value)} + disabled={!editing} /> + + + + + + + + {emailFormData.label} + setEmail(e.target.value)} + disabled={!editing} /> + + + + + + {phoneFormData.label} + setFirstName(e.target.value)} + disabled={!editing} /> + + + + + + {birthFormData.label} + setFirstName(e.target.value)} + disabled={!editing} /> + + + +
+
+
+
+ +
Other Information
+ + + + + + + + Other information goes here. + + + + + + + +
+ + + + ) +} + +export default UserProfile; diff --git a/cloud-haven-react-app/src/images/invisible.png b/cloud-haven-react-app/src/images/invisible.png new file mode 100644 index 0000000..153f618 Binary files /dev/null and b/cloud-haven-react-app/src/images/invisible.png differ