Commit 3963c02a authored by Deni Rinaldi's avatar Deni Rinaldi

Merge branch 'riri' into 'master'

cancel to back

See merge request !602
parents cc1081a4 a885c749
......@@ -2225,7 +2225,7 @@ export default class ProfitLoss extends Component {
}}
>
<div style={{ backgroundColor: '#019ce5', width: 105, height: 25, borderRadius: 3, justifyContent: 'center', display: 'flex', alignItems: 'center' }}>
<Typography style={{ fontSize: '11px', color: '#fff', textAlign: 'center' }}>Cancel</Typography>
<Typography style={{ fontSize: '11px', color: '#fff', textAlign: 'center' }}>Back</Typography>
</div>
</button>
</div>
......@@ -2338,7 +2338,7 @@ export default class ProfitLoss extends Component {
style={{ marginRight: 20 }}
>
<div style={{ backgroundColor: '#019ce5', width: 105, height: 25, borderRadius: 3, justifyContent: 'center', display: 'flex', alignItems: 'center' }}>
<Typography style={{ fontSize: '11px', color: '#fff', textAlign: 'center' }}>Cancel</Typography>
<Typography style={{ fontSize: '11px', color: '#fff', textAlign: 'center' }}>Back</Typography>
</div>
</button>
</div>
......
......@@ -595,13 +595,27 @@ export default class ReportItems extends Component {
getData() {
this.setState({ loading: true })
api.create().getReportItems().then((response) => {
// console.log(response)
console.log(response)
if (response.data) {
if (response.ok) {
if (response.data.status == 'success') {
let data = response.data.data
let listData = data.sort((a, b) => a.item_report_id - b.item_report_id).map((item, index) => {
return [index, item.item_report_id, item.report_name, item.company_name, item.order, item.description, item.parent, item.uom, item.weight, item.type_item_report_name, item.kpi_type, item.max_ach, item.formula_ytd, item.status]
return [
index,
item.item_report_id,
item.report_name,
item.company_name,
item.order,
item.description,
item.parent !== null ? `${item.parent} - ${item.parent_name}` : "" ,
item.uom,
item.weight,
item.type_item_report_name,
item.kpi_type,
item.max_ach,
item.formula_ytd,
item.status]
})
this.setState({ dataTable: listData, listData: response.data.data }, () => {
setTimeout(() => {
......
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