feat: add graphql support (#349)

* fix: eslint warnings

* refactor: use ramda + sanctuary instead of lodash

* refactor: use prettier-standard for formatting

* feat: enable security

* feat: add graphql

* chore: remove trailing commas from linter

* docs: new scripts on react and new-admin-server

* feat: handle authentication on graphql

* fix: perf improvement to date picker

* chore: add insecure-dev script to run servers
This commit is contained in:
Rafael Taranto 2019-12-24 14:36:41 +00:00 committed by Josh Harvey
parent 49f434f1d1
commit b8e0c2175b
182 changed files with 8827 additions and 4623 deletions

View file

@ -1,12 +1,7 @@
import React, { memo } from 'react'
import { startCase } from 'lodash/fp'
import {
Td,
THead,
TBody,
Table
} from '../fake-table/Table'
import { Td, THead, TBody, Table } from 'src/components/fake-table/Table'
import { startCase } from 'src/utils/string'
import ERow from './Row'
@ -15,12 +10,22 @@ const ETable = memo(({ elements = [], data = [], save, validationSchema }) => {
<Table>
<THead>
{elements.map(({ name, size, header, textAlign }, idx) => (
<Td header key={idx} size={size} textAlign={textAlign}>{header || startCase(name)}</Td>
<Td header key={idx} size={size} textAlign={textAlign}>
{header || startCase(name)}
</Td>
))}
<Td header size={175} />
</THead>
<TBody>
{data.map((it, idx) => <ERow key={idx} value={it} elements={elements} save={save} validationSchema={validationSchema} />)}
{data.map((it, idx) => (
<ERow
key={idx}
value={it}
elements={elements}
save={save}
validationSchema={validationSchema}
/>
))}
</TBody>
</Table>
)