Commit 1bb2be44 authored by faisalhamdi's avatar faisalhamdi

issue ro bs #2

parent 56a8fab8
......@@ -46,7 +46,7 @@ export default class BalanceSheetRO extends Component {
dataTable: [],
loading: true,
get_for: "view",
viewOnly : true,
viewOnly: true,
updateBy: [],
editable: false,
handleTekTekTek: 0,
......@@ -298,7 +298,7 @@ export default class BalanceSheetRO extends Component {
a.click();
}
setTimeout(() => {
this.setState({loading: false})
this.setState({ loading: false })
}, 500);
}
......@@ -318,13 +318,13 @@ export default class BalanceSheetRO extends Component {
a.click();
}
setTimeout(() => {
this.setState({loading: false})
this.setState({ loading: false })
}, 500);
}
handleGetFor(type) {
console.log(type)
this.setState({get_for: type}, () => {
this.setState({ get_for: type }, () => {
// this.getSettingControl()
this.getLatestUpdate()
this.getItemHierarki()
......@@ -391,7 +391,7 @@ export default class BalanceSheetRO extends Component {
let editAble = this.state.editAble
let dataTable = this.state.dataTable
let kansas = this.state.kansas
console.log(dataTable[dataTable.length-1])
console.log(dataTable[dataTable.length - 1])
// dataTable.map((i, index) => {
// if(i[0] === 3) {
// if ( i[18] === "" && (Number(i[14]) < this.state.minValue || Number(i[14]) > this.state.maxValue)) {
......@@ -894,7 +894,7 @@ export default class BalanceSheetRO extends Component {
}
}
}, {
name: `31 Dec ${Number(this.props.periode) - 1 } Actual`,
name: `31 Dec ${Number(this.props.periode) - 1} Actual`,
options: {
customHeadRender: (columnMeta) => (
<TableCell style={{ ...style2, top: 0, zIndex: 99, backgroundColor: '#1c71b8', width: 96, borderRight: '1px #fff solid' }}>
......@@ -1378,12 +1378,12 @@ export default class BalanceSheetRO extends Component {
control={
<NumberFormat
thousandSeparator={true}
style={{ color: this.props.quarter == 'q1'? "#5198ea" : '#555252', fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
style={{ color: this.props.quarter == 'q1' ? "#5198ea" : '#555252', fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
placeholder=""
// disabled={this.props.isApprover? true : (this.state.get_for == 'view'? true : false)}
disabled={this.props.quarter == 'q1'? false : true}
value={this.props.quarter == 'q2' || this.props.quarter == 'q3'? (val == ""? "" : Number(val).toFixed(1)) : Number(val).toFixed(1) }
disabled={this.props.quarter == 'q1' ? false : true}
value={this.props.quarter == 'q2' || this.props.quarter == 'q3' ? (val == "" ? "" : Number(val).toFixed(1)) : Number(val).toFixed(1)}
onBlur={(event) => {
handleChange(event.target.value, tableMeta)
}}
......@@ -1403,7 +1403,7 @@ export default class BalanceSheetRO extends Component {
type="text"
placeholder=""
disabled={true}
value={this.props.quarter == 'q2' || this.props.quarter == 'q3'? (val == ""? "" : Number(handleValueFormula(val, tableMeta)).toFixed(1)) : Number(handleValueFormula(val, tableMeta)).toFixed(1)}
value={this.props.quarter == 'q2' || this.props.quarter == 'q3' ? (val == "" ? "" : Number(handleValueFormula(val, tableMeta)).toFixed(1)) : Number(handleValueFormula(val, tableMeta)).toFixed(1)}
/>
}
/>
......@@ -1510,11 +1510,11 @@ export default class BalanceSheetRO extends Component {
control={
<NumberFormat
thousandSeparator={true}
style={{ color: this.props.quarter == 'q1'? "#5198ea" : '#555252', fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
style={{ color: this.props.quarter == 'q1' ? "#5198ea" : '#555252', fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
placeholder=""
// disabled={this.props.isApprover? true : (this.state.get_for == 'view'? true : false)}
disabled={this.props.quarter == 'q1'? false : true}
disabled={this.props.quarter == 'q1' ? false : true}
value={Number(val).toFixed(1)}
onBlur={(event) => {
handleChange(event.target.value, tableMeta)
......@@ -1642,11 +1642,11 @@ export default class BalanceSheetRO extends Component {
control={
<NumberFormat
thousandSeparator={true}
style={{ color: this.props.quarter == 'q1'? "#5198ea" : '#555252', fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
style={{ color: this.props.quarter == 'q1' ? "#5198ea" : '#555252', fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
placeholder=""
// disabled={this.props.isApprover? true : (this.state.get_for == 'view'? true : false)}
disabled={this.props.quarter == 'q1'? false : true}
disabled={this.props.quarter == 'q1' ? false : true}
value={Number(val).toFixed(1)}
onBlur={(event) => {
handleChange(event.target.value, tableMeta)
......@@ -1774,11 +1774,11 @@ export default class BalanceSheetRO extends Component {
control={
<NumberFormat
thousandSeparator={true}
style={{ color: this.props.quarter == 'q1' || this.props.quarter == 'q2'? "#5198ea" : '#555252', fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
style={{ color: this.props.quarter == 'q1' || this.props.quarter == 'q2' ? "#5198ea" : '#555252', fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
placeholder=""
// disabled={this.props.isApprover? true : (this.state.get_for == 'view'? true : false)}
disabled={this.props.quarter == 'q1' || this.props.quarter == 'q2'? false : true}
disabled={this.props.quarter == 'q1' || this.props.quarter == 'q2' ? false : true}
value={Number(val).toFixed(1)}
onBlur={(event) => {
handleChange(event.target.value, tableMeta)
......@@ -1906,11 +1906,11 @@ export default class BalanceSheetRO extends Component {
control={
<NumberFormat
thousandSeparator={true}
style={{ color: this.props.quarter == 'q1' || this.props.quarter == 'q2'? "#5198ea" : '#555252', fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
style={{ color: this.props.quarter == 'q1' || this.props.quarter == 'q2' ? "#5198ea" : '#555252', fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
placeholder=""
// disabled={this.props.isApprover? true : (this.state.get_for == 'view'? true : false)}
disabled={this.props.quarter == 'q1' || this.props.quarter == 'q2'? false : true}
disabled={this.props.quarter == 'q1' || this.props.quarter == 'q2' ? false : true}
value={Number(val).toFixed(1)}
onBlur={(event) => {
handleChange(event.target.value, tableMeta)
......@@ -2038,11 +2038,11 @@ export default class BalanceSheetRO extends Component {
control={
<NumberFormat
thousandSeparator={true}
style={{ color: this.props.quarter == 'q1' || this.props.quarter == 'q2'? "#5198ea" : '#555252', fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
style={{ color: this.props.quarter == 'q1' || this.props.quarter == 'q2' ? "#5198ea" : '#555252', fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
placeholder=""
// disabled={this.props.isApprover? true : (this.state.get_for == 'view'? true : false)}
disabled={this.props.quarter == 'q1' || this.props.quarter == 'q2'? false : true}
disabled={this.props.quarter == 'q1' || this.props.quarter == 'q2' ? false : true}
value={Number(val).toFixed(1)}
onBlur={(event) => {
handleChange(event.target.value, tableMeta)
......@@ -2707,7 +2707,7 @@ export default class BalanceSheetRO extends Component {
<Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>in IDR mn</Typography>
</div>
<div style={{ width: '50%' }}>
{this.props.isApprover === true || this.state.get_for == 'view'?
{this.props.isApprover === true || this.state.get_for == 'view' ?
<div style={{ justifyContent: 'flex-end', display: 'flex', flexFlow: 'wrap' }}>
<a data-tip={'Download'} data-for="download">
<button
......@@ -2736,7 +2736,7 @@ export default class BalanceSheetRO extends Component {
borderColor: 'transparent',
margin: 5
}}
onClick={() => this.setState({loading: true}, () => {
onClick={() => this.setState({ loading: true }, () => {
this.downloadTemplate()
})}
>
......@@ -2854,7 +2854,7 @@ export default class BalanceSheetRO extends Component {
// marginRight: 20
}}
onClick={() => {
this.setState({loading: true}, () => {
this.setState({ loading: true }, () => {
this.handleGetFor('edit')
})
}}
......@@ -2947,7 +2947,7 @@ export default class BalanceSheetRO extends Component {
<Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>Period : {this.props.periode} {String(this.props.quarter).toLocaleUpperCase()} (rev.{this.props.revision})</Typography>
<Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>in IDR mn</Typography>
</div>
<div style={{ width: '50%' }}/>
<div style={{ width: '50%' }} />
{/* </div> */}
</div>
......@@ -2973,7 +2973,7 @@ export default class BalanceSheetRO extends Component {
type="button"
onClick={() => this.setState({ loading: true }, () => {
setTimeout(() => {
this.setState({visibleBSRO: true, visibleUpload: false}, () => {
this.setState({ visibleBSRO: true, visibleUpload: false }, () => {
this.handleGetFor('edit')
})
}, 100);
......
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