Commit 32de7146 authored by d.arizona's avatar d.arizona

BISMILLAH_FIX_FINAL

parent 550e0882
......@@ -1345,8 +1345,11 @@ export default class BudgetTahunan extends Component {
periode={this.state.periode.periode}
submissionID={this.state.submissionID}
saveToMasterBudget={this.saveToMasterBudget.bind(this)}
onClickClose={() => this.setState({ visibleCF: false, visibleBudgetTahunan: true })}
onClickClose={() => this.setState({ visibleCAT: false, visibleBudgetTahunan: true })}
getReport={this.getSubmission.bind(this)}
isApprover={this.state.isApprover}
status={this.state.status}
lastStatus={this.state.lastStatus}
prevRevision={this.state.isSubmit ? this.state.prevRevision : true}
/>
)}
......
This diff is collapsed.
......@@ -916,27 +916,36 @@ export default class CorporateAnnualTarget extends Component {
}
const handleAction = (idParent, typeReport, tableMeta) => {
if (idParent !== null) {
let indexsss = dataTable2.findIndex((val) => val[1] == idParent)
if (dataTable2[indexsss][6] == 'CUSTOMER PERSPECTIVE' || dataTable2[indexsss][6] == 'INTERNAL BUSINESS PROCESS PERSPECTIVE') {
return true
} else {
return false
}
if (this.props.isApprover) {
return false
} else {
if (typeReport == null || typeReport == 3) {
return true
} else if (tableMeta !== undefined && tableMeta.rowData[0] == 1) {
let indexID = dataTable2.findIndex((val) => val[2] == tableMeta.rowData[1])
if (indexID !== -1) {
return false
if ((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')) {
if (idParent !== null) {
let indexsss = dataTable2.findIndex((val) => val[1] == idParent)
if (dataTable2[indexsss][6] == 'CUSTOMER PERSPECTIVE' || dataTable2[indexsss][6] == 'INTERNAL BUSINESS PROCESS PERSPECTIVE') {
return true
} else {
return false
}
} else {
return true
if (typeReport == null || typeReport == 3) {
return true
} else if (tableMeta !== undefined && tableMeta.rowData[0] == 1) {
let indexID = dataTable2.findIndex((val) => val[2] == tableMeta.rowData[1])
if (indexID !== -1) {
return false
} else {
return true
}
} else {
return false
}
}
} else {
return false
}
}
}
const handleTambah = (data, rowIndex) => {
......@@ -1048,7 +1057,7 @@ export default class CorporateAnnualTarget extends Component {
name: "",
options: {
filter: false,
display: this.props.isApprover ? false : true,
display: this.props.isApprover ? false : ((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') ? true : false),
customHeadRender: (columnMeta) => (
<TableCell key={columnMeta.index} style={{ ...style, top: 0, zIndex: 102, backgroundColor: '#dbdbdb' }}>
<Typography style={{ color: 'white', fontSize: 12, fontWeight: 'bold', textAlign: 'left' }}>{columnMeta.name}</Typography>
......@@ -1112,7 +1121,7 @@ export default class CorporateAnnualTarget extends Component {
return (
tableMeta.rowData[1] == "" ?
<div style={{ textAlign: 'left', paddingLeft: 20 * Number(tableMeta.rowData[4]) }}>
<FormControlLabel
{!this.state.loading && <FormControlLabel
style={{ margin: 0 }}
control={
<Input
......@@ -1129,7 +1138,7 @@ export default class CorporateAnnualTarget extends Component {
}}
/>
}
/>
/>}
</div>
:
<div style={{ width: 300 }}>
......@@ -1426,9 +1435,10 @@ export default class CorporateAnnualTarget extends Component {
</TableCell>
),
customBodyRender: (value, tableMeta) => {
// console.log(tableMeta.rowData[0])
return (
<div style={{ width: 96 }}>
{tableMeta.rowData[0] === 1 || tableMeta.rowData[0] === 2 || tableMeta.rowData[0] === 4 ?
{tableMeta.rowData[0] === 1 || tableMeta.rowData[0] === 2|| tableMeta.rowData[0] === 4 ?
null
:
<div style={{ flex: 1 }}>
......@@ -1447,7 +1457,7 @@ export default class CorporateAnnualTarget extends Component {
onBlur={(event) => {
// updateValue(event.target.value)
handleChange(event.target.value, tableMeta)
// console.log(dataTable2)
// console.log(tableMeta.rowData[0])
}}
/>
}
......
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