Commit ac9047de authored by Riri Novita's avatar Riri Novita

Fixing Issue MB

parent 744102c0
...@@ -3457,7 +3457,11 @@ export default class BalanceSheet extends Component { ...@@ -3457,7 +3457,11 @@ export default class BalanceSheet extends Component {
<div> <div>
<Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>{this.props.company.company_name}</Typography> <Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>{this.props.company.company_name}</Typography>
<Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>Period : {this.props.periode} (rev.{this.props.revision})</Typography> <Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>Period : {this.props.periode} (rev.{this.props.revision})</Typography>
{this.props.defaultCurrency.id === 1 ?
<Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>in IDR mn</Typography> <Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>in IDR mn</Typography>
:
<Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>in USD thousand</Typography>
}
</div> </div>
<div style={{ width: '50%' }}> <div style={{ width: '50%' }}>
{this.state.dataTable.length == 0 ? null : this.props.isApprover == true ? {this.state.dataTable.length == 0 ? null : this.props.isApprover == true ?
...@@ -3671,7 +3675,11 @@ export default class BalanceSheet extends Component { ...@@ -3671,7 +3675,11 @@ export default class BalanceSheet extends Component {
<div> <div>
<Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>{this.props.company.company_name}</Typography> <Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>{this.props.company.company_name}</Typography>
<Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>Period : {this.props.periode}</Typography> <Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>Period : {this.props.periode}</Typography>
{this.props.defaultCurrency.id === 1 ?
<Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>in IDR mn</Typography> <Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>in IDR mn</Typography>
:
<Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>in USD thousand</Typography>
}
</div> </div>
{this.state.dataLoaded && ( {this.state.dataLoaded && (
<div style={{ marginTop: 20, width: this.props.width - (this.props.open === true ? 400 : 150) }}> <div style={{ marginTop: 20, width: this.props.width - (this.props.open === true ? 400 : 150) }}>
......
...@@ -360,7 +360,7 @@ export default class BudgetTahunan extends Component { ...@@ -360,7 +360,7 @@ export default class BudgetTahunan extends Component {
} }
}) })
// // // console.log(dataTableRevision); // // // console.log(dataTableRevision);
this.setState({ dataTable, dataTableRevision: dataTableRevision.sort((a, b) => a.number - b.number), dataForRevision: response.data.data }, () => { this.setState({ loading: false, dataTable, dataTableRevision: dataTableRevision.sort((a, b) => a.number - b.number), dataForRevision: response.data.data }, () => {
document.body.style.overflow = 'unset'; document.body.style.overflow = 'unset';
}) })
} }
...@@ -627,6 +627,11 @@ export default class BudgetTahunan extends Component { ...@@ -627,6 +627,11 @@ export default class BudgetTahunan extends Component {
console.log(response) console.log(response)
if (response.data) { if (response.data) {
if (response.data.status === "success") { if (response.data.status === "success") {
if (type === "CAT") {
this.setState({ visibleCAT: false, visibleBudgetTahunan: true, loading: false })
} else {
this.setState({ visibleBudgetTahunan: true, loading: false })
}
this.setState({ this.setState({
submissionID: response.data.data.submission_id, submissionID: response.data.data.submission_id,
submitter: response.data.data.submitter, submitter: response.data.data.submitter,
...@@ -634,7 +639,7 @@ export default class BudgetTahunan extends Component { ...@@ -634,7 +639,7 @@ export default class BudgetTahunan extends Component {
lastStatus: response.data.data.last_status === null ? 'SUBMIT' : response.data.data.last_status, lastStatus: response.data.data.last_status === null ? 'SUBMIT' : response.data.data.last_status,
lastRevision: response.data.data.last_revision, lastRevision: response.data.data.last_revision,
btnApprove: response.data.data.is_submit, btnApprove: response.data.data.is_submit,
// loading: false loading: false
}, () => { }, () => {
// // console.log(response.data.data.is_submit); // // console.log(response.data.data.is_submit);
// // console.log(this.state.btnApprove) // // console.log(this.state.btnApprove)
...@@ -2339,15 +2344,16 @@ export default class BudgetTahunan extends Component { ...@@ -2339,15 +2344,16 @@ export default class BudgetTahunan extends Component {
if (response.ok) { if (response.ok) {
if (response.data.status === 'success') { if (response.data.status === 'success') {
if (type === "PL" || "DraftPL") { if (type === "PL" || "DraftPL") {
this.setState({ visiblePL: false, visibleBudgetTahunan: true }) this.setState({ visiblePL: false, visibleBudgetTahunan: true, loading: false })
console.log(this.state.loading);
} else if (type === "TP") { } else if (type === "TP") {
this.setState({ visibleTP: false, visibleBudgetTahunan: true }) this.setState({ visibleTP: false, visibleBudgetTahunan: true,loading: false })
} else if (type === "BS") { } else if (type === "BS") {
this.setState({ visibleBS: false, visibleBudgetTahunan: true }) this.setState({ visibleBS: false, visibleBudgetTahunan: true, loading: false })
} else if (type === "FAM") { } else if (type === "FAM") {
this.setState({ visibleFAM: false, visibleBudgetTahunan: true }) this.setState({ visibleFAM: false, visibleBudgetTahunan: true, loading: false })
} else if (type === "CAT") { } else if (type === "CAT") {
this.setState({ visibleFAM: false, visibleBudgetTahunan: true }) this.setState({ visibleFAM: false, visibleBudgetTahunan: true, loading: false })
} else { } else {
this.setState({ visibleBudgetTahunan: true, loading: false }) this.setState({ visibleBudgetTahunan: true, loading: false })
} }
......
...@@ -3277,7 +3277,11 @@ export default class CashFlow extends Component { ...@@ -3277,7 +3277,11 @@ export default class CashFlow extends Component {
<div> <div>
<Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>{this.props.company.company_name}</Typography> <Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>{this.props.company.company_name}</Typography>
<Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>Period : {this.props.periode} (rev.{this.props.revision})</Typography> <Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>Period : {this.props.periode} (rev.{this.props.revision})</Typography>
{this.props.defaultCurrency.id === 1 ?
<Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>in IDR mn</Typography> <Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>in IDR mn</Typography>
:
<Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>in USD thousand</Typography>
}
</div> </div>
{/* <div style={{ width: '50%' }}> {/* <div style={{ width: '50%' }}>
<div style={{ justifyContent: 'flex-end', display: 'flex', flexFlow: 'wrap' }}> <div style={{ justifyContent: 'flex-end', display: 'flex', flexFlow: 'wrap' }}>
......
...@@ -663,10 +663,11 @@ export default class CorporateAnnualTarget extends Component { ...@@ -663,10 +663,11 @@ export default class CorporateAnnualTarget extends Component {
if (response.ok) { if (response.ok) {
if (response.data.status === "success") { if (response.data.status === "success") {
if (type == 'submitted') { if (type == 'submitted') {
this.props.saveToMasterBudget(body, 'CAT') this.props.getReport(body, 'CAT')
} else { } else {
this.props.saveToMasterBudget(body) this.props.getReport(body)
} }
this.setState({ loading: false})
// this.props.onClickClose() // this.props.onClickClose()
// this.props.getReport() // this.props.getReport()
} else { } else {
...@@ -1362,7 +1363,7 @@ export default class CorporateAnnualTarget extends Component { ...@@ -1362,7 +1363,7 @@ export default class CorporateAnnualTarget extends Component {
// // // console.log(total) // // // console.log(total)
total = R.equals(total, NaN) ? "0.0" : total total = R.equals(total, NaN) ? "0.0" : total
console.log(total); // console.log(total);
// if (dataTable2[tableMeta.rowIndex][6] == "ROIC") { // if (dataTable2[tableMeta.rowIndex][6] == "ROIC") {
// if (dataTable2[tableMeta.rowIndex][tableMeta.columnIndex].value == undefined) { // if (dataTable2[tableMeta.rowIndex][tableMeta.columnIndex].value == undefined) {
// dataTable2[tableMeta.rowIndex][tableMeta.columnIndex] = "0" // dataTable2[tableMeta.rowIndex][tableMeta.columnIndex] = "0"
...@@ -3777,7 +3778,11 @@ export default class CorporateAnnualTarget extends Component { ...@@ -3777,7 +3778,11 @@ export default class CorporateAnnualTarget extends Component {
<div> <div>
<Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>{this.props.company.company_name}</Typography> <Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>{this.props.company.company_name}</Typography>
<Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>Period : {this.props.periode} (rev.{this.props.revision})</Typography> <Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>Period : {this.props.periode} (rev.{this.props.revision})</Typography>
{this.props.defaultCurrency.id === 1 ?
<Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>in IDR mn</Typography> <Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>in IDR mn</Typography>
:
<Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>in USD thousand</Typography>
}
</div> </div>
<div style={{ width: '50%' }}> <div style={{ width: '50%' }}>
{this.state.dataTable.length == 0 ? null : this.props.isApprover == true ? {this.state.dataTable.length == 0 ? null : this.props.isApprover == true ?
...@@ -3983,7 +3988,11 @@ export default class CorporateAnnualTarget extends Component { ...@@ -3983,7 +3988,11 @@ export default class CorporateAnnualTarget extends Component {
<div> <div>
<Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>{this.props.company.company_name}</Typography> <Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>{this.props.company.company_name}</Typography>
<Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>Period : {this.props.periode}</Typography> <Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>Period : {this.props.periode}</Typography>
{this.props.defaultCurrency.id === 1 ?
<Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>in IDR mn</Typography> <Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>in IDR mn</Typography>
:
<Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>in USD thousand</Typography>
}
</div> </div>
{this.state.dataLoaded && ( {this.state.dataLoaded && (
<div style={{ marginTop: 20, width: this.props.width - (this.props.open === true ? 400 : 150) }}> <div style={{ marginTop: 20, width: this.props.width - (this.props.open === true ? 400 : 150) }}>
......
...@@ -2636,7 +2636,11 @@ export default class FixedAssetsMovement extends Component { ...@@ -2636,7 +2636,11 @@ export default class FixedAssetsMovement extends Component {
<div> <div>
<Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>{this.props.company.company_name}</Typography> <Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>{this.props.company.company_name}</Typography>
<Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>Period : {this.props.periode} (rev.{this.props.revision})</Typography> <Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>Period : {this.props.periode} (rev.{this.props.revision})</Typography>
{this.props.defaultCurrency.id === 1 ?
<Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>in IDR mn</Typography> <Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>in IDR mn</Typography>
:
<Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>in USD thousand</Typography>
}
</div> </div>
<div style={{ width: '50%' }}> <div style={{ width: '50%' }}>
{this.state.dataTable.length == 0 ? null : this.props.isApprover == true ? {this.state.dataTable.length == 0 ? null : this.props.isApprover == true ?
...@@ -2852,7 +2856,11 @@ export default class FixedAssetsMovement extends Component { ...@@ -2852,7 +2856,11 @@ export default class FixedAssetsMovement extends Component {
<div> <div>
<Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>{this.props.company.company_name}</Typography> <Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>{this.props.company.company_name}</Typography>
<Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>Period : {this.props.periode}</Typography> <Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>Period : {this.props.periode}</Typography>
{this.props.defaultCurrency.id === 1 ?
<Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>in IDR mn</Typography> <Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>in IDR mn</Typography>
:
<Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>in USD thousand</Typography>
}
</div> </div>
{this.state.dataLoaded && ( {this.state.dataLoaded && (
<div style={{ marginTop: 20, width: this.props.width - (this.props.open === true ? 400 : 150) }}> <div style={{ marginTop: 20, width: this.props.width - (this.props.open === true ? 400 : 150) }}>
......
...@@ -107,6 +107,7 @@ export default class ProfitLoss extends Component { ...@@ -107,6 +107,7 @@ export default class ProfitLoss extends Component {
} }
getItemHierarki() { getItemHierarki() {
console.log(this.props);
this.setState({ loading: true, judulColumn: null }) this.setState({ loading: true, judulColumn: null })
let payload = { let payload = {
"report_id": this.props.report_id, "report_id": this.props.report_id,
...@@ -471,9 +472,9 @@ export default class ProfitLoss extends Component { ...@@ -471,9 +472,9 @@ export default class ProfitLoss extends Component {
} }
} else { } else {
if (response.data.message == "Please Set Up Rate Currency First") { if (response.data.message == "Please Set Up Rate Currency First") {
this.setState({ visibleAlertSave: true}) this.setState({ visibleAlertSave: true })
} 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") || response.data.message.includes("Token Expired")) { if (response.data.message.includes("Someone Logged In") || response.data.message.includes("Token Expired")) {
setTimeout(() => { setTimeout(() => {
localStorage.removeItem(Constant.TOKEN) localStorage.removeItem(Constant.TOKEN)
...@@ -2863,7 +2864,12 @@ export default class ProfitLoss extends Component { ...@@ -2863,7 +2864,12 @@ export default class ProfitLoss extends Component {
<div> <div>
<Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>{this.props.company.company_name}</Typography> <Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>{this.props.company.company_name}</Typography>
<Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>Period : {this.props.periode} (rev.{this.props.revision})</Typography> <Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>Period : {this.props.periode} (rev.{this.props.revision})</Typography>
{this.props.defaultCurrency.id === 1 ?
<Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>in IDR mn</Typography> <Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>in IDR mn</Typography>
:
<Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>in USD thousand</Typography>
}
</div> </div>
<div style={{ width: '50%' }}> <div style={{ width: '50%' }}>
{this.state.dataTable.length == 0 ? null : this.props.isApprover == true ? {this.state.dataTable.length == 0 ? null : this.props.isApprover == true ?
...@@ -3049,7 +3055,7 @@ export default class ProfitLoss extends Component { ...@@ -3049,7 +3055,7 @@ export default class ProfitLoss extends Component {
this.setState({ alert: true, messageAlert: 'Data is not complete !', tipeAlert: 'warning' }) this.setState({ alert: true, messageAlert: 'Data is not complete !', tipeAlert: 'warning' })
: :
this.state.handleDoubleClick == 1 ? null : this.state.handleDoubleClick == 1 ? null :
this.setState({ handleDoubleClick: 1 }, () => { this.setState({ handleDoubleClick: 1, loading: true }, () => {
this.backToMasterBudget('submitted') this.backToMasterBudget('submitted')
})} })}
style={{ style={{
...@@ -3074,7 +3080,11 @@ export default class ProfitLoss extends Component { ...@@ -3074,7 +3080,11 @@ export default class ProfitLoss extends Component {
<div> <div>
<Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>{this.props.company.company_name}</Typography> <Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>{this.props.company.company_name}</Typography>
<Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>Period : {this.props.periode}</Typography> <Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>Period : {this.props.periode}</Typography>
{this.props.defaultCurrency.id === 1 ?
<Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>in IDR mn</Typography> <Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>in IDR mn</Typography>
:
<Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>in USD thousand</Typography>
}
</div> </div>
{this.state.dataLoaded && ( {this.state.dataLoaded && (
<div style={{ marginTop: 20, width: this.props.width - (this.props.open === true ? 400 : 150) }}> <div style={{ marginTop: 20, width: this.props.width - (this.props.open === true ? 400 : 150) }}>
......
...@@ -8962,7 +8962,11 @@ export default class TaxPlanning extends Component { ...@@ -8962,7 +8962,11 @@ export default class TaxPlanning extends Component {
<div> <div>
<Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>{this.props.company.company_name}</Typography> <Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>{this.props.company.company_name}</Typography>
<Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>Period : {this.props.periode} (rev.{this.props.revision})</Typography> <Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>Period : {this.props.periode} (rev.{this.props.revision})</Typography>
{this.props.defaultCurrency.id === 1 ?
<Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>in IDR mn</Typography> <Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>in IDR mn</Typography>
:
<Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>in USD thousand</Typography>
}
</div> </div>
<div style={{ width: '50%' }}> <div style={{ width: '50%' }}>
{this.state.dataTable.length == 0 ? null : this.props.isApprover == true ? {this.state.dataTable.length == 0 ? null : this.props.isApprover == true ?
...@@ -9153,7 +9157,7 @@ export default class TaxPlanning extends Component { ...@@ -9153,7 +9157,7 @@ export default class TaxPlanning extends Component {
this.setState({ alert: true, messageAlert: 'Data is not complete !', tipeAlert: 'warning' }) this.setState({ alert: true, messageAlert: 'Data is not complete !', tipeAlert: 'warning' })
: :
this.state.handleDoubleClick == 1 ? null : this.state.handleDoubleClick == 1 ? null :
this.setState({ handleDoubleClick: 1, loading: true }, () => { this.setState({ handleDoubleClick: 1 }, () => {
setTimeout(() => { setTimeout(() => {
this.backToMasterBudget('submitted') this.backToMasterBudget('submitted')
}, 100); }, 100);
...@@ -9181,7 +9185,11 @@ export default class TaxPlanning extends Component { ...@@ -9181,7 +9185,11 @@ export default class TaxPlanning extends Component {
<div> <div>
<Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>{this.props.company.company_name}</Typography> <Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>{this.props.company.company_name}</Typography>
<Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>Period : {this.props.periode} (rev.{this.props.revision})</Typography> <Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>Period : {this.props.periode} (rev.{this.props.revision})</Typography>
{this.props.defaultCurrency.id === 1 ?
<Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>in IDR mn</Typography> <Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>in IDR mn</Typography>
:
<Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>in USD thousand</Typography>
}
</div> </div>
{this.state.dataLoaded && ( {this.state.dataLoaded && (
<div style={{ marginTop: 20, width: this.props.width - (this.props.open === true ? 400 : 150) }}> <div style={{ marginTop: 20, width: this.props.width - (this.props.open === true ? 400 : 150) }}>
......
...@@ -3426,7 +3426,7 @@ export default class TaxPlanningOLPA extends Component { ...@@ -3426,7 +3426,7 @@ export default class TaxPlanningOLPA extends Component {
this.setState({ alert: true, messageAlert: 'Data Incomplete', tipeAlert: 'error' }) this.setState({ alert: true, messageAlert: 'Data Incomplete', tipeAlert: 'error' })
: :
this.state.handleDoubleClick == 1 ? null : this.state.handleDoubleClick == 1 ? null :
this.setState({ handleDoubleClick: 1, loading: true }, () => { this.setState({ handleDoubleClick: 1 }, () => {
setTimeout(() => { setTimeout(() => {
this.backToMasterBudget('submitted') this.backToMasterBudget('submitted')
}, 100); }, 100);
......
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