Skip to content

Commit

Permalink
Upgrade packages, Nicer Dialog
Browse files Browse the repository at this point in the history
  • Loading branch information
vigzmv committed Jul 21, 2017
1 parent 9d687bc commit 8af0f2c
Show file tree
Hide file tree
Showing 6 changed files with 408 additions and 180 deletions.
2 changes: 2 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,12 @@
"no-undef": "warn",
"no-unreachable": "warn",
"no-unused-vars": "warn",
"no-return-assign": "off",
"constructor-super": "warn",
"valid-typeof": "warn",
"global-require": "off",
"react/prop-types": "off",
"react/forbid-prop-types": "off",
"react/jsx-filename-extension": [
1,
{
Expand Down
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@
"material-ui": "next",
"material-ui-icons": "^1.0.0-alpha.19",
"prop-types": "^15.5.10",
"re-base": "^3.0.2",
"re-base": "^3.0.3",
"react": "^15.6.1",
"react-dom": "^15.6.1",
"react-router-dom": "^4.1.1",
"react-router-dom": "^4.1.2",
"react-table": "^6.5.1"
},
"devDependencies": {
Expand All @@ -21,8 +21,8 @@
"eslint-plugin-jsx-a11y": "^5.0.3",
"eslint-plugin-react": "^7.1.0",
"flow-bin": "^0.48.0",
"react-scripts": "1.0.7",
"source-map-explorer": "^1.3.3"
"react-scripts": "^1.0.10",
"source-map-explorer": "^1.4.0"
},
"scripts": {
"analyze": "source-map-explorer docs/static/js/main.*",
Expand Down
2 changes: 1 addition & 1 deletion src/components/AddTimeTable/AddTimeTable.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ class AddTimeTable extends PureComponent {
context: this,
asArray: true,
}).then((data) => {
// it's a hack! :/
// eslint-disable-next-line
if (data.length != 0) {
this.setState(
{
Expand Down
31 changes: 27 additions & 4 deletions src/components/SavedTimeTables/SavedTimeTables.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import React, { Component } from 'react';
import Typography from 'material-ui/Typography';
import Paper from 'material-ui/Paper';
import Grid from 'material-ui/Grid';
import { createStyleSheet, withStyles } from 'material-ui/styles';
import Dialog from 'material-ui/Dialog';
Expand Down Expand Up @@ -159,19 +160,37 @@ class SavedTimeTables extends Component {
</Button>
</Toolbar>
</AppBar>

<Paper style={{ margin: '20px', padding: '20px' }} elevation={2} square>
<Typography type="title">
Class:
<span className={classes.ttinfo}>
{data[index].classInfo}
</span>
Semester:
<span className={classes.ttinfo}>
{data[index].semester}
</span>
Shift:
<span className={classes.ttinfo}>
{data[index].shift}
</span>
</Typography>
</Paper>

<div className="table-wrap" style={{ margin: '20px' }}>
<ReactTable
data={data[index].data}
columns={this.columns}
defaultPageSize={4}
showPageSizeOptions
showPagination
defaultPageSize={6}
showPageSizeOptions={false}
showPagination={false}
/>
</div>
</Dialog>
</div>
</Grid>
</Grid>
</Grid >
);
}
}
Expand Down Expand Up @@ -199,6 +218,10 @@ const styleSheet = createStyleSheet('SavedTimeTables', theme => ({
fontSize: 19,
textTransform: 'capitalize',
},
ttinfo: {
color: 'grey',
paddingLeft: '250px',
},
}));

SavedTimeTables.propTypes = {
Expand Down
2 changes: 1 addition & 1 deletion src/components/SavedTimeTables/index.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
import SavedTimeTables from "./SavedTimeTables";
import SavedTimeTables from './SavedTimeTables';

export default SavedTimeTables;
Loading

0 comments on commit 8af0f2c

Please sign in to comment.