Commit bb5e5515 authored by Faisal Hamdi's avatar Faisal Hamdi

faisal!

parent 0562fecb
...@@ -4223,9 +4223,9 @@ ...@@ -4223,9 +4223,9 @@
} }
}, },
"caniuse-lite": { "caniuse-lite": {
"version": "1.0.30001179", "version": "1.0.30001237",
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001179.tgz", "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001237.tgz",
"integrity": "sha512-blMmO0QQujuUWZKyVrD1msR4WNDAqb/UPO1Sw2WWsQ7deoM5bJiicKnWJ1Y0NS/aGINSnKPIWBMw5luX+NDUCA==" "integrity": "sha512-pDHgRndit6p1NR2GhzMbQ6CkRrp4VKuSsqbcLeOQppYPKOYkKT/6ZvZDvKJUqcmtyWIAHuZq3SVS2vc1egCZzw=="
}, },
"capture-exit": { "capture-exit": {
"version": "2.0.0", "version": "2.0.0",
......
...@@ -47,6 +47,8 @@ class ReportProgress extends Component { ...@@ -47,6 +47,8 @@ class ReportProgress extends Component {
componentDidMount() { componentDidMount() {
this.getMonth() this.getMonth()
this.getReportType() this.getReportType()
// console.log(this.state.listCategory);
// console.log(this.state.category);
} }
getReportType() { getReportType() {
...@@ -54,31 +56,32 @@ class ReportProgress extends Component { ...@@ -54,31 +56,32 @@ class ReportProgress extends Component {
{ {
name: 'Master Budget', name: 'Master Budget',
value: 0 value: 0
},{ }, {
name: 'Monthly Report', name: 'Monthly Report',
value: 1 value: 1
},{ }, {
name: 'Operating Indicator', name: 'Operating Indicator',
value: 2 value: 2
},{ }, {
name: 'Rolling Outlook', name: 'Rolling Outlook',
value: 3 value: 3
}, },
] ]
let arrayReportTypeFinal = this.state.category.value.includes('status')? arrayReportType : arrayReportType.filter((val) => val.value != 2) let arrayReportTypeFinal = this.state.category.value.includes('status') ? arrayReportType : arrayReportType.filter((val) => val.value != 2)
let defaultProps = { let defaultProps = {
options: arrayReportTypeFinal, options: arrayReportTypeFinal,
getOptionLabel: (option) => option.name, getOptionLabel: (option) => option.name,
}; };
this.setState({listReportType: defaultProps, reportType: arrayReportTypeFinal[0]}, () => { this.setState({ listReportType: defaultProps, reportType: arrayReportTypeFinal[0] }, () => {
console.log(this.state.listReportType) console.log(this.state.listReportType)
console.log(this.state.reportType)
}) })
} }
getMonth() { getMonth() {
this.setState({loading: true}) this.setState({ loading: true })
api.create().getMonthTransaction().then(response => { api.create().getMonthTransaction().then(response => {
let dateNow = new Date() let dateNow = new Date()
dateNow.setMonth(dateNow.getMonth() - 1); dateNow.setMonth(dateNow.getMonth() - 1);
...@@ -158,11 +161,18 @@ class ReportProgress extends Component { ...@@ -158,11 +161,18 @@ class ReportProgress extends Component {
render() { render() {
const dataTable = [ const dataTableMB = [
['Tax Planning', '2', 'ABA: Anugerah Buminusantara Abadi', '2021-05-03'], ['Tax Planning', '2', 'ABA: Anugerah Buminusantara Abadi', '2021-05-03'],
['CAT', '1', 'ABA: Anugerah Buminusantara Abadi', '2021-05-03' ], ['CAT', '1', 'ABA: Anugerah Buminusantara Abadi', '2021-05-03'],
['Profit Loss', '0', 'ABA: Anugerah Buminusantara Abadi', '2021-05-03'] ['Profit Loss', '0', 'ABA: Anugerah Buminusantara Abadi', '2021-05-03']
] ]
const dataTableMBStatus = [
['ABA: Anugerah Buminusantara Abadi', '2021', 'approved', '2', 'Sudah Approved', 'Sudah Approved', 'Sudah Approved', 'Sudah Approved', 'Sudah Approved', 'Sudah Approved'],
['ABA: Anugerah Buminusantara Abadi', '2021', 'approved', '1', 'Sudah Approved', 'Sudah Approved', 'Sudah Approved', 'Sudah Approved', 'Sudah Approved', 'Sudah Approved'],
['ABA: Anugerah Buminusantara Abadi', '2021', 'approved', '0', 'Sudah Approved', 'Sudah Approved', 'Sudah Approved', 'Sudah Approved', 'Sudah Approved', 'Sudah Approved']
]
const loadingComponent = ( const loadingComponent = (
<div style={{ position: 'fixed', zIndex: 110, top: 0, left: 0, width: '100%', height: '100%', display: 'flex', justifyContent: 'center', alignItems: 'center', background: 'rgba(255,255,255,0.8)' }}> <div style={{ position: 'fixed', zIndex: 110, top: 0, left: 0, width: '100%', height: '100%', display: 'flex', justifyContent: 'center', alignItems: 'center', background: 'rgba(255,255,255,0.8)' }}>
<PropagateLoader <PropagateLoader
...@@ -181,7 +191,7 @@ class ReportProgress extends Component { ...@@ -181,7 +191,7 @@ class ReportProgress extends Component {
<Typography style={{ fontSize: '16px', color: 'white' }}>Report Status & Approval Progress Monitoring</Typography> <Typography style={{ fontSize: '16px', color: 'white' }}>Report Status & Approval Progress Monitoring</Typography>
</div> </div>
<div style={{ padding: 20, width: '100%' }}> <div style={{ padding: 20, width: '100%' }}>
<Paper style={{ paddingTop: 10, paddingBottom: 50}}> <Paper style={{ paddingTop: 10, paddingBottom: 50 }}>
<div style={{ borderBottom: 'solid 1px #c4c4c4' }} > <div style={{ borderBottom: 'solid 1px #c4c4c4' }} >
<Typography style={{ fontSize: '12px', color: '#4b4b4b', margin: 10 }}>Report Status & Approval Progress</Typography> <Typography style={{ fontSize: '12px', color: '#4b4b4b', margin: 10 }}>Report Status & Approval Progress</Typography>
</div> </div>
...@@ -193,7 +203,7 @@ class ReportProgress extends Component { ...@@ -193,7 +203,7 @@ class ReportProgress extends Component {
onChange={(event, newInputValue) => this.setState({ category: newInputValue, loading: true }, () => { onChange={(event, newInputValue) => this.setState({ category: newInputValue, loading: true }, () => {
// this.getListUserSubcoRO() // this.getListUserSubcoRO()
this.getReportType() this.getReportType()
this.setState({loading: false}) this.setState({ loading: false })
})} })}
disableClearable disableClearable
style={{ minWidth: 210, marginRight: 20 }} style={{ minWidth: 210, marginRight: 20 }}
...@@ -205,7 +215,7 @@ class ReportProgress extends Component { ...@@ -205,7 +215,7 @@ class ReportProgress extends Component {
id="report-type" id="report-type"
onChange={(event, newInputValue) => this.setState({ reportType: newInputValue, loading: true }, () => { onChange={(event, newInputValue) => this.setState({ reportType: newInputValue, loading: true }, () => {
// this.getListUserSubcoRO() // this.getListUserSubcoRO()
this.setState({loading: false}) this.setState({ loading: false })
})} })}
disableClearable disableClearable
style={{ minWidth: 210, marginRight: 20 }} style={{ minWidth: 210, marginRight: 20 }}
...@@ -221,7 +231,7 @@ class ReportProgress extends Component { ...@@ -221,7 +231,7 @@ class ReportProgress extends Component {
id="periode" id="periode"
onChange={(event, newInputValue) => this.setState({ periodeMB: newInputValue, loading: true }, () => { onChange={(event, newInputValue) => this.setState({ periodeMB: newInputValue, loading: true }, () => {
// this.getListUserSubcoRO() // this.getListUserSubcoRO()
this.setState({loading: false}) this.setState({ loading: false })
})} })}
disableClearable disableClearable
style={{ minWidth: 210, marginRight: 20 }} style={{ minWidth: 210, marginRight: 20 }}
...@@ -233,7 +243,7 @@ class ReportProgress extends Component { ...@@ -233,7 +243,7 @@ class ReportProgress extends Component {
id="month" id="month"
onChange={(event, newInputValue) => this.setState({ month: newInputValue, loading: true }, () => { onChange={(event, newInputValue) => this.setState({ month: newInputValue, loading: true }, () => {
// this.getListUserSubcoRO() // this.getListUserSubcoRO()
this.setState({loading: false}) this.setState({ loading: false })
})} })}
disableClearable disableClearable
style={{ minWidth: 210, marginRight: 20 }} style={{ minWidth: 210, marginRight: 20 }}
...@@ -245,7 +255,7 @@ class ReportProgress extends Component { ...@@ -245,7 +255,7 @@ class ReportProgress extends Component {
id="quarter" id="quarter"
onChange={(event, newInputValue) => this.setState({ quarter: newInputValue, loading: true }, () => { onChange={(event, newInputValue) => this.setState({ quarter: newInputValue, loading: true }, () => {
// this.getListUserSubcoRO() // this.getListUserSubcoRO()
this.setState({loading: false}) this.setState({ loading: false })
})} })}
disableClearable disableClearable
style={{ minWidth: 210, marginRight: 20 }} style={{ minWidth: 210, marginRight: 20 }}
...@@ -283,18 +293,19 @@ class ReportProgress extends Component { ...@@ -283,18 +293,19 @@ class ReportProgress extends Component {
</div> */} </div> */}
{this.state.loading && loadingComponent} {this.state.loading && loadingComponent}
{/* {this.state.previewTable && ( */} {/* {this.state.previewTable && ( */}
<TableProgressReport <TableProgressReport
width={this.props.width} width={this.props.width}
height={this.props.height} height={this.props.height}
open={this.props.open} open={this.props.open}
// month={this.state.month.month_value} // month={this.state.month.month_value}
type={this.state.report ? this.state.report.value : 1} category={this.state.category ? this.state.category.value : 1}
dataTable={dataTable} reportType={this.state.reportType ? this.state.reportType.value : 0}
// dataTable={this.state.dataTable} dataTable={this.state.category ? dataTableMBStatus : dataTableMB}
periode={this.state.periode ? this.state.periode.periode : null} // dataTable={this.state.dataTable}
quarter={this.state.quarter.name} periode={this.state.periode ? this.state.periode.periode : null}
company={this.state.company} quarter={this.state.quarter.name}
/> company={this.state.company}
/>
{/* )} */} {/* )} */}
</div> </div>
</Paper> </Paper>
......
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