Commit 01c05bf3 authored by Dida Adams Arizona's avatar Dida Adams Arizona

Merge branch 'didam' into 'master'

uponuphill

See merge request !785
parents 723b4cd3 480e7a56
...@@ -94,8 +94,8 @@ export default class CorporateAnnualTarget extends Component { ...@@ -94,8 +94,8 @@ export default class CorporateAnnualTarget extends Component {
this.getKPIType() this.getKPIType()
this.getMaxAch() this.getMaxAch()
this.getLatestUpdate() this.getLatestUpdate()
// // console.log(this.props.status) // // // console.log(this.props.status)
// // // console.log(this.props.lastStatus); // // // // console.log(this.props.lastStatus);
} }
...@@ -108,7 +108,7 @@ export default class CorporateAnnualTarget extends Component { ...@@ -108,7 +108,7 @@ export default class CorporateAnnualTarget extends Component {
"company_id": this.props.company.company_id, "company_id": this.props.company.company_id,
"submission_id": this.props.submissionID "submission_id": this.props.submissionID
} }
// // console.log(JSON.stringify(payload)) // // // console.log(JSON.stringify(payload))
api.create().getDetailReportMB(payload).then(response => { api.create().getDetailReportMB(payload).then(response => {
let dataTable = [] let dataTable = []
let dataCustomerPrs = [] let dataCustomerPrs = []
...@@ -173,7 +173,7 @@ export default class CorporateAnnualTarget extends Component { ...@@ -173,7 +173,7 @@ export default class CorporateAnnualTarget extends Component {
item.level, item.level,
"", "",
item.description, item.description,
item.type_report_id == 1 ? `${Number(item.weight) * 100}%` : (String(item.cat.weight).indexOf(".") == -1 ? item.cat.weight : `${Number(item.weight) * 100}%`), item.type_report_id == 1 ? `${Number(item.weight) * 100}%` : (String(Number(String(item.cat.weight).substr(0,String(item.cat.weight).length-1)).toFixed(1)) + '%'),
parentTrue ? item.cat.uom : item.uom, parentTrue ? item.cat.uom : item.uom,
parentTrue ? item.cat.kpi_type == "" ? null : { value: item.cat.kpi_type } : item.kpi_type == "" ? null : { value: item.kpi_type }, parentTrue ? item.cat.kpi_type == "" ? null : { value: item.cat.kpi_type } : item.kpi_type == "" ? null : { value: item.kpi_type },
parentTrue ? item.cat.max_ach == "" ? null : { value: titleCase(item.cat.max_ach) } : item.max_ach == "" ? null : { value: titleCase(item.max_ach) }, parentTrue ? item.cat.max_ach == "" ? null : { value: titleCase(item.cat.max_ach) } : item.max_ach == "" ? null : { value: titleCase(item.max_ach) },
...@@ -217,7 +217,7 @@ export default class CorporateAnnualTarget extends Component { ...@@ -217,7 +217,7 @@ export default class CorporateAnnualTarget extends Component {
item.level, item.level,
"", "",
item.description, item.description,
item.type_report_id == 1 ? `${Number(item.weight) * 100}%` : item.cat.weight, item.type_report_id == 1 ? `${Number(item.weight) * 100}%` : (String(Number(String(item.cat.weight).substr(0,String(item.cat.weight).length-1)).toFixed(1)) + '%'),
item.cat.uom, item.cat.uom,
item.kpi_type == "" ? null : { value: item.kpi_type }, item.kpi_type == "" ? null : { value: item.kpi_type },
item.max_ach == "" ? null : { value: titleCase(item.max_ach) }, item.max_ach == "" ? null : { value: titleCase(item.max_ach) },
...@@ -251,9 +251,9 @@ export default class CorporateAnnualTarget extends Component { ...@@ -251,9 +251,9 @@ export default class CorporateAnnualTarget extends Component {
} }
} }
}) })
// console.log(dataTable) // // console.log(dataTable)
this.setState({ dataTable, loading: false, dataReal: res, editable: true, dataCustomerPrs, dataInternalBsn, dataFin, dataLearn}, () => { this.setState({ dataTable, loading: false, dataReal: res, editable: true, dataCustomerPrs, dataInternalBsn, dataFin, dataLearn}, () => {
// // console.log(dataCustomerPrs) // // // console.log(dataCustomerPrs)
}) })
} else { } else {
this.setState({ alert: true, messageAlert: response.data.message, tipeAlert: 'warning', loading: false }, () => { this.setState({ alert: true, messageAlert: response.data.message, tipeAlert: 'warning', loading: false }, () => {
...@@ -281,7 +281,7 @@ export default class CorporateAnnualTarget extends Component { ...@@ -281,7 +281,7 @@ export default class CorporateAnnualTarget extends Component {
`https://tia.eksad.com/tia-reporting-dev/public/transaction/master_budget/download_template?report_id=${this.props.report_id}&&company_id=${this.props.company.company_id}&&year=${this.props.periode}` `https://tia.eksad.com/tia-reporting-dev/public/transaction/master_budget/download_template?report_id=${this.props.report_id}&&company_id=${this.props.company.company_id}&&year=${this.props.periode}`
) )
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');
...@@ -292,16 +292,16 @@ export default class CorporateAnnualTarget extends Component { ...@@ -292,16 +292,16 @@ export default class CorporateAnnualTarget extends Component {
} }
async downloadAllData() { async downloadAllData() {
// // // console.log('masuk') // // // // console.log('masuk')
let bram = [this.props.submissionID, this.props.report_id, this.props.company.company_id, this.props.periode, this.props.revision] let bram = [this.props.submissionID, this.props.report_id, this.props.company.company_id, this.props.periode, this.props.revision]
// // // console.log(bram) // // // // console.log(bram)
let resReal = `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}` let resReal = `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}`
let resNull = `https://tia.eksad.com/tia-reporting-dev/public/transaction/master_budget/export_master_budget?submission_id=&&report_id=${this.props.report_id}&&company_id=${this.props.company.company_id}&&year=${this.props.periode}&&revision=${this.props.revision}` let resNull = `https://tia.eksad.com/tia-reporting-dev/public/transaction/master_budget/export_master_budget?submission_id=&&report_id=${this.props.report_id}&&company_id=${this.props.company.company_id}&&year=${this.props.periode}&&revision=${this.props.revision}`
let res = await fetch( let res = await fetch(
this.props.submissionID == null ? resNull : resReal this.props.submissionID == null ? resNull : resReal
) )
res = await res.blob() res = await res.blob()
// // // console.log(res) // // // // console.log(res)
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);
...@@ -315,13 +315,13 @@ export default class CorporateAnnualTarget extends Component { ...@@ -315,13 +315,13 @@ export default class CorporateAnnualTarget extends Component {
fileHandler = (event) => { fileHandler = (event) => {
let fileObj = event let fileObj = event
ExcelRenderer(fileObj, (err, resp) => { ExcelRenderer(fileObj, (err, resp) => {
// // // // console.log(resp) // // // // // console.log(resp)
if (err) { if (err) {
// // // console.log(err); // // // // console.log(err);
} }
else { else {
let isi = resp.rows.slice(3) let isi = resp.rows.slice(3)
// console.log(isi); // // console.log(isi);
let payload = [] let payload = []
let reg = /^[-+]?(?:[0-9]+,)*[0-9]+(?:\.[0-9]+)?$/; let reg = /^[-+]?(?:[0-9]+,)*[0-9]+(?:\.[0-9]+)?$/;
let newValidate = false let newValidate = false
...@@ -358,7 +358,7 @@ export default class CorporateAnnualTarget extends Component { ...@@ -358,7 +358,7 @@ export default class CorporateAnnualTarget extends Component {
payload.push({ payload.push({
item_report_id: i[0] === undefined ? 0 : reg.test(String(i[0])) === false ? 0 : String(i[0]).trim(), item_report_id: i[0] === undefined ? 0 : reg.test(String(i[0])) === false ? 0 : String(i[0]).trim(),
item_report: i[1] === undefined ? "" : String(i[1]).trim(), item_report: i[1] === undefined ? "" : String(i[1]).trim(),
weight: i[2] === undefined ? "" : (String(i[2]).includes('%')? String(i[2].trim()) : (String(Number(i[2] * 100)).length > 3 ? String(Number(i[2] * 100).toFixed(0) + '%') : String(Number(i[2] * 100)) + '%')), weight: i[2] === undefined ? "" : String(Number(i[2] * 100).toFixed(1)) + '%',
uom: i[3] === undefined ? "" : String(i[3]).trim(), uom: i[3] === undefined ? "" : String(i[3]).trim(),
kpi_type: i[4] === undefined ? "" : String(i[4]).trim(), kpi_type: i[4] === undefined ? "" : String(i[4]).trim(),
max_ach: i[5] === undefined ? "" : String(i[5]).toLocaleLowerCase() !== 'unlimited' ? (String(i[5]).includes('%')? String(i[5].trim()) : String(Number(i[5] * 100) + '%')) : String(i[5]).trim(), max_ach: i[5] === undefined ? "" : String(i[5]).toLocaleLowerCase() !== 'unlimited' ? (String(i[5]).includes('%')? String(i[5].trim()) : String(Number(i[5] * 100) + '%')) : String(i[5]).trim(),
...@@ -387,7 +387,7 @@ export default class CorporateAnnualTarget extends Component { ...@@ -387,7 +387,7 @@ export default class CorporateAnnualTarget extends Component {
payload.push({ payload.push({
item_report_id: i[0] === undefined ? 0 : reg.test(String(i[0])) === false ? 0 : String(i[0]).trim(), item_report_id: i[0] === undefined ? 0 : reg.test(String(i[0])) === false ? 0 : String(i[0]).trim(),
item_report: i[1] === undefined ? "" : String(i[1]).trim(), item_report: i[1] === undefined ? "" : String(i[1]).trim(),
weight: i[2] === undefined ? "" : (String(i[2]).includes('%')? String(i[2].trim()) : (String(Number(i[2] * 100)).length > 3 ? String(Number(i[2] * 100).toFixed(0) + '%') : String(Number(i[2] * 100)) + '%')), weight: i[2] === undefined ? "" : String(Number(i[2] * 100).toFixed(1)) + '%',
uom: i[3] === undefined ? "" : String(i[3]).trim(), uom: i[3] === undefined ? "" : String(i[3]).trim(),
kpi_type: i[4] === undefined ? "" : String(i[4]).trim(), kpi_type: i[4] === undefined ? "" : String(i[4]).trim(),
max_ach: i[5] === undefined ? "" : String(i[5]).toLocaleLowerCase() !== 'unlimited' ? (String(i[5]).includes('%')? String(i[5].trim()) : String(Number(i[5] * 100) + '%')) : String(i[5]).trim(), max_ach: i[5] === undefined ? "" : String(i[5]).toLocaleLowerCase() !== 'unlimited' ? (String(i[5]).includes('%')? String(i[5].trim()) : String(Number(i[5] * 100) + '%')) : String(i[5]).trim(),
...@@ -412,14 +412,14 @@ export default class CorporateAnnualTarget extends Component { ...@@ -412,14 +412,14 @@ export default class CorporateAnnualTarget extends Component {
pic: i[24] === undefined ? "" : String(i[24]).trim() pic: i[24] === undefined ? "" : String(i[24]).trim()
}) })
} }
// console.log(i[2]) // // console.log(i[2])
// // console.log(Number(i[2] * 100)) // // // console.log(Number(i[2] * 100))
// // // // console.log(i[2] === undefined ? "" : String(Number(i[2]*100)).length > 3? String(Number(i[2]*100).toFixed(0) + '%') : String(Number(i[2]*100)) + '%') // // // // // console.log(i[2] === undefined ? "" : String(Number(i[2]*100)).length > 3? String(Number(i[2]*100).toFixed(0) + '%') : String(Number(i[2]*100)) + '%')
} }
}) })
// console.log(payload) // // console.log(payload)
let body = { let body = {
company_id: this.props.company.company_id, company_id: this.props.company.company_id,
periode: this.props.periode, periode: this.props.periode,
...@@ -427,7 +427,7 @@ export default class CorporateAnnualTarget extends Component { ...@@ -427,7 +427,7 @@ export default class CorporateAnnualTarget extends Component {
status: '', status: '',
cat: payload cat: payload
} }
// // // console.log(body) // // // // console.log(body)
this.setState({ payload: body, judul: resp.rows[1][0] }) this.setState({ payload: body, judul: resp.rows[1][0] })
} }
}); });
...@@ -438,7 +438,7 @@ export default class CorporateAnnualTarget extends Component { ...@@ -438,7 +438,7 @@ export default class CorporateAnnualTarget extends Component {
let dataDelete = this.state.dataDelete let dataDelete = this.state.dataDelete
api.create().getIdDeleteFromExcel(this.state.payload).then((response) => { api.create().getIdDeleteFromExcel(this.state.payload).then((response) => {
if (response.data) { if (response.data) {
// // // // console.log(response.data) // // // // // console.log(response.data)
let idDelete = response.data.data.item_report_id let idDelete = response.data.data.item_report_id
if (idDelete.length > 0) { if (idDelete.length > 0) {
idDelete.map((item, index) => { idDelete.map((item, index) => {
...@@ -450,7 +450,7 @@ export default class CorporateAnnualTarget extends Component { ...@@ -450,7 +450,7 @@ export default class CorporateAnnualTarget extends Component {
}) })
// console.log(this.state.payload) // console.log(this.state.payload)
api.create().checkUploadMB(this.state.payload).then(response => { api.create().checkUploadMB(this.state.payload).then(response => {
// console.log(JSON.stringify(this.state.payload)); // // console.log(JSON.stringify(this.state.payload));
// console.log(response) // console.log(response)
if (response.data) { if (response.data) {
if (response.ok) { if (response.ok) {
...@@ -512,7 +512,7 @@ export default class CorporateAnnualTarget extends Component { ...@@ -512,7 +512,7 @@ export default class CorporateAnnualTarget extends Component {
item.level == null ? 1 : item.level, item.level == null ? 1 : item.level,
"", "",
item.item_report, item.item_report,
item.type_report_id == 1 ? `${Number(item.weight) * 100}%` : (String(item.weight).indexOf(".") == -1 ? item.weight : `${Number(item.weight) * 100}%`), item.type_report_id == 1 ? `${Number(item.weight) * 100}%` : (String(item.weight)),
item.uom, item.uom,
item.kpi_type == "" || item.kpi_type == null ? null : { value: item.kpi_type }, item.kpi_type == "" || item.kpi_type == null ? null : { value: item.kpi_type },
item.max_ach == "" || item.max_ach == null ? null : { value: titleCase(item.max_ach) }, item.max_ach == "" || item.max_ach == null ? null : { value: titleCase(item.max_ach) },
...@@ -547,17 +547,17 @@ export default class CorporateAnnualTarget extends Component { ...@@ -547,17 +547,17 @@ export default class CorporateAnnualTarget extends Component {
if (checkDataFin.length > 0 || checkDataLearn.length > 0) { if (checkDataFin.length > 0 || checkDataLearn.length > 0) {
handleDataSalah = true handleDataSalah = true
} }
// console.log(indexCheck) // // console.log(indexCheck)
// // // console.log(this.state.buttonError) // // // // console.log(this.state.buttonError)
// console.log(dataTable) // // console.log(dataTable)
this.setState({ dataTable, dataLoaded: true, loading: false, buttonError: false, editable: true, dataDelete, handleDataSalah }, () => { this.setState({ dataTable, dataLoaded: true, loading: false, buttonError: false, editable: true, dataDelete, handleDataSalah }, () => {
this.state.dataTable.map(item => { this.state.dataTable.map(item => {
if (item[30].length > 0) { if (item[30].length > 0) {
// // // console.log('masuk') // // // // console.log('masuk')
this.setState({ buttonError: true, errorPreview: true, editable: true }) this.setState({ buttonError: true, errorPreview: true, editable: true })
} }
}) })
// // // // console.log(this.state.dataTable); // // // // // console.log(this.state.dataTable);
}) })
} else { } else {
this.setState({ alert: true, messageAlert: response.data.message, tipeAlert: 'warning', loading: false }, () => { this.setState({ alert: true, messageAlert: response.data.message, tipeAlert: 'warning', loading: false }, () => {
...@@ -580,7 +580,7 @@ export default class CorporateAnnualTarget extends Component { ...@@ -580,7 +580,7 @@ export default class CorporateAnnualTarget extends Component {
uploadCAT(type) { uploadCAT(type) {
// let dataDelete = this.state.dataDelete // let dataDelete = this.state.dataDelete
// // // console.log(dataDelete) // // // // console.log(dataDelete)
let payload = { "item_report_id": this.state.dataDelete } let payload = { "item_report_id": this.state.dataDelete }
if (this.state.dataDelete.length > 0) { if (this.state.dataDelete.length > 0) {
api.create().deleteAllItemReport(payload).then((response) => { api.create().deleteAllItemReport(payload).then((response) => {
...@@ -595,7 +595,7 @@ export default class CorporateAnnualTarget extends Component { ...@@ -595,7 +595,7 @@ export default class CorporateAnnualTarget extends Component {
functionUpload(type) { functionUpload(type) {
let data = [] let data = []
let stateFR = false let stateFR = false
// // console.log(this.state.dataTable) // // // console.log(this.state.dataTable)
this.state.dataTable.map(i => { this.state.dataTable.map(i => {
if (i[2] !== null) { if (i[2] !== null) {
let indexID = this.state.dataTable.findIndex((val) => val[1] == i[2]) let indexID = this.state.dataTable.findIndex((val) => val[1] == i[2])
...@@ -647,10 +647,10 @@ export default class CorporateAnnualTarget extends Component { ...@@ -647,10 +647,10 @@ export default class CorporateAnnualTarget extends Component {
"status": type, "status": type,
"cat": data "cat": data
} }
// console.log(data); // // console.log(data);
// console.log(JSON.stringify(body)) // // console.log(JSON.stringify(body))
api.create('UPLOAD').uploadMasterBudget(body).then(response => { api.create('UPLOAD').uploadMasterBudget(body).then(response => {
// // // console.log(response); // // // // console.log(response);
if (response.data) { if (response.data) {
if (response.ok) { if (response.ok) {
if (response.data.status === "success") { if (response.data.status === "success") {
...@@ -677,7 +677,7 @@ export default class CorporateAnnualTarget extends Component { ...@@ -677,7 +677,7 @@ export default class CorporateAnnualTarget extends Component {
handleValidate() { handleValidate() {
let data = [] let data = []
// // console.log(this.state.dataTable) // // // console.log(this.state.dataTable)
let totalWeight = 0 let totalWeight = 0
let dataTableBaru = this.state.dataTable let dataTableBaru = this.state.dataTable
let dataTampung = [] let dataTampung = []
...@@ -699,14 +699,14 @@ export default class CorporateAnnualTarget extends Component { ...@@ -699,14 +699,14 @@ export default class CorporateAnnualTarget extends Component {
if (i[2] !== null) { if (i[2] !== null) {
let indexID = this.state.dataTable.findIndex((val) => val[1] == i[2]) let indexID = this.state.dataTable.findIndex((val) => val[1] == i[2])
// // // console.log(indexID) // // // // console.log(indexID)
// // // console.log(i[2]) // // // // console.log(i[2])
if (indexID !== -1) { if (indexID !== -1) {
// // // console.log(dataTableBaru[indexID][6]) // // // // console.log(dataTableBaru[indexID][6])
if (dataTableBaru[indexID][6] == 'INTERNAL BUSINESS PROCESS PERSPECTIVE' || dataTableBaru[indexID][6] == 'CUSTOMER PERSPECTIVE') { if (dataTableBaru[indexID][6] == 'INTERNAL BUSINESS PROCESS PERSPECTIVE' || dataTableBaru[indexID][6] == 'CUSTOMER PERSPECTIVE') {
if (i[6] == "" || i[7] == "" || i[9] == null || i[10] == null || i[11] == null) { if (i[6] == "" || i[7] == "" || i[9] == null || i[10] == null || i[11] == null) {
handleKosongKPIMAXYTD = true handleKosongKPIMAXYTD = true
// // // console.log(handleKosongKPIMAXYTD) // // // // console.log(handleKosongKPIMAXYTD)
} }
} else if (dataTableBaru[indexID][6] === 'FINANCIAL PERSPECTIVE') { } else if (dataTableBaru[indexID][6] === 'FINANCIAL PERSPECTIVE') {
stateFR = true stateFR = true
...@@ -719,7 +719,7 @@ export default class CorporateAnnualTarget extends Component { ...@@ -719,7 +719,7 @@ export default class CorporateAnnualTarget extends Component {
// if (i[0] == null && i[2] == null) { // if (i[0] == null && i[2] == null) {
// if (i[6] == "" || i[7] == "" || i[9] == null || i[10] == null || i[11] == null) { // if (i[6] == "" || i[7] == "" || i[9] == null || i[10] == null || i[11] == null) {
// handleKosongKPIMAXYTD = true // handleKosongKPIMAXYTD = true
// // // // console.log(handleKosongKPIMAXYTD) // // // // // console.log(handleKosongKPIMAXYTD)
// } // }
// } // }
...@@ -739,17 +739,18 @@ export default class CorporateAnnualTarget extends Component { ...@@ -739,17 +739,18 @@ export default class CorporateAnnualTarget extends Component {
weightReal = i[7] weightReal = i[7]
dataTampung[indexID].valChild = dataTampung[indexID].valChild + Number(i[7] == "" || i[7] == undefined ? 0 : i[7].replace('%', '')) dataTampung[indexID].valChild = dataTampung[indexID].valChild + Number(i[7] == "" || i[7] == undefined ? 0 : i[7].replace('%', ''))
} }
// // // console.log(weightReal) // // // // console.log(weightReal)
// // // console.log(dataTableBaru[index][7]) // // // // console.log(dataTableBaru[index][7])
// // // console.log(dataTampung[indexID].valChild) // // // // console.log(dataTampung[indexID].valChild)
} }
} }
// // console.log(String(weightReal).substr(0,String(weightReal).length-1))
// // console.log(Number(String(weightReal).substr(0,String(weightReal).length-1)).toFixed(1));
data.push({ data.push({
"item_report_id": i[1] == "" || i[1] == null ? 0 : i[1], "item_report_id": i[1] == "" || i[1] == null ? 0 : i[1],
"item_name": String(i[6]), "item_name": String(i[6]),
"parent": i[2] == "" ? null : i[2], "parent": i[2] == "" ? null : i[2],
"weight": weightReal == null ? String(i[7]) : weightReal, "weight": weightReal == null ? String(i[7]) : String(Number(String(weightReal).substr(0,String(weightReal).length-1)).toFixed(1)) + '%',
"uom": String(i[8]), "uom": String(i[8]),
"kpi_type": i[9] == null ? "" : i[9].value, "kpi_type": i[9] == null ? "" : i[9].value,
"max_ach": i[10] == null ? "" : i[10].value, "max_ach": i[10] == null ? "" : i[10].value,
...@@ -775,8 +776,8 @@ export default class CorporateAnnualTarget extends Component { ...@@ -775,8 +776,8 @@ export default class CorporateAnnualTarget extends Component {
}) })
}) })
// // // console.log(dataTableBaru) // // // // console.log(dataTableBaru)
// // // console.log(JSON.stringify(data)) // // // // console.log(JSON.stringify(data))
let payload = { let payload = {
"submission_id": this.props.submissionID, "submission_id": this.props.submissionID,
"company_id": this.props.company.company_id, "company_id": this.props.company.company_id,
...@@ -785,7 +786,7 @@ export default class CorporateAnnualTarget extends Component { ...@@ -785,7 +786,7 @@ export default class CorporateAnnualTarget extends Component {
"status": "submitted", "status": "submitted",
"cat": data "cat": data
} }
// // // console.log(totalWeight) // // // // console.log(totalWeight)
// this.setState({dataTable: dataTampung}) // this.setState({dataTable: dataTampung})
if (handleKosongKPIMAXYTD) { if (handleKosongKPIMAXYTD) {
this.setState({ alert: true, messageAlert: 'KPI / Weight / KPI Type / Max Ach / Formula YTD / Cannot be Empty', tipeAlert: 'warning', loading: false, editable: true }) this.setState({ alert: true, messageAlert: 'KPI / Weight / KPI Type / Max Ach / Formula YTD / Cannot be Empty', tipeAlert: 'warning', loading: false, editable: true })
...@@ -793,7 +794,7 @@ export default class CorporateAnnualTarget extends Component { ...@@ -793,7 +794,7 @@ export default class CorporateAnnualTarget extends Component {
this.setState({ alert: true, messageAlert: 'Total weight less than 100%', tipeAlert: 'warning', loading: false, editable: true }) this.setState({ alert: true, messageAlert: 'Total weight less than 100%', tipeAlert: 'warning', loading: false, editable: true })
} else { } else {
api.create().validateSubmitReport(payload).then((response) => { api.create().validateSubmitReport(payload).then((response) => {
// // // console.log(response) // // // // console.log(response)
if (response.data.data.result) { if (response.data.data.result) {
this.setState({ loading: false, buttonError: false, editable: false, buttonDraft: false }) this.setState({ loading: false, buttonError: false, editable: false, buttonDraft: false })
} else { } else {
...@@ -810,14 +811,14 @@ export default class CorporateAnnualTarget extends Component { ...@@ -810,14 +811,14 @@ export default class CorporateAnnualTarget extends Component {
backToMasterBudget(type) { backToMasterBudget(type) {
let data = [] let data = []
let stateFR = false let stateFR = false
// // console.log(this.state.dataTable) // // // console.log(this.state.dataTable)
this.state.dataTable.map(i => { this.state.dataTable.map(i => {
if (i[2] !== null) { if (i[2] !== null) {
let indexID = this.state.dataTable.findIndex((val) => val[1] == i[2]) let indexID = this.state.dataTable.findIndex((val) => val[1] == i[2])
// // // console.log(indexID) // // // // console.log(indexID)
// // // console.log(i[2]) // // // // console.log(i[2])
if (indexID !== -1) { if (indexID !== -1) {
// // // console.log(dataTableBaru[indexID][6]) // // // // console.log(dataTableBaru[indexID][6])
if (this.state.dataTable[indexID][6] === 'FINANCIAL PERSPECTIVE') { if (this.state.dataTable[indexID][6] === 'FINANCIAL PERSPECTIVE') {
stateFR = true stateFR = true
} else { } else {
...@@ -827,7 +828,7 @@ export default class CorporateAnnualTarget extends Component { ...@@ -827,7 +828,7 @@ export default class CorporateAnnualTarget extends Component {
} else { } else {
stateFR = false stateFR = false
} }
// // // // console.log(i[9] == null? "" : i[9].value) // // // // // console.log(i[9] == null? "" : i[9].value)
data.push({ data.push({
"item_report_id": i[1] == "" || i[1] == null ? 0 : i[1], "item_report_id": i[1] == "" || i[1] == null ? 0 : i[1],
"item_name": String(i[6]), "item_name": String(i[6]),
...@@ -857,7 +858,7 @@ export default class CorporateAnnualTarget extends Component { ...@@ -857,7 +858,7 @@ export default class CorporateAnnualTarget extends Component {
"pic": String(i[29]) "pic": String(i[29])
}) })
}) })
// // console.log(JSON.stringify(data)) // // // console.log(JSON.stringify(data))
let payload = { let payload = {
"submission_id": this.props.submissionID, "submission_id": this.props.submissionID,
"company_id": this.props.company.company_id, "company_id": this.props.company.company_id,
...@@ -866,7 +867,7 @@ export default class CorporateAnnualTarget extends Component { ...@@ -866,7 +867,7 @@ export default class CorporateAnnualTarget extends Component {
"status": type, "status": type,
"cat": data "cat": data
} }
// // console.log(JSON.stringify(payload)); // console.log(JSON.stringify(payload));
this.deleteReport(payload) this.deleteReport(payload)
} }
...@@ -875,10 +876,10 @@ export default class CorporateAnnualTarget extends Component { ...@@ -875,10 +876,10 @@ export default class CorporateAnnualTarget extends Component {
if (this.state.dataDelete.length > 0) { if (this.state.dataDelete.length > 0) {
api.create().deleteAllItemReport(payload).then((response) => { api.create().deleteAllItemReport(payload).then((response) => {
// // // console.log(response) // // // // console.log(response)
// api.create().validateSubmitReport(payloadBro).then((response) => { // api.create().validateSubmitReport(payloadBro).then((response) => {
// // // // console.log(response) // // // // // console.log(response)
// if (response.data.data.result) { // if (response.data.data.result) {
this.props.saveToMasterBudget(payloadBro) this.props.saveToMasterBudget(payloadBro)
this.props.onClickClose() this.props.onClickClose()
...@@ -888,9 +889,9 @@ export default class CorporateAnnualTarget extends Component { ...@@ -888,9 +889,9 @@ export default class CorporateAnnualTarget extends Component {
// }) // })
}) })
} else { } else {
// // // // console.log('sini jing') // // // // // console.log('sini jing')
// api.create().validateSubmitReport(payloadBro).then((response) => { // api.create().validateSubmitReport(payloadBro).then((response) => {
// // // // console.log(response) // // // // // console.log(response)
// if (response.data.data.result) { // if (response.data.data.result) {
this.props.saveToMasterBudget(payloadBro) this.props.saveToMasterBudget(payloadBro)
this.props.onClickClose() this.props.onClickClose()
...@@ -909,12 +910,12 @@ export default class CorporateAnnualTarget extends Component { ...@@ -909,12 +910,12 @@ export default class CorporateAnnualTarget extends Component {
type: 'KPI_TYPE' type: 'KPI_TYPE'
} }
api.create().getAllSettingByType(body).then(response => { api.create().getAllSettingByType(body).then(response => {
// // // // console.log(response) // // // // // console.log(response)
if (response.data) { if (response.data) {
if (response.ok) { if (response.ok) {
if (response.data.status === 'success') { if (response.data.status === 'success') {
let data = response.data.data let data = response.data.data
// // // console.log(data) // // // // console.log(data)
let inputKPI = [] let inputKPI = []
data.map((item) => { data.map((item) => {
...@@ -926,7 +927,7 @@ export default class CorporateAnnualTarget extends Component { ...@@ -926,7 +927,7 @@ export default class CorporateAnnualTarget extends Component {
options: inputKPI, options: inputKPI,
getOptionLabel: (option) => titleCase(option.value), getOptionLabel: (option) => titleCase(option.value),
}; };
// // // console.log(defaultProps) // // // // console.log(defaultProps)
this.setState({ kpiTypeList: defaultProps }) this.setState({ kpiTypeList: defaultProps })
} else { } else {
this.setState({ alert: true, messageAlert: response.data.message, tipeAlert: 'warning' }, () => { this.setState({ alert: true, messageAlert: response.data.message, tipeAlert: 'warning' }, () => {
...@@ -1053,7 +1054,7 @@ export default class CorporateAnnualTarget extends Component { ...@@ -1053,7 +1054,7 @@ export default class CorporateAnnualTarget extends Component {
let columnEnd = 24 let columnEnd = 24
let month = column - 1 let month = column - 1
let total = 0 let total = 0
// // console.log(formulaAwal) // // // console.log(formulaAwal)
if (forecast == undefined) { if (forecast == undefined) {
dataTable2[tableMeta.rowIndex].map((itemz, indexz) => { dataTable2[tableMeta.rowIndex].map((itemz, indexz) => {
if (indexz >= columnStart && indexz <= columnStart + month) { if (indexz >= columnStart && indexz <= columnStart + month) {
...@@ -1090,10 +1091,10 @@ export default class CorporateAnnualTarget extends Component { ...@@ -1090,10 +1091,10 @@ export default class CorporateAnnualTarget extends Component {
anjay.push(valuezz == "" ? 0 : valuezz) anjay.push(valuezz == "" ? 0 : valuezz)
} }
} else { } else {
// // console.log(dataTable2[tableMeta.rowIndex][30]) // // // console.log(dataTable2[tableMeta.rowIndex][30])
let array = dataTable2[tableMeta.rowIndex][30].filter((val) => val.periode == Number(column)) let array = dataTable2[tableMeta.rowIndex][30].filter((val) => val.periode == Number(column))
let valuezz = array[0].value let valuezz = array[0].value
// // console.log(valuezz) // // // console.log(valuezz)
anjay.push(valuezz == "" ? 0 : valuezz) anjay.push(valuezz == "" ? 0 : valuezz)
// let indexID = dataTable2[tableMeta.rowIndex][30].findIndex((val) => val.periode == Number(this.props.periode)) // let indexID = dataTable2[tableMeta.rowIndex][30].findIndex((val) => val.periode == Number(this.props.periode))
// if (indexID !== -1) { // if (indexID !== -1) {
...@@ -1251,21 +1252,21 @@ export default class CorporateAnnualTarget extends Component { ...@@ -1251,21 +1252,21 @@ export default class CorporateAnnualTarget extends Component {
} }
}) })
// if (dataTable2[tableMeta.rowIndex][6] == "NPAT" && forecast !== undefined) { // if (dataTable2[tableMeta.rowIndex][6] == "NPAT" && forecast !== undefined) {
// // console.log(tableMeta.rowData[3]) // // // console.log(tableMeta.rowData[3])
// // console.log(splitFormula) // // // console.log(splitFormula)
// // console.log(baru) // // // console.log(baru)
// // console.log(anjay) // // // console.log(anjay)
// // // console.log(item1) // // // // console.log(item1)
// // console.log(anjay2) // // // console.log(anjay2)
// // console.log(total) // // // console.log(total)
// } // }
// // console.log(tableMeta.rowData[3]) // // // console.log(tableMeta.rowData[3])
// // console.log(splitFormula) // // // console.log(splitFormula)
// // console.log(baru) // // // console.log(baru)
// // console.log(anjay) // // // console.log(anjay)
// // console.log(item1) // // // console.log(item1)
// // console.log(anjay2) // // // console.log(anjay2)
// // console.log(total) // // // console.log(total)
total = dataTable2[tableMeta.rowIndex][6] == "ROIC" ? "0" : R.equals(total, NaN) ? "0.0" : total total = dataTable2[tableMeta.rowIndex][6] == "ROIC" ? "0" : R.equals(total, NaN) ? "0.0" : total
if (dataTable2[tableMeta.rowIndex][6] == "ROIC") { if (dataTable2[tableMeta.rowIndex][6] == "ROIC") {
...@@ -1383,7 +1384,7 @@ export default class CorporateAnnualTarget extends Component { ...@@ -1383,7 +1384,7 @@ export default class CorporateAnnualTarget extends Component {
} }
const handleTambah = (data, rowIndex) => { const handleTambah = (data, rowIndex) => {
// // console.log(dataTable2) // // // console.log(dataTable2)
let newData = [] let newData = []
dataTable2.map((item, index) => { dataTable2.map((item, index) => {
newData.push(item) newData.push(item)
...@@ -1427,7 +1428,7 @@ export default class CorporateAnnualTarget extends Component { ...@@ -1427,7 +1428,7 @@ export default class CorporateAnnualTarget extends Component {
this.setState({ dataTable: dataTable2 }, () => { this.setState({ dataTable: dataTable2 }, () => {
setTimeout(() => { setTimeout(() => {
this.setState({ loading: false }) this.setState({ loading: false })
// // console.log(dataTable2) // // // console.log(dataTable2)
}, 500) }, 500)
}) })
} }
...@@ -1516,7 +1517,7 @@ export default class CorporateAnnualTarget extends Component { ...@@ -1516,7 +1517,7 @@ export default class CorporateAnnualTarget extends Component {
cursor: 'pointer', cursor: 'pointer',
borderColor: 'transparent', borderColor: 'transparent',
}} }}
// onClick={() => // // // console.log(tableMeta.rowData[1])} // onClick={() => // // // // console.log(tableMeta.rowData[1])}
onClick={() => { onClick={() => {
this.setState({ loading: true }) this.setState({ loading: true })
handleTambah(tableMeta.rowData[1], tableMeta.rowIndex) handleTambah(tableMeta.rowData[1], tableMeta.rowIndex)
...@@ -1572,9 +1573,9 @@ export default class CorporateAnnualTarget extends Component { ...@@ -1572,9 +1573,9 @@ export default class CorporateAnnualTarget extends Component {
defaultValue={val} defaultValue={val}
// disabled={!handleAction(tableMeta.rowData[2])} // disabled={!handleAction(tableMeta.rowData[2])}
onBlur={(event) => { onBlur={(event) => {
// // // console.log(event.target.value) // // // // console.log(event.target.value)
handleChangeText(event.target.value, tableMeta) handleChangeText(event.target.value, tableMeta)
// // console.log(dataTable2) // // // console.log(dataTable2)
}} }}
/> />
} }
...@@ -1689,10 +1690,10 @@ export default class CorporateAnnualTarget extends Component { ...@@ -1689,10 +1690,10 @@ export default class CorporateAnnualTarget extends Component {
color={"#5198ea"} color={"#5198ea"}
disabled={true} disabled={true}
onBlur={(event) => { onBlur={(event) => {
// // // console.log(event.target.value) // // // // console.log(event.target.value)
// updateValue(event.target.value) // updateValue(event.target.value)
handleChangeText(event.target.value, tableMeta) handleChangeText(event.target.value, tableMeta)
// // // console.log(dataTable2) // // // // console.log(dataTable2)
}} }}
/> : /> :
<ThemeProvider theme={theme}> <ThemeProvider theme={theme}>
...@@ -1705,10 +1706,10 @@ export default class CorporateAnnualTarget extends Component { ...@@ -1705,10 +1706,10 @@ export default class CorporateAnnualTarget extends Component {
color={"#5198ea"} color={"#5198ea"}
// disabled={this.props.isApprover ? true : ((this.props.lastStatus == 'SUBMIT' || this.props.lastStatus == 'REVISION') && this.props.prevRevision === false ? false : !handleAction(tableMeta.rowData[2]))} // disabled={this.props.isApprover ? true : ((this.props.lastStatus == 'SUBMIT' || this.props.lastStatus == 'REVISION') && this.props.prevRevision === false ? false : !handleAction(tableMeta.rowData[2]))}
onBlur={(event) => { onBlur={(event) => {
// // // console.log(event.target.value) // // // // console.log(event.target.value)
// updateValue(event.target.value) // updateValue(event.target.value)
handleChangeText(event.target.value, tableMeta) handleChangeText(event.target.value, tableMeta)
// // // console.log(dataTable2) // // // // console.log(dataTable2)
}} }}
/> />
</ThemeProvider> </ThemeProvider>
...@@ -1855,7 +1856,7 @@ export default class CorporateAnnualTarget extends Component { ...@@ -1855,7 +1856,7 @@ export default class CorporateAnnualTarget extends Component {
onBlur={(event) => { onBlur={(event) => {
// updateValue(event.target.value) // updateValue(event.target.value)
handleChange(event.target.value, tableMeta) handleChange(event.target.value, tableMeta)
// // // console.log(dataTable2) // // // // console.log(dataTable2)
}} }}
/> />
} }
...@@ -1875,7 +1876,7 @@ export default class CorporateAnnualTarget extends Component { ...@@ -1875,7 +1876,7 @@ export default class CorporateAnnualTarget extends Component {
</TableCell> </TableCell>
), ),
customBodyRender: (value, tableMeta) => { customBodyRender: (value, tableMeta) => {
// // // console.log(tableMeta.rowData[0]) // // // // console.log(tableMeta.rowData[0])
return ( return (
<div style={{ width: 96 }}> <div style={{ width: 96 }}>
{ {
...@@ -1894,7 +1895,7 @@ export default class CorporateAnnualTarget extends Component { ...@@ -1894,7 +1895,7 @@ export default class CorporateAnnualTarget extends Component {
onBlur={(event) => { onBlur={(event) => {
// updateValue(event.target.value) // updateValue(event.target.value)
handleChange(event.target.value, tableMeta) handleChange(event.target.value, tableMeta)
// // // console.log(tableMeta.rowData[0]) // // // // console.log(tableMeta.rowData[0])
}} }}
/> />
} }
...@@ -1919,7 +1920,7 @@ export default class CorporateAnnualTarget extends Component { ...@@ -1919,7 +1920,7 @@ export default class CorporateAnnualTarget extends Component {
onBlur={(event) => { onBlur={(event) => {
// updateValue(event.target.value) // updateValue(event.target.value)
handleChange(event.target.value, tableMeta) handleChange(event.target.value, tableMeta)
// // // console.log(tableMeta.rowData[0]) // // // // console.log(tableMeta.rowData[0])
}} }}
/> />
} }
...@@ -1942,7 +1943,7 @@ export default class CorporateAnnualTarget extends Component { ...@@ -1942,7 +1943,7 @@ export default class CorporateAnnualTarget extends Component {
onBlur={(event) => { onBlur={(event) => {
// updateValue(event.target.value) // updateValue(event.target.value)
handleChange(event.target.value, tableMeta) handleChange(event.target.value, tableMeta)
// // // console.log(tableMeta.rowData[0]) // // // // console.log(tableMeta.rowData[0])
}} }}
/> />
} }
...@@ -1980,7 +1981,7 @@ export default class CorporateAnnualTarget extends Component { ...@@ -1980,7 +1981,7 @@ export default class CorporateAnnualTarget extends Component {
onBlur={(event) => { onBlur={(event) => {
// updateValue(event.target.value) // updateValue(event.target.value)
handleChange(event.target.value, tableMeta) handleChange(event.target.value, tableMeta)
// // // console.log(tableMeta.rowData[0]) // // // // console.log(tableMeta.rowData[0])
}} }}
/> />
} }
...@@ -2005,7 +2006,7 @@ export default class CorporateAnnualTarget extends Component { ...@@ -2005,7 +2006,7 @@ export default class CorporateAnnualTarget extends Component {
onBlur={(event) => { onBlur={(event) => {
// updateValue(event.target.value) // updateValue(event.target.value)
handleChange(event.target.value, tableMeta) handleChange(event.target.value, tableMeta)
// // // console.log(tableMeta.rowData[0]) // // // // console.log(tableMeta.rowData[0])
}} }}
/> />
} }
...@@ -2028,7 +2029,7 @@ export default class CorporateAnnualTarget extends Component { ...@@ -2028,7 +2029,7 @@ export default class CorporateAnnualTarget extends Component {
onBlur={(event) => { onBlur={(event) => {
// updateValue(event.target.value) // updateValue(event.target.value)
handleChange(event.target.value, tableMeta) handleChange(event.target.value, tableMeta)
// // // console.log(tableMeta.rowData[0]) // // // // console.log(tableMeta.rowData[0])
}} }}
/> />
} }
...@@ -2066,7 +2067,7 @@ export default class CorporateAnnualTarget extends Component { ...@@ -2066,7 +2067,7 @@ export default class CorporateAnnualTarget extends Component {
onBlur={(event) => { onBlur={(event) => {
// updateValue(event.target.value) // updateValue(event.target.value)
handleChange(event.target.value, tableMeta) handleChange(event.target.value, tableMeta)
// // // console.log(tableMeta.rowData[0]) // // // // console.log(tableMeta.rowData[0])
}} }}
/> />
} }
...@@ -2091,7 +2092,7 @@ export default class CorporateAnnualTarget extends Component { ...@@ -2091,7 +2092,7 @@ export default class CorporateAnnualTarget extends Component {
onBlur={(event) => { onBlur={(event) => {
// updateValue(event.target.value) // updateValue(event.target.value)
handleChange(event.target.value, tableMeta) handleChange(event.target.value, tableMeta)
// // // console.log(tableMeta.rowData[0]) // // // // console.log(tableMeta.rowData[0])
}} }}
/> />
} }
...@@ -2114,7 +2115,7 @@ export default class CorporateAnnualTarget extends Component { ...@@ -2114,7 +2115,7 @@ export default class CorporateAnnualTarget extends Component {
onBlur={(event) => { onBlur={(event) => {
// updateValue(event.target.value) // updateValue(event.target.value)
handleChange(event.target.value, tableMeta) handleChange(event.target.value, tableMeta)
// // // console.log(tableMeta.rowData[0]) // // // // console.log(tableMeta.rowData[0])
}} }}
/> />
} }
...@@ -2153,7 +2154,7 @@ export default class CorporateAnnualTarget extends Component { ...@@ -2153,7 +2154,7 @@ export default class CorporateAnnualTarget extends Component {
onBlur={(event) => { onBlur={(event) => {
// updateValue(event.target.value) // updateValue(event.target.value)
handleChange(event.target.value, tableMeta) handleChange(event.target.value, tableMeta)
// // // console.log(tableMeta.rowData[0]) // // // // console.log(tableMeta.rowData[0])
}} }}
/> />
} }
...@@ -2178,7 +2179,7 @@ export default class CorporateAnnualTarget extends Component { ...@@ -2178,7 +2179,7 @@ export default class CorporateAnnualTarget extends Component {
onBlur={(event) => { onBlur={(event) => {
// updateValue(event.target.value) // updateValue(event.target.value)
handleChange(event.target.value, tableMeta) handleChange(event.target.value, tableMeta)
// // // console.log(tableMeta.rowData[0]) // // // // console.log(tableMeta.rowData[0])
}} }}
/> />
} }
...@@ -2201,7 +2202,7 @@ export default class CorporateAnnualTarget extends Component { ...@@ -2201,7 +2202,7 @@ export default class CorporateAnnualTarget extends Component {
onBlur={(event) => { onBlur={(event) => {
// updateValue(event.target.value) // updateValue(event.target.value)
handleChange(event.target.value, tableMeta) handleChange(event.target.value, tableMeta)
// // // console.log(tableMeta.rowData[0]) // // // // console.log(tableMeta.rowData[0])
}} }}
/> />
} }
...@@ -2240,7 +2241,7 @@ export default class CorporateAnnualTarget extends Component { ...@@ -2240,7 +2241,7 @@ export default class CorporateAnnualTarget extends Component {
onBlur={(event) => { onBlur={(event) => {
// updateValue(event.target.value) // updateValue(event.target.value)
handleChange(event.target.value, tableMeta) handleChange(event.target.value, tableMeta)
// // // console.log(tableMeta.rowData[0]) // // // // console.log(tableMeta.rowData[0])
}} }}
/> />
} }
...@@ -2265,7 +2266,7 @@ export default class CorporateAnnualTarget extends Component { ...@@ -2265,7 +2266,7 @@ export default class CorporateAnnualTarget extends Component {
onBlur={(event) => { onBlur={(event) => {
// updateValue(event.target.value) // updateValue(event.target.value)
handleChange(event.target.value, tableMeta) handleChange(event.target.value, tableMeta)
// // // console.log(tableMeta.rowData[0]) // // // // console.log(tableMeta.rowData[0])
}} }}
/> />
} }
...@@ -2288,7 +2289,7 @@ export default class CorporateAnnualTarget extends Component { ...@@ -2288,7 +2289,7 @@ export default class CorporateAnnualTarget extends Component {
onBlur={(event) => { onBlur={(event) => {
// updateValue(event.target.value) // updateValue(event.target.value)
handleChange(event.target.value, tableMeta) handleChange(event.target.value, tableMeta)
// // // console.log(tableMeta.rowData[0]) // // // // console.log(tableMeta.rowData[0])
}} }}
/> />
} }
...@@ -2327,7 +2328,7 @@ export default class CorporateAnnualTarget extends Component { ...@@ -2327,7 +2328,7 @@ export default class CorporateAnnualTarget extends Component {
onBlur={(event) => { onBlur={(event) => {
// updateValue(event.target.value) // updateValue(event.target.value)
handleChange(event.target.value, tableMeta) handleChange(event.target.value, tableMeta)
// // // console.log(tableMeta.rowData[0]) // // // // console.log(tableMeta.rowData[0])
}} }}
/> />
} }
...@@ -2352,7 +2353,7 @@ export default class CorporateAnnualTarget extends Component { ...@@ -2352,7 +2353,7 @@ export default class CorporateAnnualTarget extends Component {
onBlur={(event) => { onBlur={(event) => {
// updateValue(event.target.value) // updateValue(event.target.value)
handleChange(event.target.value, tableMeta) handleChange(event.target.value, tableMeta)
// // // console.log(tableMeta.rowData[0]) // // // // console.log(tableMeta.rowData[0])
}} }}
/> />
} }
...@@ -2375,7 +2376,7 @@ export default class CorporateAnnualTarget extends Component { ...@@ -2375,7 +2376,7 @@ export default class CorporateAnnualTarget extends Component {
onBlur={(event) => { onBlur={(event) => {
// updateValue(event.target.value) // updateValue(event.target.value)
handleChange(event.target.value, tableMeta) handleChange(event.target.value, tableMeta)
// // // console.log(tableMeta.rowData[0]) // // // // console.log(tableMeta.rowData[0])
}} }}
/> />
} }
...@@ -2414,7 +2415,7 @@ export default class CorporateAnnualTarget extends Component { ...@@ -2414,7 +2415,7 @@ export default class CorporateAnnualTarget extends Component {
onBlur={(event) => { onBlur={(event) => {
// updateValue(event.target.value) // updateValue(event.target.value)
handleChange(event.target.value, tableMeta) handleChange(event.target.value, tableMeta)
// // // console.log(tableMeta.rowData[0]) // // // // console.log(tableMeta.rowData[0])
}} }}
/> />
} }
...@@ -2439,7 +2440,7 @@ export default class CorporateAnnualTarget extends Component { ...@@ -2439,7 +2440,7 @@ export default class CorporateAnnualTarget extends Component {
onBlur={(event) => { onBlur={(event) => {
// updateValue(event.target.value) // updateValue(event.target.value)
handleChange(event.target.value, tableMeta) handleChange(event.target.value, tableMeta)
// // // console.log(tableMeta.rowData[0]) // // // // console.log(tableMeta.rowData[0])
}} }}
/> />
} }
...@@ -2462,7 +2463,7 @@ export default class CorporateAnnualTarget extends Component { ...@@ -2462,7 +2463,7 @@ export default class CorporateAnnualTarget extends Component {
onBlur={(event) => { onBlur={(event) => {
// updateValue(event.target.value) // updateValue(event.target.value)
handleChange(event.target.value, tableMeta) handleChange(event.target.value, tableMeta)
// // // console.log(tableMeta.rowData[0]) // // // // console.log(tableMeta.rowData[0])
}} }}
/> />
} }
...@@ -2501,7 +2502,7 @@ export default class CorporateAnnualTarget extends Component { ...@@ -2501,7 +2502,7 @@ export default class CorporateAnnualTarget extends Component {
onBlur={(event) => { onBlur={(event) => {
// updateValue(event.target.value) // updateValue(event.target.value)
handleChange(event.target.value, tableMeta) handleChange(event.target.value, tableMeta)
// // // console.log(tableMeta.rowData[0]) // // // // console.log(tableMeta.rowData[0])
}} }}
/> />
} }
...@@ -2526,7 +2527,7 @@ export default class CorporateAnnualTarget extends Component { ...@@ -2526,7 +2527,7 @@ export default class CorporateAnnualTarget extends Component {
onBlur={(event) => { onBlur={(event) => {
// updateValue(event.target.value) // updateValue(event.target.value)
handleChange(event.target.value, tableMeta) handleChange(event.target.value, tableMeta)
// // // console.log(tableMeta.rowData[0]) // // // // console.log(tableMeta.rowData[0])
}} }}
/> />
} }
...@@ -2549,7 +2550,7 @@ export default class CorporateAnnualTarget extends Component { ...@@ -2549,7 +2550,7 @@ export default class CorporateAnnualTarget extends Component {
onBlur={(event) => { onBlur={(event) => {
// updateValue(event.target.value) // updateValue(event.target.value)
handleChange(event.target.value, tableMeta) handleChange(event.target.value, tableMeta)
// // // console.log(tableMeta.rowData[0]) // // // // console.log(tableMeta.rowData[0])
}} }}
/> />
} }
...@@ -2588,7 +2589,7 @@ export default class CorporateAnnualTarget extends Component { ...@@ -2588,7 +2589,7 @@ export default class CorporateAnnualTarget extends Component {
onBlur={(event) => { onBlur={(event) => {
// updateValue(event.target.value) // updateValue(event.target.value)
handleChange(event.target.value, tableMeta) handleChange(event.target.value, tableMeta)
// // // console.log(tableMeta.rowData[0]) // // // // console.log(tableMeta.rowData[0])
}} }}
/> />
} }
...@@ -2613,7 +2614,7 @@ export default class CorporateAnnualTarget extends Component { ...@@ -2613,7 +2614,7 @@ export default class CorporateAnnualTarget extends Component {
onBlur={(event) => { onBlur={(event) => {
// updateValue(event.target.value) // updateValue(event.target.value)
handleChange(event.target.value, tableMeta) handleChange(event.target.value, tableMeta)
// // // console.log(tableMeta.rowData[0]) // // // // console.log(tableMeta.rowData[0])
}} }}
/> />
} }
...@@ -2636,7 +2637,7 @@ export default class CorporateAnnualTarget extends Component { ...@@ -2636,7 +2637,7 @@ export default class CorporateAnnualTarget extends Component {
onBlur={(event) => { onBlur={(event) => {
// updateValue(event.target.value) // updateValue(event.target.value)
handleChange(event.target.value, tableMeta) handleChange(event.target.value, tableMeta)
// // // console.log(tableMeta.rowData[0]) // // // // console.log(tableMeta.rowData[0])
}} }}
/> />
} }
...@@ -2675,7 +2676,7 @@ export default class CorporateAnnualTarget extends Component { ...@@ -2675,7 +2676,7 @@ export default class CorporateAnnualTarget extends Component {
onBlur={(event) => { onBlur={(event) => {
// updateValue(event.target.value) // updateValue(event.target.value)
handleChange(event.target.value, tableMeta) handleChange(event.target.value, tableMeta)
// // // console.log(tableMeta.rowData[0]) // // // // console.log(tableMeta.rowData[0])
}} }}
/> />
} }
...@@ -2700,7 +2701,7 @@ export default class CorporateAnnualTarget extends Component { ...@@ -2700,7 +2701,7 @@ export default class CorporateAnnualTarget extends Component {
onBlur={(event) => { onBlur={(event) => {
// updateValue(event.target.value) // updateValue(event.target.value)
handleChange(event.target.value, tableMeta) handleChange(event.target.value, tableMeta)
// // // console.log(tableMeta.rowData[0]) // // // // console.log(tableMeta.rowData[0])
}} }}
/> />
} }
...@@ -2723,7 +2724,7 @@ export default class CorporateAnnualTarget extends Component { ...@@ -2723,7 +2724,7 @@ export default class CorporateAnnualTarget extends Component {
onBlur={(event) => { onBlur={(event) => {
// updateValue(event.target.value) // updateValue(event.target.value)
handleChange(event.target.value, tableMeta) handleChange(event.target.value, tableMeta)
// // // console.log(tableMeta.rowData[0]) // // // // console.log(tableMeta.rowData[0])
}} }}
/> />
} }
...@@ -2762,7 +2763,7 @@ export default class CorporateAnnualTarget extends Component { ...@@ -2762,7 +2763,7 @@ export default class CorporateAnnualTarget extends Component {
onBlur={(event) => { onBlur={(event) => {
// updateValue(event.target.value) // updateValue(event.target.value)
handleChange(event.target.value, tableMeta) handleChange(event.target.value, tableMeta)
// // // console.log(tableMeta.rowData[0]) // // // // console.log(tableMeta.rowData[0])
}} }}
/> />
} }
...@@ -2787,7 +2788,7 @@ export default class CorporateAnnualTarget extends Component { ...@@ -2787,7 +2788,7 @@ export default class CorporateAnnualTarget extends Component {
onBlur={(event) => { onBlur={(event) => {
// updateValue(event.target.value) // updateValue(event.target.value)
handleChange(event.target.value, tableMeta) handleChange(event.target.value, tableMeta)
// // // console.log(tableMeta.rowData[0]) // // // // console.log(tableMeta.rowData[0])
}} }}
/> />
} }
...@@ -2810,7 +2811,7 @@ export default class CorporateAnnualTarget extends Component { ...@@ -2810,7 +2811,7 @@ export default class CorporateAnnualTarget extends Component {
onBlur={(event) => { onBlur={(event) => {
// updateValue(event.target.value) // updateValue(event.target.value)
handleChange(event.target.value, tableMeta) handleChange(event.target.value, tableMeta)
// // // console.log(tableMeta.rowData[0]) // // // // console.log(tableMeta.rowData[0])
}} }}
/> />
} }
...@@ -2849,7 +2850,7 @@ export default class CorporateAnnualTarget extends Component { ...@@ -2849,7 +2850,7 @@ export default class CorporateAnnualTarget extends Component {
onBlur={(event) => { onBlur={(event) => {
// updateValue(event.target.value) // updateValue(event.target.value)
handleChange(event.target.value, tableMeta) handleChange(event.target.value, tableMeta)
// // // console.log(tableMeta.rowData[0]) // // // // console.log(tableMeta.rowData[0])
}} }}
/> />
} }
...@@ -2874,7 +2875,7 @@ export default class CorporateAnnualTarget extends Component { ...@@ -2874,7 +2875,7 @@ export default class CorporateAnnualTarget extends Component {
onBlur={(event) => { onBlur={(event) => {
// updateValue(event.target.value) // updateValue(event.target.value)
handleChange(event.target.value, tableMeta) handleChange(event.target.value, tableMeta)
// // // console.log(tableMeta.rowData[0]) // // // // console.log(tableMeta.rowData[0])
}} }}
/> />
} }
...@@ -2897,7 +2898,7 @@ export default class CorporateAnnualTarget extends Component { ...@@ -2897,7 +2898,7 @@ export default class CorporateAnnualTarget extends Component {
onBlur={(event) => { onBlur={(event) => {
// updateValue(event.target.value) // updateValue(event.target.value)
handleChange(event.target.value, tableMeta) handleChange(event.target.value, tableMeta)
// // // console.log(tableMeta.rowData[0]) // // // // console.log(tableMeta.rowData[0])
}} }}
/> />
} }
...@@ -2937,7 +2938,7 @@ export default class CorporateAnnualTarget extends Component { ...@@ -2937,7 +2938,7 @@ export default class CorporateAnnualTarget extends Component {
onBlur={(event) => { onBlur={(event) => {
// updateValue(event.target.value) // updateValue(event.target.value)
handleChange(event.target.value, tableMeta) handleChange(event.target.value, tableMeta)
// // // console.log(tableMeta.rowData[0]) // // // // console.log(tableMeta.rowData[0])
}} }}
/> />
} }
...@@ -2962,7 +2963,7 @@ export default class CorporateAnnualTarget extends Component { ...@@ -2962,7 +2963,7 @@ export default class CorporateAnnualTarget extends Component {
onBlur={(event) => { onBlur={(event) => {
// updateValue(event.target.value) // updateValue(event.target.value)
handleChange(event.target.value, tableMeta) handleChange(event.target.value, tableMeta)
// // // console.log(tableMeta.rowData[0]) // // // // console.log(tableMeta.rowData[0])
}} }}
/> />
} }
...@@ -2985,7 +2986,7 @@ export default class CorporateAnnualTarget extends Component { ...@@ -2985,7 +2986,7 @@ export default class CorporateAnnualTarget extends Component {
onBlur={(event) => { onBlur={(event) => {
// updateValue(event.target.value) // updateValue(event.target.value)
handleChange(event.target.value, tableMeta) handleChange(event.target.value, tableMeta)
// // // console.log(tableMeta.rowData[0]) // // // // console.log(tableMeta.rowData[0])
}} }}
/> />
} }
...@@ -3024,7 +3025,7 @@ export default class CorporateAnnualTarget extends Component { ...@@ -3024,7 +3025,7 @@ export default class CorporateAnnualTarget extends Component {
onBlur={(event) => { onBlur={(event) => {
// updateValue(event.target.value) // updateValue(event.target.value)
handleChange(event.target.value, tableMeta) handleChange(event.target.value, tableMeta)
// // // console.log(tableMeta.rowData[0]) // // // // console.log(tableMeta.rowData[0])
}} }}
/> />
} }
...@@ -3049,7 +3050,7 @@ export default class CorporateAnnualTarget extends Component { ...@@ -3049,7 +3050,7 @@ export default class CorporateAnnualTarget extends Component {
onBlur={(event) => { onBlur={(event) => {
// updateValue(event.target.value) // updateValue(event.target.value)
handleChange(event.target.value, tableMeta) handleChange(event.target.value, tableMeta)
// // // console.log(tableMeta.rowData[0]) // // // // console.log(tableMeta.rowData[0])
}} }}
/> />
} }
...@@ -3072,7 +3073,7 @@ export default class CorporateAnnualTarget extends Component { ...@@ -3072,7 +3073,7 @@ export default class CorporateAnnualTarget extends Component {
onBlur={(event) => { onBlur={(event) => {
// updateValue(event.target.value) // updateValue(event.target.value)
handleChange(event.target.value, tableMeta) handleChange(event.target.value, tableMeta)
// // // console.log(tableMeta.rowData[0]) // // // // console.log(tableMeta.rowData[0])
}} }}
/> />
} }
...@@ -3111,7 +3112,7 @@ export default class CorporateAnnualTarget extends Component { ...@@ -3111,7 +3112,7 @@ export default class CorporateAnnualTarget extends Component {
onBlur={(event) => { onBlur={(event) => {
// updateValue(event.target.value) // updateValue(event.target.value)
handleChange(event.target.value, tableMeta) handleChange(event.target.value, tableMeta)
// // // console.log(tableMeta.rowData[0]) // // // // console.log(tableMeta.rowData[0])
}} }}
/> />
} }
...@@ -3136,7 +3137,7 @@ export default class CorporateAnnualTarget extends Component { ...@@ -3136,7 +3137,7 @@ export default class CorporateAnnualTarget extends Component {
onBlur={(event) => { onBlur={(event) => {
// updateValue(event.target.value) // updateValue(event.target.value)
handleChange(event.target.value, tableMeta) handleChange(event.target.value, tableMeta)
// // // console.log(tableMeta.rowData[0]) // // // // console.log(tableMeta.rowData[0])
}} }}
/> />
} }
...@@ -3159,7 +3160,7 @@ export default class CorporateAnnualTarget extends Component { ...@@ -3159,7 +3160,7 @@ export default class CorporateAnnualTarget extends Component {
onBlur={(event) => { onBlur={(event) => {
// updateValue(event.target.value) // updateValue(event.target.value)
handleChange(event.target.value, tableMeta) handleChange(event.target.value, tableMeta)
// // // console.log(tableMeta.rowData[0]) // // // // console.log(tableMeta.rowData[0])
}} }}
/> />
} }
...@@ -3196,9 +3197,9 @@ export default class CorporateAnnualTarget extends Component { ...@@ -3196,9 +3197,9 @@ export default class CorporateAnnualTarget extends Component {
disabled={this.props.isApprover ? true : ((this.props.lastStatus == 'SUBMIT' || this.props.lastStatus == 'REVISION') && this.props.prevRevision === false && (this.props.status === 'revision' || this.props.status === 'not-yet' || this.props.status === 'draft' || this.props.status === 'submitted') ? false : true)} disabled={this.props.isApprover ? true : ((this.props.lastStatus == 'SUBMIT' || this.props.lastStatus == 'REVISION') && this.props.prevRevision === false && (this.props.status === 'revision' || this.props.status === 'not-yet' || this.props.status === 'draft' || this.props.status === 'submitted') ? false : true)}
defaultValue={value} defaultValue={value}
onBlur={(event) => { onBlur={(event) => {
// // // console.log(event.target.value) // // // // console.log(event.target.value)
handleChangeText(event.target.value, tableMeta) handleChangeText(event.target.value, tableMeta)
// // // console.log(dataTable2) // // // // console.log(dataTable2)
}} }}
/> />
</ThemeProvider> </ThemeProvider>
...@@ -3236,10 +3237,10 @@ export default class CorporateAnnualTarget extends Component { ...@@ -3236,10 +3237,10 @@ export default class CorporateAnnualTarget extends Component {
disabled={this.props.isApprover ? true : ((this.props.lastStatus == 'SUBMIT' || this.props.lastStatus == 'REVISION') && this.props.prevRevision === false && (this.props.status === 'revision' || this.props.status === 'not-yet' || this.props.status === 'draft' || this.props.status === 'submitted') ? false : true)} disabled={this.props.isApprover ? true : ((this.props.lastStatus == 'SUBMIT' || this.props.lastStatus == 'REVISION') && this.props.prevRevision === false && (this.props.status === 'revision' || this.props.status === 'not-yet' || this.props.status === 'draft' || this.props.status === 'submitted') ? false : true)}
defaultValue={value} defaultValue={value}
onBlur={(event) => { onBlur={(event) => {
// // // console.log(event.target.value) // // // // console.log(event.target.value)
// updateValue(event.target.value) // updateValue(event.target.value)
handleChangeText(event.target.value, tableMeta) handleChangeText(event.target.value, tableMeta)
// // // console.log(dataTable2) // // // // console.log(dataTable2)
}} }}
/> />
</ThemeProvider> </ThemeProvider>
......
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