Commit c3f4dce4 authored by Deni Rinaldi's avatar Deni Rinaldi

Merge branch 'riri' into 'master'

PLMR

See merge request !566
parents 4ba5aaec c16941be
......@@ -541,7 +541,7 @@ export default class MonthlyReport extends Component {
periode={this.state.periode.periode}
submissionID={this.state.submissionID}
// saveToMasterBudget={this.saveToMasterBudget.bind(this)}
onClickClose={() => this.setState({ visiblePL: false, visibleBudgetTahunan: true })}
onClickClose={() => this.setState({ visiblePL: false, visibleMonthlyReport: true })}
// getReport={this.getCompanyActive.bind(this)}
/>
......
import { createMuiTheme, MuiThemeProvider, Paper, TableCell, Typography } from '@material-ui/core'
import { createMuiTheme, MuiThemeProvider, Paper, TableCell, Typography, Tooltip, withStyles, Input, FormControlLabel } from '@material-ui/core'
import MUIDataTable from 'mui-datatables';
import React, { Component } from 'react'
import ReactTooltip from 'react-tooltip';
import Images from '../../assets/Images';
import NumberFormat from 'react-number-format';
const LightTooltip = withStyles((theme) => ({
tooltip: {
backgroundColor: theme.palette.common.white,
color: 'rgba(0, 0, 0, 0.87)',
boxShadow: theme.shadows[1],
fontSize: 11,
},
}))(Tooltip);
var ct = require("../../library/CustomTable");
const getMuiTheme = () => createMuiTheme(ct.customTable3());
......@@ -23,6 +33,12 @@ const style2 = {
};
export default class ProfitLossMR extends Component {
constructor(props) {
super(props)
this.state = {
dataTable: []
}
}
render() {
let columns = [
{
......@@ -54,8 +70,24 @@ export default class ProfitLossMR extends Component {
setCellProps: () => ({ style }),
customBodyRender: (val, tableMeta) => {
return (
<div style={{ width: 96 }}>
{val}
<div style={{ textAlign: 'right' }}>
<div style={{ flex: 1 }}>
<FormControlLabel
style={{ margin: 0 }}
// value={value}
control={
<Input
disableUnderline={true}
style={{ color: "#5198ea", fontSize: 12, textAlign: 'left', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
placeholder=""
// disabled={this.props.isApprover ? true : ((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') ? false : true)}
defaultValue=""
/>
}
/>
</div>
</div>
)
}
......@@ -118,7 +150,26 @@ export default class ProfitLossMR extends Component {
</div>
<div className="col-3">
<div style={{ textAlign: 'right', width: 90 }}>
{val.c}
<div style={{ flex: 1 }}>
<FormControlLabel
style={{ margin: 0 }}
// value={value}
control={
<NumberFormat
thousandSeparator={true}
style={{ color: "#5198ea", fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
placeholder=""
// disabled={this.props.isApprover ? true : ((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') ? false : true)}
// value={Number(value).toFixed(1)}
// onBlur={(event) => {
// handleChange(event.target.value, tableMeta)
// // console.log(dataTable2)
// }}
/>
}
/>
</div>
</div>
</div>
</div>
......@@ -392,6 +443,28 @@ export default class ProfitLossMR extends Component {
</MuiThemeProvider>
</div>
</div>
<div className="grid grid-2x" style={{ marginTop: 20 }}>
<div className="col-1">
<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' }}>Cancel</Typography>
</div>
</button>
</div>
</div>
</Paper>
</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