-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #78 from calblueprint/kyle/navBar
Kyle/nav bar
- Loading branch information
Showing
23 changed files
with
694 additions
and
23 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,116 @@ | ||
import React from 'react'; | ||
import PropTypes from 'prop-types'; | ||
import { | ||
faLeaf, | ||
faHome, | ||
faPen, | ||
faFile, | ||
faSmile, | ||
faCode, | ||
} from '@fortawesome/free-solid-svg-icons'; | ||
import { withStyles } from '@material-ui/core/styles'; | ||
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; | ||
import styles from './styles'; | ||
|
||
class ActionItemCard extends React.Component { | ||
constructor(props) { | ||
super(props); | ||
/* | ||
TODO: check props types | ||
tempory props rn to test components | ||
props: | ||
actionItem - Javascripy object | ||
title - Assignment title: String | ||
description - Short description: String | ||
date - Due date of assignment: JavaScript date? | ||
category - type of assignment: string?? | ||
status - status of item: string | ||
*/ | ||
|
||
} | ||
|
||
// render icon based on category | ||
renderIcon() { | ||
const AssignmentCategory = this.props.actionItem.category; | ||
let icon = null; | ||
switch (AssignmentCategory) { | ||
case 'house': | ||
icon = ( | ||
<FontAwesomeIcon | ||
className="icon-large" | ||
icon={faHome} | ||
color="#9EDC8E" | ||
/> | ||
); | ||
break; | ||
case 'leaf': | ||
icon = ( | ||
<FontAwesomeIcon | ||
className="icon-large" | ||
icon={faLeaf} | ||
color="#9EDC8E" | ||
/> | ||
); | ||
break; | ||
case 'pen': | ||
icon = ( | ||
<FontAwesomeIcon | ||
className="icon-large" | ||
icon={faPen} | ||
color="#9EDC8E" | ||
/> | ||
); | ||
break; | ||
case 'file': | ||
icon = ( | ||
<FontAwesomeIcon | ||
className="icon-large" | ||
icon={faFile} | ||
color="#9EDC8E" | ||
/> | ||
); | ||
break; | ||
case 'smile': | ||
icon = ( | ||
<FontAwesomeIcon | ||
className="icon-large" | ||
icon={faSmile} | ||
color="#9EDC8E" | ||
/> | ||
); | ||
break; | ||
case 'code': | ||
icon = ( | ||
<FontAwesomeIcon | ||
className="icon-large" | ||
icon={faCode} | ||
color="#9EDC8E" | ||
/> | ||
); | ||
break; | ||
} | ||
return icon; | ||
} | ||
|
||
render() { | ||
return ( | ||
<div className="card"> | ||
<div className="rectangle"></div> | ||
{this.renderIcon()} | ||
<div className="info"> | ||
<div className="text">{this.props.actionItem.description}</div> | ||
<div className="date"> | ||
DATE ASSIGNED: {this.props.actionItem.date.toLocaleDateString()} | ||
</div> | ||
</div> | ||
<div className="assign">VIEW ASSIGNMENT</div> | ||
</div> | ||
); | ||
} | ||
} | ||
|
||
ActionItemCard.propTypes = { | ||
actionItem: PropTypes.object, | ||
}; | ||
|
||
export default withStyles(styles)(ActionItemCard); |
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,46 @@ | ||
export const styles = () => ({ | ||
card: { | ||
display: 'flex', | ||
flexDirection: 'row', | ||
justifyContent: 'start', | ||
border: '0.5px solid #5870EB', | ||
}, | ||
rectangle: { | ||
width: '5px', | ||
height: '70.93px', | ||
background: '#5870EB', | ||
borderRadius: '20px', | ||
}, | ||
assign: { | ||
fontFamily: 'Inter', | ||
fontStyle: 'normal', | ||
fontWeight: 'bold', | ||
fontSize: '12px', | ||
lineHeight: '16px', | ||
color: '#5870EB', | ||
}, | ||
'& :active': { | ||
color: 'rgb(58, 74, 156)', | ||
}, | ||
text: { | ||
color: '#8E8E8E', | ||
fontFamily: 'Inter', | ||
fontStyle: 'normal', | ||
fontSize: '8px', | ||
}, | ||
date: { | ||
color: '#8E8E8E', | ||
fontFamily: 'Inter', | ||
fontStyle: 'normal', | ||
fontWeight: '500', | ||
fontSize: '12px', | ||
lineHeight: '16px', | ||
}, | ||
info: { | ||
display: 'flex', | ||
flexDirection: 'column', | ||
flexGrow: '2', | ||
}, | ||
}); | ||
|
||
export default styles; |
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,42 @@ | ||
import React from 'react'; | ||
import ActionItemCard from 'components/ActionItemCards'; | ||
import Navbar from 'components/Navbar'; | ||
import PropTypes from 'prop-types'; | ||
|
||
const action = { | ||
title: 'Finish Sprint', | ||
description: 'Complete the sprint by tonight please. Thank you', | ||
date: new Date(), | ||
category: 'code', | ||
}; | ||
|
||
class ActionItemDashboard extends React.Component { | ||
constructor(props) { | ||
super(props); | ||
this.state = { | ||
assignments: this.props.assignments, | ||
}; | ||
} | ||
|
||
render() { | ||
return ( | ||
<div className="dashboard"> | ||
<Navbar isAdmin={this.props.isAdmin} /> | ||
<div className="content"> | ||
<h1>Assignment Dashboard</h1> | ||
<div className="table-container"> | ||
<div> | ||
<ActionItemCard actionItem={action} /> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
); | ||
} | ||
} | ||
|
||
ActionItemDashboard.propTypes = { | ||
assignments: PropTypes.array, | ||
}; | ||
|
||
export default ActionItemDashboard; |
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
Oops, something went wrong.