Commit 0703d033 authored by Dida Adams Arizona's avatar Dida Adams Arizona

Merge branch 'riri' into 'master'

ok

See merge request !385
parents 5140b090 a536f64a
...@@ -553,7 +553,12 @@ export default class ProfitLoss extends Component { ...@@ -553,7 +553,12 @@ export default class ProfitLoss extends Component {
"formula": rilFormula "formula": rilFormula
} }
api.create().countingFormula(body).then(response => { api.create().countingFormula(body).then(response => {
// console.log(response); console.log(response);
// if (response.data) {
// if (response.data.status === "success") {
// return response.data.data.result
// }
// }
}) })
} else { } else {
let body = { let body = {
......
import React, { Component } from 'react'; import React, { Component } from 'react';
import { Typography, Paper, TextField, MenuItem, Select, FormControlLabel, createMuiTheme, MuiThemeProvider } from '@material-ui/core'; import { Typography, Paper, TextField, MenuItem, Select, FormControlLabel, createMuiTheme, withStyles, MuiThemeProvider } from '@material-ui/core';
import MUIDataTable from 'mui-datatables'; import MUIDataTable from 'mui-datatables';
import Images from '../../assets/Images'; import Images from '../../assets/Images';
import OperatingIndicatorDetail from './OperatingIndicatorDetail' import OperatingIndicatorDetail from './OperatingIndicatorDetail'
import api from '../../api'; import api from '../../api';
import Autocomplete from '@material-ui/lab/Autocomplete'; import Autocomplete from '@material-ui/lab/Autocomplete';
import MuiAlert from '@material-ui/lab/Alert';
import { titleCase } from '../../library/Utils'; import { titleCase } from '../../library/Utils';
import { ExcelRenderer } from 'react-excel-renderer'; import { ExcelRenderer } from 'react-excel-renderer';
import UploadFile from "../../library/Upload"; import UploadFile from "../../library/Upload";
...@@ -14,6 +15,9 @@ import Constant from '../../library/Constant'; ...@@ -14,6 +15,9 @@ import Constant from '../../library/Constant';
var ct = require("../../library/CustomTable"); var ct = require("../../library/CustomTable");
const getMuiTheme = () => createMuiTheme(ct.customTable()); const getMuiTheme = () => createMuiTheme(ct.customTable());
const Alert = withStyles({
})((props) => <MuiAlert elevation={6} variant="filled" {...props} />);
export default class OperatingIndicator extends Component { export default class OperatingIndicator extends Component {
constructor(props) { constructor(props) {
super(props) super(props)
...@@ -30,7 +34,10 @@ export default class OperatingIndicator extends Component { ...@@ -30,7 +34,10 @@ export default class OperatingIndicator extends Component {
report_id: null, report_id: null,
listAttachment: [], listAttachment: [],
visibleUpload: false, visibleUpload: false,
operatingIndID: null operatingIndID: null,
alert: false,
tipeAlert: '',
messageAlert: ''
} }
this.fileHandler = this.fileHandler.bind(this); this.fileHandler = this.fileHandler.bind(this);
} }
...@@ -69,17 +76,15 @@ export default class OperatingIndicator extends Component { ...@@ -69,17 +76,15 @@ export default class OperatingIndicator extends Component {
return [ return [
item.number, item.number,
item.report_name, item.report_name,
// item.revision,
item.current_status, item.current_status,
item.report_id, item.report_id,
item.is_can_upload, item.is_can_upload
// item.revision
] ]
}) })
// console.log(dataTable); // console.log(dataTable);
this.setState({ dataTable, dataReport: response.data.data}) this.setState({ dataTable, dataReport: response.data.data})
} }
} }
}) })
} }
...@@ -268,7 +273,7 @@ export default class OperatingIndicator extends Component { ...@@ -268,7 +273,7 @@ export default class OperatingIndicator extends Component {
} }
render() { render() {
const columns = ["#", "Jenis Laporan", const columns = ["#", "Report Type",
// { // {
// name: "Revision", // name: "Revision",
// options: { // options: {
...@@ -329,14 +334,14 @@ export default class OperatingIndicator extends Component { ...@@ -329,14 +334,14 @@ export default class OperatingIndicator extends Component {
<button <button
style={{ style={{
backgroundColor: 'transparent', backgroundColor: 'transparent',
cursor: tableMeta.rowData[5] ? 'pointer' : null, cursor: tableMeta.rowData[4] ? 'pointer' : null,
borderColor: 'transparent' borderColor: 'transparent'
}} }}
onClick={() => onClick={() =>
tableMeta.rowData[4] ? this.clickDetail(tableMeta.rowData) : null tableMeta.rowData[4] ? this.clickDetail(tableMeta.rowData, tableMeta.rowData[1], tableMeta.rowData[3], tableMeta.rowData[2]) : null
} }
> >
<Typography style={{ color: tableMeta.rowData[5] ? '#5198ea' : 'GrayText', fontSize: 12, }}>Detail</Typography> <Typography style={{ color: tableMeta.rowData[4] ? '#5198ea' : 'GrayText', fontSize: 12, }}>Detail</Typography>
</button> </button>
</div > </div >
); );
...@@ -357,7 +362,8 @@ export default class OperatingIndicator extends Component { ...@@ -357,7 +362,8 @@ export default class OperatingIndicator extends Component {
download: false, download: false,
selectableRows: false, selectableRows: false,
viewColumns: false, viewColumns: false,
rowsPerPage: 5, rowsPerPage: 50,
pagination: false,
rowsPerPageOptions: [5, 25, 100], rowsPerPageOptions: [5, 25, 100],
search: false search: false
} }
...@@ -402,10 +408,11 @@ export default class OperatingIndicator extends Component { ...@@ -402,10 +408,11 @@ export default class OperatingIndicator extends Component {
this.getOperatingID() this.getOperatingID()
// this.getReportAttachment() // this.getReportAttachment()
})} })}
debug // debug
clearOnEscape
disableClearable disableClearable
style={{ width: 250 }} style={{ width: 250 }}
renderInput={(params) => <TextField {...params} label="Periode" margin="normal" style={{ marginTop: 7 }} />} renderInput={(params) => <TextField {...params} label="Period" margin="normal" style={{ marginTop: 7 }} />}
value={this.state.periode} value={this.state.periode}
/> />
</div> </div>
...@@ -418,7 +425,7 @@ export default class OperatingIndicator extends Component { ...@@ -418,7 +425,7 @@ export default class OperatingIndicator extends Component {
this.getOperatingID() this.getOperatingID()
// this.getReportAttachment() // this.getReportAttachment()
})} })}
debug clearOnEscape
disableClearable disableClearable
style={{ width: 250 }} style={{ width: 250 }}
renderInput={(params) => renderInput={(params) =>
......
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