Commit 699c83fe authored by Dida Adams Arizona's avatar Dida Adams Arizona

Merge branch 'GGMAC' into 'master'

apdet

See merge request !1315
parents 328b5c85 a7f81ee7
......@@ -683,7 +683,7 @@ class HomePage extends Component {
return (
<div>
<Typography style={{ color: '#656565', fontSize: '16px', marginTop: 20 }}>{item.item_business}</Typography>
<div style={{ display: 'flex', overflowX: 'scroll', width: this.props.width * 0.9 }}>
<div style={{ display: 'flex', overflowX: 'scroll', width: this.props.width * 0.95 }}>
{item.category.map((items, indexs) => {
return (
<Link to={{
......@@ -957,7 +957,7 @@ class HomePage extends Component {
return (
<div>
<Typography style={{ color: '#656565', fontSize: '16px', marginTop: 20 }}>{item.item_business}</Typography>
<div style={{ display: 'flex', overflowX: 'scroll', width: this.props.width * 0.9 }}>
<div style={{ display: 'flex', overflowX: 'scroll', width: this.props.width * 0.95 }}>
{item.category.map((items, indexs) => {
return (
<Link to={{
......
......@@ -63,6 +63,7 @@ export default class BalanceSheetRO extends Component {
componentDidMount() {
// this.getItemHierarki()
this.getLatestUpdate()
this.getSettingControl()
this.handleViewOnly()
}
......@@ -141,6 +142,39 @@ export default class BalanceSheetRO extends Component {
})
}
getLatestUpdate() {
let payload = {
"report_id": this.props.report_id,
"revision": Number(this.props.revision),
"periode": this.props.periode,
"company_id": this.props.company.company_id,
"rolling_outlook_id": this.props.rollingOutlookID,
"quartal": this.props.quarter
}
api.create().getRollingOutlookLastUpdate(payload).then(response => {
console.log(response);
if (response.data) {
if (response.data.status === "success") {
this.setState({
updateBy: response.data.data.latest_update === null ? '-' : response.data.data.latest_update,
notes: response.data.data.notes_update === null ? "" : response.data.data.notes_update
})
} else {
this.setState({ alert: true, messageAlert: response.data.message, tipeAlert: 'warning', loading: false }, () => {
if (response.data.message.includes("Someone Logged In")) {
setTimeout(() => {
localStorage.removeItem(Constant.TOKEN)
window.location.reload();
}, 1000);
}
})
}
} else {
this.setState({ alert: true, messageAlert: response.problem, tipeAlert: 'error', loading: false })
}
})
}
getItemHierarki() {
this.setState({ loading: true, judulColumn: null })
let payload = {
......@@ -291,7 +325,7 @@ export default class BalanceSheetRO extends Component {
console.log(type)
this.setState({get_for: type}, () => {
// this.getSettingControl()
// this.getLatestUpdate()
this.getLatestUpdate()
this.getItemHierarki()
})
}
......
......@@ -101,7 +101,7 @@ export default class ProfitLossROO extends Component {
componentDidMount() {
this.getItemHierarki()
// this.getLatestUpdate()
this.getLatestUpdate()
// this.getSettingControl()
this.handleViewOnly()
}
......@@ -182,38 +182,38 @@ export default class ProfitLossROO extends Component {
// })
// }
// getLatestUpdate() {
// let payload = {
// "report_id": this.props.report_id,
// "revision": Number(this.props.revision),
// "periode": this.props.periode,
// "company_id": this.props.company.company_id,
// "monthly_report_id": this.props.monthlyReportId,
// // "months": this.props.month.month_id
// }
// api.create().getLastestUpdateMR(payload).then(response => {
// console.log(response)
// if (response.data) {
// if (response.data.status === "success") {
// this.setState({
// updateBy: response.data.data.latest_update === null ? '-' : response.data.data.latest_update,
// notesUpdate: response.data.data.notes_update === null ? '-' : response.data.data.notes_update
// })
// } else {
// this.setState({ alert: true, messageAlert: response.data.message, tipeAlert: 'warning', loading: false }, () => {
// if (response.data.message.includes("Someone Logged In")) {
// setTimeout(() => {
// localStorage.removeItem(Constant.TOKEN)
// window.location.reload();
// }, 1000);
// }
// })
// }
// } else {
// this.setState({ alert: true, messageAlert: response.problem, tipeAlert: 'error', loading: false })
// }
// })
// }
getLatestUpdate() {
let payload = {
"report_id": this.props.report_id,
"revision": Number(this.props.revision),
"periode": this.props.periode,
"company_id": this.props.company.company_id,
"rolling_outlook_id": this.props.rollingOutlookID,
"quartal": this.props.quarter
}
api.create().getRollingOutlookLastUpdate(payload).then(response => {
console.log(response);
if (response.data) {
if (response.data.status === "success") {
this.setState({
updateBy: response.data.data.latest_update === null ? '-' : response.data.data.latest_update,
notes: response.data.data.notes_update === null ? "" : response.data.data.notes_update
})
} else {
this.setState({ alert: true, messageAlert: response.data.message, tipeAlert: 'warning', loading: false }, () => {
if (response.data.message.includes("Someone Logged In")) {
setTimeout(() => {
localStorage.removeItem(Constant.TOKEN)
window.location.reload();
}, 1000);
}
})
}
} else {
this.setState({ alert: true, messageAlert: response.problem, tipeAlert: 'error', loading: false })
}
})
}
getItemHierarki() {
let payload = {
......
......@@ -136,13 +136,16 @@ export default class TaxPlanning extends Component {
"revision": Number(this.props.revision),
"periode": this.props.periode,
"company_id": this.props.company.company_id,
"submission_id": this.props.submissionID
"rolling_outlook_id": this.props.rollingOutlookID,
"quartal": this.props.quarter
}
api.create().getLastestUpdateMB(payload).then(response => {
api.create().getRollingOutlookLastUpdate(payload).then(response => {
console.log(response);
if (response.data) {
if (response.data.status === "success") {
this.setState({
updateBy: response.data.data.latest_update === null ? '-' : response.data.data.latest_update
updateBy: response.data.data.latest_update === null ? '-' : response.data.data.latest_update,
notes: response.data.data.notes_update === null ? "" : response.data.data.notes_update
})
} else {
this.setState({ alert: true, messageAlert: response.data.message, tipeAlert: 'warning', loading: false }, () => {
......
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