Commit 5b4dc246 authored by Riri Novita's avatar Riri Novita

Merge branch 'dev/riri' into 'ENV-DEV'

Fixing Issue RO

See merge request !2125
parents aa7174e7 322d60a5
......@@ -396,6 +396,7 @@ export default class BalanceSheetRO extends Component {
"currency_id": this.props.defaultCurrency.id,
"balance_sheet": data
}
console.log(payload);
api.create('UPLOAD').createRollingOutlookBS(payload).then(response => {
console.log(payload);
console.log(response);
......@@ -443,7 +444,7 @@ export default class BalanceSheetRO extends Component {
// this.props.onClickClose()
// this.props.refresh()
// })
// }
// }
} else {
this.setState({ loading: false, handleDoubleClick: 0 })
}
......@@ -459,9 +460,16 @@ export default class BalanceSheetRO extends Component {
this.setState({ loading: true })
let n = 0
for (n = (this.props.quarter == 'q1' ? 10 : (this.props.quarter == 'q2' ? 13 : 16)); n <= 18; n++) {
if ((this.props.defaultCurrency.id == 1 ? fixNumber(Number(i[n]), 2) : Number(i[n]) < Number(this.state.minValue) || this.props.defaultCurrency.id == 1 ? fixNumber(Number(i[n]), 1) : Number(i[n]) > Number(this.state.maxValue))) {
err = true
if (this.props.defaultCurrency.id == 1) {
if ((fixNumber(Number(i[n]), 2) < Number(this.state.minValue) || fixNumber(Number(i[n]), 1) > Number(this.state.maxValue))) {
err = true
}
} else {
if ((Number(i[n]) < Number(this.state.minValue) || Number(i[n]) > Number(this.state.maxValue))) {
err = true
}
}
}
}
})
......@@ -553,7 +561,7 @@ export default class BalanceSheetRO extends Component {
this.setState({ visibleUpload: false, visibleBSRO: false, loading: true })
let err = false
let dataTable = response.data.data.map((item, index) => {
// if (item.type_report_id === 3) {
// if (item.type_report_id === 3) {
// if (item.mtd_vs_mb == "" && Number(item.percent_act_vs_mb) < this.state.minValue || Number(item.percent_act_vs_mb) > this.state.maxValue) {
// err = true
// }
......@@ -1479,7 +1487,7 @@ export default class BalanceSheetRO extends Component {
type="text"
placeholder=""
disabled={true}
value={fixNumber(Number(handleValidation(val, tableMeta)),12)}
value={fixNumber(Number(handleValidation(val, tableMeta)), 12)}
/> :
<LightTooltip title={this.state.minValue === null ? `Value Should be ${tableMeta.rowData[21]}` : `Value Should be (${this.state.minValue}) up to (${this.state.maxValue})`} arrow>
<NumberFormat
......@@ -1496,7 +1504,7 @@ export default class BalanceSheetRO extends Component {
type="text"
placeholder=""
disabled={true}
value={fixNumber(Number(handleValidation(val, tableMeta)),12)}
value={fixNumber(Number(handleValidation(val, tableMeta)), 12)}
/>
</LightTooltip>
:
......@@ -1648,7 +1656,7 @@ export default class BalanceSheetRO extends Component {
type="text"
placeholder=""
disabled={true}
value={fixNumber(Number(handleValidation(val, tableMeta)),12)}
value={fixNumber(Number(handleValidation(val, tableMeta)), 12)}
/> :
<LightTooltip title={this.state.minValue === null ? `Value Should be ${tableMeta.rowData[21]}` : `Value Should be (${this.state.minValue}) up to (${this.state.maxValue})`} arrow>
<NumberFormat
......@@ -1665,7 +1673,7 @@ export default class BalanceSheetRO extends Component {
type="text"
placeholder=""
disabled={true}
value={fixNumber(Number(handleValidation(val, tableMeta)),12)}
value={fixNumber(Number(handleValidation(val, tableMeta)), 12)}
/>
</LightTooltip>
:
......@@ -1817,7 +1825,7 @@ export default class BalanceSheetRO extends Component {
type="text"
placeholder=""
disabled={true}
value={fixNumber(Number(handleValidation(val, tableMeta)),12)}
value={fixNumber(Number(handleValidation(val, tableMeta)), 12)}
/> :
<LightTooltip title={this.state.minValue === null ? `Value Should be ${tableMeta.rowData[21]}` : `Value Should be (${this.state.minValue}) up to (${this.state.maxValue})`} arrow>
<NumberFormat
......@@ -1834,7 +1842,7 @@ export default class BalanceSheetRO extends Component {
type="text"
placeholder=""
disabled={true}
value={fixNumber(Number(handleValidation(val, tableMeta)),12)}
value={fixNumber(Number(handleValidation(val, tableMeta)), 12)}
/>
</LightTooltip>
:
......@@ -1986,7 +1994,7 @@ export default class BalanceSheetRO extends Component {
type="text"
placeholder=""
disabled={true}
value={fixNumber(Number(handleValidation(val, tableMeta)),12)}
value={fixNumber(Number(handleValidation(val, tableMeta)), 12)}
/> :
<LightTooltip title={this.state.minValue === null ? `Value Should be ${tableMeta.rowData[21]}` : `Value Should be (${this.state.minValue}) up to (${this.state.maxValue})`} arrow>
<NumberFormat
......@@ -2003,7 +2011,7 @@ export default class BalanceSheetRO extends Component {
type="text"
placeholder=""
disabled={true}
value={fixNumber(Number(handleValidation(val, tableMeta)),12)}
value={fixNumber(Number(handleValidation(val, tableMeta)), 12)}
/>
</LightTooltip>
:
......@@ -2155,7 +2163,7 @@ export default class BalanceSheetRO extends Component {
type="text"
placeholder=""
disabled={true}
value={fixNumber(Number(handleValidation(val, tableMeta)),12)}
value={fixNumber(Number(handleValidation(val, tableMeta)), 12)}
/> :
<LightTooltip title={this.state.minValue === null ? `Value Should be ${tableMeta.rowData[21]}` : `Value Should be (${this.state.minValue}) up to (${this.state.maxValue})`} arrow>
<NumberFormat
......@@ -2172,7 +2180,7 @@ export default class BalanceSheetRO extends Component {
type="text"
placeholder=""
disabled={true}
value={fixNumber(Number(handleValidation(val, tableMeta)),12)}
value={fixNumber(Number(handleValidation(val, tableMeta)), 12)}
/>
</LightTooltip>
:
......@@ -2323,7 +2331,7 @@ export default class BalanceSheetRO extends Component {
type="text"
placeholder=""
disabled={true}
value={fixNumber(Number(handleValidation(val, tableMeta)),12)}
value={fixNumber(Number(handleValidation(val, tableMeta)), 12)}
/> :
<LightTooltip title={this.state.minValue === null ? `Value Should be ${tableMeta.rowData[21]}` : `Value Should be (${this.state.minValue}) up to (${this.state.maxValue})`} arrow>
<NumberFormat
......@@ -2340,7 +2348,7 @@ export default class BalanceSheetRO extends Component {
type="text"
placeholder=""
disabled={true}
value={fixNumber(Number(handleValidation(val, tableMeta)),12)}
value={fixNumber(Number(handleValidation(val, tableMeta)), 12)}
/>
</LightTooltip>
:
......@@ -2491,7 +2499,7 @@ export default class BalanceSheetRO extends Component {
type="text"
placeholder=""
disabled={true}
value={fixNumber(Number(handleValidation(val, tableMeta)),12)}
value={fixNumber(Number(handleValidation(val, tableMeta)), 12)}
/> :
<LightTooltip title={this.state.minValue === null ? `Value Should be ${tableMeta.rowData[21]}` : `Value Should be (${this.state.minValue}) up to (${this.state.maxValue})`} arrow>
<NumberFormat
......@@ -2508,7 +2516,7 @@ export default class BalanceSheetRO extends Component {
type="text"
placeholder=""
disabled={true}
value={fixNumber(Number(handleValidation(val, tableMeta)),12)}
value={fixNumber(Number(handleValidation(val, tableMeta)), 12)}
/>
</LightTooltip>
:
......@@ -2659,7 +2667,7 @@ export default class BalanceSheetRO extends Component {
type="text"
placeholder=""
disabled={true}
value={fixNumber(Number(handleValidation(val, tableMeta)),12)}
value={fixNumber(Number(handleValidation(val, tableMeta)), 12)}
/> :
<LightTooltip title={this.state.minValue === null ? `Value Should be ${tableMeta.rowData[21]}` : `Value Should be (${this.state.minValue}) up to (${this.state.maxValue})`} arrow>
<NumberFormat
......@@ -2676,7 +2684,7 @@ export default class BalanceSheetRO extends Component {
type="text"
placeholder=""
disabled={true}
value={fixNumber(Number(handleValidation(val, tableMeta)),12)}
value={fixNumber(Number(handleValidation(val, tableMeta)), 12)}
/>
</LightTooltip>
:
......@@ -2722,7 +2730,7 @@ export default class BalanceSheetRO extends Component {
type="text"
placeholder=""
disabled={true}
value={this.props.defaultCurrency.id == 1 ? fixNumber(Number(val), 1) : Number(val) == 0 ? "0.0" : fixNumber(Number(val),1)}
value={this.props.defaultCurrency.id == 1 ? fixNumber(Number(val), 1) : Number(val) == 0 ? "0.0" : fixNumber(Number(val), 1)}
/>
:
tableMeta.rowData[0] === 2 ?
......@@ -2771,7 +2779,7 @@ export default class BalanceSheetRO extends Component {
placeholder=""
disabled={true}
value={this.props.defaultCurrency.id == 1 ? (fixNumber(Number(handleForecast(tableMeta, `${Number(this.props.periode)}`, 19)), 1)) : (Number(handleForecast(tableMeta, `${Number(this.props.periode)}`, 19)) == 0 ? "0.0" : Number(handleForecast(tableMeta, `${Number(this.props.periode)}`, 19)))}
// value={this.props.defaultCurrency.id == 1 ? fixNumber(Number(val), 1) : Number(val) == 0 ? "0.0" : Number(val)}
// value={this.props.defaultCurrency.id == 1 ? fixNumber(Number(val), 1) : Number(val) == 0 ? "0.0" : Number(val)}
/>
}
/>
......@@ -2827,7 +2835,7 @@ export default class BalanceSheetRO extends Component {
type="text"
placeholder=""
disabled={true}
value={fixNumber(Number(handleValidation(val, tableMeta)),12)}
value={fixNumber(Number(handleValidation(val, tableMeta)), 12)}
/> :
<LightTooltip title={this.state.minValue === null ? `Value Should be ${tableMeta.rowData[21]}` : `Value Should be (${this.state.minValue}) up to (${this.state.maxValue})`} arrow>
<NumberFormat
......@@ -2844,7 +2852,7 @@ export default class BalanceSheetRO extends Component {
type="text"
placeholder=""
disabled={true}
value={fixNumber(Number(handleValidation(val, tableMeta)),12)}
value={fixNumber(Number(handleValidation(val, tableMeta)), 12)}
/>
</LightTooltip>
:
......@@ -2932,82 +2940,82 @@ export default class BalanceSheetRO extends Component {
</Snackbar>
<div style={{ flex: 1, padding: 20, width: '100%' }}>
{this.state.visibleBSRO ? <Paper style={{ paddingTop: 10, paddingBottom: 20 }}>
<div style={{ borderBottom: 'solid 1px #c4c4c4' }} >
<Typography style={{ fontSize: '12px', color: '#4b4b4b', margin: 10 }}>Rolling Outlook - Balance Sheet</Typography>
</div>
<div style={{ padding: 20 }}>
<div style={{ display: 'flex', justifyContent: 'space-between' }}>
<div>
<Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>{this.props.company.company_name}</Typography>
<Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>Period : {this.props.periode} {String(this.props.quarter).toLocaleUpperCase()} (rev.{this.props.revision})</Typography>
{this.props.defaultCurrency.id === 1 ?
<Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>in IDR mn</Typography>
:
<Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>in USD thousand</Typography>
}
</div>
<div style={{ width: '50%' }}>
{this.props.isApprover === true || this.state.get_for == 'view' ?
null
// <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 }, () => {
// this.downloadAllData()
// })}
// >
// <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' }}>
<a data-tip={'Download Template'} data-for="template">
<button
style={{
backgroundColor: 'transparent',
cursor: 'pointer',
borderColor: 'transparent',
margin: 5
}}
onClick={() => this.setState({ loading: true }, () => {
this.downloadTemplate()
})}
>
<img src={Images.template} />
</button>
</a>
<ReactTooltip border={true} id="template" place="bottom" type="light" effect="solid" />
<a data-tip={'Upload'} data-for="upload">
<button
style={{
backgroundColor: 'transparent',
cursor: 'pointer',
borderColor: 'transparent',
margin: 5
}}
onClick={() => this.setState({ loading: true }, () => {
setTimeout(() => {
this.setState({
loading: false,
visibleUpload: true
})
}, 300);
})}
>
<img src={Images.upload} />
</button>
</a>
<ReactTooltip border={true} id="upload" place="bottom" type="light" effect="solid" />
{/* <a data-tip={'Download'} data-for="download">
<div style={{ borderBottom: 'solid 1px #c4c4c4' }} >
<Typography style={{ fontSize: '12px', color: '#4b4b4b', margin: 10 }}>Rolling Outlook - Balance Sheet</Typography>
</div>
<div style={{ padding: 20 }}>
<div style={{ display: 'flex', justifyContent: 'space-between' }}>
<div>
<Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>{this.props.company.company_name}</Typography>
<Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>Period : {this.props.periode} {String(this.props.quarter).toLocaleUpperCase()} (rev.{this.props.revision})</Typography>
{this.props.defaultCurrency.id === 1 ?
<Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>in IDR mn</Typography>
:
<Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>in USD thousand</Typography>
}
</div>
<div style={{ width: '50%' }}>
{this.props.isApprover === true || this.state.get_for == 'view' ?
null
// <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 }, () => {
// this.downloadAllData()
// })}
// >
// <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' }}>
<a data-tip={'Download Template'} data-for="template">
<button
style={{
backgroundColor: 'transparent',
cursor: 'pointer',
borderColor: 'transparent',
margin: 5
}}
onClick={() => this.setState({ loading: true }, () => {
this.downloadTemplate()
})}
>
<img src={Images.template} />
</button>
</a>
<ReactTooltip border={true} id="template" place="bottom" type="light" effect="solid" />
<a data-tip={'Upload'} data-for="upload">
<button
style={{
backgroundColor: 'transparent',
cursor: 'pointer',
borderColor: 'transparent',
margin: 5
}}
onClick={() => this.setState({ loading: true }, () => {
setTimeout(() => {
this.setState({
loading: false,
visibleUpload: true
})
}, 300);
})}
>
<img src={Images.upload} />
</button>
</a>
<ReactTooltip border={true} id="upload" place="bottom" type="light" effect="solid" />
{/* <a data-tip={'Download'} data-for="download">
<button
style={{
backgroundColor: 'transparent',
......@@ -3026,65 +3034,65 @@ export default class BalanceSheetRO extends Component {
</button>
</a>
<ReactTooltip border={true} id="download" place="bottom" type="light" effect="solid" /> */}
</div>
}
</div>
</div>
}
</div>
</div>
<div style={{ marginTop: 20, width: this.props.width - (this.props.open === true ? 400 : 150) }}>
{!this.state.loading && (
<MuiThemeProvider theme={getMuiTheme()}>
<MUIDataTable
data={dataTable2}
columns={columns}
options={options}
/>
</MuiThemeProvider>
)}
</div>
<div style={{ marginTop: 20, width: this.props.width - (this.props.open === true ? 400 : 150) }}>
{!this.state.loading && (
<MuiThemeProvider theme={getMuiTheme()}>
<MUIDataTable
data={dataTable2}
columns={columns}
options={options}
/>
</MuiThemeProvider>
)}
</div>
<div style={{ display: 'flex' }}>
<Typography style={{ fontSize: '11px', color: '#4b4b4b', marginTop: 20 }}>Last Updated by : </Typography>
<div style={{ marginLeft: 10, overflowY: 'scroll', height: this.state.updateBy.length < 2 ? 25 : 75, marginTop: 10 }}>
{
this.state.updateBy.length > 0 ? this.state.updateBy.reverse().map((item, index) => {
return (
<Typography style={{ fontSize: '11px', color: '#4b4b4b', marginTop: 10, marginRight: 5 }}>{item.latest_update}</Typography>
)
}) :
<Typography style={{ fontSize: '11px', color: '#4b4b4b', marginTop: 10, marginRight: 5 }}>-</Typography>
}
</div>
<div style={{ display: 'flex' }}>
<Typography style={{ fontSize: '11px', color: '#4b4b4b', marginTop: 20 }}>Last Updated by : </Typography>
<div style={{ marginLeft: 10, overflowY: 'scroll', height: this.state.updateBy.length < 2 ? 25 : 75, marginTop: 10 }}>
{
this.state.updateBy.length > 0 ? this.state.updateBy.reverse().map((item, index) => {
return (
<Typography style={{ fontSize: '11px', color: '#4b4b4b', marginTop: 10, marginRight: 5 }}>{item.latest_update}</Typography>
)
}) :
<Typography style={{ fontSize: '11px', color: '#4b4b4b', marginTop: 10, marginRight: 5 }}>-</Typography>
}
</div>
<Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>Notes : {this.state.notes}</Typography>
</div>
<Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>Notes : {this.state.notes}</Typography>
</div>
<div className="grid grid-2x" style={{ padding: 20 }}>
<div className="col-1" style={{ paddingLeft: 0 }}>
<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' }}>Back</Typography>
</div>
</button>
</div>
<div className="grid grid-2x" style={{ padding: 20 }}>
<div className="col-1" style={{ paddingLeft: 0 }}>
<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' }}>Back</Typography>
</div>
</button>
</div>
{this.props.isApprover === true ?
<div className="col-2">
</div> :
<div className="" style={{ display: 'flex', justifyContent: 'flex-end', maxWidth: '100%', paddingRight: 5 }}>
{this.state.get_for == 'view' && this.state.viewOnly &&
{this.props.isApprover === true ?
<div className="col-2">
</div> :
<div className="" style={{ display: 'flex', justifyContent: 'flex-end', maxWidth: '100%', paddingRight: 5 }}>
{this.state.get_for == 'view' && this.state.viewOnly &&
<button
className="button"
type="button"
......@@ -3105,79 +3113,79 @@ export default class BalanceSheetRO extends Component {
<Typography style={{ fontSize: '11px', color: '#354960', textAlign: 'center' }}>Edit</Typography>
</div>
</button>
}
{this.state.get_for == 'edit' && <button
className="button"
type="button"
style={{
backgroundColor: 'transparent',
cursor: 'pointer',
borderColor: 'transparent',
outline: 'none',
marginRight: 20
}}
onClick={() => {
this.setState({ loading: true, dataTable: dataTable2 }, () => {
setTimeout(() => {
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>}
{this.state.get_for === 'edit' && <button
className="button"
type="button"
style={{
backgroundColor: 'transparent',
cursor: 'pointer',
borderColor: 'transparent',
outline: 'none',
marginRight: 20
}}
onClick={() =>
this.state.saveDraft ?
this.setState({ alert: true, messageAlert: 'Data Incomplete !', tipeAlert: 'error' })
:
this.state.handleDoubleClick == 1 ? null :
this.setState({ handleDoubleClick: 1, loading: true }, () => {
this.backToRollingOutlook('draft')
})
}
{this.state.get_for == 'edit' && <button
className="button"
type="button"
style={{
backgroundColor: 'transparent',
cursor: 'pointer',
borderColor: 'transparent',
outline: 'none',
marginRight: 20
}}
onClick={() => {
this.setState({ loading: true, dataTable: dataTable2 }, () => {
setTimeout(() => {
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>}
{this.state.get_for === 'edit' && <button
className="button"
type="button"
style={{
backgroundColor: 'transparent',
cursor: 'pointer',
borderColor: 'transparent',
outline: 'none',
marginRight: 20
}}
onClick={() =>
this.state.saveDraft ?
this.setState({ alert: true, messageAlert: 'Data Incomplete !', tipeAlert: 'error' })
:
this.state.handleDoubleClick == 1 ? null :
this.setState({ handleDoubleClick: 1, loading: true }, () => {
this.backToRollingOutlook('draft')
})
}
>
<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>}
{this.state.get_for === 'edit' && <button
type="button"
// disabled={this.state.buttonError}
onClick={() =>
this.state.buttonError ?
this.setState({ alert: true, messageAlert: 'Data incomplete !', tipeAlert: 'error' })
:
this.state.handleDoubleClick == 1 ? null :
this.setState({ handleDoubleClick: 1 }, () => {
this.backToRollingOutlook('submitted')
})}
style={{
backgroundColor: 'transparent',
cursor: 'pointer',
borderColor: 'transparent',
outline: 'none',
}}
>
<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 & Complete</Typography>
</div>
</button>}
</div>
}
</div>
</Paper> :
>
<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>}
{this.state.get_for === 'edit' && <button
type="button"
// disabled={this.state.buttonError}
onClick={() =>
this.state.buttonError ?
this.setState({ alert: true, messageAlert: 'Data incomplete !', tipeAlert: 'error' })
:
this.state.handleDoubleClick == 1 ? null :
this.setState({ handleDoubleClick: 1 }, () => {
this.backToRollingOutlook('submitted')
})}
style={{
backgroundColor: 'transparent',
cursor: 'pointer',
borderColor: 'transparent',
outline: 'none',
}}
>
<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 & Complete</Typography>
</div>
</button>}
</div>
}
</div>
</Paper> :
<Paper style={{ paddingTop: 10, paddingBottom: 20 }}>
<div style={{ borderBottom: 'solid 1px #c4c4c4' }} >
<Typography style={{ fontSize: '12px', color: '#4b4b4b', margin: 10 }}>Rolling Outlook - Balance Sheet</Typography>
......
......@@ -760,7 +760,6 @@ export default class TaxPlanning extends Component {
// let data = []
let errorContrl = this.state.buttonError
let editAble = this.state.editAble
// console.log(this.state.dataTable)
this.state.dataTable.map((i, index) => {
if (String(i[8]) == "Control (should be nil)") {
this.setState({ loading: true })
......@@ -7190,9 +7189,13 @@ export default class TaxPlanning extends Component {
marginRight: 20
}}
onClick={() => {
this.setState({ loading: true, dataTable: dataTable2 }, () => {
this.setState({ datatable: dataTable2 }, () => {
setTimeout(() => {
this.handleValidate()
this.setState({ loading: true }, () => {
setTimeout(() => {
this.handleValidate()
}, 100);
})
}, 100);
})
}}
......@@ -7308,9 +7311,13 @@ export default class TaxPlanning extends Component {
}}
onClick={() => {
// this.forceUpdate()
this.setState({ loading: true, buttonDraft: false }, () => {
this.setState({ datatable: dataTable2 }, () => {
setTimeout(() => {
this.handleValidate()
this.setState({ loading: true }, () => {
setTimeout(() => {
this.handleValidate()
}, 100);
})
}, 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