2019-01-03 11:16:46 +01:00
|
|
|
import { endOfMonth, startOfMonth } from 'date-fns'
|
2018-05-09 10:25:08 +02:00
|
|
|
import React from 'react'
|
|
|
|
|
2019-01-03 12:53:47 +01:00
|
|
|
import Stats from '../Common/Stats'
|
2018-05-09 10:25:08 +02:00
|
|
|
|
2019-01-03 11:16:46 +01:00
|
|
|
export default class Statistics extends React.Component {
|
2018-06-06 20:17:37 +02:00
|
|
|
constructor(props, context) {
|
|
|
|
super(props, context)
|
|
|
|
const date = new Date()
|
|
|
|
this.state = {
|
|
|
|
start: startOfMonth(date),
|
|
|
|
end: endOfMonth(date),
|
2019-01-03 11:16:46 +01:00
|
|
|
duration: 'week',
|
|
|
|
type: 'by_time',
|
2018-06-06 20:17:37 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
render() {
|
|
|
|
return (
|
|
|
|
<div className="card activity-card">
|
2019-08-28 15:35:22 +02:00
|
|
|
<div className="card-header">This month</div>
|
2018-06-07 12:42:30 +02:00
|
|
|
<div className="card-body">
|
2019-01-04 19:17:16 +01:00
|
|
|
<Stats displayEmpty={false} statsParams={this.state} />
|
2018-06-06 20:17:37 +02:00
|
|
|
</div>
|
2018-05-09 10:25:08 +02:00
|
|
|
</div>
|
2018-06-06 20:17:37 +02:00
|
|
|
)
|
|
|
|
}
|
2018-05-09 10:25:08 +02:00
|
|
|
}
|