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