Display relationships on 3 cols and fix ID display

This commit is contained in:
Aurelsicoko 2017-09-19 13:56:51 +02:00
parent 019690d6d6
commit 3176a431ec
3 changed files with 8 additions and 8 deletions

View File

@ -14,7 +14,7 @@ class PluginHeader extends React.Component { // eslint-disable-line react/prefer
render() {
return (
<div className={`${styles.pluginHeader} row`}>
<div className="col-lg-6">
<div className="col-lg-7">
<PluginHeaderTitle
title={this.props.title}
description={this.props.description}
@ -25,7 +25,7 @@ class PluginHeader extends React.Component { // eslint-disable-line react/prefer
actions={this.props.subActions || []}
/>
</div>
<div className="col-lg-4 justify-content-end">
<div className="col-lg-3 justify-content-end">
<PluginHeaderActions
actions={this.props.actions || []}
/>

View File

@ -26,13 +26,13 @@ class TableRow extends React.Component {
* @returns {*}
*/
getDisplayedValue(type, value) {
switch (type) {
switch (type.toLowerCase()) {
case 'string':
return !isEmpty(value) ? value.toString() : '-';
return value && !isEmpty(value.toString()) ? value.toString() : '-';
case 'integer':
return !isEmpty(value) ? value.toString() : '-';
return value && !isEmpty(value.toString()) ? value.toString() : '-';
case 'boolean':
return !isEmpty(value) ? value.toString() : '-';
return value && !isEmpty(value.toString()) ? value.toString() : '-';
default:
return '-';
}

View File

@ -154,7 +154,7 @@ export class Edit extends React.Component {
fullWidth={this.props.isRelationComponentNull}
/>
<div className='row'>
<div className={this.props.isRelationComponentNull ? `col-lg-12` : `col-lg-8`}>
<div className={this.props.isRelationComponentNull ? `col-lg-12` : `col-lg-9`}>
<div className={styles.main_wrapper}>
<EditForm
record={this.props.record}
@ -167,7 +167,7 @@ export class Edit extends React.Component {
/>
</div>
</div>
<div className={`col-lg-4 ${this.props.isRelationComponentNull ? 'hidden-xl-down' : ''}`}>
<div className={`col-lg-3 ${this.props.isRelationComponentNull ? 'hidden-xl-down' : ''}`}>
<div className={styles.sub_wrapper}>
<EditFormRelations
currentModelName={this.props.currentModelName}