Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "scentgraph",
"version": "2.0.42",
"version": "2.0.43",
"description": "ScentGraph is a project for Helsinki University FullStack course. React and TypeScript are used for the front end, Node for the backend and Neo4J for the graph database. The database queries will be done using Cypher.",
"scripts": {
"postinstall": "npm run build-client",
Expand Down
4 changes: 3 additions & 1 deletion src/client/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ import {
AdminTools,
ShowScents,
NoteCreate,
Current
Current,
ExcelPage,
} from './pages'
import ScentCreate from './pages/scent-create/scent-create'
import 'bootstrap/dist/css/bootstrap.css'
Expand Down Expand Up @@ -50,6 +51,7 @@ class App extends React.Component {
<Route exact path={ClientRoutePath.Current} component={Current} />
<Route exact path={ClientRoutePath.NoteCreation} component={NoteCreate} />
<Route exact path={ClientRoutePath.ScentCreation} component={ScentCreate} />
<Route exact path={ClientRoutePath.ScentExcel} component={ExcelPage} />
<Route exact path={ClientRoutePath.ShowCategoryScents} component={ShowScents} />
<Route exact path={ClientRoutePath.UserCreation} component={UserCreate} />
<Route exact path={ClientRoutePath.AdminTools} component={AdminTools} />
Expand Down
31 changes: 31 additions & 0 deletions src/client/pages/excel-page/excel-page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
import * as React from 'react'
import NavBarLayout from '../nav-bar-layout/nav-bar-layout'
import { EMPTY_STATE } from '../../utils'
import { Notification } from '../../components'

interface ExcelPageProps {
history: any,
location: ExcelPageLocation,
match: any
}

interface ExcelPageLocation extends Location {
message: string
}

export class ExcelPage extends React.Component<ExcelPageProps, EMPTY_STATE> {

constructor(props) {
super(props)
}

public render(): JSX.Element {
return (
<div>
<div className='container'>
<Notification message={this.props.location.message} />
</div>
</div>
)
}
}
1 change: 1 addition & 0 deletions src/client/pages/excel-page/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from './excel-page'
1 change: 1 addition & 0 deletions src/client/pages/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@ export * from './scent-create'
export * from './note-create'
export * from './show-scents'
export * from './current'
export * from './excel-page'
4 changes: 4 additions & 0 deletions src/client/pages/nav-bar-layout/nav-bar-layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@ class NavBarLayout extends React.PureComponent<NavBarLayoutProps, EMPTY_STATE> {
<Link className='text-info' to='/addScent'>Add a Scent</Link>
</Nav.Link>

<Nav.Link href='#' as='span'>
<Link className='text-info' to='/scentExcel'>Add with Excel</Link>
</Nav.Link>

<Nav.Link href='#' as='span'>
<Link className='text-info' to='/addNotes'>Add Notes</Link>
</Nav.Link>
Expand Down
1 change: 1 addition & 0 deletions src/client/routes.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ export enum ClientRoutePath {
Current = '/',
UserCreation = '/newUser',
ScentCreation = '/addScent',
ScentExcel = '/scentExcel',
NoteCreation = '/addNotes',
ShowCategoryScents = '/showScents',
AdminTools = '/adminTools',
Expand Down
Loading