Commit c1f866f4 authored by Riri Novita's avatar Riri Novita

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

parents 29d60692 d0db23d0
......@@ -69,7 +69,8 @@ export default class BudgetTahunan extends Component {
btnApprove: false,
isAdmin: false,
btncreate: false,
loadview: false
loadview: false,
permissionhandle: false
}
this.myRef = React.createRef()
this.fileHandler = this.fileHandler.bind(this);
......@@ -166,10 +167,12 @@ export default class BudgetTahunan extends Component {
if (response.data.status === "success") {
// // console.log(response);
if (response.data.data.is_approver === true) {
this.setState({ isApprover: true, checkApprover: true }, () =>
this.getPeriode())
this.setState({ isApprover: true, permissionhandle: true, checkApprover: true }, () =>
{
this.getPeriode()
})
} else {
this.setState({ isApprover: false, checkApprover: false }, () =>
this.setState({ isApprover: false, permissionhandle: false, checkApprover: false }, () =>
this.getDetailUser())
}
} else {
......@@ -489,7 +492,7 @@ export default class BudgetTahunan extends Component {
let payload = {
"company_id": this.state.company.company_id,
"periode": this.state.periode.periode,
"is_approver": this.state.isApprover
"is_approver": this.state.permissionhandle? this.state.permissionhandle : this.state.isApprover
}
api.create().getSubmission(payload).then(response => {
console.log(response)
......@@ -504,11 +507,13 @@ export default class BudgetTahunan extends Component {
btnApprove: response.data.data.is_submit,
// loading: false
}, () => {
// // console.log(this.state.lastStatus);
// console.log(response.data.data.is_submit);
// console.log(this.state.btnApprove)
this.historyApproval()
this.getLatestPeriodSubmit()
api.create().checkApprover().then(response => {
// // console.log(response);
// console.log(this.state.btncreate);
// console.log(this.state.btnedit)
if (this.state.btncreate === true && this.state.btnedit === true) {
this.setState({ isApprover: false }, () => {
if (response.data.data.is_approver === true) {
......
......@@ -123,7 +123,7 @@ export default class getAllDocument extends Component {
openPopUp = async (index, val, type) =>{
if (type === 'download') {
let res = await fetch(
`${process.env.REACT_APP_URL_MAIN_BE}/public/document/download_document?documentName=`+this.state.docPath[val]+"&&fileType="+index[5]
`${process.env.REACT_APP_URL_MAIN_BE}/public/document/download_document?documentName=`+this.state.docPath[val]+"&&fileType="+index[6]
)
res = await res.blob()
// console.log(res)
......
......@@ -302,6 +302,7 @@ export default class CreateManagementDoc extends Component {
})
}
}
this.props.handleLoading(0)
}
deleteFile(e) {
......
This diff is collapsed.
......@@ -85,7 +85,9 @@ export default class CorporateAnnualTargetMR extends Component {
"monthly_report_id": this.props.monthlyReportId,
"months": this.props.month.month_id
}
// console.log(payload)
api.create().getLastestUpdateMR(payload).then(response => {
// console.log(JSON.stringify(response))
if (response.data) {
if (response.data.status === "success") {
this.setState({
......@@ -102,6 +104,7 @@ export default class CorporateAnnualTargetMR extends Component {
})
}
} else {
// console.log('brrrrrrrr')
this.setState({ alert: true, messageAlert: response.problem, tipeAlert: 'error', loading: false })
}
})
......@@ -203,6 +206,8 @@ export default class CorporateAnnualTargetMR extends Component {
})
}
} else {
// console.log('terrrr')
//
this.setState({ alert: true, messageAlert: response.problem, tipeAlert: 'error', loading: false })
}
console.log(dataTable);
......@@ -509,7 +514,7 @@ export default class CorporateAnnualTargetMR extends Component {
}
} else {
this.setState({ loading: false }, () => {
this.getSubmission()
// this.getSubmission()
document.body.style.overflow = 'unset';
})
}
......
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