Commit a90df87e authored by Deni Rinaldi's avatar Deni Rinaldi

Merge branch 'deni-dev(pc)' into 'master'

Deni dev(pc)

See merge request !491
parents 1bd6874e 98acc789
...@@ -79,7 +79,7 @@ export default class BudgetTahunan extends Component { ...@@ -79,7 +79,7 @@ export default class BudgetTahunan extends Component {
this.props.selectIndex('Master Budget & CAT') this.props.selectIndex('Master Budget & CAT')
if (this.props.location.state !== undefined) { if (this.props.location.state !== undefined) {
console.log(this.props); console.log(this.props);
this.setState({ userType: this.props.location.state.userType, intent: 'Home', latestPeriode: this.props.location.state.rawData.periode, rawData: this.props.location.state.rawData }, () => { this.setState({ userType: this.props.location.state.userType, intent: 'Home', lastPeriod: this.props.location.state.rawData.periode, rawData: this.props.location.state.rawData }, () => {
this.checkApprover() this.checkApprover()
}) })
} else { } else {
...@@ -318,7 +318,7 @@ export default class BudgetTahunan extends Component { ...@@ -318,7 +318,7 @@ export default class BudgetTahunan extends Component {
options: periodeData, options: periodeData,
getOptionLabel: (option) => option.periode, getOptionLabel: (option) => option.periode,
}; };
let periode = (this.state.latestPeriode == "" ? String(Number(currentYear) + 1) : this.state.latestPeriode) let periode = (this.state.lastPeriod == "" ? String(Number(currentYear) + 1) : this.state.lastPeriod)
let index = data.sort((a, b) => a - b).findIndex((val) => val === periode) let index = data.sort((a, b) => a - b).findIndex((val) => val === periode)
// console.log(data) // console.log(data)
console.log(this.state.latestPeriode) console.log(this.state.latestPeriode)
......
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