Commit 8d8746e1 authored by faisalhamdi's avatar faisalhamdi

add CAT & update md-company

parent 067b985e
...@@ -9,6 +9,7 @@ import { titleCase } from '../library/Utils'; ...@@ -9,6 +9,7 @@ import { titleCase } from '../library/Utils';
import ProfitLoss from './BudgetTahunan/ProfitLoss'; import ProfitLoss from './BudgetTahunan/ProfitLoss';
import TaxPlanning from './BudgetTahunan/TaxPlanning'; import TaxPlanning from './BudgetTahunan/TaxPlanning';
import FixedAssetsMovement from './BudgetTahunan/FixedAssetsMovement'; import FixedAssetsMovement from './BudgetTahunan/FixedAssetsMovement';
import CorporateAnnualTarget from './BudgetTahunan/CorporateAnnualTarget';
export default class BudgetTahunan extends Component { export default class BudgetTahunan extends Component {
constructor(props) { constructor(props) {
...@@ -23,7 +24,8 @@ export default class BudgetTahunan extends Component { ...@@ -23,7 +24,8 @@ export default class BudgetTahunan extends Component {
company: null, company: null,
report_id: null, report_id: null,
visiblePL: false, visiblePL: false,
visibleFAM: false visibleFAM: false,
visibleCAT: false
} }
} }
...@@ -114,6 +116,15 @@ export default class BudgetTahunan extends Component { ...@@ -114,6 +116,15 @@ export default class BudgetTahunan extends Component {
visibleFAM: true, visibleFAM: true,
visibleTP: false visibleTP: false
}) })
} else if (item === 'CAT') {
this.setState({
visibleBudgetTahunan: false,
visibleBS: false,
visiblePL: false,
visibleCAT: true,
visibleFAM: false,
visibleTP: false
})
} }
} }
...@@ -314,7 +325,14 @@ export default class BudgetTahunan extends Component { ...@@ -314,7 +325,14 @@ export default class BudgetTahunan extends Component {
/> />
)} )}
{this.state.visibleFAM && ( {this.state.visibleFAM && (
<FixedAssetsMovement /> <FixedAssetsMovement
onClickClose={() => this.setState({ visibleFAM: false, visibleBudgetTahunan: true })}
/>
)}
{this.state.visibleCAT && (
<CorporateAnnualTarget
onClickClose={() => this.setState({ visibleCAT: false, visibleBudgetTahunan: true })}
/>
)} )}
</div > </div >
); );
......
This diff is collapsed.
...@@ -238,6 +238,29 @@ export default class Perusahaan extends Component { ...@@ -238,6 +238,29 @@ export default class Perusahaan extends Component {
componentDidMount() { componentDidMount() {
this.getData() this.getData()
this.getPermission()
}
getPermission() {
let payload = {
menu: "company"
}
api.create().getPermission(payload).then(response => {
console.log(response)
if (response.data) {
if (response.data.status === "success") {
this.setState({
create: response.data.data.create,
edit: response.data.data.edit,
load: true
})
} else {
this.setState({
load: true
})
}
}
})
} }
getData() { getData() {
...@@ -472,6 +495,7 @@ export default class Perusahaan extends Component { ...@@ -472,6 +495,7 @@ export default class Perusahaan extends Component {
</Alert> </Alert>
</Snackbar> </Snackbar>
{this.state.visiblePerusahaan === true ? {this.state.visiblePerusahaan === true ?
this.state.load && (
<div> <div>
<div style={{ display: 'flex', flexDirection: 'row', justifyContent: 'space-between', paddingRight: 25, paddingLeft: 25, marginTop: -118 }}> <div style={{ display: 'flex', flexDirection: 'row', justifyContent: 'space-between', paddingRight: 25, paddingLeft: 25, marginTop: -118 }}>
<label style={{ color: 'white', fontSize: 16, alignSelf: 'center', width: '20%', }}>Master Data - Company</label> <label style={{ color: 'white', fontSize: 16, alignSelf: 'center', width: '20%', }}>Master Data - Company</label>
...@@ -570,8 +594,9 @@ export default class Perusahaan extends Component { ...@@ -570,8 +594,9 @@ export default class Perusahaan extends Component {
</div> </div>
</div> </div>
)
: :
this.state.visibleVisual == true ? this.state.visibleVisual === true ?
<VisualPerusahaan <VisualPerusahaan
onClickClose={() => this.setState({ visibleVisual: false, visiblePerusahaan: true })} onClickClose={() => this.setState({ visibleVisual: false, visiblePerusahaan: true })}
height={this.props.height} height={this.props.height}
......
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