Commit 3a002d7d authored by Riri Novita's avatar Riri Novita

push duluu

parent 743ba1e8
...@@ -21,6 +21,15 @@ const LightTooltip = withStyles((theme) => ({ ...@@ -21,6 +21,15 @@ const LightTooltip = withStyles((theme) => ({
}, },
}))(Tooltip); }))(Tooltip);
const LightTooltipError = withStyles((theme) => ({
tooltip: {
backgroundColor: theme.palette.common.white,
color: 'rgba(255, 0, 0, 0.87)',
boxShadow: theme.shadows[1],
fontSize: 11,
},
}))(Tooltip);
var ct = require("../../library/CustomTable"); var ct = require("../../library/CustomTable");
const getMuiTheme = () => createMuiTheme(ct.customTable3()); const getMuiTheme = () => createMuiTheme(ct.customTable3());
...@@ -77,6 +86,7 @@ export default class ProfitLossMR extends Component { ...@@ -77,6 +86,7 @@ export default class ProfitLossMR extends Component {
minValue: 0, minValue: 0,
maxValue: 0, maxValue: 0,
updateBy: '-', updateBy: '-',
notesUpdate: '-',
bebeas: false bebeas: false
} }
this.fileHandler = this.fileHandler.bind(this); this.fileHandler = this.fileHandler.bind(this);
...@@ -137,7 +147,8 @@ export default class ProfitLossMR extends Component { ...@@ -137,7 +147,8 @@ export default class ProfitLossMR extends Component {
if (response.data) { if (response.data) {
if (response.data.status === "success") { if (response.data.status === "success") {
this.setState({ this.setState({
updateBy: response.data.data.latest_update === null ? '-' : response.data.data.latest_update updateBy: response.data.data.latest_update === null ? '-' : response.data.data.latest_update,
notesUpdate: response.data.data.notes_update === null ? '-' : response.data.data.notes_update
}) })
} else { } else {
this.setState({ alert: true, messageAlert: response.data.message, tipeAlert: 'warning', loading: false }, () => { this.setState({ alert: true, messageAlert: response.data.message, tipeAlert: 'warning', loading: false }, () => {
...@@ -1529,7 +1540,7 @@ export default class ProfitLossMR extends Component { ...@@ -1529,7 +1540,7 @@ export default class ProfitLossMR extends Component {
// value={value} // value={value}
control={ control={
tableMeta.rowData[19] == "" && Number(tableMeta.rowData[14]) <= this.state.minValue || Number(tableMeta.rowData[14]) >= this.state.maxValue ? tableMeta.rowData[19] == "" && Number(tableMeta.rowData[14]) <= this.state.minValue || Number(tableMeta.rowData[14]) >= this.state.maxValue ?
<LightTooltip title={"MTD Explanation vs Prev. Month is Reqiured"} arrow> <LightTooltipError title={"MTD Explanation vs Prev. Month is Reqiured"} arrow>
<Input <Input
disableUnderline={true} disableUnderline={true}
style={{ color: "#5198ea", fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }} style={{ color: "#5198ea", fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
...@@ -1545,7 +1556,7 @@ export default class ProfitLossMR extends Component { ...@@ -1545,7 +1556,7 @@ export default class ProfitLossMR extends Component {
handleText(event.target.value, tableMeta, 0) handleText(event.target.value, tableMeta, 0)
}} }}
/> />
</LightTooltip> : </LightTooltipError> :
<Input <Input
disableUnderline={true} disableUnderline={true}
style={{ color: "#5198ea", fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }} style={{ color: "#5198ea", fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
...@@ -1575,7 +1586,7 @@ export default class ProfitLossMR extends Component { ...@@ -1575,7 +1586,7 @@ export default class ProfitLossMR extends Component {
// value={value} // value={value}
control={ control={
tableMeta.rowData[20] == "" && Number(tableMeta.rowData[16]) <= this.state.minValue || Number(tableMeta.rowData[16]) >= this.state.maxValue ? tableMeta.rowData[20] == "" && Number(tableMeta.rowData[16]) <= this.state.minValue || Number(tableMeta.rowData[16]) >= this.state.maxValue ?
<LightTooltip title={"MTD Explanation vs MB is Reqiured"} arrow> <LightTooltipError title={"MTD Explanation vs MB is Reqiured"} arrow>
<Input <Input
disableUnderline={true} disableUnderline={true}
style={{ color: "#5198ea", fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }} style={{ color: "#5198ea", fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
...@@ -1591,7 +1602,7 @@ export default class ProfitLossMR extends Component { ...@@ -1591,7 +1602,7 @@ export default class ProfitLossMR extends Component {
handleText(event.target.value, tableMeta, 1) handleText(event.target.value, tableMeta, 1)
}} }}
/> />
</LightTooltip> : </LightTooltipError> :
<Input <Input
disableUnderline={true} disableUnderline={true}
style={{ color: "#5198ea", fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }} style={{ color: "#5198ea", fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
...@@ -1621,7 +1632,7 @@ export default class ProfitLossMR extends Component { ...@@ -1621,7 +1632,7 @@ export default class ProfitLossMR extends Component {
// value={value} // value={value}
control={ control={
tableMeta.rowData[21] == "" && Number(tableMeta.rowData[18]) <= this.state.minValue || Number(tableMeta.rowData[18]) >= this.state.maxValue ? tableMeta.rowData[21] == "" && Number(tableMeta.rowData[18]) <= this.state.minValue || Number(tableMeta.rowData[18]) >= this.state.maxValue ?
<LightTooltip title={"MTD Explanation vs RB is Reqiured"} arrow> <LightTooltipError title={"MTD Explanation vs RB is Reqiured"} arrow>
<Input <Input
disableUnderline={true} disableUnderline={true}
style={{ color: "#5198ea", fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }} style={{ color: "#5198ea", fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
...@@ -1637,7 +1648,7 @@ export default class ProfitLossMR extends Component { ...@@ -1637,7 +1648,7 @@ export default class ProfitLossMR extends Component {
handleText(event.target.value, tableMeta, 0) handleText(event.target.value, tableMeta, 0)
}} }}
/> />
</LightTooltip> : </LightTooltipError> :
<Input <Input
disableUnderline={true} disableUnderline={true}
style={{ color: "#5198ea", fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }} style={{ color: "#5198ea", fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
...@@ -1808,6 +1819,7 @@ export default class ProfitLossMR extends Component { ...@@ -1808,6 +1819,7 @@ export default class ProfitLossMR extends Component {
</div> </div>
<Typography style={{ fontSize: '11px', color: '#4b4b4b', marginTop: 20 }}>Last Updated by : {this.state.updateBy}</Typography> <Typography style={{ fontSize: '11px', color: '#4b4b4b', marginTop: 20 }}>Last Updated by : {this.state.updateBy}</Typography>
<Typography style={{ fontSize: '11px', color: '#4b4b4b', marginTop: 5 }}>Notes : {this.state.notesUpdate}</Typography>
</div> </div>
{/* {this.props.isApprover === true || this.state.dataTable.length == 0 ? null : {/* {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') ? */} (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') ? */}
...@@ -1940,9 +1952,9 @@ export default class ProfitLossMR extends Component { ...@@ -1940,9 +1952,9 @@ export default class ProfitLossMR extends Component {
<div className="col-1"> <div className="col-1">
<button <button
type="button" type="button"
onClick={() => this.setState({ loading: true }, () => { onClick={() => this.setState({ loading: true, visiblePLMR: true }, () => {
setTimeout(() => { setTimeout(() => {
this.props.onClickClose() this.getItemHierarki()
}, 100); }, 100);
})} })}
style={{ style={{
......
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