Commit 44daecdc authored by a.bairuha's avatar a.bairuha

Merge branch 'master' of http://103.44.149.204/d.arizona/tia-dev into syadziy

parents 6a625d36 dc04af2b
...@@ -71,11 +71,11 @@ export default class Perusahaan extends Component { ...@@ -71,11 +71,11 @@ export default class Perusahaan extends Component {
if (item.length > 0) { if (item.length > 0) {
payload.push({ payload.push({
"id": index + 1, "id": index + 1,
"company_name": item[0], "company_name": item[0] === undefined ? "" : item[0],
"company_parent": item[1] === undefined ? null : item[1], "company_parent": item[1] === undefined ? "" : item[1],
"unit_bisnis": item[2], "unit_bisnis": item[2] === undefined ? "" : item[2],
"startDate": item[3], "startDate": item[3] === undefined ? "" : item[3],
"endDate": item[4], "endDate": item[4] === undefined ? "" :item[4],
}) })
} }
}) })
...@@ -111,16 +111,16 @@ export default class Perusahaan extends Component { ...@@ -111,16 +111,16 @@ export default class Perusahaan extends Component {
options: { options: {
customBodyRender: (val, tableMeta) => { customBodyRender: (val, tableMeta) => {
let check = null let check = null
if (tableMeta.rowData[6] != null) { if (tableMeta.rowData[5] != null) {
check = tableMeta.rowData[6].findIndex((val) => val.field.includes('company_name')) check = tableMeta.rowData[5].findIndex((val) => val.field.includes('company_name'))
if (check > -1) { if (check > -1) {
this.setState({ buttonError: true }) this.setState({ buttonError: true })
} }
} }
return ( return (
<div style={{ display: 'flex' }}> <div style={{ display: 'flex' }}>
{tableMeta.rowData[6] != null && check > -1 ? {tableMeta.rowData[5] != null && check > -1 ?
<a data-tip={tableMeta.rowData[6][check].message} data-for="company_name"> <a data-tip={tableMeta.rowData[5][check].message} data-for="company_name">
<span style={{ color: check != null && check > -1 ? "red" : 'black' }}>{val === "" ? "Empty" : val}</span> <span style={{ color: check != null && check > -1 ? "red" : 'black' }}>{val === "" ? "Empty" : val}</span>
</a> : </a> :
<span style={{ color: check != null && check > -1 ? "red" : 'black' }}>{val === "" ? "Empty" : val}</span> <span style={{ color: check != null && check > -1 ? "red" : 'black' }}>{val === "" ? "Empty" : val}</span>
...@@ -136,16 +136,16 @@ export default class Perusahaan extends Component { ...@@ -136,16 +136,16 @@ export default class Perusahaan extends Component {
options: { options: {
customBodyRender: (val, tableMeta) => { customBodyRender: (val, tableMeta) => {
let check = null let check = null
if (tableMeta.rowData[6] != null) { if (tableMeta.rowData[5] != null) {
check = tableMeta.rowData[6].findIndex((val) => val.field.includes('company_parent')) check = tableMeta.rowData[5].findIndex((val) => val.field.includes('company_parent'))
if (check > -1) { if (check > -1) {
this.setState({ buttonError: true }) this.setState({ buttonError: true })
} }
} }
return ( return (
<div style={{ display: 'flex' }}> <div style={{ display: 'flex' }}>
{tableMeta.rowData[6] != null && check > -1 ? {tableMeta.rowData[5] != null && check > -1 ?
<a data-tip={tableMeta.rowData[6][check].message} data-for="company_parent"> <a data-tip={tableMeta.rowData[5][check].message} data-for="company_parent">
<span style={{ color: check != null && check > -1 ? "red" : 'black' }}>{val === "" ? "Empty" : val}</span> <span style={{ color: check != null && check > -1 ? "red" : 'black' }}>{val === "" ? "Empty" : val}</span>
</a> : </a> :
<span style={{ color: check != null && check > -1 ? "red" : 'black' }}>{val === "" ? "Empty" : val}</span> <span style={{ color: check != null && check > -1 ? "red" : 'black' }}>{val === "" ? "Empty" : val}</span>
...@@ -161,16 +161,16 @@ export default class Perusahaan extends Component { ...@@ -161,16 +161,16 @@ export default class Perusahaan extends Component {
options: { options: {
customBodyRender: (val, tableMeta) => { customBodyRender: (val, tableMeta) => {
let check = null let check = null
if (tableMeta.rowData[6] != null) { if (tableMeta.rowData[5] != null) {
check = tableMeta.rowData[6].findIndex((val) => val.field.includes('unit_bisnis')) check = tableMeta.rowData[5].findIndex((val) => val.field.includes('unit_bisnis'))
if (check > -1) { if (check > -1) {
this.setState({ buttonError: true }) this.setState({ buttonError: true })
} }
} }
return ( return (
<div style={{ display: 'flex' }}> <div style={{ display: 'flex' }}>
{tableMeta.rowData[6] != null && check > -1 ? {tableMeta.rowData[5] != null && check > -1 ?
<a data-tip={tableMeta.rowData[6][check].message} data-for="unit_bisnis"> <a data-tip={tableMeta.rowData[5][check].message} data-for="unit_bisnis">
<span style={{ color: check != null && check > -1 ? "red" : 'black' }}>{val === "" ? "Empty" : val}</span> <span style={{ color: check != null && check > -1 ? "red" : 'black' }}>{val === "" ? "Empty" : val}</span>
</a> : </a> :
<span style={{ color: check != null && check > -1 ? "red" : 'black' }}>{val === "" ? "Empty" : val}</span> <span style={{ color: check != null && check > -1 ? "red" : 'black' }}>{val === "" ? "Empty" : val}</span>
...@@ -186,16 +186,16 @@ export default class Perusahaan extends Component { ...@@ -186,16 +186,16 @@ export default class Perusahaan extends Component {
options: { options: {
customBodyRender: (val, tableMeta) => { customBodyRender: (val, tableMeta) => {
let check = null let check = null
if (tableMeta.rowData[6] != null) { if (tableMeta.rowData[5] != null) {
check = tableMeta.rowData[6].findIndex((val) => val.field.includes('start_date')) check = tableMeta.rowData[5].findIndex((val) => val.field.includes('start_date'))
if (check > -1) { if (check > -1) {
this.setState({ buttonError: true }) this.setState({ buttonError: true })
} }
} }
return ( return (
<div style={{ display: 'flex' }}> <div style={{ display: 'flex' }}>
{tableMeta.rowData[6] != null && check > -1 ? {tableMeta.rowData[5] != null && check > -1 ?
<a data-tip={tableMeta.rowData[6][check].message} data-for="startdate"> <a data-tip={tableMeta.rowData[5][check].message} data-for="startdate">
<span style={{ color: check != null && check > -1 ? "red" : 'black' }}>{val === "" ? "Empty" : val}</span> <span style={{ color: check != null && check > -1 ? "red" : 'black' }}>{val === "" ? "Empty" : val}</span>
</a> : </a> :
<span style={{ color: check != null && check > -1 ? "red" : 'black' }}>{val === "" ? "Empty" : val}</span> <span style={{ color: check != null && check > -1 ? "red" : 'black' }}>{val === "" ? "Empty" : val}</span>
...@@ -211,16 +211,16 @@ export default class Perusahaan extends Component { ...@@ -211,16 +211,16 @@ export default class Perusahaan extends Component {
options: { options: {
customBodyRender: (val, tableMeta) => { customBodyRender: (val, tableMeta) => {
let check = null let check = null
if (tableMeta.rowData[6] != null) { if (tableMeta.rowData[5] != null) {
check = tableMeta.rowData[6].findIndex((val) => val.field.includes('end_date')) check = tableMeta.rowData[5].findIndex((val) => val.field.includes('end_date'))
if (check > -1) { if (check > -1) {
this.setState({ buttonError: true }) this.setState({ buttonError: true })
} }
} }
return ( return (
<div style={{ display: 'flex' }}> <div style={{ display: 'flex' }}>
{tableMeta.rowData[6] != null && check > -1 ? {tableMeta.rowData[5] != null && check > -1 ?
<a data-tip={tableMeta.rowData[6][check].message} data-for="enddate"> <a data-tip={tableMeta.rowData[5][check].message} data-for="enddate">
<span style={{ color: check != null && check > -1 ? "red" : 'black' }}>{val === "" ? "Empty" : val}</span> <span style={{ color: check != null && check > -1 ? "red" : 'black' }}>{val === "" ? "Empty" : val}</span>
</a> : </a> :
<span style={{ color: check != null && check > -1 ? "red" : 'black' }}>{val === "" ? "Empty" : val}</span> <span style={{ color: check != null && check > -1 ? "red" : 'black' }}>{val === "" ? "Empty" : val}</span>
...@@ -239,7 +239,7 @@ export default class Perusahaan extends Component { ...@@ -239,7 +239,7 @@ export default class Perusahaan extends Component {
} }
] ]
// console.log(dataRow); console.log(dataRow);
this.setState({ this.setState({
dataLoaded: true, dataLoaded: true,
cols: columns, cols: columns,
...@@ -525,40 +525,49 @@ export default class Perusahaan extends Component { ...@@ -525,40 +525,49 @@ export default class Perusahaan extends Component {
sort: false, sort: false,
customBodyRender: (val, tableMeta) => { customBodyRender: (val, tableMeta) => {
return ( return (
<div style={{ display: 'flex' }}> this.state.edit && (
{this.state.edit && ( <div style={{ display: 'flex' }}>
<button <a data-tip={'Edit'} data-for="edit">
style={{ <button
backgroundColor: 'transparent', style={{
cursor: 'pointer', backgroundColor: 'transparent',
borderColor: 'transparent' cursor: 'pointer',
}} borderColor: 'transparent'
// onClick={() => this.setState({ visibleEdit: true, data: tableMeta.rowData })} }}
onClick={() => this.openPopUp(tableMeta.rowData, 'edit')} // onClick={() => this.setState({ visibleEdit: true, data: tableMeta.rowData })}
> onClick={() => this.openPopUp(tableMeta.rowData, 'edit')}
<div style={{ display: 'flex' }}> >
{!tableMeta.rowData[2].includes("TIA") ? <div style={{ display: 'flex' }}>
<img src={Images.editCopy} /> : {!tableMeta.rowData[2].includes("TIA") ?
null <img src={Images.editCopy} /> :
} null
</div > }
</button> </div >
)} </button>
{this.state.edit && ( </a>
<button <ReactTooltip border={true} id="edit" place="bottom" type="light" effect="solid" />
style={{ <a data-tip={'Delete'} data-for="delete">
backgroundColor: 'transparent', <button
cursor: 'pointer', style={{
borderColor: 'transparent', backgroundColor: 'transparent',
marginLeft: 10 cursor: 'pointer',
}} borderColor: 'transparent',
// onClick={() => this.setState({ visibleEdit: true, data: tableMeta.rowData })} marginLeft: 10
onClick={() => this.openPopUp(tableMeta.rowData, 'delete')} }}
> // onClick={() => this.setState({ visibleEdit: true, data: tableMeta.rowData })}
<img src={Images.delete} /> onClick={() => this.openPopUp(tableMeta.rowData, 'delete')}
</button> >
)} <div style={{ display: 'flex' }}>
</div > {!tableMeta.rowData[2].includes("TIA") ?
<img src={Images.delete} /> :
null
}
</div >
</button>
</a>
<ReactTooltip border={true} id="delete" place="bottom" type="light" effect="solid" />
</div>
)
); );
} }
} }
......
...@@ -107,6 +107,7 @@ export default class VisualPerusahaan extends Component { ...@@ -107,6 +107,7 @@ export default class VisualPerusahaan extends Component {
this.setState({ alert: true, messageAlert: response.data.message, tipeAlert: 'success' }, () => { this.setState({ alert: true, messageAlert: response.data.message, tipeAlert: 'success' }, () => {
setTimeout(() => { setTimeout(() => {
this.props.onClickClose() this.props.onClickClose()
window.location.reload();
}, 1000); }, 1000);
}) })
} else { } else {
......
import React, { Component } from "react"; import React, { Component } from "react";
import { createMuiTheme, MuiThemeProvider, withStyles } from '@material-ui/core/styles'; import { createMuiTheme, MuiThemeProvider} from '@material-ui/core/styles';
import Images from "../../assets/Images"; import Images from "../../assets/Images";
import MUIDataTable from "mui-datatables"; import MUIDataTable from "mui-datatables";
import { InputBase, Snackbar } from "@material-ui/core"; import { InputBase, Snackbar, withStyles } from "@material-ui/core";
import { ExcelRenderer } from 'react-excel-renderer'; import { ExcelRenderer } from 'react-excel-renderer';
import UploadFile from "../../library/Upload"; import UploadFile from "../../library/Upload";
import MuiAlert from '@material-ui/lab/Alert'; import MuiAlert from '@material-ui/lab/Alert';
...@@ -67,22 +67,22 @@ export default class ReportItems extends Component { ...@@ -67,22 +67,22 @@ export default class ReportItems extends Component {
if (item.length > 0) { if (item.length > 0) {
payload.push({ payload.push({
id: index + 1, id: index + 1,
report: item[0] === undefined ? "" : item[0], report_type: item[0] === undefined ? "" : item[0],
company: item[1] == undefined ? "" : item[1], company: item[1] === undefined ? "" : item[1],
orders: item[2] === undefined ? "" : item[2], orders: item[2] === undefined ? null : item[2],
description: item[3] === undefined ? "-" : item[3], description: item[3] === undefined ? "" : item[3],
parent: item[4] === undefined ? 0 : item[4], parent: item[4] === undefined ? null : item[4],
uom: item[5] === undefined ? null : item[5], uom: item[5] === undefined ? "" : item[5],
weight: item[6] === undefined ? "" : item[6], weight: item[6] === undefined ? "" : item[6],
type_report: item[7], type_report: item[7] === undefined ? "" : item[7],
formula: item[8], formula: item[8] === undefined ? "" : item[8],
condition_it_should_be: item[9] === undefined ? null : item[9], condition_it_should_be: item[9] === undefined ? "" : item[9],
condition_if_wrong: item[10] === undefined ? null : item[10], condition_if_wrong: item[10] === undefined ? "" : item[10],
kpi_type: item[11] === undefined ? "" : item[11], kpi_type: item[11] === undefined ? "" : item[11],
max_ach: item[12] === undefined ? "" : item[12], max_ach: item[12] === undefined ? "" : item[12],
formula_ytd: item[13] === undefined ? "" : item[13], formula_ytd: item[13] === undefined ? "" : item[13],
start_date: item[14], start_date: item[14] === undefined ? "" : item[14],
end_date: item[15], end_date: item[15] === undefined ? "" : item[15],
}) })
} }
}) })
...@@ -104,8 +104,7 @@ export default class ReportItems extends Component { ...@@ -104,8 +104,7 @@ export default class ReportItems extends Component {
if (response.data.status === "success") { if (response.data.status === "success") {
dataRow = response.data.data.map((item, index) => { dataRow = response.data.data.map((item, index) => {
return [ return [
// index + 1, item.report_type,
item.report,
item.company, item.company,
item.orders, item.orders,
item.description, item.description,
...@@ -131,7 +130,7 @@ export default class ReportItems extends Component { ...@@ -131,7 +130,7 @@ export default class ReportItems extends Component {
customBodyRender: (val, tableMeta) => { customBodyRender: (val, tableMeta) => {
let check = null let check = null
if (tableMeta.rowData[16] != null) { if (tableMeta.rowData[16] != null) {
check = tableMeta.rowData[16].findIndex((val) => val.field.includes('report')) check = tableMeta.rowData[16].findIndex((val) => val.field.includes('report_type'))
if (check > -1) { if (check > -1) {
this.setState({ buttonError: true }) this.setState({ buttonError: true })
} }
...@@ -140,9 +139,9 @@ export default class ReportItems extends Component { ...@@ -140,9 +139,9 @@ export default class ReportItems extends Component {
<div style={{ display: 'flex' }}> <div style={{ display: 'flex' }}>
{tableMeta.rowData[16] != null && check > -1 ? {tableMeta.rowData[16] != null && check > -1 ?
<a data-tip={tableMeta.rowData[16][check].message} data-for="reportname"> <a data-tip={tableMeta.rowData[16][check].message} data-for="reportname">
<span style={{ color: check != null && check > -1 ? "red" : 'black' }}>{val === "" ? "-" : val}</span> <span style={{ color: check != null && check > -1 ? "red" : 'black' }}>{val === "" ? "Empty" : val}</span>
</a> : </a> :
<span style={{ color: check != null && check > -1 ? "red" : 'black' }}>{val === "" ? "-" : val}</span> <span style={{ color: check != null && check > -1 ? "red" : 'black' }}>{val === "" ? "Empty" : val}</span>
} }
<ReactTooltip border={true} id="reportname" place="bottom" type="light" effect="solid" /> <ReactTooltip border={true} id="reportname" place="bottom" type="light" effect="solid" />
</div > </div >
...@@ -165,9 +164,9 @@ export default class ReportItems extends Component { ...@@ -165,9 +164,9 @@ export default class ReportItems extends Component {
<div style={{ display: 'flex' }}> <div style={{ display: 'flex' }}>
{tableMeta.rowData[16] != null && check > -1 ? {tableMeta.rowData[16] != null && check > -1 ?
<a data-tip={tableMeta.rowData[16][check].message} data-for="companyname"> <a data-tip={tableMeta.rowData[16][check].message} data-for="companyname">
<span style={{ color: check != null && check > -1 ? "red" : 'black' }}>{val === "" ? "-" : val}</span> <span style={{ color: check != null && check > -1 ? "red" : 'black' }}>{val === "" ? "Empty" : val}</span>
</a> : </a> :
<span style={{ color: check != null && check > -1 ? "red" : 'black' }}>{val === "" ? "-" : val}</span> <span style={{ color: check != null && check > -1 ? "red" : 'black' }}>{val === "" ? "Empty" : val}</span>
} }
<ReactTooltip border={true} id="companyname" place="bottom" type="light" effect="solid" /> <ReactTooltip border={true} id="companyname" place="bottom" type="light" effect="solid" />
</div > </div >
...@@ -190,9 +189,9 @@ export default class ReportItems extends Component { ...@@ -190,9 +189,9 @@ export default class ReportItems extends Component {
<div style={{ display: 'flex' }}> <div style={{ display: 'flex' }}>
{tableMeta.rowData[16] != null && check > -1 ? {tableMeta.rowData[16] != null && check > -1 ?
<a data-tip={tableMeta.rowData[16][check].message} data-for="order"> <a data-tip={tableMeta.rowData[16][check].message} data-for="order">
<span style={{ color: check != null && check > -1 ? "red" : 'black' }}>{val === "" ? "-" : val}</span> <span style={{ color: check != null && check > -1 ? "red" : 'black' }}>{val === null ? "Empty" : val}</span>
</a> : </a> :
<span style={{ color: check != null && check > -1 ? "red" : 'black' }}>{val === "" ? "-" : val}</span> <span style={{ color: check != null && check > -1 ? "red" : 'black' }}>{val === null ? "Empty" : val}</span>
} }
<ReactTooltip border={true} id="order" place="bottom" type="light" effect="solid" /> <ReactTooltip border={true} id="order" place="bottom" type="light" effect="solid" />
</div > </div >
...@@ -215,9 +214,9 @@ export default class ReportItems extends Component { ...@@ -215,9 +214,9 @@ export default class ReportItems extends Component {
<div style={{ display: 'flex' }}> <div style={{ display: 'flex' }}>
{tableMeta.rowData[16] != null && check > -1 ? {tableMeta.rowData[16] != null && check > -1 ?
<a data-tip={tableMeta.rowData[16][check].message} data-for="desc"> <a data-tip={tableMeta.rowData[16][check].message} data-for="desc">
<span style={{ color: check != null && check > -1 ? "red" : 'black' }}>{val === "" ? "-" : val}</span> <span style={{ color: check != null && check > -1 ? "red" : 'black' }}>{val === "" ? "Empty" : val}</span>
</a> : </a> :
<span style={{ color: check != null && check > -1 ? "red" : 'black' }}>{val === "" ? "-" : val}</span> <span style={{ color: check != null && check > -1 ? "red" : 'black' }}>{val === "" ? "Empty" : val}</span>
} }
<ReactTooltip border={true} id="desc" place="bottom" type="light" effect="solid" /> <ReactTooltip border={true} id="desc" place="bottom" type="light" effect="solid" />
</div > </div >
...@@ -240,9 +239,9 @@ export default class ReportItems extends Component { ...@@ -240,9 +239,9 @@ export default class ReportItems extends Component {
<div style={{ display: 'flex' }}> <div style={{ display: 'flex' }}>
{tableMeta.rowData[16] != null && check > -1 ? {tableMeta.rowData[16] != null && check > -1 ?
<a data-tip={tableMeta.rowData[16][check].message} data-for="parents"> <a data-tip={tableMeta.rowData[16][check].message} data-for="parents">
<span style={{ color: check != null && check > -1 ? "red" : 'black' }}>{val === "" ? "-" : val}</span> <span style={{ color: check != null && check > -1 ? "red" : 'black' }}>{val}</span>
</a> : </a> :
<span style={{ color: check != null && check > -1 ? "red" : 'black' }}>{val === "" ? "-" : val}</span> <span style={{ color: check != null && check > -1 ? "red" : 'black' }}>{val}</span>
} }
<ReactTooltip border={true} id="parents" place="bottom" type="light" effect="solid" /> <ReactTooltip border={true} id="parents" place="bottom" type="light" effect="solid" />
</div > </div >
...@@ -265,9 +264,9 @@ export default class ReportItems extends Component { ...@@ -265,9 +264,9 @@ export default class ReportItems extends Component {
<div style={{ display: 'flex' }}> <div style={{ display: 'flex' }}>
{tableMeta.rowData[16] != null && check > -1 ? {tableMeta.rowData[16] != null && check > -1 ?
<a data-tip={tableMeta.rowData[16][check].message} data-for="uoms"> <a data-tip={tableMeta.rowData[16][check].message} data-for="uoms">
<span style={{ color: check != null && check > -1 ? "red" : 'black' }}>{val === "" ? "-" : val}</span> <span style={{ color: check != null && check > -1 ? "red" : 'black' }}>{val}</span>
</a> : </a> :
<span style={{ color: check != null && check > -1 ? "red" : 'black' }}>{val === "" ? "-" : val}</span> <span style={{ color: check != null && check > -1 ? "red" : 'black' }}>{val}</span>
} }
<ReactTooltip border={true} id="uoms" place="bottom" type="light" effect="solid" /> <ReactTooltip border={true} id="uoms" place="bottom" type="light" effect="solid" />
</div > </div >
...@@ -290,9 +289,9 @@ export default class ReportItems extends Component { ...@@ -290,9 +289,9 @@ export default class ReportItems extends Component {
<div style={{ display: 'flex' }}> <div style={{ display: 'flex' }}>
{tableMeta.rowData[16] != null && check > -1 ? {tableMeta.rowData[16] != null && check > -1 ?
<a data-tip={tableMeta.rowData[16][check].message} data-for="weights"> <a data-tip={tableMeta.rowData[16][check].message} data-for="weights">
<span style={{ color: check != null && check > -1 ? "red" : 'black' }}>{val === "" ? "-" : val}</span> <span style={{ color: check != null && check > -1 ? "red" : 'black' }}>{val}</span>
</a> : </a> :
<span style={{ color: check != null && check > -1 ? "red" : 'black' }}>{val === "" ? "-" : val}</span> <span style={{ color: check != null && check > -1 ? "red" : 'black' }}>{val}</span>
} }
<ReactTooltip border={true} id="weights" place="bottom" type="light" effect="solid" /> <ReactTooltip border={true} id="weights" place="bottom" type="light" effect="solid" />
</div > </div >
...@@ -315,9 +314,9 @@ export default class ReportItems extends Component { ...@@ -315,9 +314,9 @@ export default class ReportItems extends Component {
<div style={{ display: 'flex' }}> <div style={{ display: 'flex' }}>
{tableMeta.rowData[16] != null && check > -1 ? {tableMeta.rowData[16] != null && check > -1 ?
<a data-tip={tableMeta.rowData[16][check].message} data-for="datatype"> <a data-tip={tableMeta.rowData[16][check].message} data-for="datatype">
<span style={{ color: check != null && check > -1 ? "red" : 'black' }}>{val === "" ? "-" : val}</span> <span style={{ color: check != null && check > -1 ? "red" : 'black' }}>{val === "" ? "Empty" : val}</span>
</a> : </a> :
<span style={{ color: check != null && check > -1 ? "red" : 'black' }}>{val === "" ? "-" : val}</span> <span style={{ color: check != null && check > -1 ? "red" : 'black' }}>{val === "" ? "Empty" : val}</span>
} }
<ReactTooltip border={true} id="datatype" place="bottom" type="light" effect="solid" /> <ReactTooltip border={true} id="datatype" place="bottom" type="light" effect="solid" />
</div > </div >
...@@ -340,9 +339,9 @@ export default class ReportItems extends Component { ...@@ -340,9 +339,9 @@ export default class ReportItems extends Component {
<div style={{ display: 'flex' }}> <div style={{ display: 'flex' }}>
{tableMeta.rowData[16] != null && check > -1 ? {tableMeta.rowData[16] != null && check > -1 ?
<a data-tip={tableMeta.rowData[16][check].message} data-for="formulas"> <a data-tip={tableMeta.rowData[16][check].message} data-for="formulas">
<span style={{ color: check != null && check > -1 ? "red" : 'black' }}>{val === "" ? "-" : val}</span> <span style={{ color: check != null && check > -1 ? "red" : 'black' }}>{val === "" ? "Empty" : val}</span>
</a> : </a> :
<span style={{ color: check != null && check > -1 ? "red" : 'black' }}>{val === "" ? "-" : val}</span> <span style={{ color: check != null && check > -1 ? "red" : 'black' }}>{val === "" ? "Empty" : val}</span>
} }
<ReactTooltip border={true} id="formulas" place="bottom" type="light" effect="solid" /> <ReactTooltip border={true} id="formulas" place="bottom" type="light" effect="solid" />
</div > </div >
...@@ -365,9 +364,9 @@ export default class ReportItems extends Component { ...@@ -365,9 +364,9 @@ export default class ReportItems extends Component {
<div style={{ display: 'flex' }}> <div style={{ display: 'flex' }}>
{tableMeta.rowData[16] != null && check > -1 ? {tableMeta.rowData[16] != null && check > -1 ?
<a data-tip={tableMeta.rowData[16][check].message} data-for="values"> <a data-tip={tableMeta.rowData[16][check].message} data-for="values">
<span style={{ color: check != null && check > -1 ? "red" : 'black' }}>{val === "" ? "-" : val}</span> <span style={{ color: check != null && check > -1 ? "red" : 'black' }}>{val}</span>
</a> : </a> :
<span style={{ color: check != null && check > -1 ? "red" : 'black' }}>{val === "" ? "-" : val}</span> <span style={{ color: check != null && check > -1 ? "red" : 'black' }}>{val}</span>
} }
<ReactTooltip border={true} id="values" place="bottom" type="light" effect="solid" /> <ReactTooltip border={true} id="values" place="bottom" type="light" effect="solid" />
</div > </div >
...@@ -390,9 +389,9 @@ export default class ReportItems extends Component { ...@@ -390,9 +389,9 @@ export default class ReportItems extends Component {
<div style={{ display: 'flex' }}> <div style={{ display: 'flex' }}>
{tableMeta.rowData[16] != null && check > -1 ? {tableMeta.rowData[16] != null && check > -1 ?
<a data-tip={tableMeta.rowData[16][check].message} data-for="conditions"> <a data-tip={tableMeta.rowData[16][check].message} data-for="conditions">
<span style={{ color: check != null && check > -1 ? "red" : 'black' }}>{val === "" ? "-" : val}</span> <span style={{ color: check != null && check > -1 ? "red" : 'black' }}>{val}</span>
</a> : </a> :
<span style={{ color: check != null && check > -1 ? "red" : 'black' }}>{val === "" ? "-" : val}</span> <span style={{ color: check != null && check > -1 ? "red" : 'black' }}>{val}</span>
} }
<ReactTooltip border={true} id="conditions" place="bottom" type="light" effect="solid" /> <ReactTooltip border={true} id="conditions" place="bottom" type="light" effect="solid" />
</div > </div >
...@@ -415,9 +414,9 @@ export default class ReportItems extends Component { ...@@ -415,9 +414,9 @@ export default class ReportItems extends Component {
<div style={{ display: 'flex' }}> <div style={{ display: 'flex' }}>
{tableMeta.rowData[16] != null && check > -1 ? {tableMeta.rowData[16] != null && check > -1 ?
<a data-tip={tableMeta.rowData[16][check].message} data-for="kpi_type"> <a data-tip={tableMeta.rowData[16][check].message} data-for="kpi_type">
<span style={{ color: check != null && check > -1 ? "red" : 'black' }}>{val === "" ? "-" : val}</span> <span style={{ color: check != null && check > -1 ? "red" : 'black' }}>{val}</span>
</a> : </a> :
<span style={{ color: check != null && check > -1 ? "red" : 'black' }}>{val === "" ? "-" : val}</span> <span style={{ color: check != null && check > -1 ? "red" : 'black' }}>{val}</span>
} }
<ReactTooltip border={true} id="kpi_type" place="bottom" type="light" effect="solid" /> <ReactTooltip border={true} id="kpi_type" place="bottom" type="light" effect="solid" />
</div > </div >
...@@ -440,9 +439,9 @@ export default class ReportItems extends Component { ...@@ -440,9 +439,9 @@ export default class ReportItems extends Component {
<div style={{ display: 'flex' }}> <div style={{ display: 'flex' }}>
{tableMeta.rowData[16] != null && check > -1 ? {tableMeta.rowData[16] != null && check > -1 ?
<a data-tip={tableMeta.rowData[16][check].message} data-for="max_ach"> <a data-tip={tableMeta.rowData[16][check].message} data-for="max_ach">
<span style={{ color: check != null && check > -1 ? "red" : 'black' }}>{val === "" ? "-" : val}</span> <span style={{ color: check != null && check > -1 ? "red" : 'black' }}>{val}</span>
</a> : </a> :
<span style={{ color: check != null && check > -1 ? "red" : 'black' }}>{val === "" ? "-" : val}</span> <span style={{ color: check != null && check > -1 ? "red" : 'black' }}>{val}</span>
} }
<ReactTooltip border={true} id="max_ach" place="bottom" type="light" effect="solid" /> <ReactTooltip border={true} id="max_ach" place="bottom" type="light" effect="solid" />
</div > </div >
...@@ -465,9 +464,9 @@ export default class ReportItems extends Component { ...@@ -465,9 +464,9 @@ export default class ReportItems extends Component {
<div style={{ display: 'flex' }}> <div style={{ display: 'flex' }}>
{tableMeta.rowData[16] != null && check > -1 ? {tableMeta.rowData[16] != null && check > -1 ?
<a data-tip={tableMeta.rowData[16][check].message} data-for="formula_ytd"> <a data-tip={tableMeta.rowData[16][check].message} data-for="formula_ytd">
<span style={{ color: check != null && check > -1 ? "red" : 'black' }}>{val === "" ? "-" : val}</span> <span style={{ color: check != null && check > -1 ? "red" : 'black' }}>{val}</span>
</a> : </a> :
<span style={{ color: check != null && check > -1 ? "red" : 'black' }}>{val === "" ? "-" : val}</span> <span style={{ color: check != null && check > -1 ? "red" : 'black' }}>{val}</span>
} }
<ReactTooltip border={true} id="formula_ytd" place="bottom" type="light" effect="solid" /> <ReactTooltip border={true} id="formula_ytd" place="bottom" type="light" effect="solid" />
</div > </div >
...@@ -490,9 +489,9 @@ export default class ReportItems extends Component { ...@@ -490,9 +489,9 @@ export default class ReportItems extends Component {
<div style={{ display: 'flex' }}> <div style={{ display: 'flex' }}>
{tableMeta.rowData[16] != null && check > -1 ? {tableMeta.rowData[16] != null && check > -1 ?
<a data-tip={tableMeta.rowData[16][check].message} data-for="startdate"> <a data-tip={tableMeta.rowData[16][check].message} data-for="startdate">
<span style={{ color: check != null && check > -1 ? "red" : 'black' }}>{val === "" ? "-" : val}</span> <span style={{ color: check != null && check > -1 ? "red" : 'black' }}>{val === "" ? "Empty" : val}</span>
</a> : </a> :
<span style={{ color: check != null && check > -1 ? "red" : 'black' }}>{val === "" ? "-" : val}</span> <span style={{ color: check != null && check > -1 ? "red" : 'black' }}>{val === "" ? "Empty" : val}</span>
} }
<ReactTooltip border={true} id="startdate" place="bottom" type="light" effect="solid" /> <ReactTooltip border={true} id="startdate" place="bottom" type="light" effect="solid" />
</div > </div >
...@@ -515,9 +514,9 @@ export default class ReportItems extends Component { ...@@ -515,9 +514,9 @@ export default class ReportItems extends Component {
<div style={{ display: 'flex' }}> <div style={{ display: 'flex' }}>
{tableMeta.rowData[16] != null && check > -1 ? {tableMeta.rowData[16] != null && check > -1 ?
<a data-tip={tableMeta.rowData[16][check].message} data-for="enddate"> <a data-tip={tableMeta.rowData[16][check].message} data-for="enddate">
<span style={{ color: check != null && check > -1 ? "red" : 'black' }}>{val === "" ? "-" : val}</span> <span style={{ color: check != null && check > -1 ? "red" : 'black' }}>{val === "" ? "Empty" : val}</span>
</a> : </a> :
<span style={{ color: check != null && check > -1 ? "red" : 'black' }}>{val === "" ? "-" : val}</span> <span style={{ color: check != null && check > -1 ? "red" : 'black' }}>{val === "" ? "Empty" : val}</span>
} }
<ReactTooltip border={true} id="enddate" place="bottom" type="light" effect="solid" /> <ReactTooltip border={true} id="enddate" place="bottom" type="light" effect="solid" />
</div > </div >
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment