Commit b684c83c authored by Riri Novita's avatar Riri Novita

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

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