Commit 2911e85a authored by Faisal Hamdi's avatar Faisal Hamdi

Merge branch 'faisal' into 'master'

Faisal

See merge request !1398
parents d1e26b82 238a0287
...@@ -17,6 +17,7 @@ import PropagateLoader from "react-spinners/PropagateLoader" ...@@ -17,6 +17,7 @@ import PropagateLoader from "react-spinners/PropagateLoader"
import { DatePicker } from '@material-ui/pickers'; import { DatePicker } from '@material-ui/pickers';
import BalanceSheetOLPA from './OutlookPA/BalanceSheetOLPA'; import BalanceSheetOLPA from './OutlookPA/BalanceSheetOLPA';
import moment from 'moment'; import moment from 'moment';
import CorporateAnnualTargetOLPA from './OutlookPA/CorporateAnnualTargetOLPA';
var ct = require("../library/CustomTable"); var ct = require("../library/CustomTable");
const getMuiTheme = () => createMuiTheme(ct.customTable()); const getMuiTheme = () => createMuiTheme(ct.customTable());
...@@ -40,6 +41,7 @@ export default class OutlookPA extends Component { ...@@ -40,6 +41,7 @@ export default class OutlookPA extends Component {
visibleBS: false, visibleBS: false,
visiblePL: false, visiblePL: false,
visibleCF: false, visibleCF: false,
visibleCAT: false,
listAttachment: [], listAttachment: [],
visibleUpload: false, visibleUpload: false,
revisionTable: null, revisionTable: null,
...@@ -206,7 +208,7 @@ export default class OutlookPA extends Component { ...@@ -206,7 +208,7 @@ export default class OutlookPA extends Component {
"report_type": "Outlook PA", "report_type": "Outlook PA",
} }
api.create().getReportOLPA(payload).then(response => { api.create().getReportOLPA(payload).then(response => {
// console.log(response); console.log(response);
if (response.data) { if (response.data) {
if (response.data.status === "success") { if (response.data.status === "success") {
let dataTable = response.data.data.map((item, index) => { let dataTable = response.data.data.map((item, index) => {
...@@ -571,7 +573,8 @@ export default class OutlookPA extends Component { ...@@ -571,7 +573,8 @@ export default class OutlookPA extends Component {
visibleBS: true, visibleBS: true,
visiblePL: false, visiblePL: false,
visibleTP: false, visibleTP: false,
visibleCF: false visibleCF: false,
visibleCAT: false
}) })
} else if (item === 'Profit Loss') { } else if (item === 'Profit Loss') {
this.setState({ this.setState({
...@@ -579,7 +582,8 @@ export default class OutlookPA extends Component { ...@@ -579,7 +582,8 @@ export default class OutlookPA extends Component {
visibleBS: false, visibleBS: false,
visiblePL: true, visiblePL: true,
visibleTP: false, visibleTP: false,
visibleCF: false visibleCF: false,
visibleCAT: false
}) })
} else if (item === 'Tax Planning') { } else if (item === 'Tax Planning') {
this.setState({ this.setState({
...@@ -587,7 +591,8 @@ export default class OutlookPA extends Component { ...@@ -587,7 +591,8 @@ export default class OutlookPA extends Component {
visibleBS: false, visibleBS: false,
visiblePL: false, visiblePL: false,
visibleTP: true, visibleTP: true,
visibleCF: false visibleCF: false,
visibleCAT: false
}) })
} else if (item === 'Cash Flow') { } else if (item === 'Cash Flow') {
this.setState({ this.setState({
...@@ -595,7 +600,17 @@ export default class OutlookPA extends Component { ...@@ -595,7 +600,17 @@ export default class OutlookPA extends Component {
visibleBS: false, visibleBS: false,
visiblePL: false, visiblePL: false,
visibleTP: false, visibleTP: false,
visibleCF: true visibleCF: true,
visibleCAT: false
})
} else if (item === 'Corporate Annual Target') {
this.setState({
visibleOutlookPA: false,
visibleBS: false,
visiblePL: false,
visibleTP: false,
visibleCF: true,
visibleCAT: true
}) })
} }
}) })
...@@ -1437,6 +1452,25 @@ export default class OutlookPA extends Component { ...@@ -1437,6 +1452,25 @@ export default class OutlookPA extends Component {
prevRevision={this.state.isSubmit ? this.state.prevRevision : true} prevRevision={this.state.isSubmit ? this.state.prevRevision : true}
/> />
)} )}
{this.state.visibleCAT && (
<CorporateAnnualTargetOLPA
open={this.props.open}
report_id={this.state.report_id}
height={this.props.height}
width={this.props.width}
company={this.state.company}
revision={this.state.revisionTable}
periode={this.state.periode.periode}
outlook_pa_id={this.state.outlook_pa_id}
saveToOLPA={this.saveToOLPA.bind(this)}
onClickClose={() => this.setState({ visibleCAT: false, visibleOutlookPA: true })}
getReport={this.getOutlookPAID.bind(this)}
isApprover={this.state.isApprover}
lastStatus={this.state.lastStatus}
prevRevision={this.state.isSubmit ? this.state.prevRevision : true}
status={this.state.status}
/>
)}
{this.state.visibleRevision && ( {this.state.visibleRevision && (
<div className="test app-popup-show"> <div className="test app-popup-show">
......
This source diff could not be displayed because it is too large. You can view the blob instead.
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