Commit 55cb53a9 authored by Riri Novita's avatar Riri Novita

Update Banyak

parent ab9fa1c1
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
...@@ -602,7 +602,7 @@ export default class ProfitLossROO extends Component { ...@@ -602,7 +602,7 @@ export default class ProfitLossROO extends Component {
console.log("checkUpload Response", response) console.log("checkUpload Response", response)
if (response.data) { if (response.data) {
if (response.data.status === 'success') { if (response.data.status === 'success') {
this.setState({ visibleUpload: false, visiblePLRO: false, loading: true, visibleButtonUpload: true }) this.setState({ visibleUploadSimulasi: false, visiblePLRO: false, loading: true, visibleButtonUpload: true })
let dataTable = response.data.data.map((item, index) => { let dataTable = response.data.data.map((item, index) => {
return [ return [
item.type_report_id, item.type_report_id,
...@@ -850,6 +850,10 @@ export default class ProfitLossROO extends Component { ...@@ -850,6 +850,10 @@ export default class ProfitLossROO extends Component {
// }) // })
} }
handleValidateSimulasi() {
this.setState({ loading: false, buttonError: false, editable: false, saveDraft: false, handleDoubleClick: 0 })
}
closeAlert() { closeAlert() {
this.setState({ alert: false }) this.setState({ alert: false })
} }
...@@ -2742,6 +2746,101 @@ export default class ProfitLossROO extends Component { ...@@ -2742,6 +2746,101 @@ export default class ProfitLossROO extends Component {
} */} } */}
</Paper> </Paper>
: :
this.state.visibleButtonUpload ?
<Paper style={{ paddingTop: 10 }}>
<div style={{ borderBottom: 'solid 1px #c4c4c4' }} >
<Typography style={{ fontSize: '12px', color: '#4b4b4b', margin: 10 }}>Rolling Outlook - Profit Loss</Typography>
</div>
<div style={{ padding: 20 }}>
<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={{ marginTop: 20, width: this.props.width - (this.props.open === true ? 400 : 150) }}>
{this.state.dataLoaded && (
<MuiThemeProvider theme={getMuiTheme()}>
<MUIDataTable
data={dataTable2}
columns={columns}
options={options}
/>
</MuiThemeProvider>
)}
</div>
<div className="grid grid-2x" style={{ marginTop: 20 }}>
<div className="col-1" style={{ paddingLeft: 0 }}>
<button
type="button"
onClick={() => this.setState({ loading: true, visiblePLRO: true }, () => {
setTimeout(() => {
this.getItemHierarki()
}, 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="col-2" style={{ display: 'flex', justifyContent: 'flex-end', maxWidth: '100%', paddingRight: 5 }}>
<button
className="button"
type="button"
style={{
backgroundColor: 'transparent',
cursor: 'pointer',
borderColor: 'transparent',
outline: 'none',
marginRight: 20
}}
onClick={() => {
this.setState({ loading: true }, () => {
setTimeout(() => {
// this.setState({ loading: false })
this.handleValidateSimulasi()
}, 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
type="button"
// disabled={this.state.buttonError}
onClick={() =>
this.setState({ handleDoubleClick: 1, loading: true }, () => {
this.uploadSimulasi('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 Data</Typography>
</div>
</button>
</div>
</div>
</div>
</Paper>
:
<Paper style={{ paddingTop: 10 }}> <Paper style={{ paddingTop: 10 }}>
<div style={{ borderBottom: 'solid 1px #c4c4c4' }} > <div style={{ borderBottom: 'solid 1px #c4c4c4' }} >
<Typography style={{ fontSize: '12px', color: '#4b4b4b', margin: 10 }}>Rolling Outlook - Profit Loss</Typography> <Typography style={{ fontSize: '12px', color: '#4b4b4b', margin: 10 }}>Rolling Outlook - Profit Loss</Typography>
...@@ -2944,7 +3043,7 @@ export default class ProfitLossROO extends Component { ...@@ -2944,7 +3043,7 @@ export default class ProfitLossROO extends Component {
}} }}
/> />
</div> </div>
{this.state.visibleButtonUpload && {/* {this.state.visibleButtonUpload &&
<div style={{ display: 'flex', justifyContent: 'flex-end', margin: '0px 32px 16px' }}> <div style={{ display: 'flex', justifyContent: 'flex-end', margin: '0px 32px 16px' }}>
<div> <div>
<button <button
...@@ -2968,7 +3067,7 @@ export default class ProfitLossROO extends Component { ...@@ -2968,7 +3067,7 @@ export default class ProfitLossROO extends Component {
</button> </button>
</div> </div>
</div> </div>
} } */}
{/* <div style={{ padding: '0px 30px 29px', fontSize: 17, color: 'red' }}><b>Warning:</b> Valid currency for uploading data is <b>{this.props.defaultCurrency.id == 1 ? "IDR" : "USD"}</b></div> */} {/* <div style={{ padding: '0px 30px 29px', fontSize: 17, color: 'red' }}><b>Warning:</b> Valid currency for uploading data is <b>{this.props.defaultCurrency.id == 1 ? "IDR" : "USD"}</b></div> */}
</div> </div>
</div> </div>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment