Commit 69f336f2 authored by rifkaki's avatar rifkaki

Merge branch 'master' of http://103.44.149.204/d.arizona/tia-dev into rifka

parents dfc42297 6875717e
......@@ -762,7 +762,7 @@ export default class BudgetTahunan extends Component {
})
}
} else {
this.setState({ alert: true, messageAlert: 'Data is not saved, please check your Connection', tipeAlert: 'error', loading: false }, () => {
this.setState({ alert: true, messageAlert: 'Error saving data. Please try again', tipeAlert: 'error', loading: false }, () => {
this.getSubmission()
document.body.style.overflow = 'unset';
})
......
......@@ -442,7 +442,7 @@ export default class BalanceSheet extends Component {
})
}
} else {
this.setState({ alert: true, messageAlert: 'Data is not saved, please check your Connection', tipeAlert: 'error', loading: false })
this.setState({ alert: true, messageAlert: 'Error saving data. Please try again', tipeAlert: 'error', loading: false })
}
})
}
......
......@@ -670,7 +670,7 @@ export default class CorporateAnnualTarget extends Component {
this.setState({ alert: true, messageAlert: response.data.message, tipeAlert: 'error', loading: false })
}
} else {
this.setState({ alert: true, messageAlert: 'Data is not saved, please check your Connection', tipeAlert: 'error', loading: false })
this.setState({ alert: true, messageAlert: 'Error saving data. Please try again', tipeAlert: 'error', loading: false })
}
})
}
......
......@@ -447,7 +447,7 @@ export default class FixedAssetsMovement extends Component {
} else {
// this.setState({ loading: false })
// alert(response.problem)
this.setState({ alert: true, messageAlert: 'Data is not saved, please check your Connection', tipeAlert: 'error', loading: false })
this.setState({ alert: true, messageAlert: 'Error saving data. Please try again', tipeAlert: 'error', loading: false })
}
})
}
......
......@@ -447,7 +447,7 @@ export default class ProfitLoss extends Component {
this.setState({ alert: true, messageAlert: response.data.message, tipeAlert: 'error', loading: false })
}
} else {
this.setState({ alert: true, messageAlert: 'Data is not saved, please check your Connection', tipeAlert: 'error', loading: false })
this.setState({ alert: true, messageAlert: 'Error saving data. Please try again', tipeAlert: 'error', loading: false })
}
})
}
......
......@@ -632,7 +632,7 @@ export default class TaxPlanning extends Component {
// alert(response.data.status)
}
} else {
this.setState({ loading: false, alert: true, messageAlert: 'Data is not saved, please check your Connection', tipeAlert: 'error' })
this.setState({ loading: false, alert: true, messageAlert: 'Error saving data. Please try again', tipeAlert: 'error' })
}
})
}
......
......@@ -430,6 +430,7 @@ export default class BalanceSheetMR extends Component {
}
api.create('UPLOAD').createMonthlyReportBS(payload).then(response => {
console.log(response);
console.log(JSON.stringify(payload))
if (response.data) {
if (response.data.status === "success") {
this.props.saveToMonthlyReport()
......
......@@ -71,7 +71,6 @@ export default class OperatingIndicatorMR extends Component {
// this.getItemHierarki()
this.getSettingControl()
this.getLatestUpdate()
// console.log(this.props.permission.create);
}
getLatestUpdate() {
......@@ -121,7 +120,7 @@ export default class OperatingIndicatorMR extends Component {
minValue: response.data.data[0] ? Number(response.data.data[0].min_value) : -5,
maxValue: response.data.data[0] ? Number(response.data.data[0].max_value) : 5,
}, () => {
this.getItemHierarki()
this.getOperatingIDMonthly()
})
} else {
this.setState({ alert: true, messageAlert: response.data.message, tipeAlert: 'warning', loading: false }, () => {
......@@ -139,10 +138,31 @@ export default class OperatingIndicatorMR extends Component {
})
}
getOperatingIDMonthly() {
let payload = {
"company_id": this.props.data.company.company_id,
"periode": this.props.data.periode.periode,
"months": this.props.data.report_id === 22 ? 1 : 23 ? 2 : 24 ? 3 : 25 ? 4 : 27 ? 5 : 28 ? 6 : 29 ? 7 : 31 ? 8 : 32 ? 9 : 33 ? 10 : 35 ? 11 : 36 ? 12 : null
}
api.create().getOpetratingIndID(payload).then(response => {
if (response) {
if (response.data.data) {
this.setState({ operatingIndIDMonthly: response.data.data.operating_indicator_id } , () => {
this.getItemHierarki()
})
} else {
this.setState({ operatingIndIDMonthly: null }, () => {
this.getItemHierarki()
})
}
}
})
}
getItemHierarki() {
this.setState({ loading: true })
let payload = {
"operating_indicator_id": this.props.data.operatingIndID,
"operating_indicator_id": this.state.operatingIndIDMonthly,
"report_id": this.props.data.report_id,
"company_id": this.props.data.company.company_id,
"periode": this.props.data.periode,
......@@ -1487,7 +1507,13 @@ export default class OperatingIndicatorMR extends Component {
})}
>
<div style={{ backgroundColor: '#354960', width: 105, height: 25, borderRadius: 3, justifyContent: 'center', display: 'flex', alignItems: 'center' }}>
<Typography style={{ fontSize: '11px', color: '#fff', textAlign: 'center' }}>Save as Draft</Typography>
{this.state.editable === true?
<LightTooltip title={"Data Incomplete"} arrow>
<Typography style={{ fontSize: '11px', color: '#fff', textAlign: 'center' }}>Save as Draft</Typography>
</LightTooltip>
:
<Typography style={{ fontSize: '11px', color: '#fff', textAlign: 'center' }}>Save as Draft</Typography>
}
</div>
</button>
<button
......@@ -1507,7 +1533,13 @@ export default class OperatingIndicatorMR extends Component {
}}
>
<div style={{ backgroundColor: '#354960', width: 105, height: 25, borderRadius: 3, justifyContent: 'center', display: 'flex', alignItems: 'center' }}>
<Typography style={{ fontSize: '11px', color: '#fff', textAlign: 'center' }}>Save & Complete</Typography>
{this.state.editable === true ?
<LightTooltip title={"Data Incomplete"} arrow>
<Typography style={{ fontSize: '11px', color: '#fff', textAlign: 'center' }}>Save & Complete</Typography>
</LightTooltip>
:
<Typography style={{ fontSize: '11px', color: '#fff', textAlign: 'center' }}>Save & Complete</Typography>
}
</div>
</button>
</div>}
......@@ -1607,7 +1639,13 @@ export default class OperatingIndicatorMR extends Component {
})}
>
<div style={{ backgroundColor: '#354960', width: 105, height: 25, borderRadius: 3, justifyContent: 'center', display: 'flex', alignItems: 'center' }}>
<Typography style={{ fontSize: '11px', color: '#fff', textAlign: 'center' }}>Save as Draft</Typography>
{this.state.editable === true?
<LightTooltip title={"Data Incomplete"} arrow>
<Typography style={{ fontSize: '11px', color: '#fff', textAlign: 'center' }}>Save as Draft</Typography>
</LightTooltip>
:
<Typography style={{ fontSize: '11px', color: '#fff', textAlign: 'center' }}>Save as Draft</Typography>
}
</div>
</button>
<button
......@@ -1630,7 +1668,13 @@ export default class OperatingIndicatorMR extends Component {
}}
>
<div style={{ backgroundColor: '#354960', width: 105, height: 25, borderRadius: 3, justifyContent: 'center', display: 'flex', alignItems: 'center' }}>
<Typography style={{ fontSize: '11px', color: '#fff', textAlign: 'center' }}>Save & Complete</Typography>
{this.state.editable === true ?
<LightTooltip title={"Data Incomplete"} arrow>
<Typography style={{ fontSize: '11px', color: '#fff', textAlign: 'center' }}>Save & Complete</Typography>
</LightTooltip>
:
<Typography style={{ fontSize: '11px', color: '#fff', textAlign: 'center' }}>Save & Complete</Typography>
}
</div>
</button>
</div>}
......
......@@ -1994,7 +1994,13 @@ export default class ProfitLossMR extends Component {
}
>
<div style={{ backgroundColor: '#354960', width: 105, height: 25, borderRadius: 3, justifyContent: 'center', display: 'flex', alignItems: 'center' }}>
{this.state.saveDraft === true ?
<LightTooltip title={"Data Incomplete"} arrow>
<Typography style={{ fontSize: '11px', color: '#fff', textAlign: 'center' }}>Save as Draft</Typography>
</LightTooltip>
:
<Typography style={{ fontSize: '11px', color: '#fff', textAlign: 'center' }}>Save as Draft</Typography>
}
</div>
</button>
<button
......@@ -2016,7 +2022,13 @@ export default class ProfitLossMR extends Component {
}}
>
<div style={{ backgroundColor: '#354960', width: 105, height: 25, borderRadius: 3, justifyContent: 'center', display: 'flex', alignItems: 'center' }}>
<Typography style={{ fontSize: '11px', color: '#fff', textAlign: 'center' }}>Save & Complete</Typography>
{this.state.buttonError ?
<LightTooltip title={"Data Incomplete"} arrow>
<Typography style={{ fontSize: '11px', color: '#fff', textAlign: 'center' }}>Save & Complete</Typography>
</LightTooltip>
:
<Typography style={{ fontSize: '11px', color: '#fff', textAlign: 'center' }}>Save & Complete</Typography>
}
</div>
</button>
</div>
......@@ -2112,7 +2124,13 @@ export default class ProfitLossMR extends Component {
}
>
<div style={{ backgroundColor: '#354960', width: 105, height: 25, borderRadius: 3, justifyContent: 'center', display: 'flex', alignItems: 'center' }}>
<Typography style={{ fontSize: '11px', color: '#fff', textAlign: 'center' }}>Save as Draft</Typography>
{this.state.saveDraft === true ?
<LightTooltip title={"Data Incomplete"} arrow>
<Typography style={{ fontSize: '11px', color: '#fff', textAlign: 'center' }}>Save as Draft</Typography>
</LightTooltip>
:
<Typography style={{ fontSize: '11px', color: '#fff', textAlign: 'center' }}>Save as Draft</Typography>
}
</div>
</button>
<button
......@@ -2134,7 +2152,13 @@ export default class ProfitLossMR extends Component {
}}
>
<div style={{ backgroundColor: '#354960', width: 105, height: 25, borderRadius: 3, justifyContent: 'center', display: 'flex', alignItems: 'center' }}>
<Typography style={{ fontSize: '11px', color: '#fff', textAlign: 'center' }}>Save & Complete</Typography>
{this.state.buttonError ?
<LightTooltip title={"Data Incomplete"} arrow>
<Typography style={{ fontSize: '11px', color: '#fff', textAlign: 'center' }}>Save & Complete</Typography>
</LightTooltip>
:
<Typography style={{ fontSize: '11px', color: '#fff', textAlign: 'center' }}>Save & Complete</Typography>
}
</div>
</button>
</div>
......
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