-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.eslintcache
1 lines (1 loc) · 57.5 KB
/
.eslintcache
1
[{"C:\\Users\\Nami\\Sync\\devmountain\\unit7\\lemon-prop\\src\\index.js":"1","C:\\Users\\Nami\\Sync\\devmountain\\unit7\\lemon-prop\\src\\reportWebVitals.js":"2","C:\\Users\\Nami\\Sync\\devmountain\\unit7\\lemon-prop\\src\\redux\\store.js":"3","C:\\Users\\Nami\\Sync\\devmountain\\unit7\\lemon-prop\\src\\App.js":"4","C:\\Users\\Nami\\Sync\\devmountain\\unit7\\lemon-prop\\src\\redux\\paymentReducer.js":"5","C:\\Users\\Nami\\Sync\\devmountain\\unit7\\lemon-prop\\src\\redux\\reducer.js":"6","C:\\Users\\Nami\\Sync\\devmountain\\unit7\\lemon-prop\\src\\Routes.js":"7","C:\\Users\\Nami\\Sync\\devmountain\\unit7\\lemon-prop\\src\\Components\\AccountNavigation.js":"8","C:\\Users\\Nami\\Sync\\devmountain\\unit7\\lemon-prop\\src\\Components\\MaintReq\\MaintReq.js":"9","C:\\Users\\Nami\\Sync\\devmountain\\unit7\\lemon-prop\\src\\Components\\Landing\\RequestSubmitted.js":"10","C:\\Users\\Nami\\Sync\\devmountain\\unit7\\lemon-prop\\src\\Components\\PasswordReset\\RequestReset.js":"11","C:\\Users\\Nami\\Sync\\devmountain\\unit7\\lemon-prop\\src\\Components\\Landing\\RequestAccess.js":"12","C:\\Users\\Nami\\Sync\\devmountain\\unit7\\lemon-prop\\src\\Components\\PasswordReset\\UpdatePassword.js":"13","C:\\Users\\Nami\\Sync\\devmountain\\unit7\\lemon-prop\\src\\Components\\AccountDash\\TheDashboard.js":"14","C:\\Users\\Nami\\Sync\\devmountain\\unit7\\lemon-prop\\src\\Components\\Payments\\Payments.js":"15","C:\\Users\\Nami\\Sync\\devmountain\\unit7\\lemon-prop\\src\\Components\\MaintReq\\SingleMaintReq.js":"16","C:\\Users\\Nami\\Sync\\devmountain\\unit7\\lemon-prop\\src\\Components\\Properties\\Properties.js":"17","C:\\Users\\Nami\\Sync\\devmountain\\unit7\\lemon-prop\\src\\Components\\Tenants\\Tenants.js":"18","C:\\Users\\Nami\\Sync\\devmountain\\unit7\\lemon-prop\\src\\Components\\Landing\\LandingPage.js":"19","C:\\Users\\Nami\\Sync\\devmountain\\unit7\\lemon-prop\\src\\Components\\Payments\\MakePayment.js":"20","C:\\Users\\Nami\\Sync\\devmountain\\unit7\\lemon-prop\\src\\Components\\Payments\\PaymentList.js":"21","C:\\Users\\Nami\\Sync\\devmountain\\unit7\\lemon-prop\\src\\Components\\MaintReq\\MaintReqList.js":"22","C:\\Users\\Nami\\Sync\\devmountain\\unit7\\lemon-prop\\src\\Components\\Properties\\PropertiesList.js":"23","C:\\Users\\Nami\\Sync\\devmountain\\unit7\\lemon-prop\\src\\Components\\Tenants\\TenantList.js":"24","C:\\Users\\Nami\\Sync\\devmountain\\unit7\\lemon-prop\\src\\Components\\Tenants\\TenantRequestList.js":"25","C:\\Users\\Nami\\Sync\\devmountain\\unit7\\lemon-prop\\src\\Components\\Landing\\Login.js":"26","C:\\Users\\Nami\\Sync\\devmountain\\unit7\\lemon-prop\\src\\Components\\Popup.js":"27"},{"size":802,"mtime":1612309323801,"results":"28","hashOfConfig":"29"},{"size":375,"mtime":1611607528947,"results":"30","hashOfConfig":"29"},{"size":381,"mtime":1612475334814,"results":"31","hashOfConfig":"29"},{"size":738,"mtime":1614199558677,"results":"32","hashOfConfig":"29"},{"size":1095,"mtime":1612475334811,"results":"33","hashOfConfig":"29"},{"size":875,"mtime":1612475334813,"results":"34","hashOfConfig":"29"},{"size":1915,"mtime":1612309323800,"results":"35","hashOfConfig":"29"},{"size":2521,"mtime":1612534363954,"results":"36","hashOfConfig":"29"},{"size":531,"mtime":1612534363956,"results":"37","hashOfConfig":"29"},{"size":453,"mtime":1612475334802,"results":"38","hashOfConfig":"29"},{"size":150,"mtime":1611941094800,"results":"39","hashOfConfig":"29"},{"size":1090,"mtime":1612475334802,"results":"40","hashOfConfig":"29"},{"size":156,"mtime":1611941094801,"results":"41","hashOfConfig":"29"},{"size":4514,"mtime":1614210837383,"results":"42","hashOfConfig":"29"},{"size":450,"mtime":1612534363959,"results":"43","hashOfConfig":"29"},{"size":1462,"mtime":1612534363957,"results":"44","hashOfConfig":"29"},{"size":3051,"mtime":1613684650186,"results":"45","hashOfConfig":"29"},{"size":4878,"mtime":1613684650190,"results":"46","hashOfConfig":"29"},{"size":1515,"mtime":1614199558678,"results":"47","hashOfConfig":"29"},{"size":2561,"mtime":1614199545764,"results":"48","hashOfConfig":"29"},{"size":2817,"mtime":1614199545765,"results":"49","hashOfConfig":"29"},{"size":5272,"mtime":1613684650185,"results":"50","hashOfConfig":"29"},{"size":4467,"mtime":1613684650187,"results":"51","hashOfConfig":"29"},{"size":5881,"mtime":1613684650188,"results":"52","hashOfConfig":"29"},{"size":2623,"mtime":1613684650189,"results":"53","hashOfConfig":"29"},{"size":3973,"mtime":1614199558679,"results":"54","hashOfConfig":"29"},{"size":287,"mtime":1614199558679,"results":"55","hashOfConfig":"29"},{"filePath":"56","messages":"57","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"58"},"qwjnh5",{"filePath":"59","messages":"60","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"58"},{"filePath":"61","messages":"62","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"58"},{"filePath":"63","messages":"64","errorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":"65","usedDeprecatedRules":"58"},{"filePath":"66","messages":"67","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"58"},{"filePath":"68","messages":"69","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"58"},{"filePath":"70","messages":"71","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"58"},{"filePath":"72","messages":"73","errorCount":0,"warningCount":2,"fixableErrorCount":0,"fixableWarningCount":0,"source":"74","usedDeprecatedRules":"58"},{"filePath":"75","messages":"76","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"58"},{"filePath":"77","messages":"78","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"58"},{"filePath":"79","messages":"80","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"58"},{"filePath":"81","messages":"82","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"58"},{"filePath":"83","messages":"84","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"58"},{"filePath":"85","messages":"86","errorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"87","messages":"88","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"58"},{"filePath":"89","messages":"90","errorCount":0,"warningCount":2,"fixableErrorCount":0,"fixableWarningCount":0,"source":"91","usedDeprecatedRules":"58"},{"filePath":"92","messages":"93","errorCount":0,"warningCount":3,"fixableErrorCount":0,"fixableWarningCount":0,"source":"94","usedDeprecatedRules":"58"},{"filePath":"95","messages":"96","errorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":"97","usedDeprecatedRules":"58"},{"filePath":"98","messages":"99","errorCount":0,"warningCount":4,"fixableErrorCount":0,"fixableWarningCount":0,"source":"100","usedDeprecatedRules":"58"},{"filePath":"101","messages":"102","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"58"},{"filePath":"103","messages":"104","errorCount":0,"warningCount":5,"fixableErrorCount":0,"fixableWarningCount":0,"source":"105","usedDeprecatedRules":"58"},{"filePath":"106","messages":"107","errorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":"108","usedDeprecatedRules":"58"},{"filePath":"109","messages":"110","errorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":"111","usedDeprecatedRules":"58"},{"filePath":"112","messages":"113","errorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":"114","usedDeprecatedRules":"58"},{"filePath":"115","messages":"116","errorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":"117","usedDeprecatedRules":"58"},{"filePath":"118","messages":"119","errorCount":0,"warningCount":2,"fixableErrorCount":0,"fixableWarningCount":0,"source":"120","usedDeprecatedRules":"58"},{"filePath":"121","messages":"122","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"58"},"C:\\Users\\Nami\\Sync\\devmountain\\unit7\\lemon-prop\\src\\index.js",[],["123","124"],"C:\\Users\\Nami\\Sync\\devmountain\\unit7\\lemon-prop\\src\\reportWebVitals.js",[],"C:\\Users\\Nami\\Sync\\devmountain\\unit7\\lemon-prop\\src\\redux\\store.js",[],"C:\\Users\\Nami\\Sync\\devmountain\\unit7\\lemon-prop\\src\\App.js",["125"],"import React, { useEffect } from 'react'\r\nimport axios from 'axios'\r\nimport routes from './Routes'\r\nimport AccountNavigation from './Components/AccountNavigation'\r\n// import './App.css';\r\nimport { connect } from 'react-redux';\r\nimport { loginUser } from './redux/reducer'\r\n\r\nfunction App(props) {\r\n useEffect(() => {\r\n axios.get(`/auth/user`).then((res) => {\r\n props.loginUser(res.data.email, res.data.user_id, res.data.admin, res.data.approved);\r\n }).catch(err => console.log(err))\r\n }, [])\r\n\r\n return (\r\n <div className=\"App\">\r\n <AccountNavigation />\r\n {routes}\r\n </div>\r\n );\r\n}\r\nfunction mapStateToProps(reduxState) {\r\n return reduxState\r\n}\r\nexport default connect(mapStateToProps, { loginUser })(App)\r\n","C:\\Users\\Nami\\Sync\\devmountain\\unit7\\lemon-prop\\src\\redux\\paymentReducer.js",[],"C:\\Users\\Nami\\Sync\\devmountain\\unit7\\lemon-prop\\src\\redux\\reducer.js",[],"C:\\Users\\Nami\\Sync\\devmountain\\unit7\\lemon-prop\\src\\Routes.js",[],"C:\\Users\\Nami\\Sync\\devmountain\\unit7\\lemon-prop\\src\\Components\\AccountNavigation.js",["126","127"],"import React from 'react';\r\nimport { Link, withRouter } from 'react-router-dom';\r\nimport { connect } from 'react-redux';\r\nimport { loginUser, logout } from '../redux/reducer'\r\nimport axios from 'axios'\r\nimport lemon from '../img/lemon_prop.png'\r\n\r\nconst AccNav = props => {\r\n function logoutUser() {\r\n axios.delete('/auth/logout')\r\n .then((res) => {\r\n props.logout()\r\n })\r\n .catch(err => console.log(err))\r\n }\r\n\r\n return (\r\n <div className=\"navigation-comp\">\r\n {\r\n !props.email && !props.approved ? (\r\n null\r\n ) : (\r\n props.admin === true ? (\r\n <nav>\r\n <div className='nav-header'>\r\n <img className='logo' src={lemon} />\r\n <h1>LemonProp</h1>\r\n </div>\r\n <div className='links'>\r\n <Link className='nav-link' id='home' to='/dashboard'>Home</Link>\r\n <Link className='nav-link' to='/payments'>Payments</Link>\r\n <Link className='nav-link' to='/maintreq'>Requests</Link>\r\n <Link className='nav-link' to='/properties'>Properties</Link>\r\n <Link className='nav-link' to='/tenants'>Tenants</Link>\r\n </div>\r\n\r\n <Link\r\n to='/'\r\n className='btn-1'\r\n onClick={logoutUser}>\r\n Logout\r\n </Link>\r\n\r\n </nav>\r\n ) : (\r\n <nav>\r\n <div className='nav-header'>\r\n <img className='logo' src={lemon} />\r\n <h1>LemonProp</h1>\r\n </div>\r\n <div className='links'>\r\n <Link className='nav-link' id='home' to='/dashboard'>Home</Link>\r\n <Link className='nav-link' to='/payments'>Payments</Link>\r\n <Link className='nav-link' to='/maintreq'>Requests</Link>\r\n </div>\r\n <Link\r\n to='/'\r\n className='btn-1'\r\n onClick={logoutUser}>\r\n Logout\r\n </Link>\r\n\r\n </nav>\r\n )\r\n )\r\n }\r\n </div >\r\n )\r\n}\r\nfunction mapStateToProps(reduxState) {\r\n return {\r\n email: reduxState.user.email,\r\n admin: reduxState.user.admin,\r\n approved: reduxState.user.approved\r\n }\r\n}\r\n\r\nexport default withRouter((connect(mapStateToProps, { loginUser, logout })(AccNav)))","C:\\Users\\Nami\\Sync\\devmountain\\unit7\\lemon-prop\\src\\Components\\MaintReq\\MaintReq.js",[],"C:\\Users\\Nami\\Sync\\devmountain\\unit7\\lemon-prop\\src\\Components\\Landing\\RequestSubmitted.js",[],"C:\\Users\\Nami\\Sync\\devmountain\\unit7\\lemon-prop\\src\\Components\\PasswordReset\\RequestReset.js",[],"C:\\Users\\Nami\\Sync\\devmountain\\unit7\\lemon-prop\\src\\Components\\Landing\\RequestAccess.js",[],"C:\\Users\\Nami\\Sync\\devmountain\\unit7\\lemon-prop\\src\\Components\\PasswordReset\\UpdatePassword.js",[],"C:\\Users\\Nami\\Sync\\devmountain\\unit7\\lemon-prop\\src\\Components\\AccountDash\\TheDashboard.js",["128"],"C:\\Users\\Nami\\Sync\\devmountain\\unit7\\lemon-prop\\src\\Components\\Payments\\Payments.js",[],"C:\\Users\\Nami\\Sync\\devmountain\\unit7\\lemon-prop\\src\\Components\\MaintReq\\SingleMaintReq.js",["129","130"],"import React, { useState, useEffect } from 'react'\r\nimport axios from 'axios'\r\nimport { connect } from 'react-redux'\r\n\r\nconst SingleMaintReq = props => {\r\n const [subject, setSubject] = useState('')\r\n const [request, setRequest] = useState('')\r\n const [admin] = useState(props.admin)\r\n const [user_id] = useState(props.user_id)\r\n const [prop_id] = useState(props.prop_id)\r\n\r\n console.log(props)\r\n\r\n function submitMaintReq() {\r\n axios.post(`/api/tenant/${user_id}/mr`, { prop_id, subject, request })\r\n .then(() => {\r\n props.history.push('/maintreq')\r\n })\r\n .catch(err => console.log(err))\r\n }\r\n\r\n\r\n\r\n return (\r\n <div className='page'>\r\n <h1>Maintenance Request</h1>\r\n <input\r\n value={subject}\r\n onChange={e => setSubject(e.target.value)}\r\n placeholder=\"Subject\"\r\n type=\"text\"\r\n >\r\n </input>\r\n <input\r\n value={request}\r\n onChange={e => setRequest(e.target.value)}\r\n placeholder=\"What is the issue?\"\r\n type=\"text\"\r\n >\r\n </input>\r\n <button className=\"btn-save\" onClick={submitMaintReq}>Submit</button>\r\n </div>\r\n )\r\n}\r\n\r\nfunction mapStateToProps(state) {\r\n console.log('state:', state)\r\n return {\r\n email: state.user.email,\r\n user_id: state.user.user_id,\r\n admin: state.user.admin,\r\n approved: state.user.approved,\r\n prop_id: state.user.prop_id\r\n }\r\n}\r\n\r\nexport default connect(mapStateToProps)(SingleMaintReq)","C:\\Users\\Nami\\Sync\\devmountain\\unit7\\lemon-prop\\src\\Components\\Properties\\Properties.js",["131","132","133"],"import axios from 'axios'\r\nimport React, { useState } from 'react'\r\nimport PropertiesList from '../Properties/PropertiesList'\r\n\r\nconst Properties = props => {\r\n const [newPropertyDisplay, setNewPropertyDisplay] = useState(false)\r\n const [currentProperties, setCurrentProperties] = useState([])\r\n const [submitProperty, setSubmitProperty] = useState(false)\r\n const [address, setAddress] = useState('')\r\n const [leaseAmt, setLeaseAmt] = useState()\r\n const [leaseStatus, setLeaseStatus] = useState(null)\r\n const { user_id, admin } = props\r\n\r\n function newProperty() {\r\n setSubmitProperty(false)\r\n setNewPropertyDisplay(true)\r\n }\r\n\r\n function submit() {\r\n axios.post('/api/manager/properties', {\r\n address: address,\r\n leaseAmt: leaseAmt,\r\n status: leaseStatus !== null ? leaseStatus : false\r\n })\r\n .then(res => {\r\n setSubmitProperty(true)\r\n setNewPropertyDisplay(false)\r\n setAddress('')\r\n setLeaseAmt()\r\n setLeaseStatus(null)\r\n axios.get('/api/manager/properties')\r\n .then(res => {\r\n setCurrentProperties(res.data)\r\n })\r\n .catch(err => console.log(err))\r\n })\r\n }\r\n\r\n function checkbox(checkbox) {\r\n if (checkbox.checked === true) {\r\n setLeaseStatus(true)\r\n } else if (checkbox.checked === false) {\r\n setLeaseStatus(false)\r\n }\r\n }\r\n\r\n return (\r\n <div className='page'>\r\n <div>\r\n <div>\r\n <div className='title-container'>\r\n <h1>Current Properties</h1>\r\n </div>\r\n <PropertiesList setCurrentProperties={setCurrentProperties} currentProperties={currentProperties} />\r\n </div>\r\n <button className=\"submit btn-1\" onClick={() => newProperty()}>New Property</button>\r\n </div>\r\n {newPropertyDisplay === true ? (\r\n <div>\r\n <div>\r\n <div>Address: </div>\r\n <input onChange={e => setAddress(e.target.value)}></input>\r\n </div>\r\n <div>\r\n <div>Lease Amount: </div>\r\n <input onChange={e => setLeaseAmt(e.target.value)} placeholder='$'></input>\r\n </div>\r\n <div>\r\n <input type='checkbox' name='leaseStatus' id='leaseStatus' onClick={() => checkbox(document.getElementById('leaseStatus'))}></input>\r\n <label htmlFor={'leaseStatus'}>Active Lease?</label>\r\n </div>\r\n <div>\r\n <button className='Submit btn-save' onClick={() => submit()}>Submit</button>\r\n </div>\r\n </div>) : null}\r\n </div>\r\n )\r\n}\r\n\r\nexport default Properties","C:\\Users\\Nami\\Sync\\devmountain\\unit7\\lemon-prop\\src\\Components\\Tenants\\Tenants.js",["134"],"import axios from 'axios'\r\nimport React, { useState } from 'react'\r\nimport TenantList from '../Tenants/TenantList'\r\nimport TenantRequestList from '../Tenants/TenantRequestList'\r\n\r\nconst Tenants = props => {\r\n const [newTenantDisplay, setNewTenantDisplay] = useState(false)\r\n const [currentTenants, setCurrentTenants] = useState([])\r\n const [submitTenant, setSubmitTenant] = useState(false)\r\n const [firstName, setFirstName] = useState('')\r\n const [lastName, setLastName] = useState('')\r\n const [email, setEmail] = useState('')\r\n const [phone, setPhone] = useState('')\r\n const [propId, setPropId] = useState()\r\n const [dueDate, setDueDate] = useState('')\r\n const [password, setPassword] = useState('')\r\n const [petBool, setPetBool] = useState(null)\r\n\r\n function newTenant() {\r\n setSubmitTenant(false)\r\n setNewTenantDisplay(true)\r\n }\r\n\r\n function submit() {\r\n axios.post('/api/manager/tenants', {\r\n first_name: firstName,\r\n last_name: lastName,\r\n phone: phone,\r\n email: email,\r\n pet: petBool !== null ? petBool : false,\r\n is_approved: true,\r\n prop_id: propId,\r\n password: password,\r\n due_date: dueDate\r\n })\r\n .then(res => {\r\n setSubmitTenant(true)\r\n setNewTenantDisplay(false)\r\n setFirstName('')\r\n setLastName('')\r\n setPhone('')\r\n setEmail('')\r\n setPetBool(null)\r\n setPropId()\r\n setPassword('')\r\n setDueDate('')\r\n axios.get('/api/manager/tenants/true')\r\n .then(res => {\r\n setCurrentTenants(res.data)\r\n })\r\n .catch(err => console.log(err))\r\n })\r\n }\r\n\r\n function checkbox(checkbox) {\r\n if (checkbox.checked === true) {\r\n setPetBool(true)\r\n } else if (checkbox.checked === false) {\r\n setPetBool(false)\r\n }\r\n }\r\n\r\n return (\r\n <div className='page'>\r\n <div>\r\n <div>\r\n <div className='title-container'>\r\n <h1>Current Tenants</h1>\r\n </div>\r\n <TenantList setCurrentTenants={setCurrentTenants} currentTenants={currentTenants} />\r\n </div>\r\n <div>\r\n <h1>Tenant Requests</h1>\r\n <TenantRequestList setCurrentTenants={setCurrentTenants} />\r\n </div>\r\n <button className=\"btn-edit\" onClick={newTenant}>New Tenant</button>\r\n </div>\r\n {newTenantDisplay === true ? (\r\n <div>\r\n <div>\r\n <div>\r\n <div>First Name: </div>\r\n <input onChange={e => setFirstName(e.target.value)}></input>\r\n </div>\r\n <div>\r\n <div>Last Name: </div>\r\n <input onChange={e => setLastName(e.target.value)}></input>\r\n </div>\r\n <div>\r\n <div>Property ID: </div>\r\n <input onChange={e => setPropId(e.target.value)}></input>\r\n </div>\r\n </div>\r\n <div>\r\n <div>\r\n <div>Phone: </div>\r\n <input onChange={e => setPhone(e.target.value)}></input>\r\n </div>\r\n <div>\r\n <div>Email: </div>\r\n <input onChange={e => setEmail(e.target.value)}></input>\r\n </div>\r\n <div>\r\n <div>Password: </div>\r\n <input onChange={e => setPassword(e.target.value)}></input>\r\n </div>\r\n </div>\r\n <div>\r\n <div>\r\n <div>Due Date: </div>\r\n <input onChange={e => setDueDate(e.target.value)}></input>\r\n </div>\r\n <div>\r\n <input type='checkbox' name='pets' id='pets' onClick={() => checkbox(document.getElementById('pets'))}></input>\r\n <label htmlFor={'pets'}>Pets?</label>\r\n </div>\r\n <div>\r\n <button className='btn-save' onClick={submit}>Submit</button>\r\n </div>\r\n </div>\r\n </div>) : null}\r\n </div>\r\n )\r\n}\r\nexport default Tenants","C:\\Users\\Nami\\Sync\\devmountain\\unit7\\lemon-prop\\src\\Components\\Landing\\LandingPage.js",["135","136","137","138"],"import React from 'react'\r\nimport Login from './Login'\r\nimport '../../scss/_landing.scss'\r\nimport logo from '../../img/lemon_prop.png'\r\nimport rental1 from '../../img/rental1.png'\r\nimport rental2 from '../../img/rental2.png'\r\nimport rental7 from '../../img/rental7.png'\r\n\r\nconst LandingPage = props => {\r\n return (\r\n <div className=\"landing\">\r\n <div className=\"grid\">\r\n <div className=\"diamond-sm\"></div>\r\n <div className=\"diamond-med\"></div>\r\n <div className=\"diamond-big\"></div>\r\n </div>\r\n\r\n <div className=\"header\">\r\n <img className=\"logo\" src={logo} ></img>\r\n <h1 className=\"main-title\">LemonProp Management</h1>\r\n {/* The Login that is rendered below will eventually be moved to an onClick function for a popover. We are displaying it now to test further functionality while we are still getting the popover up and running */}\r\n <Login {...props} />\r\n </div>\r\n\r\n <div className=\"landing-middle\">\r\n <h2>Finding a home?</h2>\r\n <h1>EASY.</h1>\r\n <hr />\r\n <h3>Checkout some of our properties:</h3>\r\n </div>\r\n\r\n <div className=\"rental-row\">\r\n <div className=\"rental-container\">\r\n <img src={rental1} ></img>\r\n </div>\r\n <div className=\"rental-container\">\r\n <img src={rental2} ></img>\r\n </div>\r\n <div className=\"rental-container\">\r\n <img src={rental7} ></img>\r\n </div>\r\n </div>\r\n\r\n </div>\r\n\r\n )\r\n}\r\nexport default LandingPage","C:\\Users\\Nami\\Sync\\devmountain\\unit7\\lemon-prop\\src\\Components\\Payments\\MakePayment.js",[],"C:\\Users\\Nami\\Sync\\devmountain\\unit7\\lemon-prop\\src\\Components\\Payments\\PaymentList.js",["139","140","141","142","143"],"import React, { useEffect, useState } from 'react';\r\nimport axios from 'axios'\r\nimport { connect } from 'react-redux';\r\nimport { updatePaymentsTnt, updatePaymentsMgr } from '../../redux/paymentReducer';\r\n\r\n// List of tenants' past payments\r\nconst PaymentList = props => {\r\n let { properties, changeProperties } = useState([])\r\n const { admin, user_id } = props\r\n const [addresses, setAddresses] = useState([]);\r\n const [currentAddress, setCurrentAddress] = useState()\r\n\r\n useEffect(() => {\r\n if (admin === false) {\r\n props.updatePaymentsTnt(user_id)\r\n // .then(res => console.log(res))\r\n axios.get(`/api/tenant/${user_id}/property`)\r\n .then(res => {\r\n setAddresses(res.data.address)\r\n })\r\n .catch(err => console.log(err))\r\n } else if (admin === true) {\r\n props.updatePaymentsMgr()\r\n axios.get('/api/manager/properties')\r\n .then(res => {\r\n let add = res.data.map(e => e.address)\r\n console.log(add)\r\n setAddresses(add)\r\n console.log(addresses)\r\n })\r\n .catch(err => console.log(err))\r\n }\r\n }, [user_id])\r\n\r\n function mappedList(array) {\r\n return array.map((el, i, arr) => {\r\n console.log(el.date_paid)\r\n let date = el.date_paid.slice(0, 10)\r\n return (\r\n <div key={el.invoice_id} className='row'>\r\n <div className='list-item'> {el.invoice_id} </div>\r\n {admin === true ? <div className='list-item'> {el.user_id} </div> : null}\r\n <div className='list-item'> ${el.amt_paid} </div>\r\n <div className='list-item'> {date} </div>\r\n </div>\r\n )\r\n })\r\n }\r\n\r\n return (\r\n <div className='sub-page'>\r\n <h2>Payment History</h2>\r\n <div className='row'>\r\n <div className='list-item list-title'>Invoice ID</div>\r\n {admin === true ? <div className='list-item list-title'>User ID</div> : null}\r\n <div className='list-item list-title'>Amount Paid</div>\r\n <div className='list-item list-title'>Date Paid</div>\r\n </div>\r\n\r\n {admin === false ? mappedList(props.tnt_payments_list) : mappedList(props.mgr_payments_list)}\r\n </div>\r\n )\r\n}\r\n\r\nfunction mapStateToProps(state) {\r\n return {\r\n user_id: state.user.user_id,\r\n admin: state.user.admin,\r\n mgr_payments_list: state.payments.mgr_payments_list,\r\n tnt_payments_list: state.payments.tnt_payments_list\r\n }\r\n}\r\n\r\nexport default connect(mapStateToProps, { updatePaymentsTnt, updatePaymentsMgr })(PaymentList)","C:\\Users\\Nami\\Sync\\devmountain\\unit7\\lemon-prop\\src\\Components\\MaintReq\\MaintReqList.js",["144"],"import axios from 'axios'\r\nimport React, { useEffect, useState } from 'react'\r\nimport { connect } from 'react-redux'\r\n\r\nconst MaintReqList = props => {\r\n const [myList, setMyList] = useState([])\r\n const [openList, setOpenList] = useState([])\r\n const [closedList, setClosedList] = useState([])\r\n const { user_id, admin } = props\r\n\r\n useEffect(() => {\r\n if (admin === false) {\r\n axios.get(`/api/tenant/${user_id}/mr`)\r\n .then(res => {\r\n setMyList(res.data)\r\n })\r\n .catch(err => console.log(err))\r\n } else if (admin === true) {\r\n axios.get(`/api/manager/mr/admin/false`)\r\n .then(res => {\r\n setOpenList(res.data)\r\n })\r\n .catch(err => console.log(err))\r\n axios.get('/api/manager/mr/admin/true')\r\n .then(res => {\r\n setClosedList(res.data)\r\n })\r\n .catch(err => console.log(err))\r\n }\r\n }, [user_id])\r\n\r\n\r\n\r\n function mapIt(array) {\r\n return array.map((element) => {\r\n let date = element.date_sub.slice(0, 10)\r\n return (\r\n <div className='maint-req' key={element.maint_req_id}>\r\n {(admin === false && !props.open) ? (\r\n <div className='row'>\r\n \r\n <div className='list-item' >{date}</div>\r\n <div className='list-item'>{element.subject}</div>\r\n {admin === false ? null : <div className='list-item'>{element.prop_id}</div>}\r\n\r\n {admin === true && element.status === 'open' ? <button className=\"btn-save\">Complete</button> : null}\r\n </div>\r\n ) : (\r\n element.is_compl === false ? (\r\n <div className='row'>\r\n \r\n <div className='list-item'>{date}</div>\r\n <div className='list-item'>{element.subject}</div>\r\n {admin === false ? null : <div className='list-item'>{element.prop_id}</div>}\r\n\r\n {admin === true && element.status === 'open' ? <button className=\"btn-save\">Complete</button> : null}\r\n </div>\r\n ) : null)}\r\n {(admin === true && element.is_compl === true && !props.open) ? (\r\n <div key={element.maint_req_id} className='row'>\r\n \r\n <div className='list-item'>{date}</div>\r\n <div className='list-item'>{element.subject}</div>\r\n {admin === false ? null : <div className='list-item'>{element.prop_id}</div>}\r\n {admin === true && element.status === 'open' ? <button className=\"btn-save\">Complete</button> : null}\r\n </div>\r\n ) : null}\r\n </div>\r\n )\r\n })\r\n }\r\n\r\n return (\r\n <div className='sub-page '>\r\n \r\n { (admin === false && !props.open) ? (\r\n <div>\r\n <div className='row'>\r\n <div className='list-item list-title'>Date Submitted</div>\r\n <div className='list-item list-title'>Subject</div>\r\n {admin === true ? <div className='list-item list-title'>Property ID</div> : null}\r\n </div>\r\n {mapIt(myList)}\r\n </div>) : null}\r\n {\r\n (admin === false && props.open) ? (\r\n <div>\r\n <h2>Open Requests</h2>\r\n <div className='row'>\r\n <div className='list-item list-title'>Date Submitted</div>\r\n <div className='list-item list-title'>Subject</div>\r\n {admin === true ? <div className='list-item list-title'>Property ID</div> : null}\r\n </div>\r\n {mapIt(myList)}\r\n </div>\r\n ) : null\r\n }\r\n {\r\n (admin === true && !props.open) ? (\r\n <div>\r\n <h2>Open Requests:</h2>\r\n <div className='row'>\r\n <div className='list-item list-title'>Date Submitted</div>\r\n <div className='list-item list-title'>Subject</div>\r\n {admin === true ? <div className='list-item list-title'>Property ID</div> : null}\r\n </div>\r\n {mapIt(openList)}\r\n </div>) : null\r\n }\r\n {\r\n (admin === true && !props.open) ? (\r\n <div>\r\n <h2>Closed Requests:</h2>\r\n <div className='row'>\r\n <div className='list-item list-title'>Date Submitted</div>\r\n <div className='list-item list-title'>Subject</div>\r\n {admin === true ? <div className='list-item list-title'>Property ID</div> : null}\r\n </div>\r\n {mapIt(closedList)}\r\n </div>) : null\r\n }\r\n {\r\n (admin === true && props.open) ? (\r\n <div>\r\n <h2>Open Requests:</h2>\r\n <div className='row'>\r\n <div className='list-item list-title'>Date Submitted</div>\r\n <div className='list-item list-title'>Subject</div>\r\n {admin === true ? <div className='list-item list-title'>Property ID</div> : null}\r\n </div>\r\n {mapIt(openList)}\r\n </div>) : null\r\n }\r\n </div >\r\n )\r\n}\r\n\r\nfunction mapStateToProps(state) {\r\n return {\r\n email: state.user.email,\r\n user_id: state.user.user_id,\r\n admin: state.user.admin,\r\n approved: state.user.approved,\r\n prop_id: state.user.prop_id\r\n }\r\n}\r\n\r\nexport default connect(mapStateToProps)(MaintReqList)","C:\\Users\\Nami\\Sync\\devmountain\\unit7\\lemon-prop\\src\\Components\\Properties\\PropertiesList.js",["145"],"import React, { useState, useEffect } from 'react'\r\nimport axios from 'axios'\r\nimport { connect } from 'react-redux'\r\n\r\nconst PropertiesList = props => {\r\n const { setCurrentProperties, currentProperties } = props\r\n const [address, setAddress] = useState('')\r\n const [leaseAmt, setLeaseAmt] = useState()\r\n const [leaseStatus, setLeaseStatus] = useState(null)\r\n const [buttonId, setButtonId] = useState()\r\n const [editBool, setEditBool] = useState(false)\r\n const { user_id, admin } = props\r\n\r\n useEffect(() => {\r\n if (admin === true) {\r\n axios.get('/api/manager/properties')\r\n .then(res => {\r\n setCurrentProperties(res.data)\r\n })\r\n .catch(err => console.log(err))\r\n }\r\n }, [user_id])\r\n\r\n function clickEdit(id) {\r\n setEditBool(true)\r\n setButtonId(id)\r\n }\r\n\r\n function checkbox(checkbox) {\r\n if (checkbox.checked === true) {\r\n setLeaseStatus(true)\r\n } else if (checkbox.checked === false) {\r\n setLeaseStatus(false)\r\n }\r\n }\r\n\r\n function submit(element) {\r\n axios.put(`/api/manager/properties/${element.prop_id}`, {\r\n address: address !== '' ? address : element.address,\r\n leaseAmt: leaseAmt !== undefined ? leaseAmt : element.lease_amt,\r\n status: leaseStatus !== null ? leaseStatus : element.lease_status\r\n })\r\n .then(res => {\r\n setEditBool(false)\r\n setAddress('')\r\n setLeaseAmt()\r\n setLeaseStatus(null)\r\n axios.get('/api/manager/properties')\r\n .then(res => {\r\n setCurrentProperties(res.data)\r\n })\r\n .catch(err => console.log(err))\r\n })\r\n .catch(err => console.log(err))\r\n }\r\n\r\n function mapIt(array) {\r\n return array.map((element) => {\r\n return (\r\n <div key={element.prop_id}>\r\n <div>\r\n {editBool === false ? (\r\n <div className='row'>\r\n <button className=\"btn-edit\" onClick={() => clickEdit(element.prop_id)}>Edit</button>\r\n <div className='list-item'>{element.prop_id}</div>\r\n <div className='list-item'>{element.address}</div>\r\n <div className='list-item'>{`$${element.lease_amt}`}</div>\r\n <div className='list-item'>{element.lease_status === true ? 'Yes' : 'No'} </div>\r\n </div>\r\n ) : (\r\n element.prop_id === buttonId ? (\r\n <div className='row'>\r\n <div>{element.prop_id}</div>\r\n <input className='list-item' defaultValue={element.address} onChange={e => setAddress(e.target.value)}></input>\r\n <input className='list-item' defaultValue={element.lease_amt} onChange={e => setLeaseAmt(e.target.value)}></input>\r\n <input className='list-item' type='checkbox' name='leaseStatus' id='leaseStatus' defaultChecked={element.lease_status} onClick={() => checkbox(document.getElementById('leaseStatus'))}></input>\r\n <label htmlFor={'leaseStatus'}>Active Lease?</label>\r\n <button className='submit btn-save' onClick={() => submit(element)}>Save</button>\r\n </div>\r\n ) : (\r\n <div >\r\n <div className='list-item'>{element.prop_id}</div>\r\n <div className='list-item'>{element.address}</div>\r\n <div className='list-item'>{`$${element.lease_amt}`}</div>\r\n \r\n <div className='list-item'>{element.lease_status === true ? 'Yes' : 'No'} </div>\r\n\r\n </div>\r\n )\r\n )\r\n }\r\n </div>\r\n </div>\r\n )\r\n })\r\n }\r\n\r\n return (\r\n <div className='sub-page'>\r\n <div className='row properties-titles'>\r\n {/* <div className='list-item list-title'>{null}</div> */}\r\n <div className='list-item list-title'>Property ID</div>\r\n <div className='list-item list-title'>Address</div>\r\n <div className='list-item list-title'>Lease Amount</div>\r\n <div className='list-title list-item'>Occupied?</div>\r\n </div>\r\n {mapIt(currentProperties)}\r\n </div>\r\n )\r\n}\r\n\r\nfunction mapStateToProps(state) {\r\n return {\r\n email: state.user.email,\r\n user_id: state.user.user_id,\r\n admin: state.user.admin,\r\n approved: state.user.approved\r\n }\r\n}\r\nexport default connect(mapStateToProps)(PropertiesList)","C:\\Users\\Nami\\Sync\\devmountain\\unit7\\lemon-prop\\src\\Components\\Tenants\\TenantList.js",["146"],"import axios from 'axios'\r\nimport React, { useEffect, useState } from 'react'\r\nimport { connect } from 'react-redux'\r\n\r\nconst TenantList = props => {\r\n const { setCurrentTenants, currentTenants } = props\r\n const [addresses, setAddresses] = useState([])\r\n const [editBool, setEditBool] = useState(false)\r\n const [firstName, setFirstName] = useState('')\r\n const [lastName, setLastName] = useState('')\r\n const [email, setEmail] = useState('')\r\n const [phone, setPhone] = useState('')\r\n const [propId, setPropId] = useState()\r\n const [buttonId, setButtonId] = useState()\r\n const [petBool, setPetBool] = useState(null)\r\n const { user_id, admin } = props\r\n\r\n useEffect(() => {\r\n if (admin === true) {\r\n axios.get('/api/manager/tenants/true')\r\n .then(res => {\r\n setCurrentTenants(res.data)\r\n })\r\n .catch(err => console.log(err))\r\n axios.get('/api/manager/properties')\r\n .then(res => {\r\n setAddresses(res.data)\r\n })\r\n .catch(err => console.log(err))\r\n }\r\n }, [user_id])\r\n\r\n function clickEdit(id) {\r\n setEditBool(true)\r\n setButtonId(id)\r\n }\r\n\r\n function checkbox(checkbox) {\r\n if (checkbox.checked === true) {\r\n setPetBool(true)\r\n } else if (checkbox.checked === false) {\r\n setPetBool(false)\r\n }\r\n }\r\n\r\n function submit(element) {\r\n axios.put(`/api/manager/tenants/${element.user_id}`, {\r\n first_name: firstName !== '' ? firstName : element.first_name,\r\n last_name: lastName !== '' ? lastName : element.last_name,\r\n phone: phone !== '' ? phone : element.phone,\r\n email: email !== '' ? email : element.email,\r\n pet: petBool !== null ? petBool : element.pet,\r\n is_approved: true,\r\n prop_id: propId ? propId : element.prop_id\r\n })\r\n .then(res => {\r\n setEditBool(false)\r\n setFirstName('')\r\n setLastName('')\r\n setPhone('')\r\n setEmail('')\r\n setPetBool(null)\r\n setPropId()\r\n axios.get('/api/manager/tenants/true')\r\n .then(res => {\r\n setCurrentTenants(res.data)\r\n })\r\n .catch(err => console.log(err))\r\n })\r\n .catch(err => console.log(err))\r\n }\r\n\r\n function mapIt(array) {\r\n let currentAddress\r\n return array.map((element) => {\r\n let date = element.due_date.slice(0, 10)\r\n for (let i = 0; i < addresses.length; i++) {\r\n if (element.prop_id === addresses[i].prop_id) {\r\n currentAddress = addresses[i].address\r\n }\r\n }\r\n return (\r\n <div key={element.user_id} >\r\n <div >\r\n \r\n {editBool === false ? (\r\n <div className='row tenant-row'>\r\n <button className=\"btn-edit\" onClick={() => clickEdit(element.user_id)}>Edit</button>\r\n <div className='list-item tenant-item'>{element.user_id}</div>\r\n <div className='list-item tenant-item'>{`${element.first_name} ${element.last_name}`}</div>\r\n <div className='list-item tenant-item'>{element.prop_id && currentAddress}</div>\r\n <div className='list-item tenant-item'>{element.email}</div>\r\n <div className='list-item tenant-item'>{element.phone}</div>\r\n {element.pet === true ? <div className='list-tem'>Yes</div> : <div className='list-tem'>No</div>}\r\n <div className='list-tem'>{date}</div>\r\n </div>\r\n ) : (\r\n element.user_id === buttonId ? (\r\n <div className='row tenant-row'>\r\n <div>{element.user_id}</div>\r\n <input className='list-item' defaultValue={`${element.first_name}`} onChange={e => setFirstName(e.target.value)}></input>\r\n <input className='list-item' defaultValue={`${element.last_name}`} onChange={e => setLastName(e.target.value)}></input>\r\n <input className='list-item' defaultValue={element.prop_id} onChange={e => setPropId(e.target.value)}></input>\r\n <input className='list-item' defaultValue={element.email} onChange={e => setEmail(e.target.value)}></input>\r\n <input className='list-item' defaultValue={element.phone} onChange={e => setPhone(e.target.value)}></input>\r\n <input className='list-item' type='checkbox' name='pets' id='pets' defaultChecked={element.pet} onClick={() => checkbox(document.getElementById('pets'))}></input>\r\n <label htmlFor={'pets'}>Pets?</label>\r\n <button className='submit btn-save' onClick={() => submit(element)}>Save</button>\r\n </div>\r\n ) : (\r\n <div className='row tenant-row'>\r\n <div className='list-item tenant-item'>{element.user_id}</div>\r\n <div className='list-item tenant-item'>{`${element.first_name} ${element.last_name}`}</div>\r\n <div className='list-item tenant-item'>{currentAddress}</div>\r\n <div className='list-item tenant-item'>{element.email}</div>\r\n <div className='list-item tenant-item'>{element.phone}</div>\r\n {element.pets === true ? <div className='list-item tenant-item'>Yes</div> : <div className='list-item tenant-item' >No</div>}\r\n <div className='list-item'>{date}\r\n </div>\r\n </div>\r\n )\r\n )\r\n }\r\n </div>\r\n </div>\r\n )\r\n })\r\n }\r\n\r\n return (\r\n <div className='sub-page'>\r\n {mapIt(currentTenants)}\r\n </div>\r\n )\r\n}\r\n\r\nfunction mapStateToProps(state) {\r\n return {\r\n email: state.user.email,\r\n user_id: state.user.user_id,\r\n admin: state.user.admin,\r\n approved: state.user.approved\r\n }\r\n}\r\n\r\nexport default connect(mapStateToProps)(TenantList)","C:\\Users\\Nami\\Sync\\devmountain\\unit7\\lemon-prop\\src\\Components\\Tenants\\TenantRequestList.js",["147"],"import axios from 'axios'\r\nimport React, { useEffect, useState } from 'react'\r\nimport { connect } from 'react-redux'\r\n\r\nconst TenantRequestList = props => {\r\n\r\n const [tenantRequests, setTenantRequests] = useState([])\r\n const { setCurrentTenants } = props\r\n const { user_id, admin } = props\r\n\r\n useEffect(() => {\r\n if (admin === false) {\r\n return ('You do not have access to this data.')\r\n } else if (admin === true) {\r\n axios.get('/api/manager/tenants/false')\r\n .then(res => {\r\n setTenantRequests(res.data)\r\n })\r\n .catch(err => console.log(err))\r\n }\r\n }, [user_id])\r\n\r\n function approve(element) {\r\n axios.put(`/api/manager/tenants/${element.user_id}`, {\r\n first_name: element.first_name,\r\n last_name: element.last_name,\r\n phone: element.phone,\r\n email: element.email,\r\n pet: element.pet,\r\n is_approved: true,\r\n prop_id: element.prop_id\r\n })\r\n .then(res => {\r\n axios.get('/api/manager/tenants/false')\r\n .then(res => {\r\n setTenantRequests(res.data)\r\n axios.get('/api/manager/tenants/true')\r\n .then(res => {\r\n setCurrentTenants(res.data)\r\n })\r\n .catch(err => console.log(err))\r\n })\r\n .catch(err => console.log(err))\r\n })\r\n .catch(err => console.log(err))\r\n }\r\n\r\n function mapIt(array) {\r\n return array.map((element) => {\r\n let date = element.due_date.slice(0, 10)\r\n return (\r\n <div key={element.user_id} className='row tenant-row'>\r\n {admin === true && element.approved === false ? <button\r\n className='btn-save'\r\n onClick={() => approve(element)}>Approve</button> : null}\r\n <div className='list-item tenant-item'>{element.user_id}</div>\r\n <div className='list-item tenant-item'>{`${element.first_name} ${element.last_name}`}</div>\r\n <div className='list-item tenant-item'>No Address Available</div>\r\n <div className='list-item tenant-item'>{element.email}</div>\r\n <div className='list-item tenant-item'>{element.phone}</div>\r\n {element.pets === true ? <div>Yes</div> : <div>No</div>}\r\n <div>{date}</div>\r\n </div>\r\n )\r\n })\r\n }\r\n\r\n return (\r\n <div className='sub-page'>\r\n {mapIt(tenantRequests)}\r\n </div>\r\n )\r\n}\r\n\r\nfunction mapStateToProps(state) {\r\n return {\r\n email: state.user.email,\r\n user_id: state.user.user_id,\r\n admin: state.user.admin,\r\n approved: state.user.approved\r\n }\r\n}\r\n\r\nexport default connect(mapStateToProps)(TenantRequestList)","C:\\Users\\Nami\\Sync\\devmountain\\unit7\\lemon-prop\\src\\Components\\Landing\\Login.js",["148","149"],"import React, { useState } from 'react'\r\nimport axios from 'axios'\r\nimport { connect } from 'react-redux'\r\nimport { loginUser } from '../../redux/reducer'\r\nimport Popup from '../Popup'\r\nimport { useForm } from 'react-hook-form'\r\nimport '../../scss/main.scss'\r\nimport logo from '../../img/lemon_prop.png'\r\n\r\nconst Login = props => {\r\n const [email, setEmail] = useState('')\r\n const [password, setPassword] = useState('')\r\n const [isOpen, setIsOpen] = useState(false)\r\n const { register, handleSubmit, errors } = useForm();\r\n\r\n const onSubmit = (data) => {\r\n console.log(data)\r\n }\r\n\r\n const togglePopup = () => {\r\n setIsOpen(!isOpen)\r\n }\r\n\r\n function submit() {\r\n axios.post('/auth/login', { email, password })\r\n .then((res) => {\r\n // console.log('login successful - 1')\r\n props.loginUser(res.data.email, res.data.user_id, res.data.admin, res.data.approved, res.data.prop_id)\r\n props.history.push('/dashboard')\r\n })\r\n .catch(err => console.log(err))\r\n }\r\n\r\n return (\r\n <div className='login-page'>\r\n {/* <input\r\n placeholder='Email'\r\n type=\"text\"\r\n value={email}\r\n onChange={e => setEmail(e.target.value)}>\r\n </input>\r\n <input\r\n placeholder='Password'\r\n type=\"text\"\r\n value={password}\r\n onChange={e => setPassword(e.target.value)}>\r\n </input>\r\n <button onClick={e => submit()}>Login</button>\r\n <button>I need access</button> */}\r\n <input className=\"btn-1\" type=\"button\"\r\n value=\"Login\"\r\n onClick={(e) => togglePopup()}\r\n />\r\n\r\n\r\n {/* THIS IS THE POPUP THAT APPEARS WHEN \"LOGIN\" IS CLICKED ON THE LANDING PAGE */}\r\n {isOpen ? <Popup content={<>\r\n <div className=\"popup-header\">\r\n {/* <img className=\"logo\" src={logo} ></img> */}\r\n <h2>LemonProp Login</h2>\r\n </div>\r\n <div className=\"member-login\">\r\n <h2>Tenant Portal Login</h2>\r\n <div className='login-inputs'>\r\n <input\r\n placeholder='Email'\r\n type=\"text\"\r\n value={email}\r\n onChange={e => setEmail(e.target.value)}>\r\n </input>\r\n\r\n <input\r\n placeholder='Password'\r\n type=\"password\"\r\n value={password}\r\n onChange={e => setPassword(e.target.value)}>\r\n </input>\r\n </div>\r\n <button className=\"btn-1\" type=\"button\" onClick={e => submit()}>Log in</button>\r\n </div>\r\n {/* Request access */}\r\n <div className=\"login-request\">\r\n <h2>Request Portal Access</h2>\r\n {/* <p>Need access? Fill out your information below and we'll send you an activation link via email. To best match your account, please use the same information provided to your Property Manager.</p> */}\r\n <form onSubmit={handleSubmit(onSubmit)}>\r\n <div className='columns-container'>\r\n <div className='input-column'>\r\n <input type=\"text\" name=\"first name\" placeholder=\"First Name\" ref={register({ required: true })} />\r\n <input type=\"text\" name=\"last name\" placeholder=\"Last Name\" ref={register({ required: true })} />\r\n </div>\r\n <div className='input-column'>\r\n <input type=\"tel\" name=\"phone\" placeholder=\"Phone number\" ref={register({ required: true, minLength: 6, maxLength: 12 })} />\r\n <input type=\"text\" name=\"email\" placeholder=\"Email address\" ref={register({ required: true, pattern: /^\\S+@\\S+$/i })} />\r\n </div>\r\n </div>\r\n {/* <input type=\"radio\" name=\"pets\" placeholder=\"Pets\" ref={register} />Pets */}\r\n <button className=\"btn-1\" type=\"button\">Submit</button>\r\n </form>\r\n </div>\r\n </>}\r\n handleClose={togglePopup} />\r\n :\r\n null\r\n }\r\n\r\n </div>\r\n )\r\n}\r\n\r\n\r\nexport default connect(null, { loginUser })(Login)","C:\\Users\\Nami\\Sync\\devmountain\\unit7\\lemon-prop\\src\\Components\\Popup.js",[],{"ruleId":"150","replacedBy":"151"},{"ruleId":"152","replacedBy":"153"},{"ruleId":"154","severity":1,"message":"155","line":14,"column":6,"nodeType":"156","endLine":14,"endColumn":8,"suggestions":"157"},{"ruleId":"158","severity":1,"message":"159","line":26,"column":19,"nodeType":"160","endLine":26,"endColumn":55},{"ruleId":"158","severity":1,"message":"159","line":48,"column":21,"nodeType":"160","endLine":48,"endColumn":57},{"ruleId":"154","severity":1,"message":"161","line":26,"column":6,"nodeType":"156","endLine":26,"endColumn":15,"suggestions":"162"},{"ruleId":"163","severity":1,"message":"164","line":1,"column":27,"nodeType":"165","messageId":"166","endLine":1,"endColumn":36},{"ruleId":"163","severity":1,"message":"167","line":8,"column":10,"nodeType":"165","messageId":"166","endLine":8,"endColumn":15},{"ruleId":"163","severity":1,"message":"168","line":8,"column":12,"nodeType":"165","messageId":"166","endLine":8,"endColumn":26},{"ruleId":"163","severity":1,"message":"169","line":12,"column":13,"nodeType":"165","messageId":"166","endLine":12,"endColumn":20},{"ruleId":"163","severity":1,"message":"167","line":12,"column":22,"nodeType":"165","messageId":"166","endLine":12,"endColumn":27},{"ruleId":"163","severity":1,"message":"170","line":9,"column":12,"nodeType":"165","messageId":"166","endLine":9,"endColumn":24},{"ruleId":"158","severity":1,"message":"159","line":19,"column":9,"nodeType":"160","endLine":19,"endColumn":43},{"ruleId":"158","severity":1,"message":"159","line":34,"column":11,"nodeType":"160","endLine":34,"endColumn":31},{"ruleId":"158","severity":1,"message":"159","line":37,"column":11,"nodeType":"160","endLine":37,"endColumn":31},{"ruleId":"158","severity":1,"message":"159","line":40,"column":11,"nodeType":"160","endLine":40,"endColumn":31},{"ruleId":"163","severity":1,"message":"171","line":8,"column":11,"nodeType":"165","messageId":"166","endLine":8,"endColumn":21},{"ruleId":"163","severity":1,"message":"172","line":8,"column":23,"nodeType":"165","messageId":"166","endLine":8,"endColumn":39},{"ruleId":"163","severity":1,"message":"173","line":11,"column":12,"nodeType":"165","messageId":"166","endLine":11,"endColumn":26},{"ruleId":"163","severity":1,"message":"174","line":11,"column":28,"nodeType":"165","messageId":"166","endLine":11,"endColumn":45},{"ruleId":"154","severity":1,"message":"175","line":33,"column":8,"nodeType":"156","endLine":33,"endColumn":17,"suggestions":"176"},{"ruleId":"154","severity":1,"message":"161","line":30,"column":6,"nodeType":"156","endLine":30,"endColumn":15,"suggestions":"177"},{"ruleId":"154","severity":1,"message":"178","line":22,"column":6,"nodeType":"156","endLine":22,"endColumn":15,"suggestions":"179"},{"ruleId":"154","severity":1,"message":"180","line":31,"column":6,"nodeType":"156","endLine":31,"endColumn":15,"suggestions":"181"},{"ruleId":"154","severity":1,"message":"161","line":21,"column":6,"nodeType":"156","endLine":21,"endColumn":15,"suggestions":"182"},{"ruleId":"163","severity":1,"message":"183","line":8,"column":8,"nodeType":"165","messageId":"166","endLine":8,"endColumn":12},{"ruleId":"163","severity":1,"message":"184","line":14,"column":35,"nodeType":"165","messageId":"166","endLine":14,"endColumn":41},"no-native-reassign",["185"],"no-negated-in-lhs",["186"],"react-hooks/exhaustive-deps","React Hook useEffect has a missing dependency: 'props'. Either include it or remove the dependency array. However, 'props' will change when *any* prop changes, so the preferred fix is to destructure the 'props' object outside of the useEffect call and refer to those specific props inside useEffect.","ArrayExpression",["187"],"jsx-a11y/alt-text","img elements must have an alt prop, either with meaningful text, or an empty string for decorative images.","JSXOpeningElement","React Hook useEffect has a missing dependency: 'admin'. Either include it or remove the dependency array.",["188"],"no-unused-vars","'useEffect' is defined but never used.","Identifier","unusedVar","'admin' is assigned a value but never used.","'submitProperty' is assigned a value but never used.","'user_id' is assigned a value but never used.","'submitTenant' is assigned a value but never used.","'properties' is assigned a value but never used.","'changeProperties' is assigned a value but never used.","'currentAddress' is assigned a value but never used.","'setCurrentAddress' is assigned a value but never used.","React Hook useEffect has missing dependencies: 'addresses', 'admin', and 'props'. Either include them or remove the dependency array. However, 'props' will change when *any* prop changes, so the preferred fix is to destructure the 'props' object outside of the useEffect call and refer to those specific props inside useEffect.",["189"],["190"],"React Hook useEffect has missing dependencies: 'admin' and 'setCurrentProperties'. Either include them or remove the dependency array.",["191"],"React Hook useEffect has missing dependencies: 'admin' and 'setCurrentTenants'. Either include them or remove the dependency array.",["192"],["193"],"'logo' is defined but never used.","'errors' is assigned a value but never used.","no-global-assign","no-unsafe-negation",{"desc":"194","fix":"195"},{"desc":"196","fix":"197"},{"desc":"198","fix":"199"},{"desc":"196","fix":"200"},{"desc":"201","fix":"202"},{"desc":"203","fix":"204"},{"desc":"196","fix":"205"},"Update the dependencies array to be: [props]",{"range":"206","text":"207"},"Update the dependencies array to be: [admin, user_id]",{"range":"208","text":"209"},"Update the dependencies array to be: [addresses, admin, props, user_id]",{"range":"210","text":"211"},{"range":"212","text":"209"},"Update the dependencies array to be: [admin, setCurrentProperties, user_id]",{"range":"213","text":"214"},"Update the dependencies array to be: [admin, setCurrentTenants, user_id]",{"range":"215","text":"216"},{"range":"217","text":"209"},[501,503],"[props]",[879,888],"[admin, user_id]",[1253,1262],"[addresses, admin, props, user_id]",[901,910],[722,731],"[admin, setCurrentProperties, user_id]",[1040,1049],"[admin, setCurrentTenants, user_id]",[610,619]]