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"
import { DatePicker } from '@material-ui/pickers';
import BalanceSheetOLPA from './OutlookPA/BalanceSheetOLPA';
import moment from 'moment';
import CorporateAnnualTargetOLPA from './OutlookPA/CorporateAnnualTargetOLPA';
var ct = require("../library/CustomTable");
const getMuiTheme = () => createMuiTheme(ct.customTable());
......@@ -40,6 +41,7 @@ export default class OutlookPA extends Component {
visibleBS: false,
visiblePL: false,
visibleCF: false,
visibleCAT: false,
listAttachment: [],
visibleUpload: false,
revisionTable: null,
......@@ -206,7 +208,7 @@ export default class OutlookPA extends Component {
"report_type": "Outlook PA",
}
api.create().getReportOLPA(payload).then(response => {
// console.log(response);
console.log(response);
if (response.data) {
if (response.data.status === "success") {
let dataTable = response.data.data.map((item, index) => {
......@@ -571,7 +573,8 @@ export default class OutlookPA extends Component {
visibleBS: true,
visiblePL: false,
visibleTP: false,
visibleCF: false
visibleCF: false,
visibleCAT: false
})
} else if (item === 'Profit Loss') {
this.setState({
......@@ -579,7 +582,8 @@ export default class OutlookPA extends Component {
visibleBS: false,
visiblePL: true,
visibleTP: false,
visibleCF: false
visibleCF: false,
visibleCAT: false
})
} else if (item === 'Tax Planning') {
this.setState({
......@@ -587,7 +591,8 @@ export default class OutlookPA extends Component {
visibleBS: false,
visiblePL: false,
visibleTP: true,
visibleCF: false
visibleCF: false,
visibleCAT: false
})
} else if (item === 'Cash Flow') {
this.setState({
......@@ -595,7 +600,17 @@ export default class OutlookPA extends Component {
visibleBS: false,
visiblePL: 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 {
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 && (
<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