Skip to content

Commit

Permalink
statistics #11
Browse files Browse the repository at this point in the history
  • Loading branch information
mkozhukharenko committed Mar 26, 2016
1 parent 07183f1 commit 0dafe99
Show file tree
Hide file tree
Showing 13 changed files with 512 additions and 149 deletions.
3 changes: 2 additions & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
webpack.*
tools
dist
server.js
server.js
/src/modules/statistics/components/UkraineMap.js
6 changes: 6 additions & 0 deletions assets/stylesheets/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,10 @@ html {

*, *:before, *:after {
box-sizing: inherit;
}


.amchart_div {
width: 100%;
min-height: 600px;
}
7 changes: 3 additions & 4 deletions src/modules/statistics/actions.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,15 @@ export function loadStatistics(url, collectionName) {
return {
type: REQUEST_API,
request: {
url: url,
url,
actions: {
start: {type: types.STATISTICS_LOAD_START},
success: {type: types.STATISTICS_LOAD_SUCCESS},
fail: {type: types.STATISTICS_LOAD_FAIL}
}
},

payload: {
collectionName: collectionName
collectionName
}
};
}
}
51 changes: 0 additions & 51 deletions src/modules/statistics/chart/Chart.jsx

This file was deleted.

58 changes: 0 additions & 58 deletions src/modules/statistics/chart/ChartPage.jsx

This file was deleted.

54 changes: 54 additions & 0 deletions src/modules/statistics/components/Statistics.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@

'use strict';

import React, {Component, PropTypes} from 'react';
import Nav from 'react-bootstrap/lib/Nav';
import NavItem from 'react-bootstrap/lib/NavItem';
import { LinkContainer } from 'react-router-bootstrap';

import {
PRIORITIES,
ALLOCATIONS_ADMINUNITS,
ALLOCATIONS_DEPARTMENTS,
ALLOCATIONS_ADMINUNITS_MAP,
PLACES,
STATISTICS_MAP as map
} from './../constants';

class Statistics extends Component {
static propTypes = {
children: PropTypes.any
};

handleSelect = (selectedKey) => {
console.log('selected ' + selectedKey);
};

render() {
return (
<div>
<div>Statistics</div>
<Nav bsStyle="pills" stacked activeKey={1} onSelect={this.handleSelect}>
<LinkContainer to={{ pathname: map[ALLOCATIONS_ADMINUNITS].route}}>
<NavItem eventKey={1} > { map[ALLOCATIONS_ADMINUNITS].title } </NavItem>
</LinkContainer>
<LinkContainer to={{ pathname: map[ALLOCATIONS_ADMINUNITS_MAP].route}}>
<NavItem eventKey={2} > { map[ALLOCATIONS_ADMINUNITS_MAP].title } </NavItem>
</LinkContainer>
<LinkContainer to={{ pathname: map[PRIORITIES].route}}>
<NavItem eventKey={3} > { map[PRIORITIES].title } </NavItem>
</LinkContainer>
<LinkContainer to={{ pathname: map[ALLOCATIONS_DEPARTMENTS].route}}>
<NavItem eventKey={4} > { map[ALLOCATIONS_DEPARTMENTS].title } </NavItem>
</LinkContainer>
<LinkContainer to={{ pathname: map[PLACES].route}}>
<NavItem eventKey={5} > { map[PLACES].title } </NavItem>
</LinkContainer>
</Nav>
{this.props.children}
</div>
);
}
}

export default Statistics;
14 changes: 14 additions & 0 deletions src/modules/statistics/components/StatisticsIndex.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
'use strict';

import React, { Component } from 'react';

export default class StatisticsIndex extends React.Component {
render () {
return (
<div>
Виберіть статистику для перегляду
</div>
);
}
}

156 changes: 156 additions & 0 deletions src/modules/statistics/components/UkraineMap.js

Large diffs are not rendered by default.

Loading

0 comments on commit 0dafe99

Please sign in to comment.