Commit c6bd8239 authored by Riri Novita's avatar Riri Novita

Merge branch 'dev/riri' into 'ENV-DEV'

Notes OPIN MB

See merge request !1732
parents 00c176c8 44fb4e03
...@@ -11,6 +11,7 @@ import ReactTooltip from 'react-tooltip'; ...@@ -11,6 +11,7 @@ import ReactTooltip from 'react-tooltip';
import UploadFile from "../../library/Upload"; import UploadFile from "../../library/Upload";
import { ExcelRenderer } from 'react-excel-renderer'; import { ExcelRenderer } from 'react-excel-renderer';
import { Alert } from '@material-ui/lab'; import { Alert } from '@material-ui/lab';
import Constant from '../../library/Constant';
var ct = require("../../library/CustomTable"); var ct = require("../../library/CustomTable");
const getMuiTheme = () => createMuiTheme(ct.customTable3()); const getMuiTheme = () => createMuiTheme(ct.customTable3());
...@@ -58,6 +59,7 @@ export default class BalanceSheet extends Component { ...@@ -58,6 +59,7 @@ export default class BalanceSheet extends Component {
editable: true, editable: true,
emptyData: false, emptyData: false,
updateBy: [], updateBy: [],
notesUpdate: '-',
templateNull: true templateNull: true
} }
this.handleValue = this.handleValue.bind(this) this.handleValue = this.handleValue.bind(this)
...@@ -72,13 +74,25 @@ export default class BalanceSheet extends Component { ...@@ -72,13 +74,25 @@ export default class BalanceSheet extends Component {
"periode": this.props.data.periode, "periode": this.props.data.periode,
} }
api.create().getLastestUpdateOI(payload).then(response => { api.create().getLastestUpdateOI(payload).then(response => {
// // console.log(response.data) // console.log(response.data)
if (response.data) { if (response.data) {
if (response.data.status === "success") { if (response.data.status === "success") {
this.setState({ this.setState({
updateBy: response.data.data.detail === null ? [] : response.data.data.detail updateBy: response.data.data.detail === null ? [] : response.data.data.detail,
notesUpdate: response.data.data.notes_update === null ? '-' : response.data.data.notes_update
}) })
} else {
this.setState({ alert: true, messageAlert: response.data.message, tipeAlert: 'warning', loading: false }, () => {
if (response.data.message.includes("Someone Logged In") || response.data.message.includes("Token Expired")) {
setTimeout(() => {
localStorage.removeItem(Constant.TOKEN)
window.location.reload();
}, 1000);
} }
})
}
} else {
this.setState({ alert: true, messageAlert: response.problem, tipeAlert: 'error', loading: false })
} }
}) })
} }
...@@ -416,7 +430,7 @@ export default class BalanceSheet extends Component { ...@@ -416,7 +430,7 @@ export default class BalanceSheet extends Component {
item.error item.error
] ]
}) })
this.setState({ dataTable, dataLoaded: true, loading: false, templateNull : total > 0 ? true : false }) this.setState({ dataTable, dataLoaded: true, loading: false, templateNull: total > 0 ? true : false })
} }
} }
}) })
...@@ -540,7 +554,7 @@ export default class BalanceSheet extends Component { ...@@ -540,7 +554,7 @@ export default class BalanceSheet extends Component {
if (item == '-' || item == '+' || item == '/' || item == '*') { if (item == '-' || item == '+' || item == '/' || item == '*') {
opet = item opet = item
} else { } else {
arrayFormulaConvert.push(opet == ''? Number(item) : Number(String(opet + String(item)))) arrayFormulaConvert.push(opet == '' ? Number(item) : Number(String(opet + String(item))))
tambahan = false tambahan = false
opet = "" opet = ""
} }
...@@ -2150,6 +2164,7 @@ export default class BalanceSheet extends Component { ...@@ -2150,6 +2164,7 @@ export default class BalanceSheet extends Component {
} }
</div> </div>
</div> </div>
<Typography style={{ fontSize: '11px', color: '#4b4b4b', marginTop: 10 }}>Notes : {this.state.notesUpdate}</Typography>
</div> </div>
<div className="grid grid-2x"> <div className="grid grid-2x">
<div className="col-1"> <div className="col-1">
......
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