Commit 9fd449fb authored by fahrur huzain's avatar fahrur huzain

Merge branch 'dev/fahrur-new' into 'ENV-DEV'

issue bs control should be null

See merge request !2108
parents 46d9f5ed e080ccd0
...@@ -1479,7 +1479,7 @@ export default class BalanceSheetRO extends Component { ...@@ -1479,7 +1479,7 @@ export default class BalanceSheetRO extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
value={Number(handleValidation(val, tableMeta))} 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> <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 <NumberFormat
...@@ -1496,7 +1496,7 @@ export default class BalanceSheetRO extends Component { ...@@ -1496,7 +1496,7 @@ export default class BalanceSheetRO extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
value={Number(handleValidation(val, tableMeta))} value={fixNumber(Number(handleValidation(val, tableMeta)),12)}
/> />
</LightTooltip> </LightTooltip>
: :
...@@ -1648,7 +1648,7 @@ export default class BalanceSheetRO extends Component { ...@@ -1648,7 +1648,7 @@ export default class BalanceSheetRO extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
value={Number(handleValidation(val, tableMeta))} 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> <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 <NumberFormat
...@@ -1665,7 +1665,7 @@ export default class BalanceSheetRO extends Component { ...@@ -1665,7 +1665,7 @@ export default class BalanceSheetRO extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
value={Number(handleValidation(val, tableMeta))} value={fixNumber(Number(handleValidation(val, tableMeta)),12)}
/> />
</LightTooltip> </LightTooltip>
: :
...@@ -1817,7 +1817,7 @@ export default class BalanceSheetRO extends Component { ...@@ -1817,7 +1817,7 @@ export default class BalanceSheetRO extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
value={Number(handleValidation(val, tableMeta))} 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> <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 <NumberFormat
...@@ -1834,7 +1834,7 @@ export default class BalanceSheetRO extends Component { ...@@ -1834,7 +1834,7 @@ export default class BalanceSheetRO extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
value={Number(handleValidation(val, tableMeta))} value={fixNumber(Number(handleValidation(val, tableMeta)),12)}
/> />
</LightTooltip> </LightTooltip>
: :
...@@ -1986,7 +1986,7 @@ export default class BalanceSheetRO extends Component { ...@@ -1986,7 +1986,7 @@ export default class BalanceSheetRO extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
value={Number(handleValidation(val, tableMeta))} 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> <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 <NumberFormat
...@@ -2003,7 +2003,7 @@ export default class BalanceSheetRO extends Component { ...@@ -2003,7 +2003,7 @@ export default class BalanceSheetRO extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
value={Number(handleValidation(val, tableMeta))} value={fixNumber(Number(handleValidation(val, tableMeta)),12)}
/> />
</LightTooltip> </LightTooltip>
: :
...@@ -2155,7 +2155,7 @@ export default class BalanceSheetRO extends Component { ...@@ -2155,7 +2155,7 @@ export default class BalanceSheetRO extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
value={Number(handleValidation(val, tableMeta))} 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> <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 <NumberFormat
...@@ -2172,7 +2172,7 @@ export default class BalanceSheetRO extends Component { ...@@ -2172,7 +2172,7 @@ export default class BalanceSheetRO extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
value={Number(handleValidation(val, tableMeta))} value={fixNumber(Number(handleValidation(val, tableMeta)),12)}
/> />
</LightTooltip> </LightTooltip>
: :
...@@ -2323,7 +2323,7 @@ export default class BalanceSheetRO extends Component { ...@@ -2323,7 +2323,7 @@ export default class BalanceSheetRO extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
value={Number(handleValidation(val, tableMeta))} 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> <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 <NumberFormat
...@@ -2340,7 +2340,7 @@ export default class BalanceSheetRO extends Component { ...@@ -2340,7 +2340,7 @@ export default class BalanceSheetRO extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
value={Number(handleValidation(val, tableMeta))} value={fixNumber(Number(handleValidation(val, tableMeta)),12)}
/> />
</LightTooltip> </LightTooltip>
: :
...@@ -2491,7 +2491,7 @@ export default class BalanceSheetRO extends Component { ...@@ -2491,7 +2491,7 @@ export default class BalanceSheetRO extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
value={Number(handleValidation(val, tableMeta))} 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> <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 <NumberFormat
...@@ -2508,7 +2508,7 @@ export default class BalanceSheetRO extends Component { ...@@ -2508,7 +2508,7 @@ export default class BalanceSheetRO extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
value={Number(handleValidation(val, tableMeta))} value={fixNumber(Number(handleValidation(val, tableMeta)),12)}
/> />
</LightTooltip> </LightTooltip>
: :
...@@ -2659,7 +2659,7 @@ export default class BalanceSheetRO extends Component { ...@@ -2659,7 +2659,7 @@ export default class BalanceSheetRO extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
value={Number(handleValidation(val, tableMeta))} 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> <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 <NumberFormat
...@@ -2676,7 +2676,7 @@ export default class BalanceSheetRO extends Component { ...@@ -2676,7 +2676,7 @@ export default class BalanceSheetRO extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
value={Number(handleValidation(val, tableMeta))} value={fixNumber(Number(handleValidation(val, tableMeta)),12)}
/> />
</LightTooltip> </LightTooltip>
: :
...@@ -2771,7 +2771,7 @@ export default class BalanceSheetRO extends Component { ...@@ -2771,7 +2771,7 @@ export default class BalanceSheetRO extends Component {
placeholder="" placeholder=""
disabled={true} 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(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 +2827,7 @@ export default class BalanceSheetRO extends Component { ...@@ -2827,7 +2827,7 @@ export default class BalanceSheetRO extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
value={Number(handleValidation(val, tableMeta))} 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> <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 <NumberFormat
...@@ -2844,7 +2844,7 @@ export default class BalanceSheetRO extends Component { ...@@ -2844,7 +2844,7 @@ export default class BalanceSheetRO extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
value={Number(handleValidation(val, tableMeta))} value={fixNumber(Number(handleValidation(val, tableMeta)),12)}
/> />
</LightTooltip> </LightTooltip>
: :
...@@ -2932,82 +2932,82 @@ export default class BalanceSheetRO extends Component { ...@@ -2932,82 +2932,82 @@ export default class BalanceSheetRO extends Component {
</Snackbar> </Snackbar>
<div style={{ flex: 1, padding: 20, width: '100%' }}> <div style={{ flex: 1, padding: 20, width: '100%' }}>
{this.state.visibleBSRO ? <Paper style={{ paddingTop: 10, paddingBottom: 20 }}> {this.state.visibleBSRO ? <Paper style={{ paddingTop: 10, paddingBottom: 20 }}>
<div style={{ borderBottom: 'solid 1px #c4c4c4' }} > <div style={{ borderBottom: 'solid 1px #c4c4c4' }} >
<Typography style={{ fontSize: '12px', color: '#4b4b4b', margin: 10 }}>Rolling Outlook - Balance Sheet</Typography> <Typography style={{ fontSize: '12px', color: '#4b4b4b', margin: 10 }}>Rolling Outlook - Balance Sheet</Typography>
</div> </div>
<div style={{ padding: 20 }}> <div style={{ padding: 20 }}>
<div style={{ display: 'flex', justifyContent: 'space-between' }}> <div style={{ display: 'flex', justifyContent: 'space-between' }}>
<div> <div>
<Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>{this.props.company.company_name}</Typography> <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> <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 ? {this.props.defaultCurrency.id === 1 ?
<Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>in IDR mn</Typography> <Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>in IDR mn</Typography>
: :
<Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>in USD thousand</Typography> <Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>in USD thousand</Typography>
} }
</div> </div>
<div style={{ width: '50%' }}> <div style={{ width: '50%' }}>
{this.props.isApprover === true || this.state.get_for == 'view' ? {this.props.isApprover === true || this.state.get_for == 'view' ?
null null
// <div style={{ justifyContent: 'flex-end', display: 'flex', flexFlow: 'wrap' }}> // <div style={{ justifyContent: 'flex-end', display: 'flex', flexFlow: 'wrap' }}>
// <a data-tip={'Download'} data-for="download"> // <a data-tip={'Download'} data-for="download">
// <button // <button
// style={{ // style={{
// backgroundColor: 'transparent', // backgroundColor: 'transparent',
// cursor: 'pointer', // cursor: 'pointer',
// borderColor: 'transparent', // borderColor: 'transparent',
// margin: 5 // margin: 5
// }} // }}
// onClick={() => // onClick={() =>
// this.setState({ loading: true }, () => { // this.setState({ loading: true }, () => {
// this.downloadAllData() // this.downloadAllData()
// })} // })}
// > // >
// <img src={Images.download} /> // <img src={Images.download} />
// </button> // </button>
// </a> // </a>
// <ReactTooltip border={true} id="download" place="bottom" type="light" effect="solid" /> // <ReactTooltip border={true} id="download" place="bottom" type="light" effect="solid" />
// </div> // </div>
: :
<div style={{ justifyContent: 'flex-end', display: 'flex', flexFlow: 'wrap' }}> <div style={{ justifyContent: 'flex-end', display: 'flex', flexFlow: 'wrap' }}>
<a data-tip={'Download Template'} data-for="template"> <a data-tip={'Download Template'} data-for="template">
<button <button
style={{ style={{
backgroundColor: 'transparent', backgroundColor: 'transparent',
cursor: 'pointer', cursor: 'pointer',
borderColor: 'transparent', borderColor: 'transparent',
margin: 5 margin: 5
}} }}
onClick={() => this.setState({ loading: true }, () => { onClick={() => this.setState({ loading: true }, () => {
this.downloadTemplate() this.downloadTemplate()
})} })}
> >
<img src={Images.template} /> <img src={Images.template} />
</button> </button>
</a> </a>
<ReactTooltip border={true} id="template" place="bottom" type="light" effect="solid" /> <ReactTooltip border={true} id="template" place="bottom" type="light" effect="solid" />
<a data-tip={'Upload'} data-for="upload"> <a data-tip={'Upload'} data-for="upload">
<button <button
style={{ style={{
backgroundColor: 'transparent', backgroundColor: 'transparent',
cursor: 'pointer', cursor: 'pointer',
borderColor: 'transparent', borderColor: 'transparent',
margin: 5 margin: 5
}} }}
onClick={() => this.setState({ loading: true }, () => { onClick={() => this.setState({ loading: true }, () => {
setTimeout(() => { setTimeout(() => {
this.setState({ this.setState({
loading: false, loading: false,
visibleUpload: true visibleUpload: true
}) })
}, 300); }, 300);
})} })}
> >
<img src={Images.upload} /> <img src={Images.upload} />
</button> </button>
</a> </a>
<ReactTooltip border={true} id="upload" place="bottom" type="light" effect="solid" /> <ReactTooltip border={true} id="upload" place="bottom" type="light" effect="solid" />
{/* <a data-tip={'Download'} data-for="download"> {/* <a data-tip={'Download'} data-for="download">
<button <button
style={{ style={{
backgroundColor: 'transparent', backgroundColor: 'transparent',
...@@ -3026,65 +3026,65 @@ export default class BalanceSheetRO extends Component { ...@@ -3026,65 +3026,65 @@ export default class BalanceSheetRO extends Component {
</button> </button>
</a> </a>
<ReactTooltip border={true} id="download" place="bottom" type="light" effect="solid" /> */} <ReactTooltip border={true} id="download" place="bottom" type="light" effect="solid" /> */}
</div> </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={{ display: 'flex' }}> <div style={{ marginTop: 20, width: this.props.width - (this.props.open === true ? 400 : 150) }}>
<Typography style={{ fontSize: '11px', color: '#4b4b4b', marginTop: 20 }}>Last Updated by : </Typography> {!this.state.loading && (
<div style={{ marginLeft: 10, overflowY: 'scroll', height: this.state.updateBy.length < 2 ? 25 : 75, marginTop: 10 }}> <MuiThemeProvider theme={getMuiTheme()}>
{ <MUIDataTable
this.state.updateBy.length > 0 ? this.state.updateBy.reverse().map((item, index) => { data={dataTable2}
return ( columns={columns}
<Typography style={{ fontSize: '11px', color: '#4b4b4b', marginTop: 10, marginRight: 5 }}>{item.latest_update}</Typography> options={options}
) />
}) : </MuiThemeProvider>
<Typography style={{ fontSize: '11px', color: '#4b4b4b', marginTop: 10, marginRight: 5 }}>-</Typography> )}
}
</div> </div>
</div>
<Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>Notes : {this.state.notes}</Typography>
</div> <div style={{ display: 'flex' }}>
<div className="grid grid-2x" style={{ padding: 20 }}> <Typography style={{ fontSize: '11px', color: '#4b4b4b', marginTop: 20 }}>Last Updated by : </Typography>
<div className="col-1" style={{ paddingLeft: 0 }}> <div style={{ marginLeft: 10, overflowY: 'scroll', height: this.state.updateBy.length < 2 ? 25 : 75, marginTop: 10 }}>
<button {
type="button" this.state.updateBy.length > 0 ? this.state.updateBy.reverse().map((item, index) => {
onClick={() => this.setState({ loading: true }, () => { return (
setTimeout(() => { <Typography style={{ fontSize: '11px', color: '#4b4b4b', marginTop: 10, marginRight: 5 }}>{item.latest_update}</Typography>
this.props.onClickClose() )
}, 100); }) :
})} <Typography style={{ fontSize: '11px', color: '#4b4b4b', marginTop: 10, marginRight: 5 }}>-</Typography>
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> </div>
</button> </div>
<Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>Notes : {this.state.notes}</Typography>
</div> </div>
{this.props.isApprover === true ? <div className="grid grid-2x" style={{ padding: 20 }}>
<div className="col-2"> <div className="col-1" style={{ paddingLeft: 0 }}>
</div> : <button
<div className="" style={{ display: 'flex', justifyContent: 'flex-end', maxWidth: '100%', paddingRight: 5 }}> type="button"
{this.state.get_for == 'view' && this.state.viewOnly && 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 &&
<button <button
className="button" className="button"
type="button" type="button"
...@@ -3105,79 +3105,79 @@ export default class BalanceSheetRO extends Component { ...@@ -3105,79 +3105,79 @@ export default class BalanceSheetRO extends Component {
<Typography style={{ fontSize: '11px', color: '#354960', textAlign: 'center' }}>Edit</Typography> <Typography style={{ fontSize: '11px', color: '#354960', textAlign: 'center' }}>Edit</Typography>
</div> </div>
</button> </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
<div style={{ backgroundColor: '#354960', width: 105, height: 25, borderRadius: 3, justifyContent: 'center', display: 'flex', alignItems: 'center' }}> className="button"
<Typography style={{ fontSize: '11px', color: '#fff', textAlign: 'center' }}>Save as Draft</Typography> type="button"
</div> style={{
</button>} backgroundColor: 'transparent',
{this.state.get_for === 'edit' && <button cursor: 'pointer',
type="button" borderColor: 'transparent',
// disabled={this.state.buttonError} outline: 'none',
onClick={() => marginRight: 20
this.state.buttonError ? }}
this.setState({ alert: true, messageAlert: 'Data incomplete !', tipeAlert: 'error' }) onClick={() => {
: this.setState({ loading: true, dataTable: dataTable2 }, () => {
this.state.handleDoubleClick == 1 ? null : setTimeout(() => {
this.setState({ handleDoubleClick: 1 }, () => { this.handleValidate()
this.backToRollingOutlook('submitted') }, 100);
})} })
style={{ }}
backgroundColor: 'transparent', >
cursor: 'pointer', <div style={{ backgroundColor: '#fff', width: 105, height: 25, borderRadius: 3, justifyContent: 'center', display: 'flex', alignItems: 'center', border: 'solid 1px #354960' }}>
borderColor: 'transparent', <Typography style={{ fontSize: '11px', color: '#354960', textAlign: 'center' }}>Calculate</Typography>
outline: 'none', </div>
}} </button>}
> {this.state.get_for === 'edit' && <button
<div style={{ backgroundColor: '#354960', width: 105, height: 25, borderRadius: 3, justifyContent: 'center', display: 'flex', alignItems: 'center' }}> className="button"
<Typography style={{ fontSize: '11px', color: '#fff', textAlign: 'center' }}>Save & Complete</Typography> type="button"
</div> style={{
</button>} backgroundColor: 'transparent',
</div> cursor: 'pointer',
} borderColor: 'transparent',
</div> outline: 'none',
</Paper> : 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> :
<Paper style={{ paddingTop: 10, paddingBottom: 20 }}> <Paper style={{ paddingTop: 10, paddingBottom: 20 }}>
<div style={{ borderBottom: 'solid 1px #c4c4c4' }} > <div style={{ borderBottom: 'solid 1px #c4c4c4' }} >
<Typography style={{ fontSize: '12px', color: '#4b4b4b', margin: 10 }}>Rolling Outlook - Balance Sheet</Typography> <Typography style={{ fontSize: '12px', color: '#4b4b4b', margin: 10 }}>Rolling Outlook - Balance Sheet</Typography>
......
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