Share report template functionality

This commit is contained in:
Tomas Bures 2017-07-24 07:03:32 +03:00
parent e6ad0e239e
commit 4822a50d0b
35 changed files with 614 additions and 128 deletions

View file

@ -1,8 +1,9 @@
'use strict';
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { translate } from 'react-i18next';
import { withPageHelpers, Title } from '../lib/page'
import { requiresAuthenticatedUser, withPageHelpers, Title } from '../lib/page';
import { withForm, Form, FormSendMethod, InputField, TextArea, ButtonRow, Button, TreeTableSelect } from '../lib/form';
import axios from '../lib/axios';
import { withErrorHandling, withAsyncErrorHandler } from '../lib/error-handling';
@ -13,6 +14,7 @@ import { ModalDialog } from '../lib/bootstrap-components';
@withForm
@withPageHelpers
@withErrorHandling
@requiresAuthenticatedUser
export default class CUD extends Component {
constructor(props) {
super(props);
@ -28,6 +30,10 @@ export default class CUD extends Component {
}
static propTypes = {
edit: PropTypes.bool
}
isEditGlobal() {
return this.state.entityId === 1;
}

View file

@ -2,11 +2,17 @@
import React, { Component } from 'react';
import { translate } from 'react-i18next';
import { Title, Toolbar, NavButton } from '../lib/page';
import { requiresAuthenticatedUser, withPageHelpers, Title, Toolbar, NavButton } from '../lib/page';
import { TreeTable } from '../lib/tree';
@translate()
@withPageHelpers
@requiresAuthenticatedUser
export default class List extends Component {
constructor(props) {
super(props);
}
render() {
const t = this.props.t;

View file

@ -5,9 +5,9 @@ import ReactDOM from 'react-dom';
import { I18nextProvider } from 'react-i18next';
import i18n from '../lib/i18n';
import { Section } from '../lib/page'
import CUD from './CUD'
import List from './List'
import { Section } from '../lib/page';
import CUD from './CUD';
import List from './List';
const getStructure = t => ({
'': {