Commit fb50741a authored by r.kurnia's avatar r.kurnia

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

parents 249c9ab9 22de988c
......@@ -422,6 +422,7 @@ export default class SubHolding extends Component {
if (this.state.report.value === 1) {
api.create().getAllReportPLDetail(payload).then(response => {
console.log(response);
console.log(payload);
let dataTable = []
if (response.data) {
if (response.data.status === 'success') {
......@@ -477,7 +478,56 @@ export default class SubHolding extends Component {
item.profit_loss.monthly_last_year_october,
item.profit_loss.monthly_last_year_november,
item.profit_loss.monthly_last_year_december,
item.profit_loss.notes
item.profit_loss.notes,
item.profit_loss.ro_full_year_january,
item.profit_loss.ro_full_year_february,
item.profit_loss.ro_full_year_march,
item.profit_loss.ro_full_year_april,
item.profit_loss.ro_full_year_may,
item.profit_loss.ro_full_year_june,
item.profit_loss.ro_full_year_july,
item.profit_loss.ro_full_year_august,
item.profit_loss.ro_full_year_september,
item.profit_loss.ro_full_year_october,
item.profit_loss.ro_full_year_november,
item.profit_loss.ro_full_year_december,
item.profit_loss.ol_q1_january,
item.profit_loss.ol_q1_february,
item.profit_loss.ol_q1_march,
item.profit_loss.ol_q1_april,
item.profit_loss.ol_q1_may,
item.profit_loss.ol_q1_june,
item.profit_loss.ol_q1_july,
item.profit_loss.ol_q1_august,
item.profit_loss.ol_q1_september,
item.profit_loss.ol_q1_october,
item.profit_loss.ol_q1_november,
item.profit_loss.ol_q1_december,
item.profit_loss.ol_q2_january,
item.profit_loss.ol_q2_february,
item.profit_loss.ol_q2_march,
item.profit_loss.ol_q2_april,
item.profit_loss.ol_q2_may,
item.profit_loss.ol_q2_june,
item.profit_loss.ol_q2_july,
item.profit_loss.ol_q2_august,
item.profit_loss.ol_q2_september,
item.profit_loss.ol_q2_october,
item.profit_loss.ol_q2_november,
item.profit_loss.ol_q2_december,
item.profit_loss.ol_q3_january,
item.profit_loss.ol_q3_february,
item.profit_loss.ol_q3_march,
item.profit_loss.ol_q3_april,
item.profit_loss.ol_q3_may,
item.profit_loss.ol_q3_june,
item.profit_loss.ol_q3_july,
item.profit_loss.ol_q3_august,
item.profit_loss.ol_q3_september,
item.profit_loss.ol_q3_october,
item.profit_loss.ol_q3_november,
item.profit_loss.ol_q3_december,
])
}
if (item.children !== null) {
......@@ -537,7 +587,55 @@ export default class SubHolding extends Component {
item.profit_loss.monthly_last_year_october,
item.profit_loss.monthly_last_year_november,
item.profit_loss.monthly_last_year_december,
item.profit_loss.notes
item.profit_loss.notes,
item.profit_loss.ro_full_year_january,
item.profit_loss.ro_full_year_february,
item.profit_loss.ro_full_year_march,
item.profit_loss.ro_full_year_april,
item.profit_loss.ro_full_year_may,
item.profit_loss.ro_full_year_june,
item.profit_loss.ro_full_year_july,
item.profit_loss.ro_full_year_august,
item.profit_loss.ro_full_year_september,
item.profit_loss.ro_full_year_october,
item.profit_loss.ro_full_year_november,
item.profit_loss.ro_full_year_december,
item.profit_loss.ol_q1_january,
item.profit_loss.ol_q1_february,
item.profit_loss.ol_q1_march,
item.profit_loss.ol_q1_april,
item.profit_loss.ol_q1_may,
item.profit_loss.ol_q1_june,
item.profit_loss.ol_q1_july,
item.profit_loss.ol_q1_august,
item.profit_loss.ol_q1_september,
item.profit_loss.ol_q1_october,
item.profit_loss.ol_q1_november,
item.profit_loss.ol_q1_december,
item.profit_loss.ol_q2_january,
item.profit_loss.ol_q2_february,
item.profit_loss.ol_q2_march,
item.profit_loss.ol_q2_april,
item.profit_loss.ol_q2_may,
item.profit_loss.ol_q2_june,
item.profit_loss.ol_q2_july,
item.profit_loss.ol_q2_august,
item.profit_loss.ol_q2_september,
item.profit_loss.ol_q2_october,
item.profit_loss.ol_q2_november,
item.profit_loss.ol_q2_december,
item.profit_loss.ol_q3_january,
item.profit_loss.ol_q3_february,
item.profit_loss.ol_q3_march,
item.profit_loss.ol_q3_april,
item.profit_loss.ol_q3_may,
item.profit_loss.ol_q3_june,
item.profit_loss.ol_q3_july,
item.profit_loss.ol_q3_august,
item.profit_loss.ol_q3_september,
item.profit_loss.ol_q3_october,
item.profit_loss.ol_q3_november,
item.profit_loss.ol_q3_december,
])
if (item.children !== null) {
if (item.children.length > 0) {
......@@ -547,7 +645,7 @@ export default class SubHolding extends Component {
}
}
})
// console.log(dataTable)
console.log(dataTable)
// this.setState({ dataTable, previewTable: true, loading: false, previewDownload: true })
this.setState({ dataTable, previewTable: true, loading: false, previewDownload: true })
......
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -140,7 +140,7 @@ export default class CatRevision extends Component {
let indexIDzz = dataTable.findIndex((val) => val[1] === item.id)
if (indexIDzz === -1) {
let parentTrue = item.parent_name == 'INTERNAL BUSINESS PROCESS PERSPECTIVE' || item.parent_name == 'CUSTOMER PERSPECTIVE'
let weight = String(item.corporate_annual_target.weight).substr(0, String(item.corporate_annual_target.weight).length - 1)
dataTable.push([
item.type_report_id,
item.id,
......@@ -148,7 +148,7 @@ export default class CatRevision extends Component {
item.formula,
item.level,
item.description,
item.type_report_id == 1 ? `${Number(item.weight) * 100}%` : (String(Number(String(item.corporate_annual_target.weight).substr(0, String(item.corporate_annual_target.weight).length - 1)).toFixed(1)) + '%'),
item.corporate_annual_target.weight == "" ? Number(0).toFixed(1) : Number(weight).toFixed(1),
parentTrue ? item.corporate_annual_target.uom : item.uom,
parentTrue ? item.corporate_annual_target.kpi == "" ? null : { value: item.corporate_annual_target.kpi } : item.kpi_type == "" ? null : { value: item.kpi_type },
parentTrue ? item.corporate_annual_target.max_ach == "" ? null : { value: titleCase(item.corporate_annual_target.max_ach) } : item.max_ach == "" ? null : { value: titleCase(item.max_ach) },
......@@ -200,7 +200,7 @@ export default class CatRevision extends Component {
item.formula,
item.level,
item.description,
item.type_report_id == 1 ? `${Number(item.weight) * 100}%` : (String(Number(String(item.corporate_annual_target.weight).substr(0, String(item.corporate_annual_target.weight).length - 1)).toFixed(1)) + '%'),
item.weight == '' ? Number(0).toFixed(1) : Number(Number(item.weight) * 100).toFixed(1),
item.corporate_annual_target.uom,
item.kpi_type == "" ? null : { value: item.kpi_type },
item.max_ach == "" ? null : { value: titleCase(item.max_ach) },
......@@ -1197,13 +1197,13 @@ export default class CatRevision extends Component {
control={
<NumberFormat
thousandSeparator={true}
suffix="%"
suffix={"%"}
style={{ color: 'black', fontSize: 12, textAlign: 'center', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
placeholder=""
value={value}
value={Number(value).toFixed(1)}
disabled={true}
maxLength={4}
decimalScale={1}
/>
}
/>
......@@ -2667,7 +2667,7 @@ export default class CatRevision extends Component {
<div style={{ display: 'flex', justifyContent: 'space-between' }}>
<div>
<Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>{this.props.company.company_name}</Typography>
<Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>Period : {this.props.periode} (rev.{this.props.revision}) {String(this.props.quarter).toLocaleUpperCase()}</Typography>
<Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>Period : {this.props.periode} {String(this.props.quarter).toLocaleUpperCase()} (rev.{this.props.revision})</Typography>
<Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>in IDR mn</Typography>
</div>
<div style={{ width: '50%' }}>
......@@ -2888,7 +2888,7 @@ export default class CatRevision extends Component {
<div style={{ display: 'flex', justifyContent: 'space-between' }}>
<div>
<Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>{this.props.company.company_name}</Typography>
<Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>Period : {this.props.periode} (rev.{this.props.revision})</Typography>
<Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>Period : {this.props.periode} {String(this.props.quarter).toLocaleUpperCase()} (rev.{this.props.revision})</Typography>
<Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>in IDR mn</Typography>
</div>
<div style={{ width: '50%' }} />
......
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