Commit bd7c151b authored by d.arizona's avatar d.arizona

bismilaah

parent 8b8854ef
This diff is collapsed.
...@@ -7,6 +7,7 @@ import Constant from '../library/Constant'; ...@@ -7,6 +7,7 @@ import Constant from '../library/Constant';
import api from '../api'; import api from '../api';
import { Link } from 'react-router-dom'; import { Link } from 'react-router-dom';
import { PropagateLoader } from 'react-spinners'; import { PropagateLoader } from 'react-spinners';
import { titleCase } from '../library/Utils';
var ct = require("../library/CustomTable"); var ct = require("../library/CustomTable");
const getMuiTheme = () => createMuiTheme(ct.customTable()); const getMuiTheme = () => createMuiTheme(ct.customTable());
...@@ -94,7 +95,8 @@ class HomePage extends Component { ...@@ -94,7 +95,8 @@ class HomePage extends Component {
if (String(response.data.status).toLocaleLowerCase() == 'success') { if (String(response.data.status).toLocaleLowerCase() == 'success') {
let data = response.data.data let data = response.data.data
data.map((item, index) => { data.map((item, index) => {
listDashboard.push([index + 1, item.approval_id, item.company_name, `${item.type_report} - ${item.periode}`, item.revision, item.status]) let statusConvert = item.status == 'approval_review'? 'Waiting For Review' : item.status == 'approval_proccess'? 'Waiting For Approval' : titleCase(item.status)
listDashboard.push([index + 1, item.approval_id, item.company_name, `${item.type_report} - ${item.periode}`, item.revision, item.status, statusConvert])
}) })
this.setState({ listDashboard, rawData: response.data.data }) this.setState({ listDashboard, rawData: response.data.data })
} }
...@@ -141,7 +143,13 @@ class HomePage extends Component { ...@@ -141,7 +143,13 @@ class HomePage extends Component {
} }
render() { render() {
const columns = ["#", "ID", "Company", "Report Type", "Revision", "Status", { const columns = ["#", "ID", "Company", "Report Type", "Revision",
{
name: "",
options: {
display: false
}
}, 'Status', {
name: "Action", name: "Action",
options: { options: {
customBodyRender: (val, tableMeta) => { customBodyRender: (val, tableMeta) => {
...@@ -240,7 +248,7 @@ class HomePage extends Component { ...@@ -240,7 +248,7 @@ class HomePage extends Component {
</div> </div>
<div style={{ flex: 1, padding: 20, width: '100%' }}> <div style={{ flex: 1, padding: 20, width: '100%' }}>
<div style={{ display: 'flex' }}> <div style={{ display: 'flex' }}>
<Typography style={{ color: '#656565', fontSize: '16px', fontWeight: 'bold' }}>Waiting Your Submission</Typography> <Typography style={{ color: '#656565', fontSize: '16px', fontWeight: 'bold' }}>Waiting Your Approval</Typography>
</div> </div>
</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