Commit 093072c1 authored by Riri Novita's avatar Riri Novita

persave-an

parent 046114a2
...@@ -183,7 +183,7 @@ export default class ProfitLossMR extends Component { ...@@ -183,7 +183,7 @@ export default class ProfitLossMR extends Component {
} }
backToMonthlyReport(type) { backToMonthlyReport(type) {
console.log(this.state.dataTable); // console.log(this.state.dataTable);
let data = [] let data = []
this.state.dataTable.map(i => { this.state.dataTable.map(i => {
data.push({ data.push({
...@@ -1335,11 +1335,12 @@ export default class ProfitLossMR extends Component { ...@@ -1335,11 +1335,12 @@ export default class ProfitLossMR extends Component {
return ( return (
<div style={{ height: this.props.height, backgroundColor: '#f8f8f8', marginBottom: 100, minHeight: 1000 }}> <div style={{ height: this.props.height, backgroundColor: '#f8f8f8', marginBottom: 100, minHeight: 1000 }}>
{this.state.loading && loadingComponent}
<div className={"main-color"} style={{ height: 78, flex: 1, display: 'flex', alignItems: 'center', paddingLeft: 20 }}> <div className={"main-color"} style={{ height: 78, flex: 1, display: 'flex', alignItems: 'center', paddingLeft: 20 }}>
<Typography style={{ fontSize: '16px', color: 'white' }}>Monthly Report</Typography> <Typography style={{ fontSize: '16px', color: 'white' }}>Monthly Report</Typography>
</div> </div>
<div style={{ flex: 1, padding: 20, width: '100%' }}> <div style={{ flex: 1, padding: 20, width: '100%' }}>
<Paper style={{ paddingTop: 10, paddingBottom: 20 }}> <Paper style={{ paddingTop: 10 }}>
<div style={{ borderBottom: 'solid 1px #c4c4c4' }} > <div style={{ borderBottom: 'solid 1px #c4c4c4' }} >
<Typography style={{ fontSize: '12px', color: '#4b4b4b', margin: 10 }}>Monthly Report - Profit Loss</Typography> <Typography style={{ fontSize: '12px', color: '#4b4b4b', margin: 10 }}>Monthly Report - Profit Loss</Typography>
</div> </div>
...@@ -1414,6 +1415,8 @@ export default class ProfitLossMR extends Component { ...@@ -1414,6 +1415,8 @@ export default class ProfitLossMR extends Component {
</MuiThemeProvider> </MuiThemeProvider>
)} )}
</div> </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="grid grid-2x" style={{ marginTop: 20 }}> <div className="grid grid-2x" style={{ marginTop: 20 }}>
<div className="col-1"> <div className="col-1">
<button <button
...@@ -1439,18 +1442,17 @@ export default class ProfitLossMR extends Component { ...@@ -1439,18 +1442,17 @@ export default class ProfitLossMR extends Component {
<button <button
className="button" className="button"
type="button" type="button"
disabled={this.state.buttonError}
style={{ style={{
backgroundColor: 'transparent', backgroundColor: 'transparent',
cursor: this.state.buttonError === true ? 'default' : 'pointer', cursor: 'pointer',
borderColor: 'transparent', borderColor: 'transparent',
outline: 'none', outline: 'none',
marginRight: 20 marginRight: 20
}} }}
onClick={() => { onClick={() => {
this.setState({ loading: true, dataTable: dataTable2, buttonDraft: false }, () => { this.setState({ loading: true }, () => {
setTimeout(() => { setTimeout(() => {
this.setState({ loading: false}) this.setState({ loading: false })
// this.handleValidate() // this.handleValidate()
}, 100); }, 100);
}) })
...@@ -1461,10 +1463,11 @@ export default class ProfitLossMR extends Component { ...@@ -1461,10 +1463,11 @@ export default class ProfitLossMR extends Component {
</div> </div>
</button> </button>
<button <button
className="button"
type="button" type="button"
style={{ style={{
backgroundColor: 'transparent', backgroundColor: 'transparent',
cursor: this.state.editable !== true ? 'pointer' : 'default', cursor: this.state.saveDraft !== true ? 'pointer' : 'default',
borderColor: 'transparent', borderColor: 'transparent',
outline: 'none', outline: 'none',
marginRight: 20 marginRight: 20
...@@ -1506,7 +1509,9 @@ export default class ProfitLossMR extends Component { ...@@ -1506,7 +1509,9 @@ export default class ProfitLossMR extends Component {
</button> </button>
</div> </div>
</div> </div>
</div> {/* : null
} */}
</div>
</Paper> </Paper>
</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