Summary.tsx 2.04 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
import * as React from 'react';
import { translate } from 'react-i18next';

import Grid from '@material-ui/core/Grid';
import Paper from '@material-ui/core/Paper';
import Divider from '@material-ui/core/Divider';

import Page from 'model/Page';
import Partner from 'model/genesys/Partner';

interface ISummaryProps extends React.ClassAttributes<any> {
  paged: Page<Partner>;
  t: any;
}

class Summary extends React.Component<ISummaryProps, any> {

  public render() {
    const { paged, t } = this.props;

    return (
      <Paper square>
        <div className="pl-20 pr-20 pt-20 pb-20">
          <h4 className="green font-bold  m-0">
            { t('partners.public.c.summary.title') }
          </h4>
        </div>
        <Divider/>
        <div>
          <Grid container spacing={ 0 } className="pt-20 pb-10">
            <Grid item xs={ 12 }>
              <div className="pt-15 pb-15 pl-20 pr-20 mb-10 even-row">
                <h4 className="font-bold mb-15">
                  { t('partners.public.c.summary.publisherNumber') }
                </h4>
                <h1 className="font-bold m-0">
                  { paged.totalElements }
                </h1>
              </div>
            </Grid>
            <Grid item xs={ 12 }>
              <div className="pt-15 pb-15 pl-20 pr-20 mb-10 even-row">
                <h4 className="font-bold mb-15">
                  { t('partners.public.c.summary.countryNumber') }
                </h4>
                <h1 className="font-bold m-0">
                  65
                </h1>
              </div>
            </Grid>
            <Grid item xs={ 12 }>
              <div className="pt-15 pb-15 pl-20 pr-20 mb-10 even-row">
                <h4 className="font-bold mb-15">
                  { t('partners.public.c.summary.instituteNumber') }
                </h4>
                <h1 className="font-bold m-0">
                  { paged.totalElements }
                </h1>
              </div>
            </Grid>
          </Grid>
        </div>
      </Paper>
    );
  }
}

export default translate()(Summary);