@rnga/orders
Version:
## Get schema from @prisma-cms 1. yarn get-api-schema -e http://localhost:4000 2. yarn build-api-fragments
159 lines (113 loc) • 3.08 kB
JavaScript
import React from 'react'
import PropTypes from 'prop-types'
import { withStyles } from 'material-ui/styles';
import Pagination from 'Pagination';
// import {
// styles,
// TableView,
// } from '../../DataList/View/Table';
import {
styles,
TableView,
} from 'apollo-cms/src/DataView/List/Table';
import { Link } from 'react-router-dom';
import { Grid, TextField, Checkbox, Button } from 'material-ui';
export class ExpertisersPageView extends TableView {
static propTypes = {
...TableView.propTypes,
limit: PropTypes.number,
};
static defaultProps = {
...TableView.defaultProps,
// listName: "expertisersConnection",
title: "Эксперты",
columnData: [
{
id: 'shortname', numeric: false, disablePadding: true, label: 'Короткое название',
renderer: (value, record) => {
const {
id,
} = record;
return value ? <Link
to={`/admin/expertisers/${id}`}
>
{value}
</Link> : null;
}
},
{
id: 'name', numeric: false, disablePadding: true, label: 'Полное название название',
renderer: (value, record) => {
const {
id,
} = record;
return value ? <Link
to={`/admin/expertisers/${id}`}
>
{value}
</Link> : null;
}
},
{
id: 'description', numeric: false, disablePadding: true, label: 'Описание',
},
{
id: 'rank', numeric: false, disablePadding: true, label: 'Ранк',
},
// {
// id: 'User', numeric: false, disablePadding: true, label: 'Заказчик',
// renderer: (value, record) => {
// let content;
// if (value) {
// // const {
// // fullname,
// // } = User;
// content = <UserLink
// user={value}
// />;
// }
// return content;
// }
// },
// {
// id: 'date', numeric: false, disablePadding: true, label: 'Дата (по договору)',
// renderer: (value, record) => {
// return value && moment(value).format('DD.MM.YYYY') || null;
// }
// },
],
};
// render() {
// const {
// first,
// page,
// first: limit,
// data,
// } = this.props;
// const {
// objectsConnection,
// } = data || {};
// const {
// aggregate,
// } = objectsConnection || {};
// const {
// count,
// } = aggregate || {};
// const content = super.render();
// return <div>
// {content}
// fewf
// wefweewfwe
// {count && limit ?
// <Pagination
// limit={limit}
// total={count}
// page={page || 1}
// />
// :
// null
// }
// </div>;
// }
}
export default withStyles(styles)(ExpertisersPageView);