Commit 184c4ff8 authored by Riri Novita's avatar Riri Novita

Merge branch 'riri' into 'master'

last updated

See merge request !762
parents 4b7ccdf0 20860775
...@@ -51,9 +51,29 @@ export default class OperatingIndicatorMR extends Component { ...@@ -51,9 +51,29 @@ export default class OperatingIndicatorMR extends Component {
} }
} }
getLatestUpdate() {
let payload = {
"operating_indicator_id": this.props.data.operatingIndID,
"report_id": this.props.data.report_id,
"company_id": this.props.data.company.company_id,
"periode": this.props.data.periode,
}
api.create().getLastestUpdateMROI(payload).then(response => {
// console.log(response.data)
if (response.data) {
if (response.data.status === "success") {
this.setState({
updateBy: response.data.data.latest_update === null ? '-' : response.data.data.latest_update
})
}
}
})
}
componentDidMount() { componentDidMount() {
// this.getItemHierarki() // this.getItemHierarki()
this.getSettingControl() this.getSettingControl()
this.getLatestUpdate()
} }
getSettingControl() { getSettingControl() {
......
import { createMuiTheme, FormControlLabel, Input, MuiThemeProvider, Paper, TableCell, Tooltip, Typography, withStyles } from '@material-ui/core' import { createMuiTheme, FormControlLabel, Input, MuiThemeProvider, Paper, Snackbar, TableCell, Tooltip, Typography, withStyles } from '@material-ui/core'
import MUIDataTable from 'mui-datatables'; import MUIDataTable from 'mui-datatables';
import React, { Component } from 'react' import React, { Component } from 'react'
import ReactTooltip from 'react-tooltip'; import ReactTooltip from 'react-tooltip';
...@@ -10,6 +10,7 @@ import { PropagateLoader } from 'react-spinners'; ...@@ -10,6 +10,7 @@ import { PropagateLoader } from 'react-spinners';
import { ExcelRenderer } from 'react-excel-renderer'; import { ExcelRenderer } from 'react-excel-renderer';
import Constant from '../../library/Constant'; import Constant from '../../library/Constant';
import UploadFile from "../../library/Upload"; import UploadFile from "../../library/Upload";
import { Alert } from '@material-ui/lab';
const LightTooltip = withStyles((theme) => ({ const LightTooltip = withStyles((theme) => ({
tooltip: { tooltip: {
...@@ -427,6 +428,10 @@ export default class ProfitLossMR extends Component { ...@@ -427,6 +428,10 @@ export default class ProfitLossMR extends Component {
}) })
} }
closeAlert() {
this.setState({ alert: false })
}
render() { render() {
let dataTable2 = this.state.dataTable let dataTable2 = this.state.dataTable
const handleNotes = (value, tableMeta) => { const handleNotes = (value, tableMeta) => {
...@@ -1637,8 +1642,13 @@ export default class ProfitLossMR extends Component { ...@@ -1637,8 +1642,13 @@ export default class ProfitLossMR extends Component {
<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} {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 Submission</Typography>
</div> </div>
<Snackbar open={this.state.alert} autoHideDuration={6000} onClose={() => this.closeAlert()}>
<Alert onClose={() => this.closeAlert()} severity={this.state.tipeAlert}>
{this.state.messageAlert}
</Alert>
</Snackbar>
<div style={{ flex: 1, padding: 20, width: '100%' }}> <div style={{ flex: 1, padding: 20, width: '100%' }}>
{this.state.visiblePLMR ? {this.state.visiblePLMR ?
<Paper style={{ paddingTop: 10 }}> <Paper style={{ paddingTop: 10 }}>
......
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