Commit ceb3ffc4 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 8323819d 5b90dbfc
...@@ -312,7 +312,7 @@ export default class BudgetTahunan extends Component { ...@@ -312,7 +312,7 @@ export default class BudgetTahunan extends Component {
saveToMasterBudget(data) { saveToMasterBudget(data) {
this.setState({ loading: true }) this.setState({ loading: true })
// console.log(JSON.stringify(data)); // console.log(JSON.stringify(data));
api.create().createSubmitReport(data).then(response => { api.create('UPLOAD').createSubmitReport(data).then(response => {
console.log(response); console.log(response);
if (response.data) { if (response.data) {
if (response.data.status === "success") { if (response.data.status === "success") {
......
...@@ -31,18 +31,7 @@ export default class BalanceSheet extends Component { ...@@ -31,18 +31,7 @@ export default class BalanceSheet extends Component {
constructor(props) { constructor(props) {
super(props) super(props)
this.state = { this.state = {
dataTable: [ dataTable: [],
// ["TOTAL ASSETS", "11,247,249", "10,702,196"],
// ["TOTAL CURRENT ASSETS", "2,647,647", "2,058,898"],
// ["Cash & Cash Equivalent", "1,464,571", "729,743"],
// ["Cash & Bank Balance", "938,707", "265,584"],
// ["Time & Call Deposit", "525,864", "464,159"],
// ["BI Deposit", "", ""],
// ["Marketable Securities", "150,250", "154,500"],
// ["Notes Receivable", "", ""],
// ["Accounts Receivable", "172,031", "97,112"],
// ["Trade Receivables - Third Party", "142,668", "77,480"],
],
visibleBalanceSheet: true, visibleBalanceSheet: true,
disabledSave: true disabledSave: true
} }
...@@ -66,626 +55,80 @@ export default class BalanceSheet extends Component { ...@@ -66,626 +55,80 @@ export default class BalanceSheet extends Component {
} }
api.create().getDetailReportMB(payload).then(response => { api.create().getDetailReportMB(payload).then(response => {
console.log(response); console.log(response);
if (response.data) { let dataTable = []
if (response.data.status === "success") { let res = response.data.data
let dataTable = [] console.log(res)
response.data.data.map((item, index) => { const handlePushChild = (item) => {
let indexIDzz = dataTable.findIndex((val) => val[1] === item.id)
if (item.children && item.children.length > 0) { if (indexIDzz === -1) {
dataTable.push([ dataTable.push([
item.type_report_id, item.type_report_id,
item.id, item.id,
item.parent, item.parent,
item.formula, item.formula,
item.level, item.level,
item.description, item.description,
item.balance_sheet.total_actual_before, item.balance_sheet.total_actual_before,
item.balance_sheet.january, item.balance_sheet.january,
item.balance_sheet.february, item.balance_sheet.february,
item.balance_sheet.march, item.balance_sheet.march,
item.balance_sheet.april, item.balance_sheet.april,
item.balance_sheet.may, item.balance_sheet.may,
item.balance_sheet.june, item.balance_sheet.june,
item.balance_sheet.july, item.balance_sheet.july,
item.balance_sheet.august, item.balance_sheet.august,
item.balance_sheet.september, item.balance_sheet.september,
item.balance_sheet.october, item.balance_sheet.october,
item.balance_sheet.november, item.balance_sheet.november,
item.balance_sheet.december, item.balance_sheet.december,
item.balance_sheet.total_current_year, item.balance_sheet.total_current_year,
item.balance_sheet.total_next_year, item.balance_sheet.total_next_year,
item.balance_sheet.total_more_year item.balance_sheet.total_more_year
]) ])
item.children.map(i => { }
if (i.children) { if (item.children !== null) {
if (i.children.length > 0) { if (item.children.length > 0) {
dataTable.push([ item.children.map((items, indexs) => {
i.type_report_id, handlePushChild(items)
i.id, })
i.parent, }
i.formula,
i.level,
i.description,
i.balance_sheet.total_actual_before,
i.balance_sheet.january,
i.balance_sheet.february,
i.balance_sheet.march,
i.balance_sheet.april,
i.balance_sheet.may,
i.balance_sheet.june,
i.balance_sheet.july,
i.balance_sheet.august,
i.balance_sheet.september,
i.balance_sheet.october,
i.balance_sheet.november,
i.balance_sheet.december,
i.balance_sheet.total_current_year,
i.balance_sheet.total_next_year,
i.balance_sheet.total_more_year
])
i.children.map(val => {
if (val.children && val.children.length > 0) {
dataTable.push([
val.type_report_id,
val.id,
val.parent,
val.formula,
val.level,
val.description,
val.balance_sheet.total_actual_before,
val.balance_sheet.january,
val.balance_sheet.february,
val.balance_sheet.march,
val.balance_sheet.april,
val.balance_sheet.may,
val.balance_sheet.june,
val.balance_sheet.july,
val.balance_sheet.august,
val.balance_sheet.september,
val.balance_sheet.october,
val.balance_sheet.november,
val.balance_sheet.december,
val.balance_sheet.total_current_year,
val.balance_sheet.total_next_year,
val.balance_sheet.total_more_year
])
val.children.map(items => {
if (items.children && items.children.length > 0) {
dataTable.push([
items.type_report_id,
items.id,
items.parent,
items.formula,
items.level,
items.description,
items.balance_sheet.total_actual_before,
items.balance_sheet.january,
items.balance_sheet.february,
items.balance_sheet.march,
items.balance_sheet.april,
items.balance_sheet.may,
items.balance_sheet.june,
items.balance_sheet.july,
items.balance_sheet.august,
items.balance_sheet.september,
items.balance_sheet.october,
items.balance_sheet.november,
items.balance_sheet.december,
items.balance_sheet.total_current_year,
items.balance_sheet.total_next_year,
items.balance_sheet.total_more_year
])
items.children.map(itemss => {
if (itemss.children && itemss.children.length > 0) {
dataTable.push([
itemss.type_report_id,
itemss.id,
itemss.parent,
itemss.formula,
itemss.level,
itemss.description,
itemss.balance_sheet.total_actual_before,
itemss.balance_sheet.january,
itemss.balance_sheet.february,
itemss.balance_sheet.march,
itemss.balance_sheet.april,
itemss.balance_sheet.may,
itemss.balance_sheet.june,
itemss.balance_sheet.july,
itemss.balance_sheet.august,
itemss.balance_sheet.september,
itemss.balance_sheet.october,
itemss.balance_sheet.november,
itemss.balance_sheet.december,
itemss.balance_sheet.total_current_year,
itemss.balance_sheet.total_next_year,
itemss.balance_sheet.total_more_year
])
itemss.children.map(item1 => {
if (item1.children && item1.children.length > 0) {
dataTable.push([
item1.type_report_id,
item1.id,
item1.parent,
item1.formula,
item1.level,
item1.description,
item1.balance_sheet.total_actual_before,
item1.balance_sheet.january,
item1.balance_sheet.february,
item1.balance_sheet.march,
item1.balance_sheet.april,
item1.balance_sheet.may,
item1.balance_sheet.june,
item1.balance_sheet.july,
item1.balance_sheet.august,
item1.balance_sheet.september,
item1.balance_sheet.october,
item1.balance_sheet.november,
item1.balance_sheet.december,
item1.balance_sheet.total_current_year,
item1.balance_sheet.total_next_year,
item1.balance_sheet.total_more_year
])
item1.children.map(item2 => {
if (item2.children && item2.children.length > 0) {
dataTable.push([
item2.type_report_id,
item2.id,
item2.parent,
item2.formula,
item2.level,
item2.description,
item2.balance_sheet.total_actual_before,
item2.balance_sheet.january,
item2.balance_sheet.february,
item2.balance_sheet.march,
item2.balance_sheet.april,
item2.balance_sheet.may,
item2.balance_sheet.june,
item2.balance_sheet.july,
item2.balance_sheet.august,
item2.balance_sheet.september,
item2.balance_sheet.october,
item2.balance_sheet.november,
item2.balance_sheet.december,
item2.balance_sheet.total_current_year,
item2.balance_sheet.total_next_year,
item2.balance_sheet.total_more_year
])
item2.children.map(item3 => {
if (item3.children && item3.children.length > 0) {
dataTable.push([
item3.type_report_id,
item3.id,
item3.parent,
item3.formula,
item3.level,
item3.description,
item3.balance_sheet.total_actual_before,
item3.balance_sheet.january,
item3.balance_sheet.february,
item3.balance_sheet.march,
item3.balance_sheet.april,
item3.balance_sheet.may,
item3.balance_sheet.june,
item3.balance_sheet.july,
item3.balance_sheet.august,
item3.balance_sheet.september,
item3.balance_sheet.october,
item3.balance_sheet.november,
item3.balance_sheet.december,
item3.balance_sheet.total_current_year,
item3.balance_sheet.total_next_year,
item3.balance_sheet.total_more_year
])
item3.children.map(item4 => {
if (item4.children && item4.children.length > 0) {
dataTable.push([
item4.type_report_id,
item4.id,
item4.parent,
item4.formula,
item4.level,
item4.description,
item4.balance_sheet.total_actual_before,
item4.balance_sheet.january,
item4.balance_sheet.february,
item4.balance_sheet.march,
item4.balance_sheet.april,
item4.balance_sheet.may,
item4.balance_sheet.june,
item4.balance_sheet.july,
item4.balance_sheet.august,
item4.balance_sheet.september,
item4.balance_sheet.october,
item4.balance_sheet.november,
item4.balance_sheet.december,
item4.balance_sheet.total_current_year,
item4.balance_sheet.total_next_year,
item4.balance_sheet.total_more_year
])
item4.children.map(item5 => {
if (item5.children && item5.children.length > 0) {
dataTable.push([
item5.type_report_id,
item5.id,
item5.parent,
item5.formula,
item5.level,
item5.description,
item5.balance_sheet.total_actual_before,
item5.balance_sheet.january,
item5.balance_sheet.february,
item5.balance_sheet.march,
item5.balance_sheet.april,
item5.balance_sheet.may,
item5.balance_sheet.june,
item5.balance_sheet.july,
item5.balance_sheet.august,
item5.balance_sheet.september,
item5.balance_sheet.october,
item5.balance_sheet.november,
item5.balance_sheet.december,
item5.balance_sheet.total_current_year,
item5.balance_sheet.total_next_year,
item5.balance_sheet.total_more_year
])
item5.children.map(item6 => {
if (item6.children && item.children.length > 0) {
dataTable.push([
item6.type_report_id,
item6.id,
item6.parent,
item6.formula,
item6.level,
item6.description,
item6.balance_sheet.total_actual_before,
item6.balance_sheet.january,
item6.balance_sheet.february,
item6.balance_sheet.march,
item6.balance_sheet.april,
item6.balance_sheet.may,
item6.balance_sheet.june,
item6.balance_sheet.july,
item6.balance_sheet.august,
item6.balance_sheet.september,
item6.balance_sheet.october,
item6.balance_sheet.november,
item6.balance_sheet.december,
item6.balance_sheet.total_current_year,
item6.balance_sheet.total_next_year,
item6.balance_sheet.total_more_year
])
} else {
dataTable.push([
item6.type_report_id,
item6.id,
item6.parent,
item6.formula,
item6.level,
item6.description,
item6.balance_sheet.total_actual_before,
item6.balance_sheet.january,
item6.balance_sheet.february,
item6.balance_sheet.march,
item6.balance_sheet.april,
item6.balance_sheet.may,
item6.balance_sheet.june,
item6.balance_sheet.july,
item6.balance_sheet.august,
item6.balance_sheet.september,
item6.balance_sheet.october,
item6.balance_sheet.november,
item6.balance_sheet.december,
item6.balance_sheet.total_current_year,
item6.balance_sheet.total_next_year,
item6.balance_sheet.total_more_year
])
}
})
} else {
dataTable.push([
item5.type_report_id,
item5.id,
item5.parent,
item5.formula,
item5.level,
item5.description,
item5.balance_sheet.total_actual_before,
item5.balance_sheet.january,
item5.balance_sheet.february,
item5.balance_sheet.march,
item5.balance_sheet.april,
item5.balance_sheet.may,
item5.balance_sheet.june,
item5.balance_sheet.july,
item5.balance_sheet.august,
item5.balance_sheet.september,
item5.balance_sheet.october,
item5.balance_sheet.november,
item5.balance_sheet.december,
item5.balance_sheet.total_current_year,
item5.balance_sheet.total_next_year,
item5.balance_sheet.total_more_year
])
}
})
} else {
dataTable.push([
item4.type_report_id,
item4.id,
item4.parent,
item4.formula,
item4.level,
item4.description,
item4.balance_sheet.total_actual_before,
item4.balance_sheet.january,
item4.balance_sheet.february,
item4.balance_sheet.march,
item4.balance_sheet.april,
item4.balance_sheet.may,
item4.balance_sheet.june,
item4.balance_sheet.july,
item4.balance_sheet.august,
item4.balance_sheet.september,
item4.balance_sheet.october,
item4.balance_sheet.november,
item4.balance_sheet.december,
item4.balance_sheet.total_current_year,
item4.balance_sheet.total_next_year,
item4.balance_sheet.total_more_year
])
}
})
} else {
dataTable.push([
item3.type_report_id,
item3.id,
item3.parent,
item3.formula,
item3.level,
item3.description,
item3.balance_sheet.total_actual_before,
item3.balance_sheet.january,
item3.balance_sheet.february,
item3.balance_sheet.march,
item3.balance_sheet.april,
item3.balance_sheet.may,
item3.balance_sheet.june,
item3.balance_sheet.july,
item3.balance_sheet.august,
item3.balance_sheet.september,
item3.balance_sheet.october,
item3.balance_sheet.november,
item3.balance_sheet.december,
item3.balance_sheet.total_current_year,
item3.balance_sheet.total_next_year,
item3.balance_sheet.total_more_year
])
}
})
} else {
dataTable.push([
item2.type_report_id,
item2.id,
item2.parent,
item2.formula,
item2.level,
item2.description,
item2.balance_sheet.total_actual_before,
item2.balance_sheet.january,
item2.balance_sheet.february,
item2.balance_sheet.march,
item2.balance_sheet.april,
item2.balance_sheet.may,
item2.balance_sheet.june,
item2.balance_sheet.july,
item2.balance_sheet.august,
item2.balance_sheet.september,
item2.balance_sheet.october,
item2.balance_sheet.november,
item2.balance_sheet.december,
item2.balance_sheet.total_current_year,
item2.balance_sheet.total_next_year,
item2.balance_sheet.total_more_year
])
}
})
} else {
dataTable.push([
item1.type_report_id,
item1.id,
item1.parent,
item1.formula,
item1.level,
item1.description,
item1.balance_sheet.total_actual_before,
item1.balance_sheet.january,
item1.balance_sheet.february,
item1.balance_sheet.march,
item1.balance_sheet.april,
item1.balance_sheet.may,
item1.balance_sheet.june,
item1.balance_sheet.july,
item1.balance_sheet.august,
item1.balance_sheet.september,
item1.balance_sheet.october,
item1.balance_sheet.november,
item1.balance_sheet.december,
item1.balance_sheet.total_current_year,
item1.balance_sheet.total_next_year,
item1.balance_sheet.total_more_year
])
}
})
} else {
dataTable.push([
itemss.type_report_id,
itemss.id,
itemss.parent,
itemss.formula,
itemss.level,
itemss.description,
itemss.balance_sheet.total_actual_before,
itemss.balance_sheet.january,
itemss.balance_sheet.february,
itemss.balance_sheet.march,
itemss.balance_sheet.april,
itemss.balance_sheet.may,
itemss.balance_sheet.june,
itemss.balance_sheet.july,
itemss.balance_sheet.august,
itemss.balance_sheet.september,
itemss.balance_sheet.october,
itemss.balance_sheet.november,
itemss.balance_sheet.december,
itemss.balance_sheet.total_current_year,
itemss.balance_sheet.total_next_year,
itemss.balance_sheet.total_more_year
])
}
})
} else {
dataTable.push([
items.type_report_id,
items.id,
items.parent,
items.formula,
items.level,
items.description,
items.balance_sheet.total_actual_before,
items.balance_sheet.january,
items.balance_sheet.february,
items.balance_sheet.march,
items.balance_sheet.april,
items.balance_sheet.may,
items.balance_sheet.june,
items.balance_sheet.july,
items.balance_sheet.august,
items.balance_sheet.september,
items.balance_sheet.october,
items.balance_sheet.november,
items.balance_sheet.december,
items.balance_sheet.total_current_year,
items.balance_sheet.total_next_year,
items.balance_sheet.total_more_year
])
}
})
} else {
dataTable.push([
val.type_report_id,
val.id,
val.parent,
val.formula,
val.level,
val.description,
val.balance_sheet.total_actual_before,
val.balance_sheet.january,
val.balance_sheet.february,
val.balance_sheet.march,
val.balance_sheet.april,
val.balance_sheet.may,
val.balance_sheet.june,
val.balance_sheet.july,
val.balance_sheet.august,
val.balance_sheet.september,
val.balance_sheet.october,
val.balance_sheet.november,
val.balance_sheet.december,
val.balance_sheet.total_current_year,
val.balance_sheet.total_next_year,
val.balance_sheet.total_more_year
])
}
})
} else {
dataTable.push([
i.type_report_id,
i.id,
i.parent,
i.formula,
i.level,
i.description,
i.balance_sheet.total_actual_before,
i.balance_sheet.january,
i.balance_sheet.february,
i.balance_sheet.march,
i.balance_sheet.april,
i.balance_sheet.may,
i.balance_sheet.june,
i.balance_sheet.july,
i.balance_sheet.august,
i.balance_sheet.september,
i.balance_sheet.october,
i.balance_sheet.november,
i.balance_sheet.december,
i.balance_sheet.total_current_year,
i.balance_sheet.total_next_year,
i.balance_sheet.total_more_year
])
}
} else {
dataTable.push([
i.type_report_id,
i.id,
i.parent,
i.formula,
i.level,
i.description,
i.balance_sheet.total_actual_before,
i.balance_sheet.january,
i.balance_sheet.february,
i.balance_sheet.march,
i.balance_sheet.april,
i.balance_sheet.may,
i.balance_sheet.june,
i.balance_sheet.july,
i.balance_sheet.august,
i.balance_sheet.september,
i.balance_sheet.october,
i.balance_sheet.november,
i.balance_sheet.december,
i.balance_sheet.total_current_year,
i.balance_sheet.total_next_year,
i.balance_sheet.total_more_year
])
}
})
} else {
dataTable.push([
item.type_report_id,
item.id,
item.parent,
item.formula,
item.level,
item.description,
item.balance_sheet.total_actual_before,
item.balance_sheet.january,
item.balance_sheet.february,
item.balance_sheet.march,
item.balance_sheet.april,
item.balance_sheet.may,
item.balance_sheet.june,
item.balance_sheet.july,
item.balance_sheet.august,
item.balance_sheet.september,
item.balance_sheet.october,
item.balance_sheet.november,
item.balance_sheet.december,
item.balance_sheet.total_current_year,
item.balance_sheet.total_next_year,
item.balance_sheet.total_more_year
])
}
})
console.log(dataTable);
this.setState({ dataTable, loading: false })
} }
} else {
this.setState({ loading: false })
} }
res.map((item, index) => {
dataTable.push([
item.type_report_id,
item.id,
item.parent,
item.formula,
item.level,
item.description,
item.balance_sheet.total_actual_before,
item.balance_sheet.january,
item.balance_sheet.february,
item.balance_sheet.march,
item.balance_sheet.april,
item.balance_sheet.may,
item.balance_sheet.june,
item.balance_sheet.july,
item.balance_sheet.august,
item.balance_sheet.september,
item.balance_sheet.october,
item.balance_sheet.november,
item.balance_sheet.december,
item.balance_sheet.total_current_year,
item.balance_sheet.total_next_year,
item.balance_sheet.total_more_year
])
if (item.children !== null) {
if (item.children.length > 0) {
item.children.map((items, indexs) => {
handlePushChild(items)
})
}
}
})
this.setState({ dataTable, loading: false })
}) })
} }
...@@ -908,6 +351,21 @@ export default class BalanceSheet extends Component { ...@@ -908,6 +351,21 @@ export default class BalanceSheet extends Component {
}) })
} }
async downloadAllData() {
let res = await fetch(
`https://tia.eksad.com/tia-reporting-dev/public/transaction/master_budget/export_master_budget?submission_id=${this.props.submissionID}&&report_id=${this.props.report_id}&&company_id=${this.props.company.company_id}&&year=${this.props.periode}&&revision=${this.props.revision}`
)
res = await res.blob()
this.setState({ loading: false })
if (res.size > 0) {
let url = window.URL.createObjectURL(res);
let a = document.createElement('a');
a.href = url;
a.download = 'Balance Sheet.xlsx';
a.click();
}
}
render() { render() {
let dataTable2 = this.state.dataTable let dataTable2 = this.state.dataTable
const handleChange = (value, tableMeta) => { const handleChange = (value, tableMeta) => {
...@@ -2511,7 +1969,12 @@ export default class BalanceSheet extends Component { ...@@ -2511,7 +1969,12 @@ export default class BalanceSheet extends Component {
borderColor: 'transparent', borderColor: 'transparent',
margin: 5 margin: 5
}} }}
onClick={() => null} onClick={() =>
this.setState({ loading: true }, () => {
setTimeout(() => {
this.downloadAllData()
}, 100);
})}
> >
<img src={Images.download} /> <img src={Images.download} />
</button> </button>
......
...@@ -670,7 +670,7 @@ export default class FixedAssetsMovement extends Component { ...@@ -670,7 +670,7 @@ export default class FixedAssetsMovement extends Component {
]) ])
} }
}) })
// console.log(dataTable); console.log(dataTable);
this.setState({ dataTable, loading: false }) this.setState({ dataTable, loading: false })
} }
} else { } else {
...@@ -853,6 +853,8 @@ export default class FixedAssetsMovement extends Component { ...@@ -853,6 +853,8 @@ export default class FixedAssetsMovement extends Component {
customBodyRender: (val, tableMeta) => { customBodyRender: (val, tableMeta) => {
return ( return (
<div style={{ width: 300 }}> <div style={{ width: 300 }}>
{console.log(val)}
{console.log(tableMeta)}
{tableMeta.rowData[4] == 0 ? {tableMeta.rowData[4] == 0 ?
<span style={{ fontSize: 12, fontWeight: 'bold' }}>{String(tableMeta.rowData[0] === 4 ? "" : val).toUpperCase()}</span> <span style={{ fontSize: 12, fontWeight: 'bold' }}>{String(tableMeta.rowData[0] === 4 ? "" : val).toUpperCase()}</span>
: :
...@@ -865,7 +867,7 @@ export default class FixedAssetsMovement extends Component { ...@@ -865,7 +867,7 @@ export default class FixedAssetsMovement extends Component {
} }
} }
}, { }, {
name: "31 Dec 2020 Actual", name: "31 Dec 2020 Actual",
options: { options: {
customHeadRender: (columnMeta) => ( customHeadRender: (columnMeta) => (
<TableCell style={{ ...style2, top: 0, zIndex: 99, backgroundColor: '#37b5e6', width: 96 }}> <TableCell style={{ ...style2, top: 0, zIndex: 99, backgroundColor: '#37b5e6', width: 96 }}>
...@@ -897,7 +899,7 @@ export default class FixedAssetsMovement extends Component { ...@@ -897,7 +899,7 @@ export default class FixedAssetsMovement extends Component {
} }
/> />
</div> : </div> :
tableMeta.rowData[0] === 2 ? tableMeta.rowData[0] === 5 ?
<span style={{ fontSize: 12, textAlign: 'right' }}> <span style={{ fontSize: 12, textAlign: 'right' }}>
<NumberFormat <NumberFormat
thousandSeparator={true} thousandSeparator={true}
...@@ -944,7 +946,7 @@ export default class FixedAssetsMovement extends Component { ...@@ -944,7 +946,7 @@ export default class FixedAssetsMovement extends Component {
value={Number(value)} value={Number(value)}
/> />
: :
<span>validasi</span> <span>-</span>
} }
</div> </div>
) )
...@@ -983,7 +985,7 @@ export default class FixedAssetsMovement extends Component { ...@@ -983,7 +985,7 @@ export default class FixedAssetsMovement extends Component {
} }
/> />
</div> : </div> :
tableMeta.rowData[0] === 2 ? tableMeta.rowData[0] === 5 ?
<span style={{ fontSize: 12, textAlign: 'right' }}> <span style={{ fontSize: 12, textAlign: 'right' }}>
<NumberFormat <NumberFormat
thousandSeparator={true} thousandSeparator={true}
...@@ -1005,7 +1007,7 @@ export default class FixedAssetsMovement extends Component { ...@@ -1005,7 +1007,7 @@ export default class FixedAssetsMovement extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
value={handleValue(tableMeta)} value={handleFormula(value, tableMeta)}
/> />
: :
tableMeta.rowData[0] === 5 ? tableMeta.rowData[0] === 5 ?
...@@ -1015,7 +1017,7 @@ export default class FixedAssetsMovement extends Component { ...@@ -1015,7 +1017,7 @@ export default class FixedAssetsMovement extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
value={handleValue(tableMeta)} value={handleFormula(value, tableMeta)}
/> />
: :
tableMeta.rowData[0] === 1 ? tableMeta.rowData[0] === 1 ?
...@@ -1030,7 +1032,7 @@ export default class FixedAssetsMovement extends Component { ...@@ -1030,7 +1032,7 @@ export default class FixedAssetsMovement extends Component {
value={Number(value)} value={Number(value)}
/> />
: :
<span>validasi</span> <span>-</span>
} }
</div> </div>
) )
...@@ -1069,7 +1071,7 @@ export default class FixedAssetsMovement extends Component { ...@@ -1069,7 +1071,7 @@ export default class FixedAssetsMovement extends Component {
} }
/> />
</div> : </div> :
tableMeta.rowData[0] === 2 ? tableMeta.rowData[0] === 5 ?
<span style={{ fontSize: 12, textAlign: 'right' }}> <span style={{ fontSize: 12, textAlign: 'right' }}>
<NumberFormat <NumberFormat
thousandSeparator={true} thousandSeparator={true}
...@@ -1091,7 +1093,7 @@ export default class FixedAssetsMovement extends Component { ...@@ -1091,7 +1093,7 @@ export default class FixedAssetsMovement extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
value={handleValue(tableMeta)} value={handleFormula(value, tableMeta)}
/> />
: :
tableMeta.rowData[0] === 5 ? tableMeta.rowData[0] === 5 ?
...@@ -1101,7 +1103,7 @@ export default class FixedAssetsMovement extends Component { ...@@ -1101,7 +1103,7 @@ export default class FixedAssetsMovement extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
value={handleValue(tableMeta)} value={handleFormula(value, tableMeta)}
/> />
: :
tableMeta.rowData[0] === 1 ? tableMeta.rowData[0] === 1 ?
...@@ -1116,7 +1118,7 @@ export default class FixedAssetsMovement extends Component { ...@@ -1116,7 +1118,7 @@ export default class FixedAssetsMovement extends Component {
value={Number(value)} value={Number(value)}
/> />
: :
<span>validasi</span> <span>-</span>
} }
</div> </div>
) )
...@@ -1155,7 +1157,7 @@ export default class FixedAssetsMovement extends Component { ...@@ -1155,7 +1157,7 @@ export default class FixedAssetsMovement extends Component {
} }
/> />
</div> : </div> :
tableMeta.rowData[0] === 2 ? tableMeta.rowData[0] === 5 ?
<span style={{ fontSize: 12, textAlign: 'right' }}> <span style={{ fontSize: 12, textAlign: 'right' }}>
<NumberFormat <NumberFormat
thousandSeparator={true} thousandSeparator={true}
...@@ -1177,7 +1179,7 @@ export default class FixedAssetsMovement extends Component { ...@@ -1177,7 +1179,7 @@ export default class FixedAssetsMovement extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
value={handleValue(tableMeta)} value={handleFormula(value, tableMeta)}
/> />
: :
tableMeta.rowData[0] === 5 ? tableMeta.rowData[0] === 5 ?
...@@ -1187,7 +1189,7 @@ export default class FixedAssetsMovement extends Component { ...@@ -1187,7 +1189,7 @@ export default class FixedAssetsMovement extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
value={handleValue(tableMeta)} value={handleFormula(value, tableMeta)}
/> />
: :
tableMeta.rowData[0] === 1 ? tableMeta.rowData[0] === 1 ?
...@@ -1202,7 +1204,7 @@ export default class FixedAssetsMovement extends Component { ...@@ -1202,7 +1204,7 @@ export default class FixedAssetsMovement extends Component {
value={Number(value)} value={Number(value)}
/> />
: :
<span>validasi</span> <span>-</span>
} }
</div> </div>
) )
...@@ -1241,7 +1243,7 @@ export default class FixedAssetsMovement extends Component { ...@@ -1241,7 +1243,7 @@ export default class FixedAssetsMovement extends Component {
} }
/> />
</div> : </div> :
tableMeta.rowData[0] === 2 ? tableMeta.rowData[0] === 5 ?
<span style={{ fontSize: 12, textAlign: 'right' }}> <span style={{ fontSize: 12, textAlign: 'right' }}>
<NumberFormat <NumberFormat
thousandSeparator={true} thousandSeparator={true}
...@@ -1263,7 +1265,7 @@ export default class FixedAssetsMovement extends Component { ...@@ -1263,7 +1265,7 @@ export default class FixedAssetsMovement extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
value={handleValue(tableMeta)} value={handleFormula(value, tableMeta)}
/> />
: :
tableMeta.rowData[0] === 5 ? tableMeta.rowData[0] === 5 ?
...@@ -1273,7 +1275,7 @@ export default class FixedAssetsMovement extends Component { ...@@ -1273,7 +1275,7 @@ export default class FixedAssetsMovement extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
value={handleValue(tableMeta)} value={handleFormula(value, tableMeta)}
/> />
: :
tableMeta.rowData[0] === 1 ? tableMeta.rowData[0] === 1 ?
...@@ -1288,7 +1290,7 @@ export default class FixedAssetsMovement extends Component { ...@@ -1288,7 +1290,7 @@ export default class FixedAssetsMovement extends Component {
value={Number(value)} value={Number(value)}
/> />
: :
<span>validasi</span> <span>-</span>
} }
</div> </div>
) )
...@@ -1327,7 +1329,7 @@ export default class FixedAssetsMovement extends Component { ...@@ -1327,7 +1329,7 @@ export default class FixedAssetsMovement extends Component {
} }
/> />
</div> : </div> :
tableMeta.rowData[0] === 2 ? tableMeta.rowData[0] === 5 ?
<span style={{ fontSize: 12, textAlign: 'right' }}> <span style={{ fontSize: 12, textAlign: 'right' }}>
<NumberFormat <NumberFormat
thousandSeparator={true} thousandSeparator={true}
...@@ -1349,7 +1351,7 @@ export default class FixedAssetsMovement extends Component { ...@@ -1349,7 +1351,7 @@ export default class FixedAssetsMovement extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
value={handleValue(tableMeta)} value={handleFormula(value, tableMeta)}
/> />
: :
tableMeta.rowData[0] === 5 ? tableMeta.rowData[0] === 5 ?
...@@ -1359,7 +1361,7 @@ export default class FixedAssetsMovement extends Component { ...@@ -1359,7 +1361,7 @@ export default class FixedAssetsMovement extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
value={handleValue(tableMeta)} value={handleFormula(value, tableMeta)}
/> />
: :
tableMeta.rowData[0] === 1 ? tableMeta.rowData[0] === 1 ?
...@@ -1374,7 +1376,7 @@ export default class FixedAssetsMovement extends Component { ...@@ -1374,7 +1376,7 @@ export default class FixedAssetsMovement extends Component {
value={Number(value)} value={Number(value)}
/> />
: :
<span>validasi</span> <span>-</span>
} }
</div> </div>
) )
...@@ -1413,7 +1415,7 @@ export default class FixedAssetsMovement extends Component { ...@@ -1413,7 +1415,7 @@ export default class FixedAssetsMovement extends Component {
} }
/> />
</div> : </div> :
tableMeta.rowData[0] === 2 ? tableMeta.rowData[0] === 5 ?
<span style={{ fontSize: 12, textAlign: 'right' }}> <span style={{ fontSize: 12, textAlign: 'right' }}>
<NumberFormat <NumberFormat
thousandSeparator={true} thousandSeparator={true}
...@@ -1435,7 +1437,7 @@ export default class FixedAssetsMovement extends Component { ...@@ -1435,7 +1437,7 @@ export default class FixedAssetsMovement extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
value={handleValue(tableMeta)} value={handleFormula(value, tableMeta)}
/> />
: :
tableMeta.rowData[0] === 5 ? tableMeta.rowData[0] === 5 ?
...@@ -1445,7 +1447,7 @@ export default class FixedAssetsMovement extends Component { ...@@ -1445,7 +1447,7 @@ export default class FixedAssetsMovement extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
value={handleValue(tableMeta)} value={handleFormula(value, tableMeta)}
/> />
: :
tableMeta.rowData[0] === 1 ? tableMeta.rowData[0] === 1 ?
...@@ -1460,7 +1462,7 @@ export default class FixedAssetsMovement extends Component { ...@@ -1460,7 +1462,7 @@ export default class FixedAssetsMovement extends Component {
value={Number(value)} value={Number(value)}
/> />
: :
<span>validasi</span> <span>-</span>
} }
</div> </div>
) )
...@@ -1499,7 +1501,7 @@ export default class FixedAssetsMovement extends Component { ...@@ -1499,7 +1501,7 @@ export default class FixedAssetsMovement extends Component {
} }
/> />
</div> : </div> :
tableMeta.rowData[0] === 2 ? tableMeta.rowData[0] === 5 ?
<span style={{ fontSize: 12, textAlign: 'right' }}> <span style={{ fontSize: 12, textAlign: 'right' }}>
<NumberFormat <NumberFormat
thousandSeparator={true} thousandSeparator={true}
...@@ -1521,7 +1523,7 @@ export default class FixedAssetsMovement extends Component { ...@@ -1521,7 +1523,7 @@ export default class FixedAssetsMovement extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
value={handleValue(tableMeta)} value={handleFormula(value, tableMeta)}
/> />
: :
tableMeta.rowData[0] === 5 ? tableMeta.rowData[0] === 5 ?
...@@ -1531,7 +1533,7 @@ export default class FixedAssetsMovement extends Component { ...@@ -1531,7 +1533,7 @@ export default class FixedAssetsMovement extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
value={handleValue(tableMeta)} value={handleFormula(value, tableMeta)}
/> />
: :
tableMeta.rowData[0] === 1 ? tableMeta.rowData[0] === 1 ?
...@@ -1546,7 +1548,7 @@ export default class FixedAssetsMovement extends Component { ...@@ -1546,7 +1548,7 @@ export default class FixedAssetsMovement extends Component {
value={Number(value)} value={Number(value)}
/> />
: :
<span>validasi</span> <span>-</span>
} }
</div> </div>
) )
...@@ -1585,7 +1587,7 @@ export default class FixedAssetsMovement extends Component { ...@@ -1585,7 +1587,7 @@ export default class FixedAssetsMovement extends Component {
} }
/> />
</div> : </div> :
tableMeta.rowData[0] === 2 ? tableMeta.rowData[0] === 5 ?
<span style={{ fontSize: 12, textAlign: 'right' }}> <span style={{ fontSize: 12, textAlign: 'right' }}>
<NumberFormat <NumberFormat
thousandSeparator={true} thousandSeparator={true}
...@@ -1607,7 +1609,7 @@ export default class FixedAssetsMovement extends Component { ...@@ -1607,7 +1609,7 @@ export default class FixedAssetsMovement extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
value={handleValue(tableMeta)} value={handleFormula(value, tableMeta)}
/> />
: :
tableMeta.rowData[0] === 5 ? tableMeta.rowData[0] === 5 ?
...@@ -1617,7 +1619,7 @@ export default class FixedAssetsMovement extends Component { ...@@ -1617,7 +1619,7 @@ export default class FixedAssetsMovement extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
value={handleValue(tableMeta)} value={handleFormula(value, tableMeta)}
/> />
: :
tableMeta.rowData[0] === 1 ? tableMeta.rowData[0] === 1 ?
...@@ -1632,7 +1634,7 @@ export default class FixedAssetsMovement extends Component { ...@@ -1632,7 +1634,7 @@ export default class FixedAssetsMovement extends Component {
value={Number(value)} value={Number(value)}
/> />
: :
<span>validasi</span> <span>-</span>
} }
</div> </div>
) )
...@@ -1671,7 +1673,7 @@ export default class FixedAssetsMovement extends Component { ...@@ -1671,7 +1673,7 @@ export default class FixedAssetsMovement extends Component {
} }
/> />
</div> : </div> :
tableMeta.rowData[0] === 2 ? tableMeta.rowData[0] === 5 ?
<span style={{ fontSize: 12, textAlign: 'right' }}> <span style={{ fontSize: 12, textAlign: 'right' }}>
<NumberFormat <NumberFormat
thousandSeparator={true} thousandSeparator={true}
...@@ -1693,7 +1695,7 @@ export default class FixedAssetsMovement extends Component { ...@@ -1693,7 +1695,7 @@ export default class FixedAssetsMovement extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
value={handleValue(tableMeta)} value={handleFormula(value, tableMeta)}
/> />
: :
tableMeta.rowData[0] === 5 ? tableMeta.rowData[0] === 5 ?
...@@ -1703,7 +1705,7 @@ export default class FixedAssetsMovement extends Component { ...@@ -1703,7 +1705,7 @@ export default class FixedAssetsMovement extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
value={handleValue(tableMeta)} value={handleFormula(value, tableMeta)}
/> />
: :
tableMeta.rowData[0] === 1 ? tableMeta.rowData[0] === 1 ?
...@@ -1718,7 +1720,7 @@ export default class FixedAssetsMovement extends Component { ...@@ -1718,7 +1720,7 @@ export default class FixedAssetsMovement extends Component {
value={Number(value)} value={Number(value)}
/> />
: :
<span>validasi</span> <span>-</span>
} }
</div> </div>
) )
...@@ -1757,7 +1759,7 @@ export default class FixedAssetsMovement extends Component { ...@@ -1757,7 +1759,7 @@ export default class FixedAssetsMovement extends Component {
} }
/> />
</div> : </div> :
tableMeta.rowData[0] === 2 ? tableMeta.rowData[0] === 5 ?
<span style={{ fontSize: 12, textAlign: 'right' }}> <span style={{ fontSize: 12, textAlign: 'right' }}>
<NumberFormat <NumberFormat
thousandSeparator={true} thousandSeparator={true}
...@@ -1779,7 +1781,7 @@ export default class FixedAssetsMovement extends Component { ...@@ -1779,7 +1781,7 @@ export default class FixedAssetsMovement extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
value={handleValue(tableMeta)} value={handleFormula(value, tableMeta)}
/> />
: :
tableMeta.rowData[0] === 5 ? tableMeta.rowData[0] === 5 ?
...@@ -1789,7 +1791,7 @@ export default class FixedAssetsMovement extends Component { ...@@ -1789,7 +1791,7 @@ export default class FixedAssetsMovement extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
value={handleValue(tableMeta)} value={handleFormula(value, tableMeta)}
/> />
: :
tableMeta.rowData[0] === 1 ? tableMeta.rowData[0] === 1 ?
...@@ -1804,7 +1806,7 @@ export default class FixedAssetsMovement extends Component { ...@@ -1804,7 +1806,7 @@ export default class FixedAssetsMovement extends Component {
value={Number(value)} value={Number(value)}
/> />
: :
<span>validasi</span> <span>-</span>
} }
</div> </div>
) )
...@@ -1843,7 +1845,7 @@ export default class FixedAssetsMovement extends Component { ...@@ -1843,7 +1845,7 @@ export default class FixedAssetsMovement extends Component {
} }
/> />
</div> : </div> :
tableMeta.rowData[0] === 2 ? tableMeta.rowData[0] === 5 ?
<span style={{ fontSize: 12, textAlign: 'right' }}> <span style={{ fontSize: 12, textAlign: 'right' }}>
<NumberFormat <NumberFormat
thousandSeparator={true} thousandSeparator={true}
...@@ -1865,7 +1867,7 @@ export default class FixedAssetsMovement extends Component { ...@@ -1865,7 +1867,7 @@ export default class FixedAssetsMovement extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
value={handleValue(tableMeta)} value={handleFormula(value, tableMeta)}
/> />
: :
tableMeta.rowData[0] === 5 ? tableMeta.rowData[0] === 5 ?
...@@ -1875,7 +1877,7 @@ export default class FixedAssetsMovement extends Component { ...@@ -1875,7 +1877,7 @@ export default class FixedAssetsMovement extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
value={handleValue(tableMeta)} value={handleFormula(value, tableMeta)}
/> />
: :
tableMeta.rowData[0] === 1 ? tableMeta.rowData[0] === 1 ?
...@@ -1890,7 +1892,7 @@ export default class FixedAssetsMovement extends Component { ...@@ -1890,7 +1892,7 @@ export default class FixedAssetsMovement extends Component {
value={Number(value)} value={Number(value)}
/> />
: :
<span>validasi</span> <span>-</span>
} }
</div> </div>
) )
...@@ -1929,7 +1931,7 @@ export default class FixedAssetsMovement extends Component { ...@@ -1929,7 +1931,7 @@ export default class FixedAssetsMovement extends Component {
} }
/> />
</div> : </div> :
tableMeta.rowData[0] === 2 ? tableMeta.rowData[0] === 5 ?
<span style={{ fontSize: 12, textAlign: 'right' }}> <span style={{ fontSize: 12, textAlign: 'right' }}>
<NumberFormat <NumberFormat
thousandSeparator={true} thousandSeparator={true}
...@@ -1951,7 +1953,7 @@ export default class FixedAssetsMovement extends Component { ...@@ -1951,7 +1953,7 @@ export default class FixedAssetsMovement extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
value={handleValue(tableMeta)} value={handleFormula(value, tableMeta)}
/> />
: :
tableMeta.rowData[0] === 5 ? tableMeta.rowData[0] === 5 ?
...@@ -1961,7 +1963,7 @@ export default class FixedAssetsMovement extends Component { ...@@ -1961,7 +1963,7 @@ export default class FixedAssetsMovement extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
value={handleValue(tableMeta)} value={handleFormula(value, tableMeta)}
/> />
: :
tableMeta.rowData[0] === 1 ? tableMeta.rowData[0] === 1 ?
...@@ -1976,7 +1978,7 @@ export default class FixedAssetsMovement extends Component { ...@@ -1976,7 +1978,7 @@ export default class FixedAssetsMovement extends Component {
value={Number(value)} value={Number(value)}
/> />
: :
<span>validasi</span> <span>-</span>
} }
</div> </div>
) )
...@@ -2015,7 +2017,7 @@ export default class FixedAssetsMovement extends Component { ...@@ -2015,7 +2017,7 @@ export default class FixedAssetsMovement extends Component {
} }
/> />
</div> : </div> :
tableMeta.rowData[0] === 2 ? tableMeta.rowData[0] === 5 ?
<span style={{ fontSize: 12, textAlign: 'right' }}> <span style={{ fontSize: 12, textAlign: 'right' }}>
<NumberFormat <NumberFormat
thousandSeparator={true} thousandSeparator={true}
...@@ -2037,7 +2039,7 @@ export default class FixedAssetsMovement extends Component { ...@@ -2037,7 +2039,7 @@ export default class FixedAssetsMovement extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
value={handleValue(tableMeta)} value={handleFormula(value, tableMeta)}
/> />
: :
tableMeta.rowData[0] === 5 ? tableMeta.rowData[0] === 5 ?
...@@ -2047,7 +2049,7 @@ export default class FixedAssetsMovement extends Component { ...@@ -2047,7 +2049,7 @@ export default class FixedAssetsMovement extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
value={handleValue(tableMeta)} value={handleFormula(value, tableMeta)}
/> />
: :
tableMeta.rowData[0] === 1 ? tableMeta.rowData[0] === 1 ?
...@@ -2062,7 +2064,7 @@ export default class FixedAssetsMovement extends Component { ...@@ -2062,7 +2064,7 @@ export default class FixedAssetsMovement extends Component {
value={Number(value)} value={Number(value)}
/> />
: :
<span>validasi</span> <span>-</span>
} }
</div> </div>
) )
...@@ -2072,8 +2074,8 @@ export default class FixedAssetsMovement extends Component { ...@@ -2072,8 +2074,8 @@ export default class FixedAssetsMovement extends Component {
name: "31 Dec 2022 Total", name: "31 Dec 2022 Total",
options: { options: {
customHeadRender: (columnMeta) => ( customHeadRender: (columnMeta) => (
<TableCell style={{ ...style2, top: 0, zIndex: 99, backgroundColor: '#354960', width: 96 }}> <TableCell style={{ ...style2, top: 0, zIndex: 99, backgroundColor: '#37b5e6', width: 96 }}>
<Typography style={{ color: 'white', fontSize: 12, fontWeight: 'bold', textAlign: 'center' }}>{columnMeta.name}</Typography> <Typography style={{ color: 'black', fontSize: 12, fontWeight: 'bold', textAlign: 'center' }}>{columnMeta.name}</Typography>
</TableCell> </TableCell>
), ),
setCellProps: () => ({ style2 }), setCellProps: () => ({ style2 }),
...@@ -2101,7 +2103,7 @@ export default class FixedAssetsMovement extends Component { ...@@ -2101,7 +2103,7 @@ export default class FixedAssetsMovement extends Component {
} }
/> />
</div> : </div> :
tableMeta.rowData[0] === 2 ? tableMeta.rowData[0] === 5 ?
<span style={{ fontSize: 12, textAlign: 'right' }}> <span style={{ fontSize: 12, textAlign: 'right' }}>
<NumberFormat <NumberFormat
thousandSeparator={true} thousandSeparator={true}
...@@ -2123,7 +2125,7 @@ export default class FixedAssetsMovement extends Component { ...@@ -2123,7 +2125,7 @@ export default class FixedAssetsMovement extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
value={handleValue(tableMeta)} value={handleFormula(value, tableMeta)}
/> />
: :
tableMeta.rowData[0] === 5 ? tableMeta.rowData[0] === 5 ?
...@@ -2133,7 +2135,7 @@ export default class FixedAssetsMovement extends Component { ...@@ -2133,7 +2135,7 @@ export default class FixedAssetsMovement extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
value={handleValue(tableMeta)} value={handleFormula(value, tableMeta)}
/> />
: :
tableMeta.rowData[0] === 1 ? tableMeta.rowData[0] === 1 ?
...@@ -2148,7 +2150,7 @@ export default class FixedAssetsMovement extends Component { ...@@ -2148,7 +2150,7 @@ export default class FixedAssetsMovement extends Component {
value={Number(value)} value={Number(value)}
/> />
: :
<span>validasi</span> <span>-</span>
} }
</div> </div>
) )
...@@ -2158,8 +2160,8 @@ export default class FixedAssetsMovement extends Component { ...@@ -2158,8 +2160,8 @@ export default class FixedAssetsMovement extends Component {
name: "31 Dec 2023 Total", name: "31 Dec 2023 Total",
options: { options: {
customHeadRender: (columnMeta) => ( customHeadRender: (columnMeta) => (
<TableCell style={{ ...style2, top: 0, zIndex: 99, backgroundColor: '#354960', width: 96 }}> <TableCell style={{ ...style2, top: 0, zIndex: 99, backgroundColor: '#37b5e6', width: 96 }}>
<Typography style={{ color: 'white', fontSize: 12, fontWeight: 'bold', textAlign: 'center' }}>{columnMeta.name}</Typography> <Typography style={{ color: 'black', fontSize: 12, fontWeight: 'bold', textAlign: 'center' }}>{columnMeta.name}</Typography>
</TableCell> </TableCell>
), ),
setCellProps: () => ({ style2 }), setCellProps: () => ({ style2 }),
...@@ -2187,7 +2189,7 @@ export default class FixedAssetsMovement extends Component { ...@@ -2187,7 +2189,7 @@ export default class FixedAssetsMovement extends Component {
} }
/> />
</div> : </div> :
tableMeta.rowData[0] === 2 ? tableMeta.rowData[0] === 5 ?
<span style={{ fontSize: 12, textAlign: 'right' }}> <span style={{ fontSize: 12, textAlign: 'right' }}>
<NumberFormat <NumberFormat
thousandSeparator={true} thousandSeparator={true}
...@@ -2209,7 +2211,7 @@ export default class FixedAssetsMovement extends Component { ...@@ -2209,7 +2211,7 @@ export default class FixedAssetsMovement extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
value={handleValue(tableMeta)} value={handleFormula(value, tableMeta)}
/> />
: :
tableMeta.rowData[0] === 5 ? tableMeta.rowData[0] === 5 ?
...@@ -2219,7 +2221,7 @@ export default class FixedAssetsMovement extends Component { ...@@ -2219,7 +2221,7 @@ export default class FixedAssetsMovement extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
value={handleValue(tableMeta)} value={handleFormula(value, tableMeta)}
/> />
: :
tableMeta.rowData[0] === 1 ? tableMeta.rowData[0] === 1 ?
...@@ -2234,7 +2236,7 @@ export default class FixedAssetsMovement extends Component { ...@@ -2234,7 +2236,7 @@ export default class FixedAssetsMovement extends Component {
value={Number(value)} value={Number(value)}
/> />
: :
<span>validasi</span> <span>-</span>
} }
</div> </div>
) )
...@@ -2319,7 +2321,7 @@ export default class FixedAssetsMovement extends Component { ...@@ -2319,7 +2321,7 @@ export default class FixedAssetsMovement extends Component {
</div> </div>
</div> </div>
<div style={{ marginTop: 20, width: this.props.width - 200, height: this.props.height-200 }}> <div style={{ marginTop: 20, width: this.props.width - (this.props.open === true ? 400 : 150), height: this.props.height - 200 }}>
<MuiThemeProvider theme={getMuiTheme()}> <MuiThemeProvider theme={getMuiTheme()}>
<MUIDataTable <MUIDataTable
data={dataTable2} data={dataTable2}
......
...@@ -524,16 +524,17 @@ export default class UserRole extends Component { ...@@ -524,16 +524,17 @@ export default class UserRole extends Component {
} }
uploadUser() { uploadUser() {
console.log(JSON.stringify(this.state.payload))
api.create().uploadUser(this.state.payload).then(response => { api.create().uploadUser(this.state.payload).then(response => {
this.setState({buttonError: false}) this.setState({buttonError: false})
console.log(response) console.log(JSON.stringify(response))
if (response.data) { if (response.data) {
if (response.ok) { if (response.ok) {
if (response.data.status === "success") { if (response.data.status === "success") {
this.getUser() this.getUser()
this.setState({ visibleUser: true, alert: true, messageAlert: response.data.message, tipeAlert: 'success', payload: [], rows: [], judul: '' }) this.setState({ visibleUser: true, alert: true, messageAlert: response.data.message, tipeAlert: 'success', payload: [], rows: [], judul: '' })
} else { } else {
this.setState({ alert: true, messageAlert: response.data.message, tipeAlert: 'warning', payload: [], rows: [], judul: '' }, () => { this.setState({ alert: true, messageAlert: response.data.message, tipeAlert: 'warning' }, () => {
if (response.data.message.includes("Someone Logged In")) { if (response.data.message.includes("Someone Logged In")) {
setTimeout(() => { setTimeout(() => {
localStorage.removeItem(Constant.TOKEN) localStorage.removeItem(Constant.TOKEN)
...@@ -543,10 +544,10 @@ export default class UserRole extends Component { ...@@ -543,10 +544,10 @@ export default class UserRole extends Component {
}) })
} }
} else { } else {
this.setState({ alert: true, messageAlert: response.data.message, tipeAlert: 'error', payload: [], rows: [], judul: '' }) this.setState({ alert: true, messageAlert: response.data.message, tipeAlert: 'error' })
} }
} else { } else {
this.setState({ alert: true, messageAlert: response.problem, tipeAlert: 'error', payload: [], rows: [], judul: '' }) this.setState({ alert: true, messageAlert: response.problem, tipeAlert: 'error' })
} }
}) })
} }
......
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