{"size": 1094, "ext": "js", "max_stars_repo_path": "packages/pulsetile-react-admin/src/plugins/MDT/MdtList.js", "max_stars_repo_name": "BogdanShcherbanKitrum/PulseTile-RA-Lerna", "max_stars_repo_stars_event_min_datetime": "2020-08-01T04:01:46.000Z", "max_stars_repo_stars_event_max_datetime": "2020-11-10T03:29:21.000Z", "max_issues_repo_path": "packages/pulsetile-react-admin/src/plugins/MDT/MdtList.js", "max_issues_repo_name": "BogdanShcherbanKitrum/PulseTile-RA-Lerna", "max_issues_repo_issues_event_min_datetime": "2019-09-03T14:44:34.000Z", "max_issues_repo_issues_event_max_datetime": "2019-10-25T13:58:55.000Z", "max_forks_repo_path": "packages/pulsetile-react-admin/src/plugins/MDT/MdtList.js", "max_forks_repo_name": "PulseTile/PulseTile-RA-Lerna", "max_forks_repo_forks_event_min_datetime": "2019-07-30T12:42:37.000Z", "max_forks_repo_forks_event_max_datetime": "2019-09-27T06:41:54.000Z"}
{"max_stars_count": 2, "max_issues_count": 8, "max_forks_count": 2, "avg_line_length": 28.7894736842, "max_line_length": 71, "alphanum_fraction": 0.6499085923}
import React from "react";
import { DateField, TextField } from "react-admin";

import ListTemplate from "../../common/ResourseTemplates/ListTemplate";
import MdtCreate from "./MdtCreate";
import MdtEdit from "./MdtEdit";
import MdtShow from "./MdtShow";
import DatagridRow from "./fragments/DatagridRow";

/**
 * This component returns block with MDT list
 *
 * @author Bogdan Shcherban <bsc@piogroup.net>
 * @param {shape} classes
 * @param {shape} rest
 * @constructor
 */
const MdtList = ({ classes, ...rest }) => (
    <ListTemplate
        id="list-mdtreports"
        create={MdtCreate}
        edit={MdtEdit}
        show={MdtShow}
        resourceUrl="mdtreports"
        title="Generic MDT"
        CustomRow={DatagridRow}
        isCustomDatagrid={true}
        {...rest}
    >
        <DateField label="Date of Request" source="dateOfRequest" />
        <TextField label="Service / Team" source="serviceTeam" />
        <DateField label="Date of Meeting" source="dateOfMeeting" />
        <TextField label="Source" source="source" />
    </ListTemplate>
);

export default MdtList;
