Commit e4ddee60 authored by idlanirined's avatar idlanirined

isu tombol revisi

parent 515ecd0b
......@@ -108,6 +108,7 @@ export default class BudgetTahunan extends Component {
// console.log(response);
if (response.data) {
if (response.data.status === 'success') {
if (response.data.data.length > 0) {
let data = response.data.data
let companyData = data.map((item) => {
return {
......@@ -129,6 +130,9 @@ export default class BudgetTahunan extends Component {
}
//
})
} else {
this.setState({ listRevision: null, revision: null, dataTable: [], checkApprover: false, lastRevision: "", visibleTableHistory: false, loading: false })
}
} else {
this.setState({ alert: true, messageAlert: response.data.message, tipeAlert: 'warning' }, () => {
if (response.data.message.includes("Someone Logged In")) {
......@@ -959,7 +963,7 @@ export default class BudgetTahunan extends Component {
<Autocomplete
{...this.state.listCompany}
id="company"
disabled={this.state.intent === 'Home' ? true : false}
disabled={this.state.listCompany === null ? true : this.state.intent === 'Home' ? true : false}
onChange={(event, newInputValue) => this.setState({ company: newInputValue }, () => {
this.setState({ visibleTableHistory: false })
this.getRevision()
......@@ -1135,13 +1139,15 @@ export default class BudgetTahunan extends Component {
</button>
</div> : (this.state.lastStatus === 'WAITING FOR YOUR APPROVAL' && this.state.btnApprove) ?
<div className="grid grid-2x" style={{ borderTop: 'solid 1px #c4c4c4', padding: 10, backgroundColor: '#f5f5f5', width: '100%', }}>
<div className="col-1">
<div className="col-1" />
<div className="col-2" style={{ display: 'flex', justifyContent: 'flex-end', maxWidth: '100%' }}>
<button
style={{
backgroundColor: 'transparent',
cursor: 'pointer',
borderColor: 'transparent',
outline: 'none',
marginRight: 20
}}
onClick={() => this.setState({ visibleRevision: true })}
>
......@@ -1149,8 +1155,6 @@ export default class BudgetTahunan extends Component {
<Typography style={{ fontSize: '11px', color: '#fff', textAlign: 'center' }}>Revision</Typography>
</div>
</button>
</div>
<div className="col-2" style={{ display: 'flex', justifyContent: 'flex-end', maxWidth: '100%' }}>
<button
style={{
backgroundColor: 'transparent',
......@@ -1204,9 +1208,11 @@ export default class BudgetTahunan extends Component {
</div>
</div>
)}
)
}
{this.state.visibleUpload && (
{
this.state.visibleUpload && (
<div className="test app-popup-show">
<div className="popup-content background-white border-radius" style={{ borderRadius: 8 }}>
<div className="popup-panel grid grid-2x main-color" style={{ height: 64, borderTopRightRadius: 8, borderTopLeftRadius: 8 }}>
......@@ -1238,9 +1244,11 @@ export default class BudgetTahunan extends Component {
/>
</div>
</div>
)}
)
}
{this.state.visibleBS && (
{
this.state.visibleBS && (
<BalanceSheet
open={this.props.open}
report_id={this.state.report_id}
......@@ -1258,8 +1266,10 @@ export default class BudgetTahunan extends Component {
prevRevision={this.state.isSubmit ? this.state.prevRevision : true}
status={this.state.status}
/>
)}
{this.state.visiblePL && (
)
}
{
this.state.visiblePL && (
<ProfitLoss
open={this.props.open}
report_id={this.state.report_id}
......@@ -1277,8 +1287,10 @@ export default class BudgetTahunan extends Component {
lastStatus={this.state.lastStatus}
prevRevision={this.state.isSubmit ? this.state.prevRevision : true}
/>
)}
{this.state.visibleTP && (
)
}
{
this.state.visibleTP && (
<TaxPlanning
open={this.props.open}
report_id={this.state.report_id}
......@@ -1296,8 +1308,10 @@ export default class BudgetTahunan extends Component {
lastStatus={this.state.lastStatus}
prevRevision={this.state.isSubmit ? this.state.prevRevision : true}
/>
)}
{this.state.visibleFAM && (
)
}
{
this.state.visibleFAM && (
<FixedAssetsMovement
open={this.props.open}
report_id={this.state.report_id}
......@@ -1315,8 +1329,10 @@ export default class BudgetTahunan extends Component {
lastStatus={this.state.lastStatus}
prevRevision={this.state.isSubmit ? this.state.prevRevision : true}
/>
)}
{this.state.visibleCAT && (
)
}
{
this.state.visibleCAT && (
<CorporateAnnualTarget
open={this.props.open}
report_id={this.state.report_id}
......@@ -1334,8 +1350,10 @@ export default class BudgetTahunan extends Component {
lastStatus={this.state.lastStatus}
prevRevision={this.state.isSubmit ? this.state.prevRevision : true}
/>
)}
{this.state.visibleCF && (
)
}
{
this.state.visibleCF && (
<CashFlow
open={this.props.open}
report_id={this.state.report_id}
......@@ -1353,9 +1371,11 @@ export default class BudgetTahunan extends Component {
lastStatus={this.state.lastStatus}
prevRevision={this.state.isSubmit ? this.state.prevRevision : true}
/>
)}
)
}
{this.state.visibleRevision && (
{
this.state.visibleRevision && (
<div className="test app-popup-show">
<div className="popup-content background-white border-radius" style={{ borderRadius: 8 }}>
<div className="popup-panel grid grid-2x main-color" style={{ height: 64, borderTopRightRadius: 8, borderTopLeftRadius: 8 }}>
......@@ -1469,7 +1489,8 @@ export default class BudgetTahunan extends Component {
</div>
</div>
</div>
)}
)
}
</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