Skip to content

Commit

Permalink
Merge pull request #2 from hedgepigdaniel/decision-making
Browse files Browse the repository at this point in the history
WIP - Added inital files for decision making UI
  • Loading branch information
hedgepigdaniel authored Sep 30, 2017
2 parents 48a6cab + f3ef709 commit 41e52dc
Show file tree
Hide file tree
Showing 7 changed files with 92 additions and 148 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
"fetch-everywhere": "^1.0.5",
"history": "^4.6.3",
"react": "^15.4.2",
"react-datetime": "^2.10.2",
"react-dom": "^15.4.2",
"react-redux": "^5.0.5",
"react-universal-component": "^2.5.0",
Expand Down
2 changes: 1 addition & 1 deletion server/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ app.use(cookieParser())

app.use((req, res, next) => {
const cookie = req.cookies.jwToken
const jwToken = 'fake' // TRY: set to 'real' to authenticate ADMIN route
const jwToken = 'real' // TRY: set to 'real' to authenticate ADMIN route

if (cookie !== jwToken) {
res.cookie('jwToken', jwToken, { maxAge: 900000 })
Expand Down
15 changes: 14 additions & 1 deletion src/components/Admin.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,17 @@
import React from 'react'
import { admin } from '../css/Switcher'

export default () => <div className={admin}>U FIGURED OUT HOW TO DO AUTH!</div>
import DateTimePicker from './DateTimePicker'
import MeetingTable from './MeetingTable'

const MeetingAgenda = () =>
<div>
<label htmlFor='MettingDate'> Meeting Date </label>
<DateTimePicker />
<div>
<MeetingTable />
<button>Add another </button>
</div>
</div>

export default MeetingAgenda
9 changes: 9 additions & 0 deletions src/components/DateTimePicker.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import React from 'react'
import DateTime from 'react-datetime'

const DateTimePicker = () =>
<div>
<DateTime />
</div>

export default DateTimePicker
19 changes: 19 additions & 0 deletions src/components/MeetingTable.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import React from 'react'

const MeetingTable = () =>
<div>
<div>
<label htmlFor='MettingPoint'>Meeting point</label>
<input />
</div>
<div>
<label htmlFor='ShortDesc'> Short Desc </label>
<textarea />
</div>
<div>
<label htmlFor='NumVotes'> Num of votes reqd </label>
<input />
</div>
</div>

export default MeetingTable
9 changes: 7 additions & 2 deletions src/components/Sidebar.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import React from 'react'
import { connect } from 'react-redux'
import Link, { NavLink } from 'redux-first-router-link'

import { goToPage } from '../actions'
import styles from '../css/Sidebar'

Expand Down Expand Up @@ -55,9 +56,13 @@ const Sidebar = ({ onClick, path }) =>

<div style={{ height: 14 }} />

<NavLink to={{ type: 'ADMIN' }} activeClassName={styles.active}>
ADMIN
<NavLink
activeClassName={styles.active}
to={{ type: 'ADMIN', payload: { category: 'meeting-agenda' } }}
>
Create Meeting Agenda{' '}
</NavLink>

</div>

const active = (currentPath, path) =>
Expand Down
Loading

0 comments on commit 41e52dc

Please sign in to comment.