diff --git a/components/roundedCard.js b/components/roundedCard.js index 4792c07..12a1c1c 100644 --- a/components/roundedCard.js +++ b/components/roundedCard.js @@ -102,7 +102,7 @@ const cardStyle = StyleSheet.create({ borderRadius: 20, backgroundColor: '#FFFFFF', width: '100%', - elevation: 3, + elevation: 6, padding: FN(18), paddingLeft: 20, paddingRight: 20, diff --git a/components/upNext.js b/components/upNext.js index 3a440f3..be39029 100644 --- a/components/upNext.js +++ b/components/upNext.js @@ -78,7 +78,13 @@ export default class UpNext extends React.Component { } ); - else return (); + else return ( + + + Up Next + You're done with classes today. + + ); } } diff --git a/data/import_data.js b/data/import_data.js index bb86ed9..9dd03bb 100644 --- a/data/import_data.js +++ b/data/import_data.js @@ -91,7 +91,15 @@ export const getData = (term, reject) => { promises.push(fetch(globals.ROUTES.registration + globals.TERM) .then(res=>res.json()) .then(resJson=> { - globals["REGISTRATION"] = resJson; + // globals["REGISTRATION"] = resJson; + globals["REGISTRATION"] = { + "end_date": "April 4th", + "end_passed": true, + "end_time": "11:59 PM", + "start_date": "March 28th", + "start_passed": true, + "start_time": "10:00 AM", + } })); promises.push(fetch(globals.ROUTES.schedule_weekly) .then(res=>res.json()) diff --git a/navigation/tabs.js b/navigation/tabs.js index f21bc77..30b0ef9 100644 --- a/navigation/tabs.js +++ b/navigation/tabs.js @@ -44,19 +44,6 @@ const ProfileStack = createStackNavigator({ }, }, navOptions); -const ScheduleStack = createStackNavigator({ - Schedule: { - screen: Schedule, - navigationOptions: { - header: null, - gesturesEnabled: false - } - }, - Manage: { - screen: Manage, - }, -}, navOptions); - const FeedStack = createStackNavigator({ Feed: { screen: Feed, @@ -64,13 +51,16 @@ const FeedStack = createStackNavigator({ header: null, gesturesEnabled: false } + }, + Manage: { + screen: Manage, } }, navOptions); const TabNavigator = createBottomTabNavigator( { Feed: FeedStack, - Schedule: ScheduleStack, + Schedule: Schedule, Profile: ProfileStack }, { diff --git a/views/Feed.js b/views/Feed.js index d840611..f1b4eb7 100644 --- a/views/Feed.js +++ b/views/Feed.js @@ -64,6 +64,19 @@ const styles = StyleSheet.create({ alertImg: { width: FN(50), height: FN(50), + }, + importantBg: { + marginTop: 5, + backgroundColor: '#DEDEDE', + padding: 16, + paddingTop: 10, + paddingBottom: 10 + }, + importantText: { + fontWeight: 'bold', + fontSize: 16, + color: '#5C5C5C', + paddingBottom: 10 } }); @@ -79,7 +92,7 @@ _openHoldsAsync = async () => { const HoldsCard = (props) => { if (props.holds) return ( - + { } const RegistrationCard = (props) => { - if (globals.REGISTRATION.start_date && !globals.REGISTRATION.end_passed) return ( - + if (props.state.reg) return ( + {props.navigation.navigate('Schedule')}} style={{ backgroundColor: '#CCEAFF' }} caret={true}> @@ -120,7 +133,7 @@ const RegistrationCard = (props) => { export default class FeedScreen extends React.Component { componentWillMount() { - this.setState({ holds: false }); + this.setState({ holds: false, reg: globals.REGISTRATION.start_date && !globals.REGISTRATION.end_passed }); if (globals.HOLDS) this.setState({ holds: globals.HOLDS }); else EventRegister.addEventListener('load_holds', () => this.setState({ holds: globals.HOLDS })); } @@ -134,10 +147,21 @@ export default class FeedScreen extends React.Component { return ( - - - - + + + { (this.state.holds || this.state.reg) && + + IMPORTANT + + + + } + + + + {this.props.navigation.navigate('Manage')}} color={'blue'} caret={true} title={'Manage Courses'}/> + + ); diff --git a/views/Profile.js b/views/Profile.js index 3b64a45..2028232 100644 --- a/views/Profile.js +++ b/views/Profile.js @@ -21,7 +21,7 @@ export default class ProfileScreen extends React.Component { componentWillMount() { this.setState({ loaded: false, gpa: '' }); if (globals.GRADES.loaded) this.setState({ gpa: globals.GRADES.gpa, loaded: true }); - EventRegister.addEventListener('load_grades', (data) => this.setState({ gpa: data.gpa, loaded: true })); + else EventRegister.addEventListener('load_grades', (data) => this.setState({ gpa: data.gpa, loaded: true })); } componentWillUnmount() { @@ -31,15 +31,7 @@ export default class ProfileScreen extends React.Component { return ( - - - - - - - - - + - {this.state.loading && this.loading()} {!this.state.loading && - - - {}} color={'blue'} caret={true} title={'Weekly Schedule'}/> - {this.props.navigation.navigate('Manage')}} color={'blue'} caret={true} title={'Manage Courses'}/> - - + }