Commit f2517ad2 authored by Dida Adams Arizona's avatar Dida Adams Arizona

Merge branch 'didam' into 'master'

Didam

See merge request !513
parents a4e6165c 025bc64e
...@@ -334,7 +334,7 @@ export default class CorporateAnnualTarget extends Component { ...@@ -334,7 +334,7 @@ export default class CorporateAnnualTarget extends Component {
return [ return [
item.type_report_id, item.type_report_id,
item.item_report_id, item.item_report_id,
item.parent, item.parent == null && item.item_report_id == null? (response.data.data[index -1].item.parent == null? response.data.data[index -1].item.item_report_id : response.data.data[index -1].item.parent) : item.parent,
item.formula, item.formula,
item.level == null ? 1 : item.level, item.level == null ? 1 : item.level,
"", "",
...@@ -488,6 +488,13 @@ export default class CorporateAnnualTarget extends Component { ...@@ -488,6 +488,13 @@ export default class CorporateAnnualTarget extends Component {
} }
} }
if (i[0] == null && i[2] == null) {
if (i[6] == "" || i[7] == "" || i[9] == null || i[10] == null || i[11] == null) {
handleKosongKPIMAXYTD = true
// console.log(handleKosongKPIMAXYTD)
}
}
if (i[2] !== null) { if (i[2] !== null) {
let indexID = dataTampung.findIndex((val) => val.id == i[2]) let indexID = dataTampung.findIndex((val) => val.id == i[2])
if (indexID !== -1) { if (indexID !== -1) {
...@@ -511,7 +518,7 @@ export default class CorporateAnnualTarget extends Component { ...@@ -511,7 +518,7 @@ export default class CorporateAnnualTarget extends Component {
} }
data.push({ data.push({
"item_report_id": i[1] == "" ? null : i[1], "item_report_id": i[1] == "" || i[1] == null? 0 : i[1],
"item_name": String(i[6]), "item_name": String(i[6]),
"parent": i[2] == "" ? null : i[2], "parent": i[2] == "" ? null : i[2],
"weight": weightReal == null ? String(i[7]) : weightReal, "weight": weightReal == null ? String(i[7]) : weightReal,
...@@ -578,7 +585,7 @@ export default class CorporateAnnualTarget extends Component { ...@@ -578,7 +585,7 @@ export default class CorporateAnnualTarget extends Component {
this.state.dataTable.map(i => { this.state.dataTable.map(i => {
// // console.log(i[9] == null? "" : i[9].value) // // console.log(i[9] == null? "" : i[9].value)
data.push({ data.push({
"item_report_id": i[1] == "" ? null : i[1], "item_report_id": i[1] == "" || i[1] == null? 0 : i[1],
"item_name": String(i[6]), "item_name": String(i[6]),
"parent": i[2] == "" ? null : i[2], "parent": i[2] == "" ? null : i[2],
"weight": String(i[7]), "weight": String(i[7]),
...@@ -865,7 +872,7 @@ export default class CorporateAnnualTarget extends Component { ...@@ -865,7 +872,7 @@ export default class CorporateAnnualTarget extends Component {
return false return false
} }
} else { } else {
if (typeReport == null) { if (typeReport == null || typeReport == 3) {
return true return true
} else if (tableMeta !== undefined && tableMeta.rowData[0] == 1) { } else if (tableMeta !== undefined && tableMeta.rowData[0] == 1) {
let indexID = dataTable2.findIndex((val) => val[2] == tableMeta.rowData[1]) let indexID = dataTable2.findIndex((val) => val[2] == tableMeta.rowData[1])
...@@ -887,9 +894,9 @@ export default class CorporateAnnualTarget extends Component { ...@@ -887,9 +894,9 @@ export default class CorporateAnnualTarget extends Component {
newData.push(item) newData.push(item)
if (index == rowIndex) { if (index == rowIndex) {
newData.push([ newData.push([
3, null,
"", "",
item[2] == null ? item[1] : item[2], item[2] == null || item[2] == ""? (item[1] == null || item[1] ==""? (dataTable2[index-1][2] == null || dataTable2[index-1][2] == ""? dataTable2[index-1][1] : dataTable2[index-1][2]) : item[1]) : item[2],
item[3], item[3],
item[4], item[4],
"", "",
...@@ -1065,7 +1072,7 @@ export default class CorporateAnnualTarget extends Component { ...@@ -1065,7 +1072,7 @@ export default class CorporateAnnualTarget extends Component {
onBlur={(event) => { onBlur={(event) => {
// console.log(event.target.value) // console.log(event.target.value)
handleChangeText(event.target.value, tableMeta) handleChangeText(event.target.value, tableMeta)
// console.log(dataTable2) console.log(dataTable2)
}} }}
/> />
} }
......
...@@ -2366,7 +2366,7 @@ export default class FixedAssetsMovement extends Component { ...@@ -2366,7 +2366,7 @@ export default class FixedAssetsMovement extends Component {
<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.buttonError === true ? 'default' : 'pointer', cursor: this.state.buttonError === true ? 'default' : 'pointer',
......
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