Commit 6255b4f5 authored by Riri Novita's avatar Riri Novita

Fixing Issue FAM

parent 4f35da02
...@@ -321,10 +321,8 @@ export default class BudgetTahunan extends Component { ...@@ -321,10 +321,8 @@ export default class BudgetTahunan extends Component {
let indexC = String(item.current_status).toLocaleUpperCase().indexOf('C') let indexC = String(item.current_status).toLocaleUpperCase().indexOf('C')
let status_approv = '' let status_approv = ''
if (String(item.current_status).toLocaleUpperCase().includes('CC')) { if (String(item.current_status).toLocaleUpperCase().includes('CC')) {
console.log("tes 1");
status_approv = `${String(item.current_status).substr(0, indexC)}${String(item.current_status).substr(indexC + 1, String(item.current_status).length)}` status_approv = `${String(item.current_status).substr(0, indexC)}${String(item.current_status).substr(indexC + 1, String(item.current_status).length)}`
} else { } else {
console.log("tes 2");
status_approv = String(item.current_status) status_approv = String(item.current_status)
} }
const handleOpbal = (item) => { const handleOpbal = (item) => {
...@@ -336,9 +334,9 @@ export default class BudgetTahunan extends Component { ...@@ -336,9 +334,9 @@ export default class BudgetTahunan extends Component {
} }
return isUpload return isUpload
} }
console.log(this.state.lastStatus); // console.log(this.state.lastStatus);
console.log(this.state.isSubmit); // console.log(this.state.isSubmit);
console.log(status_approv); // console.log(status_approv);
return [ return [
item.number, item.number,
item.report_name === 'CAT' ? 'Corporate Annual Target' : item.report_name, item.report_name === 'CAT' ? 'Corporate Annual Target' : item.report_name,
...@@ -681,9 +679,9 @@ export default class BudgetTahunan extends Component { ...@@ -681,9 +679,9 @@ export default class BudgetTahunan extends Component {
} }
// this.getFR(type) // this.getFR(type)
api.create().checkApprover().then(response => { api.create().checkApprover().then(response => {
console.log(this.state.btnedit) // console.log(this.state.btnedit)
console.log(this.state.btncreate); // console.log(this.state.btncreate);
console.log(response); // console.log(response);
if (this.state.btncreate === true && this.state.btnedit === true) { if (this.state.btncreate === true && this.state.btnedit === true) {
this.setState({ isApprover: false }, () => { this.setState({ isApprover: false }, () => {
if (response.data.data.is_approver === true) { if (response.data.data.is_approver === true) {
......
...@@ -233,6 +233,7 @@ export default class FixedAssetsMovement extends Component { ...@@ -233,6 +233,7 @@ export default class FixedAssetsMovement extends Component {
} }
backToMasterBudget(type) { backToMasterBudget(type) {
console.log("masuk sini");
let data = [] let data = []
this.state.dataTable.map(i => { this.state.dataTable.map(i => {
data.push({ data.push({
...@@ -408,6 +409,7 @@ export default class FixedAssetsMovement extends Component { ...@@ -408,6 +409,7 @@ export default class FixedAssetsMovement extends Component {
} }
uploadFAM(type) { uploadFAM(type) {
console.log("masuk ga?");
let data = [] let data = []
this.state.dataTable.map(i => { this.state.dataTable.map(i => {
data.push({ data.push({
...@@ -2906,25 +2908,29 @@ export default class FixedAssetsMovement extends Component { ...@@ -2906,25 +2908,29 @@ export default class FixedAssetsMovement extends Component {
<Typography style={{ fontSize: '11px', color: '#354960', textAlign: 'center' }}>Calculate</Typography> <Typography style={{ fontSize: '11px', color: '#354960', textAlign: 'center' }}>Calculate</Typography>
</div> </div>
</button> </button>
<button <button
className="button" className="button"
type="button" type="button"
disabled={this.state.buttonError} // disabled={this.state.buttonError}
style={{ style={{
backgroundColor: 'transparent', backgroundColor: 'transparent',
cursor: this.state.editable === true ? 'default' : 'pointer', // cursor: this.state.editable === true ? 'default' : 'pointer',
cursor: this.state.editable !== true ? 'pointer' : 'default',
borderColor: 'transparent', borderColor: 'transparent',
outline: 'none', outline: 'none',
marginRight: 20 marginRight: 20
}} }}
onClick={() => this.state.editable === true ? onClick={() =>
null : this.setState({ loading: true }, () => this.state.editable === true ?
this.state.handleDoubleClick == 1 ? null : null : this.setState({ loading: true }, () =>
this.setState({ handleDoubleClick: 1 }, () => { this.state.handleDoubleClick == 1 ? null :
setTimeout(() => { this.setState({ handleDoubleClick: 1 }, () => {
this.uploadFAM('draft') setTimeout(() => {
}, 100); this.uploadFAM('draft')
}))} }, 100);
}))
}
> >
<div style={{ backgroundColor: '#354960', width: 105, height: 25, borderRadius: 3, justifyContent: 'center', display: 'flex', alignItems: 'center' }}> <div style={{ backgroundColor: '#354960', width: 105, height: 25, borderRadius: 3, justifyContent: 'center', display: 'flex', alignItems: 'center' }}>
<Typography style={{ fontSize: '11px', color: '#fff', textAlign: 'center' }}>Save as Draft</Typography> <Typography style={{ fontSize: '11px', color: '#fff', textAlign: 'center' }}>Save as Draft</Typography>
......
...@@ -252,7 +252,6 @@ export default class ProfitLoss extends Component { ...@@ -252,7 +252,6 @@ export default class ProfitLoss extends Component {
backToMasterBudget(type) { backToMasterBudget(type) {
// tambahin currency // tambahin currency
console.log("tes");
let data = [] let data = []
this.state.dataTable.map(i => { this.state.dataTable.map(i => {
data.push({ data.push({
...@@ -3229,7 +3228,7 @@ export default class ProfitLoss extends Component { ...@@ -3229,7 +3228,7 @@ export default class ProfitLoss extends Component {
/> />
</div> </div>
</div> </div>
<div style={{ padding: '15px 30px 55px' }}> <div style={{ padding: '10px 30px' }}>
<UploadFile <UploadFile
type={this.state.uploadStatus} type={this.state.uploadStatus}
percentage={this.state.percentage} percentage={this.state.percentage}
......
...@@ -9086,8 +9086,8 @@ export default class TaxPlanning extends Component { ...@@ -9086,8 +9086,8 @@ export default class TaxPlanning extends Component {
</div> </div>
</button> </button>
</div> </div>
{/* {this.props.isApprover === true || this.state.dataTable.length == 0 ? null : {this.props.isApprover === true || this.state.dataTable.length == 0 ? null :
(!this.props.truelyApprover) && (this.props.lastStatus === 'SUBMIT' || this.props.lastStatus === 'REVISION') && this.props.prevRevision === false && (this.props.status === 'revision' || this.props.status === 'not-yet' || this.props.status === 'draft' || this.props.status === 'submitted') ? */} (!this.props.truelyApprover) && (this.props.lastStatus === 'SUBMIT' || this.props.lastStatus === 'REVISION') && this.props.prevRevision === false && (this.props.status === 'revision' || this.props.status === 'not-yet' || this.props.status === 'draft' || this.props.status === 'submitted') ?
<div className="col-2" style={{ display: 'flex', justifyContent: 'flex-end', maxWidth: '100%' }}> <div className="col-2" style={{ display: 'flex', justifyContent: 'flex-end', maxWidth: '100%' }}>
<button <button
className="button" className="button"
...@@ -9161,8 +9161,8 @@ export default class TaxPlanning extends Component { ...@@ -9161,8 +9161,8 @@ export default class TaxPlanning extends Component {
</div> </div>
</button> </button>
</div> </div>
{/* : null : null
} */} }
</div> </div>
</Paper> </Paper>
: :
......
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