Commit b6e614f1 authored by Rifka Kurnia Irfiana's avatar Rifka Kurnia Irfiana

Merge branch 'master' of http://103.44.149.204/d.arizona/tia-dev into rifka

parents a8ceac6f 48e3f306
...@@ -73,7 +73,7 @@ export default class ProfitLoss extends Component { ...@@ -73,7 +73,7 @@ export default class ProfitLoss extends Component {
item.formula, item.formula,
item.level, item.level,
item.description, item.description,
item.profit_loss.notes, item.profit_loss.notes === "" ? null : item.profit_loss.notes,
item.profit_loss.total_actual_before, item.profit_loss.total_actual_before,
item.profit_loss.january, item.profit_loss.january,
item.profit_loss.february, item.profit_loss.february,
...@@ -101,7 +101,7 @@ export default class ProfitLoss extends Component { ...@@ -101,7 +101,7 @@ export default class ProfitLoss extends Component {
i.formula, i.formula,
i.level, i.level,
i.description, i.description,
i.profit_loss.notes, i.profit_loss.notes === "" ? null : item.profit_loss.notes,
i.profit_loss.total_actual_before, i.profit_loss.total_actual_before,
i.profit_loss.january, i.profit_loss.january,
i.profit_loss.february, i.profit_loss.february,
...@@ -128,7 +128,7 @@ export default class ProfitLoss extends Component { ...@@ -128,7 +128,7 @@ export default class ProfitLoss extends Component {
val.formula, val.formula,
val.level, val.level,
val.description, val.description,
val.profit_loss.notes, val.profit_loss.notes === "" ? null : item.profit_loss.notes,
val.profit_loss.total_actual_before, val.profit_loss.total_actual_before,
val.profit_loss.january, val.profit_loss.january,
val.profit_loss.february, val.profit_loss.february,
...@@ -155,7 +155,7 @@ export default class ProfitLoss extends Component { ...@@ -155,7 +155,7 @@ export default class ProfitLoss extends Component {
items.formula, items.formula,
items.level, items.level,
items.description, items.description,
items.profit_loss.notes, items.profit_loss.notes === "" ? null : item.profit_loss.notes,
items.profit_loss.total_actual_before, items.profit_loss.total_actual_before,
items.profit_loss.january, items.profit_loss.january,
items.profit_loss.february, items.profit_loss.february,
...@@ -182,7 +182,7 @@ export default class ProfitLoss extends Component { ...@@ -182,7 +182,7 @@ export default class ProfitLoss extends Component {
itemss.formula, itemss.formula,
itemss.level, itemss.level,
itemss.description, itemss.description,
itemss.profit_loss.notes, itemss.profit_loss.notes === "" ? null : item.profit_loss.notes,
itemss.profit_loss.total_actual_before, itemss.profit_loss.total_actual_before,
itemss.profit_loss.january, itemss.profit_loss.january,
itemss.profit_loss.february, itemss.profit_loss.february,
...@@ -209,7 +209,7 @@ export default class ProfitLoss extends Component { ...@@ -209,7 +209,7 @@ export default class ProfitLoss extends Component {
item1.formula, item1.formula,
item1.level, item1.level,
item1.description, item1.description,
item1.profit_loss.notes, item1.profit_loss.notes === "" ? null : item.profit_loss.notes,
item1.profit_loss.total_actual_before, item1.profit_loss.total_actual_before,
item1.profit_loss.january, item1.profit_loss.january,
item1.profit_loss.february, item1.profit_loss.february,
...@@ -236,7 +236,7 @@ export default class ProfitLoss extends Component { ...@@ -236,7 +236,7 @@ export default class ProfitLoss extends Component {
item2.formula, item2.formula,
item2.level, item2.level,
item2.description, item2.description,
item2.profit_loss.notes, item2.profit_loss.notes === "" ? null : item.profit_loss.notes,
item2.profit_loss.total_actual_before, item2.profit_loss.total_actual_before,
item2.profit_loss.january, item2.profit_loss.january,
item2.profit_loss.february, item2.profit_loss.february,
...@@ -263,7 +263,7 @@ export default class ProfitLoss extends Component { ...@@ -263,7 +263,7 @@ export default class ProfitLoss extends Component {
item3.formula, item3.formula,
item3.level, item3.level,
item3.description, item3.description,
item3.profit_loss.notes, item3.profit_loss.notes === "" ? null : item.profit_loss.notes,
item3.profit_loss.total_actual_before, item3.profit_loss.total_actual_before,
item3.profit_loss.january, item3.profit_loss.january,
item3.profit_loss.february, item3.profit_loss.february,
...@@ -290,7 +290,7 @@ export default class ProfitLoss extends Component { ...@@ -290,7 +290,7 @@ export default class ProfitLoss extends Component {
item4.formula, item4.formula,
item4.level, item4.level,
item4.description, item4.description,
item4.profit_loss.notes, item4.profit_loss.notes === "" ? null : item.profit_loss.notes,
item4.profit_loss.total_actual_before, item4.profit_loss.total_actual_before,
item4.profit_loss.january, item4.profit_loss.january,
item4.profit_loss.february, item4.profit_loss.february,
...@@ -317,7 +317,7 @@ export default class ProfitLoss extends Component { ...@@ -317,7 +317,7 @@ export default class ProfitLoss extends Component {
item5.formula, item5.formula,
item5.level, item5.level,
item5.description, item5.description,
item5.profit_loss.notes, item5.profit_loss.notes === "" ? null : item.profit_loss.notes,
item5.profit_loss.total_actual_before, item5.profit_loss.total_actual_before,
item5.profit_loss.january, item5.profit_loss.january,
item5.profit_loss.february, item5.profit_loss.february,
...@@ -344,7 +344,7 @@ export default class ProfitLoss extends Component { ...@@ -344,7 +344,7 @@ export default class ProfitLoss extends Component {
item6.formula, item6.formula,
item6.level, item6.level,
item6.description, item6.description,
item6.profit_loss.notes, item6.profit_loss.notes === "" ? null : item.profit_loss.notes,
item6.profit_loss.total_actual_before, item6.profit_loss.total_actual_before,
item6.profit_loss.january, item6.profit_loss.january,
item6.profit_loss.february, item6.profit_loss.february,
...@@ -370,7 +370,7 @@ export default class ProfitLoss extends Component { ...@@ -370,7 +370,7 @@ export default class ProfitLoss extends Component {
item6.formula, item6.formula,
item6.level, item6.level,
item6.description, item6.description,
item6.profit_loss.notes, item6.profit_loss.notes === "" ? null : item.profit_loss.notes,
item6.profit_loss.total_actual_before, item6.profit_loss.total_actual_before,
item6.profit_loss.january, item6.profit_loss.january,
item6.profit_loss.february, item6.profit_loss.february,
...@@ -398,7 +398,7 @@ export default class ProfitLoss extends Component { ...@@ -398,7 +398,7 @@ export default class ProfitLoss extends Component {
item5.formula, item5.formula,
item5.level, item5.level,
item5.description, item5.description,
item5.profit_loss.notes, item5.profit_loss.notes === "" ? null : item.profit_loss.notes,
item5.profit_loss.total_actual_before, item5.profit_loss.total_actual_before,
item5.profit_loss.january, item5.profit_loss.january,
item5.profit_loss.february, item5.profit_loss.february,
...@@ -426,7 +426,7 @@ export default class ProfitLoss extends Component { ...@@ -426,7 +426,7 @@ export default class ProfitLoss extends Component {
item4.formula, item4.formula,
item4.level, item4.level,
item4.description, item4.description,
item4.profit_loss.notes, item4.profit_loss.notes === "" ? null : item.profit_loss.notes,
item4.profit_loss.total_actual_before, item4.profit_loss.total_actual_before,
item4.profit_loss.january, item4.profit_loss.january,
item4.profit_loss.february, item4.profit_loss.february,
...@@ -454,7 +454,7 @@ export default class ProfitLoss extends Component { ...@@ -454,7 +454,7 @@ export default class ProfitLoss extends Component {
item3.formula, item3.formula,
item3.level, item3.level,
item3.description, item3.description,
item3.profit_loss.notes, item3.profit_loss.notes === "" ? null : item.profit_loss.notes,
item3.profit_loss.total_actual_before, item3.profit_loss.total_actual_before,
item3.profit_loss.january, item3.profit_loss.january,
item3.profit_loss.february, item3.profit_loss.february,
...@@ -482,7 +482,7 @@ export default class ProfitLoss extends Component { ...@@ -482,7 +482,7 @@ export default class ProfitLoss extends Component {
item2.formula, item2.formula,
item2.level, item2.level,
item2.description, item2.description,
item2.profit_loss.notes, item2.profit_loss.notes === "" ? null : item.profit_loss.notes,
item2.profit_loss.total_actual_before, item2.profit_loss.total_actual_before,
item2.profit_loss.january, item2.profit_loss.january,
item2.profit_loss.february, item2.profit_loss.february,
...@@ -510,7 +510,7 @@ export default class ProfitLoss extends Component { ...@@ -510,7 +510,7 @@ export default class ProfitLoss extends Component {
item1.formula, item1.formula,
item1.level, item1.level,
item1.description, item1.description,
item1.profit_loss.notes, item1.profit_loss.notes === "" ? null : item.profit_loss.notes,
item1.profit_loss.total_actual_before, item1.profit_loss.total_actual_before,
item1.profit_loss.january, item1.profit_loss.january,
item1.profit_loss.february, item1.profit_loss.february,
...@@ -538,7 +538,7 @@ export default class ProfitLoss extends Component { ...@@ -538,7 +538,7 @@ export default class ProfitLoss extends Component {
itemss.formula, itemss.formula,
itemss.level, itemss.level,
itemss.description, itemss.description,
itemss.profit_loss.notes, itemss.profit_loss.notes === "" ? null : item.profit_loss.notes,
itemss.profit_loss.total_actual_before, itemss.profit_loss.total_actual_before,
itemss.profit_loss.january, itemss.profit_loss.january,
itemss.profit_loss.february, itemss.profit_loss.february,
...@@ -566,7 +566,7 @@ export default class ProfitLoss extends Component { ...@@ -566,7 +566,7 @@ export default class ProfitLoss extends Component {
items.formula, items.formula,
items.level, items.level,
items.description, items.description,
items.profit_loss.notes, items.profit_loss.notes === "" ? null : item.profit_loss.notes,
items.profit_loss.total_actual_before, items.profit_loss.total_actual_before,
items.profit_loss.january, items.profit_loss.january,
items.profit_loss.february, items.profit_loss.february,
...@@ -594,7 +594,7 @@ export default class ProfitLoss extends Component { ...@@ -594,7 +594,7 @@ export default class ProfitLoss extends Component {
val.formula, val.formula,
val.level, val.level,
val.description, val.description,
val.profit_loss.notes, val.profit_loss.notes === "" ? null : item.profit_loss.notes,
val.profit_loss.total_actual_before, val.profit_loss.total_actual_before,
val.profit_loss.january, val.profit_loss.january,
val.profit_loss.february, val.profit_loss.february,
...@@ -622,7 +622,7 @@ export default class ProfitLoss extends Component { ...@@ -622,7 +622,7 @@ export default class ProfitLoss extends Component {
i.formula, i.formula,
i.level, i.level,
i.description, i.description,
i.profit_loss.notes, i.profit_loss.notes === "" ? null : item.profit_loss.notes,
i.profit_loss.total_actual_before, i.profit_loss.total_actual_before,
i.profit_loss.january, i.profit_loss.january,
i.profit_loss.february, i.profit_loss.february,
...@@ -649,7 +649,7 @@ export default class ProfitLoss extends Component { ...@@ -649,7 +649,7 @@ export default class ProfitLoss extends Component {
i.formula, i.formula,
i.level, i.level,
i.description, i.description,
i.profit_loss.notes, i.profit_loss.notes === "" ? null : item.profit_loss.notes,
i.profit_loss.total_actual_before, i.profit_loss.total_actual_before,
i.profit_loss.january, i.profit_loss.january,
i.profit_loss.february, i.profit_loss.february,
...@@ -677,7 +677,7 @@ export default class ProfitLoss extends Component { ...@@ -677,7 +677,7 @@ export default class ProfitLoss extends Component {
item.formula, item.formula,
item.level, item.level,
item.description, item.description,
item.profit_loss.notes, item.profit_loss.notes === "" ? null : item.profit_loss.notes,
item.profit_loss.total_actual_before, item.profit_loss.total_actual_before,
item.profit_loss.january, item.profit_loss.january,
item.profit_loss.february, item.profit_loss.february,
...@@ -698,7 +698,7 @@ export default class ProfitLoss extends Component { ...@@ -698,7 +698,7 @@ export default class ProfitLoss extends Component {
} }
}) })
// console.log(dataTable); // console.log(dataTable);
this.setState({ dataTable, loading: false }) this.setState({ loading: false, dataTable })
} }
} else { } else {
this.setState({ loading: false }) this.setState({ loading: false })
...@@ -794,14 +794,11 @@ export default class ProfitLoss extends Component { ...@@ -794,14 +794,11 @@ export default class ProfitLoss extends Component {
} }
const handleNotes = (value, tableMeta) => { const handleNotes = (value, tableMeta) => {
let indexParent = dataTable2.findIndex((val) => val[1] == dataTable2[tableMeta.rowIndex][2]) console.log(value)
if (indexParent > 0) {
// console.log(indexParent)
let a = dataTable2[tableMeta.rowIndex][tableMeta.columnIndex] = value let a = dataTable2[tableMeta.rowIndex][tableMeta.columnIndex] = value
} else { console.log(dataTable2[tableMeta.rowIndex]);
dataTable2[tableMeta.rowIndex][tableMeta.columnIndex] = value
}
} }
const handleValue = (data) => { const handleValue = (data) => {
let total = 0 let total = 0
dataTable2.map((item, index) => { dataTable2.map((item, index) => {
...@@ -875,7 +872,7 @@ export default class ProfitLoss extends Component { ...@@ -875,7 +872,7 @@ export default class ProfitLoss extends Component {
return ( return (
<div style={{ textAlign: 'right' }}> <div style={{ textAlign: 'right' }}>
<div style={{ flex: 1 }}> <div style={{ flex: 1 }}>
{tableMeta.rowData[4] !== 0 || tableMeta.rowData[4] !== 1 ? {tableMeta.rowData[4] === 0 ? null : tableMeta.rowData[4] === 1 ? null :
<FormControlLabel <FormControlLabel
style={{ margin: 0 }} style={{ margin: 0 }}
value={value} value={value}
...@@ -893,7 +890,7 @@ export default class ProfitLoss extends Component { ...@@ -893,7 +890,7 @@ export default class ProfitLoss extends Component {
}} }}
/> />
} }
/> : null} />}
</div> </div>
</div> </div>
) )
...@@ -2210,7 +2207,7 @@ export default class ProfitLoss extends Component { ...@@ -2210,7 +2207,7 @@ export default class ProfitLoss extends Component {
</div> </div>
</Paper> </Paper>
</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