Max Red - Added basic scss [skip ci]
This commit is contained in:
parent
fd2c20ac9f
commit
1f6e3ae028
|
@ -47,7 +47,7 @@ class AdminPanelStats extends React.Component {
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
return (
|
return (
|
||||||
<div>
|
<div class="admin-panel-stats">
|
||||||
<Header title={i18n('TICKET_ACTIVITY')}/>
|
<Header title={i18n('TICKET_ACTIVITY')}/>
|
||||||
<DropDown {...this.getDropDownProps()}/>
|
<DropDown {...this.getDropDownProps()}/>
|
||||||
<ToggleList {...this.getToggleListProps()} />
|
<ToggleList {...this.getToggleListProps()} />
|
||||||
|
@ -59,6 +59,8 @@ class AdminPanelStats extends React.Component {
|
||||||
getToggleListProps() {
|
getToggleListProps() {
|
||||||
return {
|
return {
|
||||||
values: this.state.showed,
|
values: this.state.showed,
|
||||||
|
className: 'admin-panel-stats__toggle-list',
|
||||||
|
onChange: this.onToggleListChange.bind(this),
|
||||||
items: [
|
items: [
|
||||||
{
|
{
|
||||||
content:
|
content:
|
||||||
|
@ -88,8 +90,7 @@ class AdminPanelStats extends React.Component {
|
||||||
<div>{i18n('CHART_COMMENT')}</div>
|
<div>{i18n('CHART_COMMENT')}</div>
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
],
|
]
|
||||||
onChange: this.onToggleListChange.bind(this)
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -119,7 +120,8 @@ class AdminPanelStats extends React.Component {
|
||||||
icon: ''
|
icon: ''
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
onChange: this.onDropDownChange.bind(this)
|
onChange: this.onDropDownChange.bind(this),
|
||||||
|
className: 'admin-panel-stats__dropdown'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,11 @@
|
||||||
|
.admin-panel-stats {
|
||||||
|
|
||||||
|
&__dropdown {
|
||||||
|
margin-left: auto;
|
||||||
|
margin-bottom: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
&__toggle-list {
|
||||||
|
margin-bottom: 20px;
|
||||||
|
}
|
||||||
|
}
|
|
@ -16,12 +16,21 @@ class ToggleList extends React.Component {
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
return (
|
return (
|
||||||
<div className="toggle-list">
|
<div className={this.getClass()}>
|
||||||
{this.props.items.map(this.renderItem.bind(this))}
|
{this.props.items.map(this.renderItem.bind(this))}
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
getClass() {
|
||||||
|
let classes = {
|
||||||
|
'toggle-list': true,
|
||||||
|
[this.props.className]: (this.props.className)
|
||||||
|
};
|
||||||
|
|
||||||
|
return classNames(classes);
|
||||||
|
}
|
||||||
|
|
||||||
renderItem(obj, index) {
|
renderItem(obj, index) {
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|
|
@ -176,25 +176,25 @@ module.exports = [
|
||||||
date: '201701' + (i + 10) % 100,
|
date: '201701' + (i + 10) % 100,
|
||||||
type: 'COMMENT',
|
type: 'COMMENT',
|
||||||
general: 1,
|
general: 1,
|
||||||
value: (4 + i + Math.floor(Math.random() * 2)).toString()
|
value: (Math.floor(Math.random() * i)).toString()
|
||||||
});
|
});
|
||||||
DATA.push({
|
DATA.push({
|
||||||
date: '201701' + (i + 10) % 100,
|
date: '201701' + (i + 10) % 100,
|
||||||
type: 'SIGNUP',
|
type: 'SIGNUP',
|
||||||
general: 1,
|
general: 1,
|
||||||
value: (9 + i + Math.floor(Math.random() * (i * 15))).toString()
|
value: (Math.floor(Math.random() * i * i / 365)).toString()
|
||||||
});
|
});
|
||||||
DATA.push({
|
DATA.push({
|
||||||
date: '201701' + (i + 10) % 100,
|
date: '201701' + (i + 10) % 100,
|
||||||
type: 'CLOSE',
|
type: 'CLOSE',
|
||||||
general: 1,
|
general: 1,
|
||||||
value: (8 + i + Math.floor(Math.random() * i * i * i * i)).toString()
|
value: (Math.floor(Math.random() * i * i * i / 365 / 365)).toString()
|
||||||
});
|
});
|
||||||
DATA.push({
|
DATA.push({
|
||||||
date: '201701' + (i + 10) % 100,
|
date: '201701' + (i + 10) % 100,
|
||||||
type: 'CREATE_TICKET',
|
type: 'CREATE_TICKET',
|
||||||
general: 1,
|
general: 1,
|
||||||
value: (10 + Math.floor(Math.random() * 4)).toString()
|
value: (Math.floor(Math.random()*Math.random()*Math.random()*Math.random()*Math.random()*1.05**i)).toString()
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue