This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* eslint-disable global-require */ | |
import path from 'path' | |
import Server from '@frankmoney/webapp/es/server/Server' | |
import config from '../../config' | |
import initRoutes from './router' | |
const isProd = process.env.NODE_ENV === 'production' | |
const findUser = ({ graphqlClient }) => | |
graphqlClient(`{ | |
me { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* eslint-disable global-require */ | |
import express from 'express' | |
import compression from 'compression' | |
import favicon from 'serve-favicon' | |
import bodyParser from 'body-parser' | |
import cookieParser from 'cookie-parser' | |
import helmet from 'helmet' | |
import csrf from 'csurf' | |
import apiProxyMiddleware from './middlewares/apiProxyMiddleware' | |
import authenticate from './middlewares/authenticate' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { matchRoutes } from 'react-router-config' | |
import { flatMap, values } from 'lodash' | |
import { createMemoryHistory } from 'history' | |
import { wrapRootEpic } from 'react-redux-epic' | |
import createStore from 'app/createStore' | |
import { featureTypes } from 'client/checkFeature' | |
import renderHtmlPage from './renderHtml' | |
import { normalizeAssets, orderAssets, normalizeStore } from './utils' | |
import renderRoute from './renderRoute' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react' | |
import { renderToString } from 'react-redux-epic' | |
import { JssProvider, SheetsRegistry } from 'react-jss' | |
import { Provider as StoreProvider } from 'react-redux' | |
import Helmet from 'react-helmet' | |
import { GridSystemProvider } from '@frankmoney/grid' | |
import StaticReduxRouter from 'app/components/routing/StaticReduxRouter' | |
import GraphqlProvider from 'app/components/GraphqlProvider' | |
import ThemeProvider from 'app/components/ThemeProvider' | |
import HttpClientProvider from 'app/components/HttpClientProvider' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const LogRecordList = records => | |
<div> | |
{records.map((record, idx) => renderRecord(record, idx, records))} | |
</div> | |
// utils | |
const lensEq = R.curryN(3, (lens, val, data) => | |
R.pipe(R.view(lens), R.equals(val))(data) | |
) | |
const lensNotEq = R.complement(lensEq) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const createCase = (inProps, outProps) => () => { | |
const initialProps = merge({ | |
hasFoundationRole: false, | |
status: SECTION_STATUS.needClarification, | |
finished: true, | |
permissions: [ | |
SECTION_PERMISSION.readStatus, | |
SECTION_PERMISSION.sendClarification, | |
], | |
}, inProps) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const mapSectionStatus = ({ section: { status, finished } }) => { | |
let statusLabel | |
let statusAppearance | |
if (status === SECTION_STATUS.needReview && finished) { | |
statusLabel = 'Edited' | |
} | |
if (status === SECTION_STATUS.needClarification && finished) { | |
statusLabel = 'Marked as resolved' | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const formErrors = { | |
budget: { | |
amount: 'Required', | |
}, | |
project: { | |
name: 'Required', | |
}, | |
empty: null, | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react' | |
import { mount } from 'enzyme' | |
import { createStore } from 'redux' | |
import { Provider as StoreProvider, connect } from 'react-redux' | |
test('render form text field', () => { | |
const changeTitle = title => ({ | |
type: 'CHANGE_TITLE', | |
payload: { title }, | |
}) |
NewerOlder