Commit 3e88701f authored by Dida Adams Arizona's avatar Dida Adams Arizona

Merge branch 'GGMAC' into 'master'

apdet

See merge request !1294
parents 5d67852a 3531f4d8
...@@ -47,7 +47,8 @@ class HomePage extends Component { ...@@ -47,7 +47,8 @@ class HomePage extends Component {
company: [], company: [],
dataDashboardCAT: [], dataDashboardCAT: [],
loading2: false, loading2: false,
loading3: false loading3: false,
parameterPerfom: []
} }
} }
...@@ -114,9 +115,7 @@ class HomePage extends Component { ...@@ -114,9 +115,7 @@ class HomePage extends Component {
let indexMonthMR = MR.findIndex((val) => val.value == yearNow) let indexMonthMR = MR.findIndex((val) => val.value == yearNow)
this.setState({ listPeriodeMB: defaultPropsMB, periodeMB: MB[MB.length - 1], listPeriodeMR: defaultPropsMR, periodeMR: MR[indexMonthMR], listPeriodeCAT: defaultPropsMB, periodeCAT: MB[indexMonthMR] }, () => { this.setState({ listPeriodeMB: defaultPropsMB, periodeMB: MB[MB.length - 1], listPeriodeMR: defaultPropsMR, periodeMR: MR[indexMonthMR], listPeriodeCAT: defaultPropsMB, periodeCAT: MB[indexMonthMR] }, () => {
this.getListUserSubcoMB() this.getParameterGroupPerfom()
this.getListUserSubcoMR()
this.getDetailUser()
}) })
} }
...@@ -130,7 +129,28 @@ class HomePage extends Component { ...@@ -130,7 +129,28 @@ class HomePage extends Component {
let arrayChild = [] let arrayChild = []
item.category.map((items, indexs) => { item.category.map((items, indexs) => {
if (this.state.company.includes(items.company_id)) { if (this.state.company.includes(items.company_id)) {
arrayChild.push({ ...items, current_value: Number(items.current_value).toFixed(2), performanceColor: this.handleBackgroundPerform(Number(items.current_value)) }) let indexPerform = this.state.parameterPerfom.findIndex((val) => val.company_id == items.company_id)
let listPerfomanceDefault = []
if (indexPerform == -1) {
listPerfomanceDefault = this.state.parameterPerfom.filter((val) => String(val.company_name).toLocaleLowerCase() == "default")
} else {
listPerfomanceDefault = this.state.parameterPerfom.filter((val) => val.company_id == items.company_id)
}
let performanceScore = ''
let perfomanceScoreColor = '#fff'
if (listPerfomanceDefault.length > 0) {
listPerfomanceDefault.map((item, index) => {
// console.log(Number(lastTotal))
// console.log(Number(item.min_value))
// console.log(Number(item.max_value))
if (Number(items.current_value).toFixed(2) >= Number(item.min_value) && Number(items.current_value).toFixed(2) <= Number(item.max_value)) {
// console.log('masuk')
performanceScore = item.description
perfomanceScoreColor = item.value
}
})
}
arrayChild.push({ ...items, current_value: Number(items.current_value).toFixed(2), performanceColor: perfomanceScoreColor })
} }
}) })
if (arrayChild.length > 0 && String(item.item_business).toLocaleLowerCase() != 'holding') { if (arrayChild.length > 0 && String(item.item_business).toLocaleLowerCase() != 'holding') {
...@@ -484,6 +504,27 @@ class HomePage extends Component { ...@@ -484,6 +504,27 @@ class HomePage extends Component {
return color return color
} }
getParameterGroupPerfom() {
api.create().getParameterByGroupName({
"group_name": "PERFORMANCE_KPI"
}).then((response) => {
console.log(response.data)
if (response.data) {
this.setState({ parameterPerfom: response.data.data } , () => {
this.getListUserSubcoMB()
this.getListUserSubcoMR()
this.getDetailUser()
})
} else {
this.setState({ parameterPerfom: [] } , () => {
this.getListUserSubcoMB()
this.getListUserSubcoMR()
this.getDetailUser()
})
}
})
}
render() { render() {
const getDataMonth = (item) => { const getDataMonth = (item) => {
let months = item.months let months = item.months
......
...@@ -822,8 +822,13 @@ export default class CorporateAnnualTargetMR extends Component { ...@@ -822,8 +822,13 @@ export default class CorporateAnnualTargetMR extends Component {
} }
console.log(Number(Number(total).toFixed(2) / Number(totalWeightz)).toFixed(2)) console.log(Number(Number(total).toFixed(2) / Number(totalWeightz)).toFixed(2))
let indexPerform = this.state.parameterPerfom.findIndex((val) => val.company_id == this.props.company.company_id)
let listPerfomanceDefault = this.state.parameterPerfom.filter((val) => String(val.company_name).toLocaleLowerCase() == "default") let listPerfomanceDefault = []
if (indexPerform == -1) {
listPerfomanceDefault = this.state.parameterPerfom.filter((val) => String(val.company_name).toLocaleLowerCase() == "default")
} else {
listPerfomanceDefault = this.state.parameterPerfom.filter((val) => val.company_id == this.props.company.company_id)
}
let performanceScore = '' let performanceScore = ''
let perfomanceScoreColor = '#fff' let perfomanceScoreColor = '#fff'
if (listPerfomanceDefault.length > 0) { if (listPerfomanceDefault.length > 0) {
......
...@@ -219,7 +219,7 @@ export default class ProfitLossROO extends Component { ...@@ -219,7 +219,7 @@ export default class ProfitLossROO extends Component {
let payload = { let payload = {
"company_id": this.props.company.company_id, "company_id": this.props.company.company_id,
"get_for": this.state.get_for, "get_for": this.state.get_for,
"months": 0, "quartal": this.props.quarter,
"periode": this.props.periode, "periode": this.props.periode,
"report_id": this.props.report_id, "report_id": this.props.report_id,
"revision": Number(this.props.revision), "revision": Number(this.props.revision),
...@@ -259,7 +259,7 @@ export default class ProfitLossROO extends Component { ...@@ -259,7 +259,7 @@ export default class ProfitLossROO extends Component {
item.profit_loss.november === "" ? "0" : item.profit_loss.november, item.profit_loss.november === "" ? "0" : item.profit_loss.november,
item.profit_loss.december === "" ? "0" : item.profit_loss.december, item.profit_loss.december === "" ? "0" : item.profit_loss.december,
item.profit_loss.current_year_total === "" ? "0" : item.profit_loss.current_year_total, item.profit_loss.current_year_total === "" ? "0" : item.profit_loss.current_year_total,
item.profit_loss.actual_formula === "" ? "0" : item.profit_loss.actual_formula, "",
item.order, item.order,
]) ])
} }
...@@ -294,7 +294,7 @@ export default class ProfitLossROO extends Component { ...@@ -294,7 +294,7 @@ export default class ProfitLossROO extends Component {
item.profit_loss.november === "" ? "0" : item.profit_loss.november, item.profit_loss.november === "" ? "0" : item.profit_loss.november,
item.profit_loss.december === "" ? "0" : item.profit_loss.december, item.profit_loss.december === "" ? "0" : item.profit_loss.december,
item.profit_loss.current_year_total === "" ? "0" : item.profit_loss.current_year_total, item.profit_loss.current_year_total === "" ? "0" : item.profit_loss.current_year_total,
item.profit_loss.actual_formula === "" ? "0" : item.profit_loss.actual_formula, "",
item.order, item.order,
]) ])
if (item.children !== null) { if (item.children !== null) {
...@@ -327,37 +327,37 @@ export default class ProfitLossROO extends Component { ...@@ -327,37 +327,37 @@ export default class ProfitLossROO extends Component {
} }
downloadTemplate = async () => { downloadTemplate = async () => {
alert('Coming Soon ...') // alert('Coming Soon ...')
// let res = await fetch( let res = await fetch(
// `${process.env.REACT_APP_URL_MAIN_BE}/public/transaction/profit_loss/monthly_report/download_template?report_id=${this.props.report_id}&&company_id=${this.props.company.company_id}&&year=${this.props.periode}` `${process.env.REACT_APP_URL_MAIN_BE}/public/transaction/profit_loss/rolling_outlook/download_template?report_id=${this.props.report_id}&&company_id=${this.props.company.company_id}&&year=${this.props.periode}&&quartal=${this.props.quarter}`
// ) )
// res = await res.blob() res = await res.blob()
// // console.log(res) // console.log(res)
// if (res.size > 0) { if (res.size > 0) {
// let url = window.URL.createObjectURL(res); let url = window.URL.createObjectURL(res);
// let a = document.createElement('a'); let a = document.createElement('a');
// a.href = url; a.href = url;
// a.download = 'Template Monthly Report Profit Loss.xlsx'; a.download = 'Template Rolling Outlook Profit Loss.xlsx';
// a.click(); a.click();
// } }
} }
async downloadAllData() { async downloadAllData() {
alert('Coming Soon ...') // alert('Coming Soon ...')
// let url = `${process.env.REACT_APP_URL_MAIN_BE}/public/transaction/profit_loss/monthly_report/export_monthly_report?monthly_report_id=${this.props.monthlyReportId}&&report_id=${this.props.report_id}&&company_id=${this.props.company.company_id}&&year=${this.props.periode}&&revision=${this.props.revision}&&months=${this.props.month.month_id}` let url = `${process.env.REACT_APP_URL_MAIN_BE}/public/transaction/profit_loss/rolling_outlook/export_rolling_outlook?rolling_outlook_id=${this.props.rollingOutlookID}&&report_id=${this.props.report_id}&&company_id=${this.props.company.company_id}&&year=${this.props.periode}&&revision=${this.props.revision}&&quartal=${this.props.quarter}`
// console.log(url); console.log(url);
// let res = await fetch( let res = await fetch(
// `${process.env.REACT_APP_URL_MAIN_BE}/public/transaction/profit_loss/monthly_report/export_monthly_report?monthly_report_id=${this.props.monthlyReportId === null ? "" : this.props.monthlyReportId}&&report_id=${this.props.report_id}&&company_id=${this.props.company.company_id}&&year=${this.props.periode}&&revision=${this.props.revision}&&months=${this.props.month.month_id}` `${process.env.REACT_APP_URL_MAIN_BE}/public/transaction/profit_loss/rolling_outlook/export_rolling_outlook?rolling_outlook_id=${this.props.rollingOutlookID === null ? "" : this.props.rollingOutlookID}&&report_id=${this.props.report_id}&&company_id=${this.props.company.company_id}&&year=${this.props.periode}&&revision=${this.props.revision}&&quartal=${this.props.quarter}`
// ) )
// res = await res.blob() res = await res.blob()
// this.setState({ loading: false }) this.setState({ loading: false })
// if (res.size > 0) { if (res.size > 0) {
// let url = window.URL.createObjectURL(res); let url = window.URL.createObjectURL(res);
// let a = document.createElement('a'); let a = document.createElement('a');
// a.href = url; a.href = url;
// a.download = 'Monthly Report Profit Loss.xlsx'; a.download = 'Rolling Outlook Profit Loss.xlsx';
// a.click(); a.click();
// } }
} }
backToRollingOutlook(type) { backToRollingOutlook(type) {
...@@ -367,20 +367,21 @@ export default class ProfitLossROO extends Component { ...@@ -367,20 +367,21 @@ export default class ProfitLossROO extends Component {
this.state.dataTable.map(i => { this.state.dataTable.map(i => {
data.push({ data.push({
"item_report_id": i[1], "item_report_id": i[1],
"total_december_last_year": String(Number(i[6]).toFixed(1)), "notes": String(i[6]),
"january": String(Number(i[7]).toFixed(1)), "last_year_total": String(Number(i[7]).toFixed(1)),
"february": String(Number(i[8]).toFixed(1)), "january": String(Number(i[8]).toFixed(1)),
"march": String(Number(i[9]).toFixed(1)), "february": String(Number(i[9]).toFixed(1)),
"april": String(Number(i[10]).toFixed(1)), "march": String(Number(i[10]).toFixed(1)),
"may": String(Number(i[11]).toFixed(1)), "april": String(Number(i[11]).toFixed(1)),
"june": String(Number(i[12]).toFixed(1)), "may": String(Number(i[12]).toFixed(1)),
"july": String(Number(i[13]).toFixed(1)), "june": String(Number(i[13]).toFixed(1)),
"august": String(Number(i[14]).toFixed(1)), "july": String(Number(i[14]).toFixed(1)),
"september": String(Number(i[15]).toFixed(1)), "august": String(Number(i[15]).toFixed(1)),
"october": String(Number(i[16]).toFixed(1)), "september": String(Number(i[16]).toFixed(1)),
"november": String(Number(i[17]).toFixed(1)), "october": String(Number(i[17]).toFixed(1)),
"december": String(Number(i[18]).toFixed(1)), "november": String(Number(i[18]).toFixed(1)),
"total_december_year": String(Number(i[19]).toFixed(1)) "december": String(Number(i[19]).toFixed(1)),
"current_year_total": String(Number(i[20]).toFixed(1)),
}) })
}) })
let payload = { let payload = {
...@@ -388,7 +389,7 @@ export default class ProfitLossROO extends Component { ...@@ -388,7 +389,7 @@ export default class ProfitLossROO extends Component {
"company_id": this.props.company.company_id, "company_id": this.props.company.company_id,
"periode": this.props.periode, "periode": this.props.periode,
"report_id": this.props.report_id, "report_id": this.props.report_id,
"months": 0, "quartal": this.props.quarter,
"status": type, "status": type,
"balance_sheet": data "balance_sheet": data
} }
...@@ -398,13 +399,8 @@ export default class ProfitLossROO extends Component { ...@@ -398,13 +399,8 @@ export default class ProfitLossROO extends Component {
console.log(response); console.log(response);
if (response.data) { if (response.data) {
if (response.data.status === "success") { if (response.data.status === "success") {
if (type == 'submitted') { this.props.refresh()
// this.props.saveToMonthlyReport('PL') this.props.onClickClose()
this.props.onClickClose()
} else {
// this.props.saveToMonthlyReport()
this.props.onClickClose()
}
} else { } else {
this.setState({ alert: true, messageAlert: response.data.message, tipeAlert: 'warning', loading: false, handleTekTekTek: 0 }, () => { this.setState({ alert: true, messageAlert: response.data.message, tipeAlert: 'warning', loading: false, handleTekTekTek: 0 }, () => {
document.body.style.overflow = 'unset'; document.body.style.overflow = 'unset';
...@@ -766,6 +762,17 @@ export default class ProfitLossROO extends Component { ...@@ -766,6 +762,17 @@ export default class ProfitLossROO extends Component {
} }
const handleTotal = (val, tableMeta) => {
let total = 0
tableMeta.rowData.map((item,index) => {
if (index >= 8 && index <= 19) {
total += Number(item)
}
})
dataTable2[tableMeta.rowIndex][tableMeta.columnIndex] = Number(total).toFixed(1)
return total
}
let columns = [ let columns = [
{ {
name: "", name: "",
...@@ -940,11 +947,11 @@ export default class ProfitLossROO extends Component { ...@@ -940,11 +947,11 @@ export default class ProfitLossROO extends Component {
control={ control={
<NumberFormat <NumberFormat
thousandSeparator={true} thousandSeparator={true}
style={{ color: "#5198ea", fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }} style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text" type="text"
placeholder="" placeholder=""
// disabled={this.props.isApprover? true : (this.state.get_for == 'view'? true : false)} // disabled={this.props.isApprover? true : (this.state.get_for == 'view'? true : false)}
disabled={false} disabled={true}
value={Number(val).toFixed(1)} value={Number(val).toFixed(1)}
onBlur={(event) => { onBlur={(event) => {
handleChange(event.target.value, tableMeta) handleChange(event.target.value, tableMeta)
...@@ -1038,11 +1045,11 @@ export default class ProfitLossROO extends Component { ...@@ -1038,11 +1045,11 @@ export default class ProfitLossROO extends Component {
control={ control={
<NumberFormat <NumberFormat
thousandSeparator={true} thousandSeparator={true}
style={{ color: "#5198ea", fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }} style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text" type="text"
placeholder="" placeholder=""
// disabled={this.props.isApprover? true : (this.state.get_for == 'view'? true : false)} // disabled={this.props.isApprover? true : (this.state.get_for == 'view'? true : false)}
disabled={false} disabled={true}
value={Number(val).toFixed(1)} value={Number(val).toFixed(1)}
onBlur={(event) => { onBlur={(event) => {
handleChange(event.target.value, tableMeta) handleChange(event.target.value, tableMeta)
...@@ -1136,11 +1143,11 @@ export default class ProfitLossROO extends Component { ...@@ -1136,11 +1143,11 @@ export default class ProfitLossROO extends Component {
control={ control={
<NumberFormat <NumberFormat
thousandSeparator={true} thousandSeparator={true}
style={{ color: "#5198ea", fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }} style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text" type="text"
placeholder="" placeholder=""
// disabled={this.props.isApprover? true : (this.state.get_for == 'view'? true : false)} // disabled={this.props.isApprover? true : (this.state.get_for == 'view'? true : false)}
disabled={false} disabled={true}
value={Number(val).toFixed(1)} value={Number(val).toFixed(1)}
onBlur={(event) => { onBlur={(event) => {
handleChange(event.target.value, tableMeta) handleChange(event.target.value, tableMeta)
...@@ -1234,11 +1241,11 @@ export default class ProfitLossROO extends Component { ...@@ -1234,11 +1241,11 @@ export default class ProfitLossROO extends Component {
control={ control={
<NumberFormat <NumberFormat
thousandSeparator={true} thousandSeparator={true}
style={{ color: "#5198ea", fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }} style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text" type="text"
placeholder="" placeholder=""
// disabled={this.props.isApprover? true : (this.state.get_for == 'view'? true : false)} // disabled={this.props.isApprover? true : (this.state.get_for == 'view'? true : false)}
disabled={false} disabled={true}
value={Number(val).toFixed(1)} value={Number(val).toFixed(1)}
onBlur={(event) => { onBlur={(event) => {
handleChange(event.target.value, tableMeta) handleChange(event.target.value, tableMeta)
...@@ -1332,11 +1339,11 @@ export default class ProfitLossROO extends Component { ...@@ -1332,11 +1339,11 @@ export default class ProfitLossROO extends Component {
control={ control={
<NumberFormat <NumberFormat
thousandSeparator={true} thousandSeparator={true}
style={{ color: "#5198ea", fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }} style={{ color: this.props.quarter == 'q1'? "#5198ea" : '#555252', fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text" type="text"
placeholder="" placeholder=""
// disabled={this.props.isApprover? true : (this.state.get_for == 'view'? true : false)} // disabled={this.props.isApprover? true : (this.state.get_for == 'view'? true : false)}
disabled={false} disabled={this.props.quarter == 'q1'? true : false}
value={Number(val).toFixed(1)} value={Number(val).toFixed(1)}
onBlur={(event) => { onBlur={(event) => {
handleChange(event.target.value, tableMeta) handleChange(event.target.value, tableMeta)
...@@ -1430,11 +1437,11 @@ export default class ProfitLossROO extends Component { ...@@ -1430,11 +1437,11 @@ export default class ProfitLossROO extends Component {
control={ control={
<NumberFormat <NumberFormat
thousandSeparator={true} thousandSeparator={true}
style={{ color: "#5198ea", fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }} style={{ color: this.props.quarter == 'q1'? "#5198ea" : '#555252', fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text" type="text"
placeholder="" placeholder=""
// disabled={this.props.isApprover? true : (this.state.get_for == 'view'? true : false)} // disabled={this.props.isApprover? true : (this.state.get_for == 'view'? true : false)}
disabled={false} disabled={this.props.quarter == 'q1'? true : false}
value={Number(val).toFixed(1)} value={Number(val).toFixed(1)}
onBlur={(event) => { onBlur={(event) => {
handleChange(event.target.value, tableMeta) handleChange(event.target.value, tableMeta)
...@@ -1528,11 +1535,11 @@ export default class ProfitLossROO extends Component { ...@@ -1528,11 +1535,11 @@ export default class ProfitLossROO extends Component {
control={ control={
<NumberFormat <NumberFormat
thousandSeparator={true} thousandSeparator={true}
style={{ color: "#5198ea", fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }} style={{ color: this.props.quarter == 'q1'? "#5198ea" : '#555252', fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text" type="text"
placeholder="" placeholder=""
// disabled={this.props.isApprover? true : (this.state.get_for == 'view'? true : false)} // disabled={this.props.isApprover? true : (this.state.get_for == 'view'? true : false)}
disabled={false} disabled={this.props.quarter == 'q1'? true : false}
value={Number(val).toFixed(1)} value={Number(val).toFixed(1)}
onBlur={(event) => { onBlur={(event) => {
handleChange(event.target.value, tableMeta) handleChange(event.target.value, tableMeta)
...@@ -1626,11 +1633,11 @@ export default class ProfitLossROO extends Component { ...@@ -1626,11 +1633,11 @@ export default class ProfitLossROO extends Component {
control={ control={
<NumberFormat <NumberFormat
thousandSeparator={true} thousandSeparator={true}
style={{ color: "#5198ea", fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }} style={{ color: this.props.quarter == 'q1' || this.props.quarter == 'q2'? "#5198ea" : '#555252', fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text" type="text"
placeholder="" placeholder=""
// disabled={this.props.isApprover? true : (this.state.get_for == 'view'? true : false)} // disabled={this.props.isApprover? true : (this.state.get_for == 'view'? true : false)}
disabled={false} disabled={this.props.quarter == 'q1' || this.props.quarter == 'q2'? true : false}
value={Number(val).toFixed(1)} value={Number(val).toFixed(1)}
onBlur={(event) => { onBlur={(event) => {
handleChange(event.target.value, tableMeta) handleChange(event.target.value, tableMeta)
...@@ -1724,11 +1731,11 @@ export default class ProfitLossROO extends Component { ...@@ -1724,11 +1731,11 @@ export default class ProfitLossROO extends Component {
control={ control={
<NumberFormat <NumberFormat
thousandSeparator={true} thousandSeparator={true}
style={{ color: "#5198ea", fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }} style={{ color: this.props.quarter == 'q1' || this.props.quarter == 'q2'? "#5198ea" : '#555252', fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text" type="text"
placeholder="" placeholder=""
// disabled={this.props.isApprover? true : (this.state.get_for == 'view'? true : false)} // disabled={this.props.isApprover? true : (this.state.get_for == 'view'? true : false)}
disabled={false} disabled={this.props.quarter == 'q1' || this.props.quarter == 'q2'? true : false}
value={Number(val).toFixed(1)} value={Number(val).toFixed(1)}
onBlur={(event) => { onBlur={(event) => {
handleChange(event.target.value, tableMeta) handleChange(event.target.value, tableMeta)
...@@ -1822,11 +1829,11 @@ export default class ProfitLossROO extends Component { ...@@ -1822,11 +1829,11 @@ export default class ProfitLossROO extends Component {
control={ control={
<NumberFormat <NumberFormat
thousandSeparator={true} thousandSeparator={true}
style={{ color: "#5198ea", fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }} style={{ color: this.props.quarter == 'q1' || this.props.quarter == 'q2'? "#5198ea" : '#555252', fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text" type="text"
placeholder="" placeholder=""
// disabled={this.props.isApprover? true : (this.state.get_for == 'view'? true : false)} // disabled={this.props.isApprover? true : (this.state.get_for == 'view'? true : false)}
disabled={false} disabled={this.props.quarter == 'q1' || this.props.quarter == 'q2'? true : false}
value={Number(val).toFixed(1)} value={Number(val).toFixed(1)}
onBlur={(event) => { onBlur={(event) => {
handleChange(event.target.value, tableMeta) handleChange(event.target.value, tableMeta)
...@@ -2214,12 +2221,12 @@ export default class ProfitLossROO extends Component { ...@@ -2214,12 +2221,12 @@ export default class ProfitLossROO extends Component {
control={ control={
<NumberFormat <NumberFormat
thousandSeparator={true} thousandSeparator={true}
style={{ color: "#5198ea", fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }} style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text" type="text"
placeholder="" placeholder=""
// disabled={this.props.isApprover? true : (this.state.get_for == 'view'? true : false)} // disabled={this.props.isApprover? true : (this.state.get_for == 'view'? true : false)}
disabled={false} disabled={true}
value={Number(val).toFixed(1)} value={Number(handleTotal(val, tableMeta)).toFixed(1)}
onBlur={(event) => { onBlur={(event) => {
handleChange(event.target.value, tableMeta) handleChange(event.target.value, tableMeta)
}} }}
......
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