Commit c76483de authored by Riri Novita's avatar Riri Novita

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

parents 778bec60 53ea4ea1
......@@ -140,7 +140,7 @@ export default class BalanceSheet extends Component {
"submission_id": this.props.submissionID
}
let response = await api.create().getDetailReportMB(payload)
// console.log(response);
console.log(response);
let dataTable = []
if (response.data) {
let res = response.data.data
......@@ -535,17 +535,33 @@ export default class BalanceSheet extends Component {
let dataTable2 = this.state.dataTable
const handleChange = (value, tableMeta, type) => {
let val = String(value).split(",").join("")
// console.log('masuk')
if (type === "actual") {
dataTable2[tableMeta.rowIndex][tableMeta.columnIndex] = Number(val).toFixed(1)
} else {
// console.log('masuk2')
let indexParent = dataTable2.findIndex((val) => val[1] === dataTable2[tableMeta.rowIndex][2])
if (indexParent > 0) {
// console.log(indexParent)
let a = dataTable2[tableMeta.rowIndex][tableMeta.columnIndex] = Number(val)
let a = 0
if (type == 'r/e') {
// console.log('masuk8')
a = dataTable2[tableMeta.rowIndex][tableMeta.columnIndex].value = Number(val).toFixed(1)
} else {
// console.log('masuk9')
a = dataTable2[tableMeta.rowIndex][tableMeta.columnIndex] = Number(val).toFixed(1)
}
let jagain = dataTable2[indexParent][tableMeta.columnIndex]
a = dataTable2[indexParent][tableMeta.columnIndex] = jagain === undefined ? (0 + Number(val)).toFixed(1) : Number(jagain + Number(val)).toFixed(1)
} else {
dataTable2[tableMeta.rowIndex][tableMeta.columnIndex] = Number(val).toFixed(1)
// console.log('masuk3')
if (type == 'r/e') {
// console.log('masuk4')
dataTable2[tableMeta.rowIndex][tableMeta.columnIndex].value = Number(val).toFixed(1)
} else {
// console.log('masuk5')
dataTable2[tableMeta.rowIndex][tableMeta.columnIndex] = Number(val).toFixed(1)
}
}
}
}
......@@ -577,7 +593,12 @@ export default class BalanceSheet extends Component {
// console.log(tableMeta.rowIndex)
// console.log(total)
// dataTable2[tableMeta.rowIndex][column] = total
total = handleValueFormula(dataTable2[tableMeta.rowIndex][column], tableMeta, column, periode, dataTable2[tableMeta.rowIndex][25])
if (column == 19 && String(tableMeta.rowData[5]).toLocaleLowerCase() == "r/e (cummulative)") {
total = tableMeta.rowData[7].value
dataTable2[tableMeta.rowIndex][column] = tableMeta.rowData[7].value
} else {
total = handleValueFormula(dataTable2[tableMeta.rowIndex][column], tableMeta, column, periode, dataTable2[tableMeta.rowIndex][25])
}
// console.log(total)
return total
}
......@@ -969,8 +990,12 @@ export default class BalanceSheet extends Component {
style={{ color: String(tableMeta.rowData[5]).toLocaleLowerCase() == "r/e (cummulative)" ? '#5198ea' : 'black', fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
placeholder=""
disabled={this.props.isApprover == true ? true : ((this.props.lastStatus === 'SUBMIT' || this.props.lastStatus === 'REVISION') && this.props.prevRevision === false && (this.props.status === 'revision' || this.props.status === 'not-yet' || this.props.status === 'draft' || this.props.status === 'submitted') ? false : (String(tableMeta.rowData[5]).toLocaleLowerCase() == "r/e (cummulative)" ? false : true))}
disabled={this.props.isApprover == true ? true : ((this.props.lastStatus === 'SUBMIT' || this.props.lastStatus === 'REVISION') && String(tableMeta.rowData[5]).toLocaleLowerCase() == "r/e (cummulative)" && this.props.prevRevision === false && (this.props.status === 'revision' || this.props.status === 'not-yet' || this.props.status === 'draft' || this.props.status === 'submitted') ? false : true)}
value={String(tableMeta.rowData[5]).toLocaleLowerCase() == "r/e (cummulative)" ? Number(value.value).toFixed(1) : Number(handleValueFormula(value, tableMeta)).toFixed(1)}
onBlur={(event) => {
handleChange(event.target.value, tableMeta, 'r/e')
// console.log(dataTable2)
}}
/>
:
tableMeta.rowData[0] === 5 ?
......@@ -979,8 +1004,12 @@ export default class BalanceSheet extends Component {
style={{ color: String(tableMeta.rowData[5]).toLocaleLowerCase() == "r/e (cummulative)" ? '#5198ea' : 'black', fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
placeholder=""
disabled={this.props.isApprover == true ? true : ((this.props.lastStatus === 'SUBMIT' || this.props.lastStatus === 'REVISION') && this.props.prevRevision === false && (this.props.status === 'revision' || this.props.status === 'not-yet' || this.props.status === 'draft' || this.props.status === 'submitted') ? false : (String(tableMeta.rowData[5]).toLocaleLowerCase() == "r/e (cummulative)" ? false : true))}
disabled={this.props.isApprover == true ? true : ((this.props.lastStatus === 'SUBMIT' || this.props.lastStatus === 'REVISION') && String(tableMeta.rowData[5]).toLocaleLowerCase() == "r/e (cummulative)" && this.props.prevRevision === false && (this.props.status === 'revision' || this.props.status === 'not-yet' || this.props.status === 'draft' || this.props.status === 'submitted') ? false : true)}
value={String(tableMeta.rowData[5]).toLocaleLowerCase() == "r/e (cummulative)" ? Number(value.value).toFixed(1) : Number(handleValueFormula(value, tableMeta)).toFixed(1)}
onBlur={(event) => {
handleChange(event.target.value, tableMeta, 'r/e')
// console.log(dataTable2)
}}
/>
:
tableMeta.rowData[0] === 1 ?
......
import { Typography, Paper, createMuiTheme, ThemeProvider, MuiThemeProvider, TableCell, FormControlLabel, TextField, Input, withStyles, makeStyles, Snackbar } from '@material-ui/core';
import MUIDataTable from 'mui-datatables';
import React, { Component } from 'react'
import ReactTooltip from 'react-tooltip';
import Images from '../../assets/Images';
import api from '../../api';
import { titleCase } from '../../library/Utils';
import Tooltip from '@material-ui/core/Tooltip';
import NumberFormat from 'react-number-format';
import Constant from '../../library/Constant';
import { Alert, Autocomplete } from '@material-ui/lab';
import UploadFile from '../../library/Upload';
import { ExcelRenderer } from 'react-excel-renderer';
import { PropagateLoader } from 'react-spinners';
import * as R from 'ramda'
const LightTooltip = withStyles((theme) => ({
tooltip: {
backgroundColor: theme.palette.common.white,
color: 'rgba(0, 0, 0, 0.87)',
boxShadow: theme.shadows[1],
fontSize: 11,
},
}))(Tooltip);
var ct = require("../../library/CustomTable");
const getMuiTheme = () => createMuiTheme(ct.customTable3());
const options = ct.customOptionsFixedColumn();
const style = {
position: "sticky",
left: 0,
zIndex: 101,
background: "white",
};
const style2 = {
position: "sticky",
background: "white",
zIndex: 100,
top: 0
};
export default class CorporateAnnualTargetPA extends Component {
constructor(props) {
super(props)
this.state = {
dataTable: [],
loading: false,
}
}
componentDidMount() {
// this.getItemHierarki()
}
closeAlert() {
this.setState({ alert: false })
}
render() {
const columnCatPQ = [
{
name: "Key Performance Indicator",
options: {
customHeadRender: (columnMeta) => (
<TableCell key={columnMeta.index} style={{ ...style, top: 0, zIndex: 103, backgroundColor: '#1c71b8', width: 300 }}>
<Typography style={{ color: 'white', fontSize: 12, fontWeight: 'bold', textAlign: 'left' }}>{columnMeta.name}</Typography>
</TableCell>
),
setCellProps: () => ({ style }),
customBodyRender: (val, tableMeta) => {
return (
<div style={{ width: 300 }}>
{
tableMeta.rowData[4] == 0 ?
<span style={{ fontSize: 12, fontWeight: 'bold' }}>{String(tableMeta.rowData[0] === 4 ? "" : val).toUpperCase()}</span>
:
<div style={{ paddingLeft: 20 * Number(tableMeta.rowData[4]) }}>
<span style={{ fontSize: 12 }}>{tableMeta.rowData[0] === 4 ? "" : val}</span>
</div>
}
</div>
)
}
}
}, {
name: "Weight",
options: {
customHeadRender: (columnMeta) => (
<TableCell style={{ ...style2, top: 0, zIndex: 99, backgroundColor: '#1c71b8', borderRight: '1px solid #fff', borderLeft: '1px solid #fff' }}>
<Typography style={{ color: 'white', fontSize: 12, fontWeight: 'bold', textAlign: 'center' }}>{columnMeta.name}</Typography>
</TableCell>
),
setCellProps: () => ({ style2 }),
customBodyRender: (value, tableMeta, updateValue) => {
return (
<div style={{ width: 90, textAlign: 'center' }}>
{tableMeta.rowData[0] === 1 || tableMeta.rowData[0] === 4 ?
null :
<div>
<span style={{ fontSize: 12 }}>{tableMeta.rowData[0] === 4 ? "" : value}</span>
</div>
}
</div>
)
}
}
}, {
name: "UOM",
options: {
customHeadRender: (columnMeta) => (
<TableCell style={{ ...style2, top: 0, zIndex: 99, backgroundColor: '#1c71b8', borderRight: '1px solid #fff', borderLeft: '1px solid #fff' }}>
<Typography style={{ color: 'white', fontSize: 12, fontWeight: 'bold', textAlign: 'center' }}>{columnMeta.name}</Typography>
</TableCell>
),
setCellProps: () => ({ style2 }),
customBodyRender: (value, tableMeta, updateValue) => {
return (
<div style={{ width: 90, textAlign: 'center' }}>
{tableMeta.rowData[0] === 1 || tableMeta.rowData[0] === 4 ?
null :
<div>
<span style={{ fontSize: 12 }}>{tableMeta.rowData[0] === 4 ? "" : value}</span>
</div>
}
</div>
)
}
}
}, {
name: "KPI Type",
options: {
customHeadRender: (columnMeta) => (
<TableCell style={{ ...style2, top: 0, zIndex: 99, backgroundColor: '#1c71b8', width: 96, borderLeft: '1px #fff solid' }}>
<Typography style={{ color: 'white', fontSize: 12, fontWeight: 'bold', textAlign: 'center' }}>{columnMeta.name}</Typography>
</TableCell>
),
customBodyRender: (val, tableMeta) => {
return (
<div style={{ textAlign: 'center', width: 60 }}>
{tableMeta.rowData[0] === 1 || tableMeta.rowData[0] === 2 || tableMeta.rowData[0] === 4 ?
null :
val
}
</div>
)
}
}
}, {
name: "Max Ach.",
options: {
customHeadRender: (columnMeta) => (
<TableCell style={{ ...style2, top: 0, zIndex: 99, backgroundColor: '#1c71b8', width: 60, borderLeft: '1px #fff solid' }}>
<Typography style={{ color: 'white', fontSize: 12, fontWeight: 'bold', textAlign: 'center' }}>{columnMeta.name}</Typography>
</TableCell>
),
customBodyRender: (val, tableMeta) => {
return (
<div style={{ textAlign: 'center', width: 60 }}>
{tableMeta.rowData[0] === 1 || tableMeta.rowData[0] === 2 || tableMeta.rowData[0] === 4 ?
null :
val
}
</div>
)
}
}
}, {
name: "Formula YTD",
options: {
customHeadRender: (columnMeta) => (
<TableCell style={{ ...style2, top: 0, zIndex: 99, backgroundColor: '#1c71b8', width: 60, borderLeft: '1px #fff solid' }}>
<Typography style={{ color: 'white', fontSize: 12, fontWeight: 'bold', textAlign: 'center' }}>{columnMeta.name}</Typography>
</TableCell>
),
customBodyRender: (val, tableMeta, updateValue) => {
return (
<div style={{ textAlign: 'center', width: 60 }}>
{tableMeta.rowData[0] === 1 || tableMeta.rowData[0] === 2 || tableMeta.rowData[0] === 4 ?
null :
val
}
</div>
)
}
}
}, {
name: `Actual 2021`,
options: {
customHeadRender: (columnMeta) => (
<TableCell style={{ ...style2, top: 0, zIndex: 99, backgroundColor: '#37b5e6', width: 75, borderLeft: '1px #fff solid' }}>
<Typography style={{ color: '#fff', fontSize: 12, fontWeight: 'bold', textAlign: 'center' }}>{columnMeta.name}</Typography>
</TableCell>
),
customBodyRender: (value, tableMeta) => {
return (
<div style={{ width: 75, textAlign: 'right' }}>
{tableMeta.rowData[0] === 1 || tableMeta.rowData[0] === 2 || tableMeta.rowData[0] === 4 ?
null :
<FormControlLabel
style={{ margin: 0 }}
value={Number(value).toFixed(1)}
control={
<NumberFormat
thousandSeparator={true}
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
placeholder=""
value={Number(value).toFixed(1)}
decimalScale={1}
disabled={true}
/>
}
/>
}
</div>
)
}
}
}, {
name: `Target 2021`,
options: {
customHeadRender: (columnMeta) => (
<TableCell style={{ ...style2, top: 0, zIndex: 99, backgroundColor: 'rgb(200 224 229)', width: 75, borderLeft: '1px #fff solid' }}>
<Typography style={{ color: '#000', fontSize: 12, fontWeight: 'bold', textAlign: 'center' }}>{columnMeta.name}</Typography>
</TableCell>
),
customBodyRender: (value, tableMeta) => {
return (
<div style={{ width: 75, textAlign: 'right' }}>
{tableMeta.rowData[0] === 1 || tableMeta.rowData[0] === 2 || tableMeta.rowData[0] === 4 ?
null :
<FormControlLabel
style={{ margin: 0 }}
value={Number(value).toFixed(1)}
control={
<NumberFormat
thousandSeparator={true}
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
placeholder=""
value={Number(value).toFixed(1)}
decimalScale={1}
disabled={true}
/>
}
/>
}
</div>
)
}
}
}, {
name: `Achivement 2021 (%)`,
options: {
customHeadRender: (columnMeta) => (
<TableCell style={{ ...style2, top: 0, zIndex: 99, backgroundColor: '#1c71b8', width: 75, borderLeft: '1px #fff solid' }}>
<Typography style={{ color: '#fff', fontSize: 12, fontWeight: 'bold', textAlign: 'center' }}>{columnMeta.name}</Typography>
</TableCell>
),
customBodyRender: (value, tableMeta) => {
return (
<div style={{ width: 75, textAlign: 'right' }}>
{tableMeta.rowData[0] === 1 || tableMeta.rowData[0] === 2 || tableMeta.rowData[0] === 4 ?
null :
<FormControlLabel
style={{ margin: 0 }}
value={Number(value).toFixed(1)}
control={
<NumberFormat
thousandSeparator={true}
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
placeholder=""
value={Number(value).toFixed(1)}
decimalScale={1}
disabled={true}
/>
}
/>
}
</div>
)
}
}
}, {
name: `Score (Scale 1-5)`,
options: {
customHeadRender: (columnMeta) => (
<TableCell style={{ ...style2, top: 0, zIndex: 99, backgroundColor: '#1c71b8', width: 70, borderLeft: '1px #fff solid' }}>
<Typography style={{ color: 'white', fontSize: 12, fontWeight: 'bold', textAlign: 'center' }}>{columnMeta.name}</Typography>
</TableCell>
),
customBodyRender: (value, tableMeta) => {
return (
<div style={{ width: 70, textAlign: 'right' }}>
{tableMeta.rowData[0] === 1 || tableMeta.rowData[0] === 2 || tableMeta.rowData[0] === 4 ?
null :
<FormControlLabel
style={{ margin: 0 }}
value={Number(value).toFixed(1)}
control={
<NumberFormat
thousandSeparator={true}
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
placeholder=""
value={Number(value).toFixed(1)}
decimalScale={1}
disabled={true}
/>
}
/>
}
</div>
)
}
}
}, {
name: `Score x Weight`,
options: {
customHeadRender: (columnMeta) => (
<TableCell style={{ ...style2, top: 0, zIndex: 99, backgroundColor: '#1c71b8', width: 75, borderLeft: '1px #fff solid' }}>
<Typography style={{ color: 'white', fontSize: 12, fontWeight: 'bold', textAlign: 'center' }}>{columnMeta.name}</Typography>
</TableCell>
),
customBodyRender: (value, tableMeta) => {
return (
<div style={{ width: 75 }}>
{tableMeta.rowData[0] === 1 || tableMeta.rowData[0] === 2 || tableMeta.rowData[0] === 4 ?
null :
<FormControlLabel
style={{ margin: 0 }}
value={Number(value).toFixed(1)}
control={
<NumberFormat
thousandSeparator={true}
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
placeholder=""
value={Number(value).toFixed(1)}
decimalScale={1}
disabled={true}
/>
}
/>
}
</div>
)
}
}
}
]
let datas = [
["ABCD", "%", "Rp Bio", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18"]
// ["Total Assets", "unit try", { a: "6", b: "7", c: "8", d: "9" }, { a: "6", b: "7", c: "8", d: "9" }, { a: "6", b: "7", c: "8", d: "9" }, { a: "6", b: "7", c: "8", d: "9" }, { a: "6", b: "7", c: "8", d: "9" }, { a: "6", b: "7", c: "8", d: "9" }]
]
console.log(datas);
const loadingComponent = (
<div style={{ position: 'absolute', zIndex: 110, top: 0, left: 0, width: '100%', height: '100%', display: 'flex', justifyContent: 'center', alignItems: 'center', background: 'rgba(255,255,255,0.8)' }}>
<PropagateLoader
// css={override}
size={20}
color={"#274B80"}
loading={this.state.loading}
/>
</div>
);
return (
<div style={{ height: this.props.height, backgroundColor: '#f8f8f8', marginBottom: 100, minHeight: 1000 }}>
<div className={"main-color"} style={{ height: 78, flex: 1, display: 'flex', alignItems: 'center', paddingLeft: 20 }}>
<Typography style={{ fontSize: '16px', color: 'white' }}>Sub Holding Report</Typography>
</div>
<Snackbar open={this.state.alert} autoHideDuration={6000} onClose={() => this.closeAlert()}>
<Alert onClose={() => this.closeAlert()} severity={this.state.tipeAlert}>
{this.state.messageAlert}
</Alert>
</Snackbar>
{/* {this.state.loading && loadingComponent} */}
<div style={{ flex: 1, padding: 20, width: '100%' }}>
{/* {this.state.visibleTP === true ? */}
<Paper style={{ paddingTop: 10, paddingBottom: 20 }}>
<div style={{ borderBottom: 'solid 1px #c4c4c4' }} >
<Typography style={{ fontSize: '12px', color: '#4b4b4b', margin: 10 }}>Sub Holding</Typography>
</div>
<div style={{ padding: 20 }}>
<div style={{ display: 'flex', justifyContent: 'space-between' }}>
<div>
<Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>CAT Performance Appraisal</Typography>
<Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>Period : 2021</Typography>
<Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>in IDR mn</Typography>
</div>
<div style={{ width: '50%' }}>
{this.state.dataTable.length == 0 ? null : this.props.isApprover == true ?
<div style={{ justifyContent: 'flex-end', display: 'flex', flexFlow: 'wrap' }}>
<a data-tip={'Download'} data-for="download">
<button
style={{
backgroundColor: 'transparent',
cursor: 'pointer',
borderColor: 'transparent',
margin: 5
}}
onClick={() =>
this.setState({ loading: true }, () => {
setTimeout(() => {
this.downloadAllData()
}, 100);
})}
>
<img src={Images.download} />
</button>
</a>
<ReactTooltip border={true} id="download" place="bottom" type="light" effect="solid" />
</div> :
<div style={{ justifyContent: 'flex-end', display: 'flex', flexFlow: 'wrap' }}>
{((this.props.lastStatus === 'SUBMIT' || this.props.lastStatus === 'REVISION') && this.props.prevRevision === false && (this.props.status === 'revision' || this.props.status === 'not-yet' || this.props.status === 'draft' || this.props.status === 'submitted')) && (
<div>
<a data-tip={'Download Template'} data-for="template">
<button
style={{
backgroundColor: 'transparent',
cursor: 'pointer',
borderColor: 'transparent',
margin: 5
}}
onClick={() => this.downloadTemplate()}
>
<img src={Images.template} />
</button>
</a>
<ReactTooltip border={true} id="template" place="bottom" type="light" effect="solid" />
</div>
)}
{((this.props.lastStatus === 'SUBMIT' || this.props.lastStatus === 'REVISION') && this.props.prevRevision === false && (this.props.status === 'revision' || this.props.status === 'not-yet' || this.props.status === 'draft' || this.props.status === 'submitted')) && (
<div>
<a data-tip={'Upload'} data-for="upload">
<button
style={{
backgroundColor: 'transparent',
cursor: 'pointer',
borderColor: 'transparent',
margin: 5
}}
onClick={() => this.setState({ visibleUpload: true })}
>
<img src={Images.upload} />
</button>
</a>
<ReactTooltip border={true} id="upload" place="bottom" type="light" effect="solid" />
</div>
)}
<a data-tip={'Download'} data-for="download">
<button
style={{
backgroundColor: 'transparent',
cursor: 'pointer',
borderColor: 'transparent',
margin: 5
}}
onClick={() =>
this.setState({ loading: true }, () => {
setTimeout(() => {
this.downloadAllData()
}, 100);
})}
>
<img src={Images.download} />
</button>
</a>
<ReactTooltip border={true} id="download" place="bottom" type="light" effect="solid" />
</div>
}
</div>
</div>
<div style={{ marginTop: 20, width: this.props.width - (this.props.open === true ? 400 : 150) }}>
{this.state.loading && loadingComponent}
<MuiThemeProvider theme={getMuiTheme()}>
<MUIDataTable
data={datas}
columns={columnCatPQ}
options={options}
/>
</MuiThemeProvider>
</div>
<Typography style={{ fontSize: '11px', color: '#4b4b4b', marginTop: 20 }}>Last Updated by : {this.state.updateBy}</Typography>
</div>
<div className="grid grid-2x" style={{ marginTop: 20 }}>
<div className="col-1">
<button
type="button"
onClick={() => this.setState({ loading: true }, () => {
setTimeout(() => {
this.props.onClickClose()
}, 100);
})}
style={{
backgroundColor: 'transparent',
cursor: 'pointer',
borderColor: 'transparent',
outline: 'none'
}}
>
<div style={{ backgroundColor: '#019ce5', width: 105, height: 25, borderRadius: 3, justifyContent: 'center', display: 'flex', alignItems: 'center' }}>
<Typography style={{ fontSize: '11px', color: '#fff', textAlign: 'center' }}>Cancel</Typography>
</div>
</button>
</div>
{this.props.isApprover === true || this.state.dataTable.length == 0 ? null :
(this.props.lastStatus === 'SUBMIT' || this.props.lastStatus === 'REVISION') && this.props.prevRevision === false && (this.props.status === 'revision' || this.props.status === 'not-yet' || this.props.status === 'draft' || this.props.status === 'submitted') ?
<div className="col-2" style={{ display: 'flex', justifyContent: 'flex-end', maxWidth: '100%' }}>
<button
className="button"
type="button"
style={{
backgroundColor: 'transparent',
cursor: 'pointer',
borderColor: 'transparent',
outline: 'none',
marginRight: 20
}}
onClick={() => {
// this.forceUpdate()
this.setState({ loading: true, buttonDraft: false }, () => {
setTimeout(() => {
// this.setState({ loading: false, buttonError: false, editable: true })
this.handleValidate()
}, 100);
})
}}
>
<div style={{ backgroundColor: '#fff', width: 105, height: 25, borderRadius: 3, justifyContent: 'center', display: 'flex', alignItems: 'center', border: 'solid 1px #354960' }}>
<Typography style={{ fontSize: '11px', color: '#354960', textAlign: 'center' }}>Calculate</Typography>
</div>
</button>
<button
className="button"
type="button"
onClick={() =>
this.state.saveDraft === true ?
null :
this.state.handleTekTekTek == 1 ? null :
this.setState({ handleTekTekTek: 1, loading: true }, () => {
setTimeout(() => {
this.backToMasterBudget('draft')
}, 100);
})
}
style={{
backgroundColor: 'transparent',
cursor: this.state.saveDraft !== true ? 'pointer' : 'default',
borderColor: 'transparent',
outline: 'none',
marginRight: 20
}}
>
<div style={{ backgroundColor: '#354960', width: 105, height: 25, borderRadius: 3, justifyContent: 'center', display: 'flex', alignItems: 'center' }}>
<Typography style={{ fontSize: '11px', color: '#fff', textAlign: 'center' }}>Save as Draft</Typography>
</div>
</button>
<button
type="button"
disabled={this.state.buttonError}
onClick={() => this.state.buttonError ?
this.setState({ alert: true, messageAlert: 'Data is not complete !', tipeAlert: 'warning' })
:
this.state.handleTekTekTek == 1 ? null :
this.setState({ handleTekTekTek: 1, loading: true }, () => {
setTimeout(() => {
this.backToMasterBudget('submitted')
}, 100);
})}
style={{
backgroundColor: 'transparent',
cursor: this.state.buttonError === true ? 'default' : 'pointer',
borderColor: 'transparent',
outline: 'none'
}}
>
<div style={{ backgroundColor: '#354960', width: 105, height: 25, borderRadius: 3, justifyContent: 'center', display: 'flex', alignItems: 'center', marginRight: 20 }}>
<Typography style={{ fontSize: '11px', color: '#fff', textAlign: 'center' }}>Save & Complete</Typography>
</div>
</button>
</div>
: null }
</div>
</Paper>
</div>
</div>
);
}
}
import React, { Component } from 'react';
import { Typography, Paper, createMuiTheme, MuiThemeProvider, TableCell, FormControlLabel, TextField, Input, Tooltip, withStyles, Snackbar } from '@material-ui/core';
import MUIDataTable from 'mui-datatables';
import NumberFormat from 'react-number-format';
import api from '../../api';
import AddIcon from '@material-ui/icons/Add';
import { values } from 'ramda';
import PropagateLoader from "react-spinners/PropagateLoader"
import Images from '../../assets/Images';
import ReactTooltip from 'react-tooltip';
import UploadFile from "../../library/Upload";
import { ExcelRenderer } from 'react-excel-renderer';
import { Alert } from '@material-ui/lab';
import * as R from 'ramda';
const LightTooltip = withStyles((theme) => ({
tooltip: {
backgroundColor: theme.palette.common.white,
color: 'rgba(0, 0, 0, 0.87)',
boxShadow: theme.shadows[1],
fontSize: 11,
},
}))(Tooltip);
var ct = require("../../library/CustomTable");
const getMuiTheme = () => createMuiTheme(ct.customTable3());
const options = ct.customOptionsFixedColumn();
const style = {
position: "sticky",
left: 0,
zIndex: 101,
background: "white",
};
const style2 = {
position: "sticky",
background: "white",
zIndex: 100,
top: 0
};
export default class CorporateAnnualTargetPQ extends Component {
constructor(props) {
super(props)
this.state = {
dataTable: [],
loading: false,
}
}
componentDidMount() {
// this.getItemHierarki()
}
closeAlert() {
this.setState({ alert: false })
}
render() {
const columnCatPQ = [
{
name: "Key Performance Indicator",
options: {
customHeadRender: (columnMeta) => (
<TableCell key={columnMeta.index} style={{ ...style, top: 0, zIndex: 103, backgroundColor: '#1c71b8', width: 300 }}>
<Typography style={{ color: 'white', fontSize: 12, fontWeight: 'bold', textAlign: 'left' }}>{columnMeta.name}</Typography>
</TableCell>
),
setCellProps: () => ({ style }),
customBodyRender: (val, tableMeta) => {
return (
<div style={{ width: 300 }}>
{
tableMeta.rowData[4] == 0 ?
<span style={{ fontSize: 12, fontWeight: 'bold' }}>{String(tableMeta.rowData[0] === 4 ? "" : val).toUpperCase()}</span>
:
<div style={{ paddingLeft: 20 * Number(tableMeta.rowData[4]) }}>
<span style={{ fontSize: 12 }}>{tableMeta.rowData[0] === 4 ? "" : val}</span>
</div>
}
</div>
)
}
}
}, {
name: "Weight",
options: {
customHeadRender: (columnMeta) => (
<TableCell style={{ ...style2, top: 0, zIndex: 99, backgroundColor: '#1c71b8', borderRight: '1px solid #fff', borderLeft: '1px solid #fff' }}>
<Typography style={{ color: 'white', fontSize: 12, fontWeight: 'bold', textAlign: 'center' }}>{columnMeta.name}</Typography>
</TableCell>
),
setCellProps: () => ({ style2 }),
customBodyRender: (value, tableMeta, updateValue) => {
return (
<div style={{ width: 90, textAlign: 'center' }}>
{tableMeta.rowData[0] === 1 || tableMeta.rowData[0] === 4 ?
null :
<div>
<span style={{ fontSize: 12 }}>{tableMeta.rowData[0] === 4 ? "" : value}</span>
</div>
}
</div>
)
}
}
}, {
name: "UOM",
options: {
customHeadRender: (columnMeta) => (
<TableCell style={{ ...style2, top: 0, zIndex: 99, backgroundColor: '#1c71b8', borderRight: '1px solid #fff', borderLeft: '1px solid #fff' }}>
<Typography style={{ color: 'white', fontSize: 12, fontWeight: 'bold', textAlign: 'center' }}>{columnMeta.name}</Typography>
</TableCell>
),
setCellProps: () => ({ style2 }),
customBodyRender: (value, tableMeta, updateValue) => {
return (
<div style={{ width: 90, textAlign: 'center' }}>
{tableMeta.rowData[0] === 1 || tableMeta.rowData[0] === 4 ?
null :
<div>
<span style={{ fontSize: 12 }}>{tableMeta.rowData[0] === 4 ? "" : value}</span>
</div>
}
</div>
)
}
}
},{
name: "2020",
options: {
customHeadRender: (columnMeta) => (
<th style={{ ...style2, color: '#fff', backgroundColor: '#07a7d0', top: 0, zIndex: 102, fontSize: 13, fontWeight: 1, width: 150, borderRight: "1px solid rgb(255, 255, 255)", padding: 0 }} >
<div style={{ borderBottom: "1px #fff solid", backgroundColor: '#07a7d0', textAlign: 'center', fontSize: 12, fontWeight: 'bold', padding: 5 }}>{columnMeta.name}</div>
<div className="grid grid-3x" style={{ ...style2, color: '#fff', fontSize: 12, fontWeight: 'bold', position: "sticky" }}>
<div className="column-1" style={{ placeSelf: 'center', textAlign: 'center', padding: 5, borderRight: "1px #fff solid", backgroundColor: '#07a7d0', height: 44, display: 'flex', justifyContent: 'center', alignItems: 'center' }}>
<span>{"Actual Q2"}</span>
</div>
<div className="column-2" style={{ placeSelf: 'center', textAlign: 'center', padding: 5, borderRight: "1px #fff solid", backgroundColor: '#07a7d0', height: 44, display: 'flex', justifyContent: 'center', alignItems: 'center' }}>
<span>{"% Growth YoY"}</span>
</div>
<div className="column-3" style={{ placeSelf: 'center', textAlign: 'center', padding: 5, borderRight: "1px #fff solid", backgroundColor: '#07a7d0' }}>
<span>{"Actual Full Year Performance"}</span>
</div>
</div>
</th>
),
setCellProps: () => ({ style2 }),
customBodyRender: (value, tableMeta, updateValue) => {
{ console.log(tableMeta); }
return (
<div>
<div className="grid grid-3x content-center">
<div className="col-1">
{tableMeta.rowData[0] === 4 ?
null
: tableMeta.rowData[0] === 1 ?
null :
<div style={{ flex: 1 }}>
<FormControlLabel
style={{ margin: 0 }}
value={value}
control={
<NumberFormat
thousandSeparator={true}
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
placeholder=""
disabled={true}
value={Number(tableMeta.rowData[3]).toFixed(1)}
/>
}
/>
</div>
}
</div>
<div className="col-2">
{tableMeta.rowData[0] === 4 ?
null
: tableMeta.rowData[0] === 1 ?
null :
<div style={{ flex: 1 }}>
<FormControlLabel
style={{ margin: 0 }}
value={value}
control={
<NumberFormat
thousandSeparator={true}
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
placeholder=""
disabled={true}
value={Number(tableMeta.rowData[4]).toFixed(1)}
/>
}
/>
</div>
}
</div>
<div className="col-3">
{tableMeta.rowData[0] === 4 ?
null
: tableMeta.rowData[0] === 1 ?
null :
<div style={{ flex: 1 }}>
<FormControlLabel
style={{ margin: 0 }}
value={value}
control={
<NumberFormat
thousandSeparator={true}
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
placeholder=""
disabled={true}
value={Number(tableMeta.rowData[5]).toFixed(1)}
/>
}
/>
</div>
}
</div>
</div>
</div>
)
}
}
},{
name: "2021",
options: {
customHeadRender: (columnMeta) => (
<th style={{ ...style2, color: '#fff', backgroundColor: '#07a7d0', top: 0, zIndex: 102, fontSize: 13, fontWeight: 1, width: 150, borderRight: "1px solid rgb(255, 255, 255)", padding: 0 }} >
<div style={{ borderBottom: "1px #fff solid", backgroundColor: '#1c71b8', textAlign: 'center', fontSize: 12, fontWeight: 'bold', padding: 5 }}>{columnMeta.name}</div>
<div className="grid grid-2x" style={{ ...style2, color: '#fff', fontSize: 12, fontWeight: 'bold', position: "sticky" }}>
<div className="column-1 grid grid-5x" style={{ placeSelf: 'center', textAlign: 'center' }}>
<div className="column-1" style={{ placeSelf: 'center', textAlign: 'center', padding: 5, borderRight: "1px #fff solid", color: '#000', backgroundColor: 'rgb(200 224 229)', height: 44, display: 'flex', justifyContent: 'center', alignItems: 'center' }}>
<span>{"Plan Q2 (Apr-Jun)"}</span>
</div>
<div className="column-2" style={{ placeSelf: 'center', textAlign: 'center', padding: 5, borderRight: "1px #fff solid", backgroundColor: '#07a7d0', height: 44, display: 'flex', justifyContent: 'center', alignItems: 'center' }}>
<span>{"Actual Q2 (Apr-Jun)"}</span>
</div>
<div className="column-3" style={{ placeSelf: 'center', textAlign: 'center', padding: 5, borderRight: "1px #fff solid", backgroundColor: '#1c71b8', height: 44, display: 'flex', justifyContent: 'center', alignItems: 'center' }}>
<span>{"% Ach"}</span>
</div>
<div className="column-4" style={{ placeSelf: 'center', textAlign: 'center', padding: 5, borderRight: "1px #fff solid", backgroundColor: '#1c71b8', height: 44, display: 'flex', justifyContent: 'center', alignItems: 'center' }}>
<span>{"Score"}</span>
</div>
<div className="column-5" style={{ placeSelf: 'center', textAlign: 'center', padding: 5, borderRight: "1px #fff solid", backgroundColor: '#1c71b8', height: 44, display: 'flex', justifyContent: 'center', alignItems: 'center' }}>
<span>{"Score x Weight"}</span>
</div>
</div>
<div className="column-2 grid grid-5x" style={{ placeSelf: 'center', textAlign: 'center' }}>
<div className="column-1" style={{ placeSelf: 'center', textAlign: 'center', padding: 5, borderRight: "1px #fff solid", color: '#000', backgroundColor: 'rgb(200 224 229)', height: 44, display: 'flex', justifyContent: 'center', alignItems: 'center' }}>
<span>{"Plan YTD"}</span>
</div>
<div className="column-2" style={{ placeSelf: 'center', textAlign: 'center', padding: 5, borderRight: "1px #fff solid", backgroundColor: '#07a7d0', height: 44, display: 'flex', justifyContent: 'center', alignItems: 'center' }}>
<span>{"Actual YTD"}</span>
</div>
<div className="column-3" style={{ placeSelf: 'center', textAlign: 'center', padding: 5, borderRight: "1px #fff solid", backgroundColor: '#1c71b8', height: 44, display: 'flex', justifyContent: 'center', alignItems: 'center' }}>
<span>{"% Ach"}</span>
</div>
<div className="column-4" style={{ placeSelf: 'center', textAlign: 'center', padding: 5, borderRight: "1px #fff solid", backgroundColor: '#1c71b8', height: 44, display: 'flex', justifyContent: 'center', alignItems: 'center' }}>
<span>{"Score"}</span>
</div>
<div className="column-5" style={{ placeSelf: 'center', textAlign: 'center', padding: 5, borderRight: "1px #fff solid", backgroundColor: '#1c71b8', height: 44, display: 'flex', justifyContent: 'center', alignItems: 'center' }}>
<span>{"Score x Weight"}</span>
</div>
</div>
</div>
</th>
),
setCellProps: () => ({ style2 }),
customBodyRender: (value, tableMeta, updateValue) => {
return (
<div>
<div className="grid grid-2x content-center">
<div className="grid grid-5x content-center">
<div className="col-1">
{tableMeta.rowData[0] === 4 ?
null
: tableMeta.rowData[0] === 1 ?
null :
<div style={{ flex: 1 }}>
<FormControlLabel
style={{ margin: 0 }}
value={value}
control={
<NumberFormat
thousandSeparator={true}
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
placeholder=""
disabled={true}
value={Number(tableMeta.rowData[6]).toFixed(1)}
/>
}
/>
</div>
}
</div>
<div className="col-2">
{tableMeta.rowData[0] === 4 ?
null
: tableMeta.rowData[0] === 1 ?
null :
<div style={{ flex: 1 }}>
<FormControlLabel
style={{ margin: 0 }}
value={value}
control={
<NumberFormat
thousandSeparator={true}
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
placeholder=""
disabled={true}
value={Number(tableMeta.rowData[7]).toFixed(1)}
/>
}
/>
</div>
}
</div>
<div className="col-3">
{tableMeta.rowData[0] === 4 ?
null
: tableMeta.rowData[0] === 1 ?
null :
<div style={{ flex: 1 }}>
<FormControlLabel
style={{ margin: 0 }}
value={value}
control={
<NumberFormat
thousandSeparator={true}
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
placeholder=""
disabled={true}
value={Number(tableMeta.rowData[8]).toFixed(1)}
/>
}
/>
</div>
}
</div>
<div className="col-4">
{tableMeta.rowData[0] === 4 ?
null
: tableMeta.rowData[0] === 1 ?
null :
<div style={{ flex: 1 }}>
<FormControlLabel
style={{ margin: 0 }}
value={value}
control={
<NumberFormat
thousandSeparator={true}
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
placeholder=""
disabled={true}
value={Number(tableMeta.rowData[9]).toFixed(1)}
/>
}
/>
</div>
}
</div>
<div className="col-5">
{tableMeta.rowData[0] === 4 ?
null
: tableMeta.rowData[0] === 1 ?
null :
<div style={{ flex: 1 }}>
<FormControlLabel
style={{ margin: 0 }}
value={value}
control={
<NumberFormat
thousandSeparator={true}
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
placeholder=""
disabled={true}
value={Number(tableMeta.rowData[10]).toFixed(1)}
/>
}
/>
</div>
}
</div>
</div>
<div className="grid grid-5x content-center">
<div className="col-1">
{tableMeta.rowData[0] === 4 ?
null
: tableMeta.rowData[0] === 1 ?
null :
<div style={{ flex: 1 }}>
<FormControlLabel
style={{ margin: 0 }}
value={value}
control={
<NumberFormat
thousandSeparator={true}
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
placeholder=""
disabled={true}
value={Number(tableMeta.rowData[11]).toFixed(1)}
/>
}
/>
</div>
}
</div>
<div className="col-2">
{tableMeta.rowData[0] === 4 ?
null
: tableMeta.rowData[0] === 1 ?
null :
<div style={{ flex: 1 }}>
<FormControlLabel
style={{ margin: 0 }}
value={value}
control={
<NumberFormat
thousandSeparator={true}
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
placeholder=""
disabled={true}
value={Number(tableMeta.rowData[12]).toFixed(1)}
/>
}
/>
</div>
}
</div>
<div className="col-3">
{tableMeta.rowData[0] === 4 ?
null
: tableMeta.rowData[0] === 1 ?
null :
<div style={{ flex: 1 }}>
<FormControlLabel
style={{ margin: 0 }}
value={value}
control={
<NumberFormat
thousandSeparator={true}
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
placeholder=""
disabled={true}
value={Number(tableMeta.rowData[13]).toFixed(1)}
/>
}
/>
</div>
}
</div>
<div className="col-4">
{tableMeta.rowData[0] === 4 ?
null
: tableMeta.rowData[0] === 1 ?
null :
<div style={{ flex: 1 }}>
<FormControlLabel
style={{ margin: 0 }}
value={value}
control={
<NumberFormat
thousandSeparator={true}
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
placeholder=""
disabled={true}
value={Number(tableMeta.rowData[14]).toFixed(1)}
/>
}
/>
</div>
}
</div>
<div className="col-5">
{tableMeta.rowData[0] === 4 ?
null
: tableMeta.rowData[0] === 1 ?
null :
<div style={{ flex: 1 }}>
<FormControlLabel
style={{ margin: 0 }}
value={value}
control={
<NumberFormat
thousandSeparator={true}
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
placeholder=""
disabled={true}
value={Number(tableMeta.rowData[15]).toFixed(1)}
/>
}
/>
</div>
}
</div>
</div>
</div>
</div>
)
}
}
}, {
name: `Master Budget 2021`,
options: {
customHeadRender: (columnMeta) => (
<TableCell style={{ ...style2, top: 0, zIndex: 99, backgroundColor: 'rgb(200 224 229)', borderRight: '1px solid #fff', borderLeft: '1px solid #fff' }}>
<Typography style={{ color: '#000', fontSize: 12, fontWeight: 'bold', textAlign: 'center' }}>{columnMeta.name}</Typography>
</TableCell>
),
setCellProps: () => ({ style2 }),
customBodyRender: (value, tableMeta, updateValue) => {
return (
<div style={{ width: 90, textAlign: 'center' }}>
{tableMeta.rowData[0] === 4 ?
null
: tableMeta.rowData[0] === 1 ?
null :
<div style={{ flex: 1 }}>
<FormControlLabel
style={{ margin: 0 }}
value={value}
control={
<NumberFormat
thousandSeparator={true}
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
placeholder=""
disabled={true}
value={Number(tableMeta.rowData[16]).toFixed(1)}
/>
}
/>
</div>
}
</div>
)
}
}
}, {
name: `OL 2021`,
options: {
customHeadRender: (columnMeta) => (
<TableCell style={{ ...style2, top: 0, zIndex: 99, backgroundColor: 'rgb(200 224 229)', borderRight: '1px solid #fff', borderLeft: '1px solid #fff' }}>
<Typography style={{ color: '#000', fontSize: 12, fontWeight: 'bold', textAlign: 'center' }}>{columnMeta.name}</Typography>
</TableCell>
),
setCellProps: () => ({ style2 }),
customBodyRender: (value, tableMeta, updateValue) => {
return (
<div style={{ width: 90, textAlign: 'center' }}>
{tableMeta.rowData[0] === 4 ?
null
: tableMeta.rowData[0] === 1 ?
null :
<div style={{ flex: 1 }}>
<FormControlLabel
style={{ margin: 0 }}
value={value}
control={
<NumberFormat
thousandSeparator={true}
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
placeholder=""
disabled={true}
value={Number(tableMeta.rowData[17]).toFixed(1)}
/>
}
/>
</div>
}
</div>
)
}
}
}, {
name: `% Var`,
options: {
customHeadRender: (columnMeta) => (
<TableCell style={{ ...style2, top: 0, zIndex: 99, backgroundColor: 'rgb(200 224 229)', borderRight: '1px solid #fff', borderLeft: '1px solid #fff' }}>
<Typography style={{ color: '#000', fontSize: 12, fontWeight: 'bold', textAlign: 'center' }}>{columnMeta.name}</Typography>
</TableCell>
),
setCellProps: () => ({ style2 }),
customBodyRender: (value, tableMeta, updateValue) => {
return (
<div style={{ width: 90, textAlign: 'center' }}>
{tableMeta.rowData[0] === 4 ?
null
: tableMeta.rowData[0] === 1 ?
null :
<div style={{ flex: 1 }}>
<FormControlLabel
style={{ margin: 0 }}
value={value}
control={
<NumberFormat
thousandSeparator={true}
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
placeholder=""
disabled={true}
value={Number(tableMeta.rowData[18]).toFixed(1)}
/>
}
/>
</div>
}
</div>
)
}
}
}, {
name: "",
options: {
display: false
}
}, {
name: "",
options: {
display: false
}
}, {
name: "",
options: {
display: false
}
}, {
name: "",
options: {
display: false
}
}, {
name: "",
options: {
display: false
}
}, {
name: "",
options: {
display: false
}
}, {
name: "",
options: {
display: false
}
}, {
name: "",
options: {
display: false
}
}, {
name: "",
options: {
display: false
}
}, {
name: "",
options: {
display: false
}
}, {
name: "",
options: {
display: false
}
}
]
let datas = [
["ABCD", "%", "Rp Bio", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18"]
// ["Total Assets", "unit try", { a: "6", b: "7", c: "8", d: "9" }, { a: "6", b: "7", c: "8", d: "9" }, { a: "6", b: "7", c: "8", d: "9" }, { a: "6", b: "7", c: "8", d: "9" }, { a: "6", b: "7", c: "8", d: "9" }, { a: "6", b: "7", c: "8", d: "9" }]
]
console.log(datas);
const loadingComponent = (
<div style={{ position: 'absolute', zIndex: 110, top: 0, left: 0, width: '100%', height: '100%', display: 'flex', justifyContent: 'center', alignItems: 'center', background: 'rgba(255,255,255,0.8)' }}>
<PropagateLoader
// css={override}
size={20}
color={"#274B80"}
loading={this.state.loading}
/>
</div>
);
return (
<div style={{ height: this.props.height, backgroundColor: '#f8f8f8', marginBottom: 100, minHeight: 1000 }}>
<div className={"main-color"} style={{ height: 78, flex: 1, display: 'flex', alignItems: 'center', paddingLeft: 20 }}>
<Typography style={{ fontSize: '16px', color: 'white' }}>Sub Holding Report</Typography>
</div>
<Snackbar open={this.state.alert} autoHideDuration={6000} onClose={() => this.closeAlert()}>
<Alert onClose={() => this.closeAlert()} severity={this.state.tipeAlert}>
{this.state.messageAlert}
</Alert>
</Snackbar>
{/* {this.state.loading && loadingComponent} */}
<div style={{ flex: 1, padding: 20, width: '100%' }}>
{/* {this.state.visibleTP === true ? */}
<Paper style={{ paddingTop: 10, paddingBottom: 20 }}>
<div style={{ borderBottom: 'solid 1px #c4c4c4' }} >
<Typography style={{ fontSize: '12px', color: '#4b4b4b', margin: 10 }}>Sub Holding</Typography>
</div>
<div style={{ padding: 20 }}>
<div style={{ display: 'flex', justifyContent: 'space-between' }}>
<div>
<Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>CAT Performance Quarterly</Typography>
<Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>Period : 2021 - Q1</Typography>
<Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>in IDR mn</Typography>
</div>
<div style={{ width: '50%' }}>
{this.state.dataTable.length == 0 ? null : this.props.isApprover == true ?
<div style={{ justifyContent: 'flex-end', display: 'flex', flexFlow: 'wrap' }}>
<a data-tip={'Download'} data-for="download">
<button
style={{
backgroundColor: 'transparent',
cursor: 'pointer',
borderColor: 'transparent',
margin: 5
}}
onClick={() =>
this.setState({ loading: true }, () => {
setTimeout(() => {
this.downloadAllData()
}, 100);
})}
>
<img src={Images.download} />
</button>
</a>
<ReactTooltip border={true} id="download" place="bottom" type="light" effect="solid" />
</div> :
<div style={{ justifyContent: 'flex-end', display: 'flex', flexFlow: 'wrap' }}>
{((this.props.lastStatus === 'SUBMIT' || this.props.lastStatus === 'REVISION') && this.props.prevRevision === false && (this.props.status === 'revision' || this.props.status === 'not-yet' || this.props.status === 'draft' || this.props.status === 'submitted')) && (
<div>
<a data-tip={'Download Template'} data-for="template">
<button
style={{
backgroundColor: 'transparent',
cursor: 'pointer',
borderColor: 'transparent',
margin: 5
}}
onClick={() => this.downloadTemplate()}
>
<img src={Images.template} />
</button>
</a>
<ReactTooltip border={true} id="template" place="bottom" type="light" effect="solid" />
</div>
)}
{((this.props.lastStatus === 'SUBMIT' || this.props.lastStatus === 'REVISION') && this.props.prevRevision === false && (this.props.status === 'revision' || this.props.status === 'not-yet' || this.props.status === 'draft' || this.props.status === 'submitted')) && (
<div>
<a data-tip={'Upload'} data-for="upload">
<button
style={{
backgroundColor: 'transparent',
cursor: 'pointer',
borderColor: 'transparent',
margin: 5
}}
onClick={() => this.setState({ visibleUpload: true })}
>
<img src={Images.upload} />
</button>
</a>
<ReactTooltip border={true} id="upload" place="bottom" type="light" effect="solid" />
</div>
)}
<a data-tip={'Download'} data-for="download">
<button
style={{
backgroundColor: 'transparent',
cursor: 'pointer',
borderColor: 'transparent',
margin: 5
}}
onClick={() =>
this.setState({ loading: true }, () => {
setTimeout(() => {
this.downloadAllData()
}, 100);
})}
>
<img src={Images.download} />
</button>
</a>
<ReactTooltip border={true} id="download" place="bottom" type="light" effect="solid" />
</div>
}
</div>
</div>
<div style={{ marginTop: 20, width: this.props.width - (this.props.open === true ? 400 : 150) }}>
{this.state.loading && loadingComponent}
<MuiThemeProvider theme={getMuiTheme()}>
<MUIDataTable
data={datas}
columns={columnCatPQ}
options={options}
/>
</MuiThemeProvider>
</div>
<Typography style={{ fontSize: '11px', color: '#4b4b4b', marginTop: 20 }}>Last Updated by : {this.state.updateBy}</Typography>
</div>
<div className="grid grid-2x" style={{ marginTop: 20 }}>
<div className="col-1">
<button
type="button"
onClick={() => this.setState({ loading: true }, () => {
setTimeout(() => {
this.props.onClickClose()
}, 100);
})}
style={{
backgroundColor: 'transparent',
cursor: 'pointer',
borderColor: 'transparent',
outline: 'none'
}}
>
<div style={{ backgroundColor: '#019ce5', width: 105, height: 25, borderRadius: 3, justifyContent: 'center', display: 'flex', alignItems: 'center' }}>
<Typography style={{ fontSize: '11px', color: '#fff', textAlign: 'center' }}>Cancel</Typography>
</div>
</button>
</div>
{this.props.isApprover === true || this.state.dataTable.length == 0 ? null :
(this.props.lastStatus === 'SUBMIT' || this.props.lastStatus === 'REVISION') && this.props.prevRevision === false && (this.props.status === 'revision' || this.props.status === 'not-yet' || this.props.status === 'draft' || this.props.status === 'submitted') ?
<div className="col-2" style={{ display: 'flex', justifyContent: 'flex-end', maxWidth: '100%' }}>
<button
className="button"
type="button"
style={{
backgroundColor: 'transparent',
cursor: 'pointer',
borderColor: 'transparent',
outline: 'none',
marginRight: 20
}}
onClick={() => {
// this.forceUpdate()
this.setState({ loading: true, buttonDraft: false }, () => {
setTimeout(() => {
// this.setState({ loading: false, buttonError: false, editable: true })
this.handleValidate()
}, 100);
})
}}
>
<div style={{ backgroundColor: '#fff', width: 105, height: 25, borderRadius: 3, justifyContent: 'center', display: 'flex', alignItems: 'center', border: 'solid 1px #354960' }}>
<Typography style={{ fontSize: '11px', color: '#354960', textAlign: 'center' }}>Calculate</Typography>
</div>
</button>
<button
className="button"
type="button"
onClick={() =>
this.state.saveDraft === true ?
null :
this.state.handleTekTekTek == 1 ? null :
this.setState({ handleTekTekTek: 1, loading: true }, () => {
setTimeout(() => {
this.backToMasterBudget('draft')
}, 100);
})
}
style={{
backgroundColor: 'transparent',
cursor: this.state.saveDraft !== true ? 'pointer' : 'default',
borderColor: 'transparent',
outline: 'none',
marginRight: 20
}}
>
<div style={{ backgroundColor: '#354960', width: 105, height: 25, borderRadius: 3, justifyContent: 'center', display: 'flex', alignItems: 'center' }}>
<Typography style={{ fontSize: '11px', color: '#fff', textAlign: 'center' }}>Save as Draft</Typography>
</div>
</button>
<button
type="button"
disabled={this.state.buttonError}
onClick={() => this.state.buttonError ?
this.setState({ alert: true, messageAlert: 'Data is not complete !', tipeAlert: 'warning' })
:
this.state.handleTekTekTek == 1 ? null :
this.setState({ handleTekTekTek: 1, loading: true }, () => {
setTimeout(() => {
this.backToMasterBudget('submitted')
}, 100);
})}
style={{
backgroundColor: 'transparent',
cursor: this.state.buttonError === true ? 'default' : 'pointer',
borderColor: 'transparent',
outline: 'none'
}}
>
<div style={{ backgroundColor: '#354960', width: 105, height: 25, borderRadius: 3, justifyContent: 'center', display: 'flex', alignItems: 'center', marginRight: 20 }}>
<Typography style={{ fontSize: '11px', color: '#fff', textAlign: 'center' }}>Save & Complete</Typography>
</div>
</button>
</div>
: null }
</div>
</Paper>
</div>
</div>
);
}
}
......@@ -38,6 +38,8 @@ export default class SubHolding extends Component {
{ value: 7, label: 'Balance Sheet - Summary' },
{ value: 8, label: 'Profit Loss - Summary' },
{ value: 9, label: 'Financial Ratio - Summary' },
{ value: 10, label: 'CAT Performance Quarterly' },
{ value: 11, label: 'CAT Performance Appraisal' },
],
report: null,
loading: false,
......@@ -2378,6 +2380,16 @@ export default class SubHolding extends Component {
})
})
})
} else if (this.state.report.value === 10) {
let dbCatPQ = [
["ABCD", "%", "Rp Bio", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18"]
]
this.setState({ dataTable: dbCatPQ, previewTable: true, loading: false, previewDownload: true })
} else if (this.state.report.value === 11) {
let dbCatPA = [
["ABCD", "%", "Rp Bio", "HIG", "Unlimited", "SUM", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18"]
]
this.setState({ dataTable: dbCatPA, previewTable: true, loading: false, previewDownload: true })
}
}
......
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -2461,7 +2461,7 @@ export default class ListOfCreditFacilities extends Component {
// </div>
:
<div style={{ padding: 0, margin: 0 }}>
<textarea disabled={this.state.get_for == 'view'} style={{ borderColor: 'white', width: 96, textAlign: 'center', justifyContent:'center', padding: 0, margin: 0, color: this.state.get_for == 'view'? "black" : "#5198ea", backgroundColor: 'transparent' }} type="text" defaultValue={tableMeta.rowData[18]}
<textarea disabled={this.state.get_for == 'view'? true : tableMeta.rowData[7] == null? true : tableMeta.rowData[7].value == 'Others'? false : true} style={{ borderColor: 'white', width: 96, textAlign: 'center', justifyContent:'center', padding: 0, margin: 0, color: this.state.get_for == 'view'? 'black' : tableMeta.rowData[7] == null? 'black' : tableMeta.rowData[7].value == 'Others'? '#5198ea' : 'black' , backgroundColor: this.state.get_for == 'view'? 'white' : tableMeta.rowData[7] == null? 'white' : (tableMeta.rowData[18] == '' && tableMeta.rowData[7].value == 'Others' ? '#ffac99' : 'white') }} type="text" defaultValue={tableMeta.rowData[18]}
onBlur={(event) => handleChange(event.target.value, tableMeta, 18)} />
</div>
}
......
......@@ -1163,7 +1163,7 @@ export default class TableSummaryTriputra extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(tableMeta.rowData[4]).toFixed(1)}
value={Number(tableMeta.rowData[4]).toFixed(2)}
/>
}
/>
......@@ -1179,7 +1179,7 @@ export default class TableSummaryTriputra extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(tableMeta.rowData[5]).toFixed(1)}
value={Number(tableMeta.rowData[5]).toFixed(2)}
/>
}
/>
......@@ -1212,7 +1212,7 @@ export default class TableSummaryTriputra extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(tableMeta.rowData[7]).toFixed(1)}
value={Number(tableMeta.rowData[7]).toFixed(2)}
/>
}
/>
......@@ -1247,7 +1247,7 @@ export default class TableSummaryTriputra extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(tableMeta.rowData[9]).toFixed(1)}
value={Number(tableMeta.rowData[9]).toFixed(2)}
/>
}
/>
......@@ -1263,7 +1263,7 @@ export default class TableSummaryTriputra extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(tableMeta.rowData[10]).toFixed(1)}
value={Number(tableMeta.rowData[10]).toFixed(2)}
/>
}
/>
......@@ -1296,7 +1296,7 @@ export default class TableSummaryTriputra extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(tableMeta.rowData[12]).toFixed(1)}
value={Number(tableMeta.rowData[12]).toFixed(2)}
/>
}
/>
......@@ -1464,7 +1464,7 @@ export default class TableSummaryTriputra extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(tableMeta.rowData[14]).toFixed(1)}
value={Number(tableMeta.rowData[14]).toFixed(2)}
/>
}
/>
......@@ -1480,7 +1480,7 @@ export default class TableSummaryTriputra extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(tableMeta.rowData[15]).toFixed(1)}
value={Number(tableMeta.rowData[15]).toFixed(2)}
/>
}
/>
......@@ -1513,7 +1513,7 @@ export default class TableSummaryTriputra extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(tableMeta.rowData[17]).toFixed(1)}
value={Number(tableMeta.rowData[17]).toFixed(2)}
/>
}
/>
......@@ -1548,7 +1548,7 @@ export default class TableSummaryTriputra extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(tableMeta.rowData[19]).toFixed(1)}
value={Number(tableMeta.rowData[19]).toFixed(2)}
/>
}
/>
......@@ -1564,7 +1564,7 @@ export default class TableSummaryTriputra extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(tableMeta.rowData[20]).toFixed(1)}
value={Number(tableMeta.rowData[20]).toFixed(2)}
/>
}
/>
......@@ -1597,7 +1597,7 @@ export default class TableSummaryTriputra extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(tableMeta.rowData[22]).toFixed(1)}
value={Number(tableMeta.rowData[22]).toFixed(2)}
/>
}
/>
......@@ -1771,7 +1771,7 @@ export default class TableSummaryTriputra extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(tableMeta.rowData[24]).toFixed(1)}
value={Number(tableMeta.rowData[24]).toFixed(2)}
/>
}
/>
......@@ -1787,7 +1787,7 @@ export default class TableSummaryTriputra extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(tableMeta.rowData[25]).toFixed(1)}
value={Number(tableMeta.rowData[25]).toFixed(2)}
/>
}
/>
......@@ -1820,7 +1820,7 @@ export default class TableSummaryTriputra extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(tableMeta.rowData[27]).toFixed(1)}
value={Number(tableMeta.rowData[27]).toFixed(2)}
/>
}
/>
......@@ -1855,7 +1855,7 @@ export default class TableSummaryTriputra extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(tableMeta.rowData[29]).toFixed(1)}
value={Number(tableMeta.rowData[29]).toFixed(2)}
/>
}
/>
......@@ -1871,7 +1871,7 @@ export default class TableSummaryTriputra extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(tableMeta.rowData[30]).toFixed(1)}
value={Number(tableMeta.rowData[30]).toFixed(2)}
/>
}
/>
......@@ -1904,7 +1904,7 @@ export default class TableSummaryTriputra extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(tableMeta.rowData[32]).toFixed(1)}
value={Number(tableMeta.rowData[32]).toFixed(2)}
/>
}
/>
......@@ -2078,7 +2078,7 @@ export default class TableSummaryTriputra extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(tableMeta.rowData[34]).toFixed(1)}
value={Number(tableMeta.rowData[34]).toFixed(2)}
/>
}
/>
......@@ -2094,7 +2094,7 @@ export default class TableSummaryTriputra extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(tableMeta.rowData[35]).toFixed(1)}
value={Number(tableMeta.rowData[35]).toFixed(2)}
/>
}
/>
......@@ -2127,7 +2127,7 @@ export default class TableSummaryTriputra extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(tableMeta.rowData[37]).toFixed(1)}
value={Number(tableMeta.rowData[37]).toFixed(2)}
/>
}
/>
......@@ -2162,7 +2162,7 @@ export default class TableSummaryTriputra extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(tableMeta.rowData[39]).toFixed(1)}
value={Number(tableMeta.rowData[39]).toFixed(2)}
/>
}
/>
......@@ -2178,7 +2178,7 @@ export default class TableSummaryTriputra extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(tableMeta.rowData[40]).toFixed(1)}
value={Number(tableMeta.rowData[40]).toFixed(2)}
/>
}
/>
......@@ -2211,7 +2211,7 @@ export default class TableSummaryTriputra extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(tableMeta.rowData[42]).toFixed(1)}
value={Number(tableMeta.rowData[42]).toFixed(2)}
/>
}
/>
......@@ -2357,7 +2357,7 @@ export default class TableSummaryTriputra extends Component {
name: `Revenue`,
options: {
customHeadRender: (columnMeta) => (
<th style={{ ...style2, top: 0, backgroundColor: '#1c71b8', color: '#fff', fontSize: 13, fontWeight: 1, width: 150, borderRight: "1px solid rgb(255, 255, 255)" }} >
<th style={{ ...style2, top: 0, backgroundColor: '#1c71b8', color: '#fff', fontSize: 13, fontWeight: 1, width: 150, borderRight: "1px solid rgb(255, 255, 255)"}} >
<div style={{ borderBottom: "1px #fff solid", textAlign: 'center', fontSize: 12, fontWeight: 'bold', padding: 5 }}>{columnMeta.name}</div>
<div className="grid grid-3x" style={{ ...style2, backgroundColor: '#1c71b8', color: '#fff', fontSize: 12, fontWeight: 'bold', position: "sticky" }}>
<div className="column-1 grid grid-4x" style={{ placeSelf: 'center', textAlign: 'center' }}>
......@@ -2396,7 +2396,7 @@ export default class TableSummaryTriputra extends Component {
<div className="column-2" style={{ placeSelf: 'center', textAlign: 'center', padding: 5, borderRight: "1px #fff solid" }}>
<span>{ Number(this.props.periode) - 1 }</span>
</div>
<div className="column-3" style={{ placeSelf: 'center', textAlign: 'center', padding: 5 }}>
<div className="column-3" style={{ placeSelf: 'center', textAlign: 'center', padding: 5, borderRight: "1px #fff solid" }}>
<span>{ Number(this.props.periode) }</span>
</div>
{/* <div className="column-4" style={{ placeSelf: 'center', textAlign: 'center', padding: 5 }}>
......@@ -2424,7 +2424,7 @@ export default class TableSummaryTriputra extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(tableMeta.rowData[4]).toFixed(1)}
value={Number(tableMeta.rowData[4]).toFixed(2)}
/>
}
/>
......@@ -2442,7 +2442,7 @@ export default class TableSummaryTriputra extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(tableMeta.rowData[5]).toFixed(1)}
value={Number(tableMeta.rowData[5]).toFixed(2)}
/>
}
/>
......@@ -2460,7 +2460,7 @@ export default class TableSummaryTriputra extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(tableMeta.rowData[6]).toFixed(1)}
value={Number(tableMeta.rowData[6]).toFixed(2)}
/>
}
/>
......@@ -2478,7 +2478,7 @@ export default class TableSummaryTriputra extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(tableMeta.rowData[7]).toFixed(1)}
value={Number(tableMeta.rowData[7]).toFixed(2)}
/>
}
/>
......@@ -2498,7 +2498,7 @@ export default class TableSummaryTriputra extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(tableMeta.rowData[8]).toFixed(1)}
value={Number(tableMeta.rowData[8]).toFixed(2)}
/>
}
/>
......@@ -2516,7 +2516,7 @@ export default class TableSummaryTriputra extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(tableMeta.rowData[9]).toFixed(1)}
value={Number(tableMeta.rowData[9]).toFixed(2)}
/>
}
/>
......@@ -2534,7 +2534,7 @@ export default class TableSummaryTriputra extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(tableMeta.rowData[10]).toFixed(1)}
value={Number(tableMeta.rowData[10]).toFixed(2)}
/>
}
/>
......@@ -2552,7 +2552,7 @@ export default class TableSummaryTriputra extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(tableMeta.rowData[11]).toFixed(1)}
value={Number(tableMeta.rowData[11]).toFixed(2)}
/>
}
/>
......@@ -2572,7 +2572,7 @@ export default class TableSummaryTriputra extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(tableMeta.rowData[12]).toFixed(1)}
value={Number(tableMeta.rowData[12]).toFixed(2)}
/>
}
/>
......@@ -2590,7 +2590,7 @@ export default class TableSummaryTriputra extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(tableMeta.rowData[13]).toFixed(1)}
value={Number(tableMeta.rowData[13]).toFixed(2)}
/>
}
/>
......@@ -2608,7 +2608,7 @@ export default class TableSummaryTriputra extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(tableMeta.rowData[14]).toFixed(1)}
value={Number(tableMeta.rowData[14]).toFixed(2)}
/>
}
/>
......@@ -2728,7 +2728,7 @@ export default class TableSummaryTriputra extends Component {
<div className="column-2" style={{ placeSelf: 'center', textAlign: 'center', padding: 5, borderRight: "1px #fff solid" }}>
<span>{ Number(this.props.periode) - 1 }</span>
</div>
<div className="column-3" style={{ placeSelf: 'center', textAlign: 'center', padding: 5 }}>
<div className="column-3" style={{ placeSelf: 'center', textAlign: 'center', padding: 5, borderRight: "1px #fff solid" }}>
<span>{ Number(this.props.periode) }</span>
</div>
{/* <div className="column-4" style={{ placeSelf: 'center', textAlign: 'center', padding: 5 }}>
......@@ -2756,7 +2756,7 @@ export default class TableSummaryTriputra extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(tableMeta.rowData[15]).toFixed(1)}
value={Number(tableMeta.rowData[15]).toFixed(2)}
/>
}
/>
......@@ -2774,7 +2774,7 @@ export default class TableSummaryTriputra extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(tableMeta.rowData[16]).toFixed(1)}
value={Number(tableMeta.rowData[16]).toFixed(2)}
/>
}
/>
......@@ -2792,7 +2792,7 @@ export default class TableSummaryTriputra extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(tableMeta.rowData[17]).toFixed(1)}
value={Number(tableMeta.rowData[17]).toFixed(2)}
/>
}
/>
......@@ -2810,7 +2810,7 @@ export default class TableSummaryTriputra extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(tableMeta.rowData[18]).toFixed(1)}
value={Number(tableMeta.rowData[18]).toFixed(2)}
/>
}
/>
......@@ -2830,7 +2830,7 @@ export default class TableSummaryTriputra extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(tableMeta.rowData[19]).toFixed(1)}
value={Number(tableMeta.rowData[19]).toFixed(2)}
/>
}
/>
......@@ -2848,7 +2848,7 @@ export default class TableSummaryTriputra extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(tableMeta.rowData[20]).toFixed(1)}
value={Number(tableMeta.rowData[20]).toFixed(2)}
/>
}
/>
......@@ -2866,7 +2866,7 @@ export default class TableSummaryTriputra extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(tableMeta.rowData[21]).toFixed(1)}
value={Number(tableMeta.rowData[21]).toFixed(2)}
/>
}
/>
......@@ -2884,7 +2884,7 @@ export default class TableSummaryTriputra extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(tableMeta.rowData[22]).toFixed(1)}
value={Number(tableMeta.rowData[22]).toFixed(2)}
/>
}
/>
......@@ -2904,7 +2904,7 @@ export default class TableSummaryTriputra extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(tableMeta.rowData[23]).toFixed(1)}
value={Number(tableMeta.rowData[23]).toFixed(2)}
/>
}
/>
......@@ -2922,7 +2922,7 @@ export default class TableSummaryTriputra extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(tableMeta.rowData[24]).toFixed(1)}
value={Number(tableMeta.rowData[24]).toFixed(2)}
/>
}
/>
......@@ -2940,7 +2940,7 @@ export default class TableSummaryTriputra extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(tableMeta.rowData[25]).toFixed(1)}
value={Number(tableMeta.rowData[25]).toFixed(2)}
/>
}
/>
......@@ -3060,7 +3060,7 @@ export default class TableSummaryTriputra extends Component {
<div className="column-2" style={{ placeSelf: 'center', textAlign: 'center', padding: 5, borderRight: "1px #fff solid" }}>
<span>{ Number(this.props.periode) - 1 }</span>
</div>
<div className="column-3" style={{ placeSelf: 'center', textAlign: 'center', padding: 5 }}>
<div className="column-3" style={{ placeSelf: 'center', textAlign: 'center', padding: 5, borderRight: "1px #fff solid" }}>
<span>{ Number(this.props.periode) }</span>
</div>
{/* <div className="column-4" style={{ placeSelf: 'center', textAlign: 'center', padding: 5 }}>
......@@ -3088,7 +3088,7 @@ export default class TableSummaryTriputra extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(tableMeta.rowData[26]).toFixed(1)}
value={Number(tableMeta.rowData[26]).toFixed(2)}
/>
}
/>
......@@ -3106,7 +3106,7 @@ export default class TableSummaryTriputra extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(tableMeta.rowData[27]).toFixed(1)}
value={Number(tableMeta.rowData[27]).toFixed(2)}
/>
}
/>
......@@ -3124,7 +3124,7 @@ export default class TableSummaryTriputra extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(tableMeta.rowData[28]).toFixed(1)}
value={Number(tableMeta.rowData[28]).toFixed(2)}
/>
}
/>
......@@ -3142,7 +3142,7 @@ export default class TableSummaryTriputra extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(tableMeta.rowData[29]).toFixed(1)}
value={Number(tableMeta.rowData[29]).toFixed(2)}
/>
}
/>
......@@ -3162,7 +3162,7 @@ export default class TableSummaryTriputra extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(tableMeta.rowData[30]).toFixed(1)}
value={Number(tableMeta.rowData[30]).toFixed(2)}
/>
}
/>
......@@ -3180,7 +3180,7 @@ export default class TableSummaryTriputra extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(tableMeta.rowData[31]).toFixed(1)}
value={Number(tableMeta.rowData[31]).toFixed(2)}
/>
}
/>
......@@ -3198,7 +3198,7 @@ export default class TableSummaryTriputra extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(tableMeta.rowData[32]).toFixed(1)}
value={Number(tableMeta.rowData[32]).toFixed(2)}
/>
}
/>
......@@ -3216,7 +3216,7 @@ export default class TableSummaryTriputra extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(tableMeta.rowData[33]).toFixed(1)}
value={Number(tableMeta.rowData[33]).toFixed(2)}
/>
}
/>
......@@ -3236,7 +3236,7 @@ export default class TableSummaryTriputra extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(tableMeta.rowData[34]).toFixed(1)}
value={Number(tableMeta.rowData[34]).toFixed(2)}
/>
}
/>
......@@ -3254,7 +3254,7 @@ export default class TableSummaryTriputra extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(tableMeta.rowData[35]).toFixed(1)}
value={Number(tableMeta.rowData[35]).toFixed(2)}
/>
}
/>
......@@ -3272,7 +3272,7 @@ export default class TableSummaryTriputra extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(tableMeta.rowData[36]).toFixed(1)}
value={Number(tableMeta.rowData[36]).toFixed(2)}
/>
}
/>
......@@ -3392,7 +3392,7 @@ export default class TableSummaryTriputra extends Component {
<div className="column-2" style={{ placeSelf: 'center', textAlign: 'center', padding: 5, borderRight: "1px #fff solid" }}>
<span>{ Number(this.props.periode) - 1 }</span>
</div>
<div className="column-3" style={{ placeSelf: 'center', textAlign: 'center', padding: 5 }}>
<div className="column-3" style={{ placeSelf: 'center', textAlign: 'center', padding: 5, borderRight: "1px #fff solid" }}>
<span>{ Number(this.props.periode) }</span>
</div>
{/* <div className="column-4" style={{ placeSelf: 'center', textAlign: 'center', padding: 5 }}>
......@@ -3420,7 +3420,7 @@ export default class TableSummaryTriputra extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(tableMeta.rowData[37]).toFixed(1)}
value={Number(tableMeta.rowData[37]).toFixed(2)}
/>
}
/>
......@@ -3438,7 +3438,7 @@ export default class TableSummaryTriputra extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(tableMeta.rowData[38]).toFixed(1)}
value={Number(tableMeta.rowData[38]).toFixed(2)}
/>
}
/>
......@@ -3456,7 +3456,7 @@ export default class TableSummaryTriputra extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(tableMeta.rowData[39]).toFixed(1)}
value={Number(tableMeta.rowData[39]).toFixed(2)}
/>
}
/>
......@@ -3474,7 +3474,7 @@ export default class TableSummaryTriputra extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(tableMeta.rowData[40]).toFixed(1)}
value={Number(tableMeta.rowData[40]).toFixed(2)}
/>
}
/>
......@@ -3494,7 +3494,7 @@ export default class TableSummaryTriputra extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(tableMeta.rowData[41]).toFixed(1)}
value={Number(tableMeta.rowData[41]).toFixed(2)}
/>
}
/>
......@@ -3512,7 +3512,7 @@ export default class TableSummaryTriputra extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(tableMeta.rowData[42]).toFixed(1)}
value={Number(tableMeta.rowData[42]).toFixed(2)}
/>
}
/>
......@@ -3530,7 +3530,7 @@ export default class TableSummaryTriputra extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(tableMeta.rowData[43]).toFixed(1)}
value={Number(tableMeta.rowData[43]).toFixed(2)}
/>
}
/>
......@@ -3548,7 +3548,7 @@ export default class TableSummaryTriputra extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(tableMeta.rowData[44]).toFixed(1)}
value={Number(tableMeta.rowData[44]).toFixed(2)}
/>
}
/>
......@@ -3568,7 +3568,7 @@ export default class TableSummaryTriputra extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(tableMeta.rowData[45]).toFixed(1)}
value={Number(tableMeta.rowData[45]).toFixed(2)}
/>
}
/>
......@@ -3586,7 +3586,7 @@ export default class TableSummaryTriputra extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(tableMeta.rowData[46]).toFixed(1)}
value={Number(tableMeta.rowData[46]).toFixed(2)}
/>
}
/>
......@@ -3604,7 +3604,7 @@ export default class TableSummaryTriputra extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(tableMeta.rowData[47]).toFixed(1)}
value={Number(tableMeta.rowData[47]).toFixed(2)}
/>
}
/>
......@@ -3724,7 +3724,7 @@ export default class TableSummaryTriputra extends Component {
<div className="column-2" style={{ placeSelf: 'center', textAlign: 'center', padding: 5, borderRight: "1px #fff solid" }}>
<span>{ Number(this.props.periode) - 1 }</span>
</div>
<div className="column-3" style={{ placeSelf: 'center', textAlign: 'center', padding: 5 }}>
<div className="column-3" style={{ placeSelf: 'center', textAlign: 'center', padding: 5, borderRight: "1px #fff solid" }}>
<span>{ Number(this.props.periode) }</span>
</div>
{/* <div className="column-4" style={{ placeSelf: 'center', textAlign: 'center', padding: 5 }}>
......@@ -3752,7 +3752,7 @@ export default class TableSummaryTriputra extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(tableMeta.rowData[48]).toFixed(1)}
value={Number(tableMeta.rowData[48]).toFixed(2)}
/>
}
/>
......@@ -3770,7 +3770,7 @@ export default class TableSummaryTriputra extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(tableMeta.rowData[49]).toFixed(1)}
value={Number(tableMeta.rowData[49]).toFixed(2)}
/>
}
/>
......@@ -3788,7 +3788,7 @@ export default class TableSummaryTriputra extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(tableMeta.rowData[50]).toFixed(1)}
value={Number(tableMeta.rowData[50]).toFixed(2)}
/>
}
/>
......@@ -3806,7 +3806,7 @@ export default class TableSummaryTriputra extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(tableMeta.rowData[51]).toFixed(1)}
value={Number(tableMeta.rowData[51]).toFixed(2)}
/>
}
/>
......@@ -3826,7 +3826,7 @@ export default class TableSummaryTriputra extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(tableMeta.rowData[52]).toFixed(1)}
value={Number(tableMeta.rowData[52]).toFixed(2)}
/>
}
/>
......@@ -3844,7 +3844,7 @@ export default class TableSummaryTriputra extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(tableMeta.rowData[53]).toFixed(1)}
value={Number(tableMeta.rowData[53]).toFixed(2)}
/>
}
/>
......@@ -3862,7 +3862,7 @@ export default class TableSummaryTriputra extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(tableMeta.rowData[54]).toFixed(1)}
value={Number(tableMeta.rowData[54]).toFixed(2)}
/>
}
/>
......@@ -3880,7 +3880,7 @@ export default class TableSummaryTriputra extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(tableMeta.rowData[55]).toFixed(1)}
value={Number(tableMeta.rowData[55]).toFixed(2)}
/>
}
/>
......@@ -3900,7 +3900,7 @@ export default class TableSummaryTriputra extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(tableMeta.rowData[56]).toFixed(1)}
value={Number(tableMeta.rowData[56]).toFixed(2)}
/>
}
/>
......@@ -3918,7 +3918,7 @@ export default class TableSummaryTriputra extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(tableMeta.rowData[57]).toFixed(1)}
value={Number(tableMeta.rowData[57]).toFixed(2)}
/>
}
/>
......@@ -3936,7 +3936,7 @@ export default class TableSummaryTriputra extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(tableMeta.rowData[58]).toFixed(1)}
value={Number(tableMeta.rowData[58]).toFixed(2)}
/>
}
/>
......@@ -4056,7 +4056,7 @@ export default class TableSummaryTriputra extends Component {
<div className="column-2" style={{ placeSelf: 'center', textAlign: 'center', padding: 5, borderRight: "1px #fff solid" }}>
<span>{ Number(this.props.periode) - 1 }</span>
</div>
<div className="column-3" style={{ placeSelf: 'center', textAlign: 'center', padding: 5 }}>
<div className="column-3" style={{ placeSelf: 'center', textAlign: 'center', padding: 5, borderRight: "1px #fff solid" }}>
<span>{ Number(this.props.periode) }</span>
</div>
{/* <div className="column-4" style={{ placeSelf: 'center', textAlign: 'center', padding: 5 }}>
......@@ -4084,7 +4084,7 @@ export default class TableSummaryTriputra extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(tableMeta.rowData[59]).toFixed(1)}
value={Number(tableMeta.rowData[59]).toFixed(2)}
/>
}
/>
......@@ -4102,7 +4102,7 @@ export default class TableSummaryTriputra extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(tableMeta.rowData[60]).toFixed(1)}
value={Number(tableMeta.rowData[60]).toFixed(2)}
/>
}
/>
......@@ -4120,7 +4120,7 @@ export default class TableSummaryTriputra extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(tableMeta.rowData[61]).toFixed(1)}
value={Number(tableMeta.rowData[61]).toFixed(2)}
/>
}
/>
......@@ -4138,7 +4138,7 @@ export default class TableSummaryTriputra extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(tableMeta.rowData[62]).toFixed(1)}
value={Number(tableMeta.rowData[62]).toFixed(2)}
/>
}
/>
......@@ -4158,7 +4158,7 @@ export default class TableSummaryTriputra extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(tableMeta.rowData[63]).toFixed(1)}
value={Number(tableMeta.rowData[63]).toFixed(2)}
/>
}
/>
......@@ -4176,7 +4176,7 @@ export default class TableSummaryTriputra extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(tableMeta.rowData[64]).toFixed(1)}
value={Number(tableMeta.rowData[64]).toFixed(2)}
/>
}
/>
......@@ -4194,7 +4194,7 @@ export default class TableSummaryTriputra extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(tableMeta.rowData[65]).toFixed(1)}
value={Number(tableMeta.rowData[65]).toFixed(2)}
/>
}
/>
......@@ -4212,7 +4212,7 @@ export default class TableSummaryTriputra extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(tableMeta.rowData[66]).toFixed(1)}
value={Number(tableMeta.rowData[66]).toFixed(2)}
/>
}
/>
......@@ -4232,7 +4232,7 @@ export default class TableSummaryTriputra extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(tableMeta.rowData[67]).toFixed(1)}
value={Number(tableMeta.rowData[67]).toFixed(2)}
/>
}
/>
......@@ -4250,7 +4250,7 @@ export default class TableSummaryTriputra extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(tableMeta.rowData[68]).toFixed(1)}
value={Number(tableMeta.rowData[68]).toFixed(2)}
/>
}
/>
......@@ -4268,7 +4268,7 @@ export default class TableSummaryTriputra extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(tableMeta.rowData[69]).toFixed(1)}
value={Number(tableMeta.rowData[69]).toFixed(2)}
/>
}
/>
......
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