Commit 8d3199f6 authored by herman's avatar herman

Merge branch 'master' into 'herman'

Master

See merge request !910
parents bc667aa9 40cd343a
...@@ -257,11 +257,13 @@ const create = (type = "") => { ...@@ -257,11 +257,13 @@ const create = (type = "") => {
const getMonthlyReport = (body) => api.post('transaction/monthly_report/get_all_report', body) const getMonthlyReport = (body) => api.post('transaction/monthly_report/get_all_report', body)
const getMonthlyOI = (body) => api.post('transaction/monthly_report_oi/get_operating_indicator_id', body) const getMonthlyOI = (body) => api.post('transaction/monthly_report_oi/get_operating_indicator_id', body)
const getMonthlyReportID = (body) => api.post('transaction/monthly_report/get_monthly_report_id', body) const getMonthlyReportID = (body) => api.post('transaction/monthly_report/get_monthly_report_id', body)
const getHierarkiMontlyReportBS = (body) => api.post('transaction/monthly_report_bs/get_report_hierarki', body) // const getHierarkiMontlyReportBS = (body) => api.post('transaction/monthly_report_bs/get_report_hierarki', body)
const getHierarkiMontlyReportBS = (body) => api.post('transaction/balance_sheet/monthly_report/get_report_hierarki', body)
const getHierarkiMontlyReportOI = (body) => api.post('transaction/monthly_report_oi/get_report_hierarki', body) const getHierarkiMontlyReportOI = (body) => api.post('transaction/monthly_report_oi/get_report_hierarki', body)
const getLastestUpdateMR = (body) => api.post('/transaction/monthly_report/get_latest_update', body) const getLastestUpdateMR = (body) => api.post('/transaction/monthly_report/get_latest_update', body)
const getHierarkiMontlyReportTP = (body) => api.post('transaction/monthly_report_tp/get_report_hierarki', body) // const getHierarkiMontlyReportTP = (body) => api.post('transaction/monthly_report_tp/get_report_hierarki', body)
const getHierarkiMontlyReportLOCF = (body) => api.post('transaction/monthly_report_locf/get_report_hierarki', body) const getHierarkiMontlyReportTP = (body) => api.post('transaction/tax_planning/monthly_report/get_report_hierarki', body)
const getHierarkiMontlyReportLOCF = (body) => api.post('transaction/locf/monthly_report/get_report_hierarki', body)
const getHierarkiMontlyReportFAM = (body) => api.post('transaction/monthly_report/fam/get_report_hierarki', body) const getHierarkiMontlyReportFAM = (body) => api.post('transaction/monthly_report/fam/get_report_hierarki', body)
const getHierarkiMontlyReportCF = (body) => api.post('transaction/monthly_report_cf/get_report_hierarki', body) const getHierarkiMontlyReportCF = (body) => api.post('transaction/monthly_report_cf/get_report_hierarki', body)
const getHierarkiMontlyReportCAT = (body) => api.post('/transaction/monthly_report/cat/get_report_hierarki', body) const getHierarkiMontlyReportCAT = (body) => api.post('/transaction/monthly_report/cat/get_report_hierarki', body)
...@@ -272,36 +274,49 @@ const create = (type = "") => { ...@@ -272,36 +274,49 @@ const create = (type = "") => {
const getMontlyReportAtt = (body) => api.post('transaction/monthly_report/get_report_attachment', body) const getMontlyReportAtt = (body) => api.post('transaction/monthly_report/get_report_attachment', body)
const uploadAttachmentMonthly = (body) => api.post('transaction/monthly_report/upload_attachment', body) const uploadAttachmentMonthly = (body) => api.post('transaction/monthly_report/upload_attachment', body)
const deleteAttachmentMonthly = (id) => api.post(`transaction/monthly_report/delete_attachment/${id}`) const deleteAttachmentMonthly = (id) => api.post(`transaction/monthly_report/delete_attachment/${id}`)
const createMonthlyReportBS = (body) => api.post('transaction/monthly_report_bs/create_monthly_report', body) // const createMonthlyReportBS = (body) => api.post('transaction/monthly_report_bs/create_monthly_report', body)
const createMonthlyReportLOCF = (body) => api.post('transaction/monthly_report_locf/create_monthly_report', body) const createMonthlyReportBS = (body) => api.post('transaction/balance_sheet/monthly_report/create_monthly_report', body)
const createMonthlyReportTP = (body) => api.post('transaction/monthly_report_tp/create_monthly_report', body) const createMonthlyReportLOCF = (body) => api.post('transaction/locf/monthly_report/create_monthly_report', body)
// const createMonthlyReportTP = (body) => api.post('transaction/monthly_report_tp/create_monthly_report', body)
const createMonthlyReportTP = (body) => api.post('transaction/tax_planning/monthly_report/create_monthly_report', body)
const createMonthlyReportFAM = (body) => api.post('transaction/monthly_report/fam/create_monthly_report', body) const createMonthlyReportFAM = (body) => api.post('transaction/monthly_report/fam/create_monthly_report', body)
const createMonthlyReportOI = (body) => api.post('transaction/monthly_report_oi/create_monthly_report', body) const createMonthlyReportOI = (body) => api.post('transaction/monthly_report_oi/create_monthly_report', body)
const createMonthlyReportCAT = (body) => api.post('transaction/monthly_report/cat/create_monthly_report', body) const createMonthlyReportCAT = (body) => api.post('transaction/monthly_report/cat/create_monthly_report', body)
const checkUploadMonthlyReportTP = (body) => api.post('transaction/monthly_report_tp/check_import', body) // const checkUploadMonthlyReportTP = (body) => api.post('transaction/monthly_report_tp/check_import', body)
const checkUploadMonthlyReportTP = (body) => api.post('transaction/tax_planning/monthly_report/check_import', body)
const checkUploadMonthlyReportFAM = (body) => api.post('transaction/monthly_report/fam/check_import', body) const checkUploadMonthlyReportFAM = (body) => api.post('transaction/monthly_report/fam/check_import', body)
const checkUploadMonthlyReportBS = (body) => api.post('transaction/monthly_report_bs/check_import', body) // const checkUploadMonthlyReportBS = (body) => api.post('transaction/monthly_report_bs/check_import', body)
const checkUploadMonthlyReportBS = (body) => api.post('transaction/balance_sheet/monthly_report/check_import', body)
const checkUploadMonthlyReportOI = (body) => api.post('transaction/monthly_report_oi/check_import', body) const checkUploadMonthlyReportOI = (body) => api.post('transaction/monthly_report_oi/check_import', body)
const checkUploadMonthlyReportCAT = (body) => api.post('transaction/monthly_report/cat/check_import', body) const checkUploadMonthlyReportCAT = (body) => api.post('transaction/monthly_report/cat/check_import', body)
const uploadMonthlyReportBS = (body) => api.post('transaction/monthly_report_bs/import_monthly_report', body) // const uploadMonthlyReportBS = (body) => api.post('transaction/monthly_report_bs/import_monthly_report', body)
const uploadMonthlyReportBS = (body) => api.post('transaction/balance_sheet/monthly_report/import_monthly_report', body)
const uploadMonthlyReportFAM = (body) => api.post('transaction/monthly_report/fam/import_monthly_report', body) const uploadMonthlyReportFAM = (body) => api.post('transaction/monthly_report/fam/import_monthly_report', body)
const uploadMonthlyReportTP = (body) => api.post('transaction/monthly_report_tp/import_monthly_report', body) // const uploadMonthlyReportTP = (body) => api.post('transaction/monthly_report_tp/import_monthly_report', body)
const uploadMonthlyReportTP = (body) => api.post('transaction/tax_planning/monthly_report/import_monthly_report', body)
const uploadMonthlyReportOI = (body) => api.post('transaction/monthly_report_oi/import_monthly_report', body) const uploadMonthlyReportOI = (body) => api.post('transaction/monthly_report_oi/import_monthly_report', body)
const uploadMonthlyReportCAT = (body) => api.post('transaction/monthly_report/cat/import_monthly_report', body) const uploadMonthlyReportCAT = (body) => api.post('transaction/monthly_report/cat/import_monthly_report', body)
const validateSubmitReportBS = (body) => api.post('transaction/monthly_report_bs/validate_save', body) // const validateSubmitReportBS = (body) => api.post('transaction/monthly_report_bs/validate_save', body)
const validateSubmitReportBS = (body) => api.post('transaction/balance_sheet/monthly_report/validate_save', body)
const validateSubmitReportMR = (body) => api.post('transaction/monthly_report/validate_save', body) const validateSubmitReportMR = (body) => api.post('transaction/monthly_report/validate_save', body)
const validateSubmitReportMRTP = (body) => api.post('transaction/monthly_report_tp/validate_save', body) // const validateSubmitReportMRTP = (body) => api.post('transaction/monthly_report_tp/validate_save', body)
const getPerBSiMontlyReportLOCF = (body) => api.post('transaction/monthly_report_locf/get_per_bs', body) const validateSubmitReportMRTP = (body) => api.post('transaction/tax_planning/monthly_report/validate_save', body)
const checkUploadMonthlyReportLOCF = (body) => api.post('transaction/monthly_report_locf/check_import', body) const getPerBSiMontlyReportLOCF = (body) => api.post('transaction/locf/monthly_report/get_per_bs', body)
const uploadMonthlyReportLOCF = (body) => api.post('transaction/monthly_report_locf/import_monthly_report', body) const checkUploadMonthlyReportLOCF = (body) => api.post('transaction/locf/monthly_report/check_import', body)
const uploadMonthlyReportLOCF = (body) => api.post('transaction/locf/monthly_report/import_monthly_report', body)
const validateSubmitReportOI = (body) => api.post('transaction/monthly_report_oi/validate_save', body) const validateSubmitReportOI = (body) => api.post('transaction/monthly_report_oi/validate_save', body)
// MonthlyPL // MonthlyPL
const getHierarkiMontlyReportPL = (body) => api.post('transaction/monthly_report_pl/get_report_hierarki', body) // const getHierarkiMontlyReportPL = (body) => api.post('transaction/monthly_report_pl/get_report_hierarki', body)
const createMonthlyReportPL = (body) => api.post('transaction/monthly_report_pl/create_monthly_report', body) // const createMonthlyReportPL = (body) => api.post('transaction/monthly_report_pl/create_monthly_report', body)
const checkUploadMonthlyReportPL = (body) => api.post('transaction/monthly_report_pl/check_import', body) // const checkUploadMonthlyReportPL = (body) => api.post('transaction/monthly_report_pl/check_import', body)
const uploadMonthlyReportPL = (body) => api.post('transaction/monthly_report_pl/import_monthly_report', body) // const uploadMonthlyReportPL = (body) => api.post('transaction/monthly_report_pl/import_monthly_report', body)
const validateSubmitReportPL = (body) => api.post('transaction/monthly_report_pl/validate_save', body) // const validateSubmitReportPL = (body) => api.post('transaction/monthly_report_pl/validate_save', body)
const getHierarkiMontlyReportPL = (body) => api.post('transaction/profit_loss/monthly_report/get_report_hierarki', body)
const createMonthlyReportPL = (body) => api.post('transaction/profit_loss/monthly_report/create_monthly_report', body)
const checkUploadMonthlyReportPL = (body) => api.post('transaction/profit_loss/monthly_report/check_import', body)
const uploadMonthlyReportPL = (body) => api.post('transaction/profit_loss/monthly_report/import_monthly_report', body)
const validateSubmitReportPL = (body) => api.post('transaction/profit_loss/monthly_report/validate_save', body)
//Template //Template
const downloadTemplate = (fileName, fileType) => api.get(`attachment/download_file?fileName=${fileName}&&fileType=${fileType}`) const downloadTemplate = (fileName, fileType) => api.get(`attachment/download_file?fileName=${fileName}&&fileType=${fileType}`)
......
This diff is collapsed.
...@@ -684,6 +684,7 @@ export default class CorporateAnnualTarget extends Component { ...@@ -684,6 +684,7 @@ export default class CorporateAnnualTarget extends Component {
let weightReal = null let weightReal = null
let handleKosongKPIMAXYTD = false let handleKosongKPIMAXYTD = false
let stateFR = false let stateFR = false
console.log(this.state.dataTable)
this.state.dataTable.map((i, index) => { this.state.dataTable.map((i, index) => {
if (i[0] == 1) { if (i[0] == 1) {
dataTampung.push({ dataTampung.push({
...@@ -746,6 +747,10 @@ export default class CorporateAnnualTarget extends Component { ...@@ -746,6 +747,10 @@ export default class CorporateAnnualTarget extends Component {
} }
// // console.log(String(weightReal).substr(0,String(weightReal).length-1)) // // console.log(String(weightReal).substr(0,String(weightReal).length-1))
// // console.log(Number(String(weightReal).substr(0,String(weightReal).length-1)).toFixed(1)); // // console.log(Number(String(weightReal).substr(0,String(weightReal).length-1)).toFixed(1));
console.log(weightReal)
console.log(i[7])
let b = []
// console.log(i[13].value == undefined? 'Y' : 'N')
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]),
...@@ -756,24 +761,26 @@ export default class CorporateAnnualTarget extends Component { ...@@ -756,24 +761,26 @@ export default class CorporateAnnualTarget extends Component {
"max_ach": i[10] == null ? "" : i[10].value, "max_ach": i[10] == null ? "" : i[10].value,
"formula": i[11] == null ? "" : i[11].value, "formula": i[11] == null ? "" : i[11].value,
"total_actual_before": String(i[12]) == "" ? "0.0" : String(i[12]), "total_actual_before": String(i[12]) == "" ? "0.0" : String(i[12]),
"january": stateFR ? String(i[13].value) : String(i[13]) == "" ? "0.0" : String(i[13]), "january": i[13].value == undefined? (String(i[13]) == ''? "0.0" : String(i[13])) : String(i[13].value),
"february": stateFR ? String(i[14].value) : String(i[14]) == "" ? "0.0" : String(i[14]), // "january": stateFR ? String(i[13].value) : String(i[13]) == "" ? "0.0" : String(i[13]),
"march": stateFR ? String(i[15].value) : String(i[15]) == "" ? "0.0" : String(i[15]), "february": i[14].value == undefined? (String(i[14]) == ''? "0.0" : String(i[14])) : String(i[14].value),
"april": stateFR ? String(i[16].value) : String(i[16]) == "" ? "0.0" : String(i[16]), "march": i[15].value == undefined? (String(i[15]) == ''? "0.0" : String(i[15])) : String(i[15].value),
"may": stateFR ? String(i[17].value) : String(i[17]) == "" ? "0.0" : String(i[17]), "april": i[16].value == undefined? (String(i[16]) == ''? "0.0" : String(i[16])) : String(i[16].value),
"june": stateFR ? String(i[18].value) : String(i[18]) == "" ? "0.0" : String(i[18]), "may": i[17].value == undefined? (String(i[17]) == ''? "0.0" : String(i[17])) : String(i[17].value),
"july": stateFR ? String(i[19].value) : String(i[19]) == "" ? "0.0" : String(i[19]), "june": i[18].value == undefined? (String(i[18]) == ''? "0.0" : String(i[18])) : String(i[18].value),
"august": stateFR ? String(i[20].value) : String(i[20]) == "" ? "0.0" : String(i[20]), "july": i[19].value == undefined? (String(i[19]) == ''? "0.0" : String(i[19])) : String(i[19].value),
"september": stateFR ? String(i[21].value) : String(i[21]) == "" ? "0.0" : String(i[21]), "august": i[20].value == undefined? (String(i[20]) == ''? "0.0" : String(i[20])) : String(i[20].value),
"october": stateFR ? String(i[22].value) : String(i[22]) == "" ? "0.0" : String(i[22]), "september": i[21].value == undefined? (String(i[21]) == ''? "0.0" : String(i[21])) : String(i[21].value),
"november": stateFR ? String(i[23].value) : String(i[23]) == "" ? "0.0" : String(i[23]), "october": i[22].value == undefined? (String(i[22]) == ''? "0.0" : String(i[22])) : String(i[22].value),
"december": stateFR ? String(i[24].value) : String(i[24]) == "" ? "0.0" : String(i[24]), "november": i[23].value == undefined? (String(i[23]) == ''? "0.0" : String(i[23])) : String(i[23].value),
"december": i[24].value == undefined? (String(i[24]) == ''? "0.0" : String(i[24])) : String(i[24].value),
"total_current_year": String(i[25]) == "" ? "0.0" : String(i[25]), "total_current_year": String(i[25]) == "" ? "0.0" : String(i[25]),
"total_next_year": String(i[26]) == "" ? "0.0" : String(i[26]), "total_next_year": String(i[26]) == "" ? "0.0" : String(i[26]),
"total_more_year": String(i[27]) == "" ? "0.0" : String(i[27]), "total_more_year": String(i[27]) == "" ? "0.0" : String(i[27]),
"strategic": String(i[28]), "strategic": String(i[28]),
"pic": String(i[29]) "pic": String(i[29])
}) })
stateFR = false
}) })
// // // // console.log(dataTableBaru) // // // // console.log(dataTableBaru)
...@@ -793,8 +800,9 @@ export default class CorporateAnnualTarget extends Component { ...@@ -793,8 +800,9 @@ export default class CorporateAnnualTarget extends Component {
} else if (totalWeight < 100) { } else if (totalWeight < 100) {
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 {
console.log(JSON.stringify(payload))
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 {
...@@ -867,7 +875,7 @@ export default class CorporateAnnualTarget extends Component { ...@@ -867,7 +875,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)
} }
......
...@@ -142,7 +142,7 @@ export default class CorporateAnnualTargetMR extends Component { ...@@ -142,7 +142,7 @@ export default class CorporateAnnualTargetMR extends Component {
let payload = { let payload = {
"report_id": this.props.report_id, "report_id": this.props.report_id,
"revision": Number(this.props.revision), "revision": Number(this.props.revision),
"periode": "2021", "periode": this.props.periode,
"company_id": this.props.company.company_id, "company_id": this.props.company.company_id,
"monthly_report_id": this.props.monthlyReportId, "monthly_report_id": this.props.monthlyReportId,
"months": this.props.month.month_id, "months": this.props.month.month_id,
...@@ -1296,14 +1296,14 @@ export default class CorporateAnnualTargetMR extends Component { ...@@ -1296,14 +1296,14 @@ export default class CorporateAnnualTargetMR extends Component {
<div style={{ flex: 1, textAlign: 'right' }}> <div style={{ flex: 1, textAlign: 'right' }}>
<FormControlLabel <FormControlLabel
style={{ margin: 0 }} style={{ margin: 0 }}
value={value} value={Number(value).toFixed(1)}
control={ control={
<NumberFormat <NumberFormat
thousandSeparator={true} thousandSeparator={true}
style={{ color: this.state.get_for == 'view'? "black" : handleAction(tableMeta.rowData[2], tableMeta.rowData[0], tableMeta)? "#5198ea" : 'black', fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }} style={{ color: this.state.get_for == 'view'? "black" : handleAction(tableMeta.rowData[2], tableMeta.rowData[0], tableMeta)? "#5198ea" : 'black', fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text" type="text"
placeholder="" placeholder=""
value={ tableMeta.rowData[0] === 5 || tableMeta.rowData[0] === 6? Number(handleValueFormula(value, tableMeta, tableMeta.columnIndex)) : Number(value).toFixed(1)} value={ tableMeta.rowData[0] === 5 || tableMeta.rowData[0] === 6? Number(handleValueFormula(value, tableMeta, tableMeta.columnIndex)).toFixed(1) : Number(value).toFixed(1)}
// 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)}
disabled={this.state.get_for == 'view'? true : !handleAction(tableMeta.rowData[2], tableMeta.rowData[0], tableMeta)} disabled={this.state.get_for == 'view'? true : !handleAction(tableMeta.rowData[2], tableMeta.rowData[0], tableMeta)}
decimalScale={1} decimalScale={1}
...@@ -1336,7 +1336,7 @@ export default class CorporateAnnualTargetMR extends Component { ...@@ -1336,7 +1336,7 @@ export default class CorporateAnnualTargetMR extends Component {
null : null :
<FormControlLabel <FormControlLabel
style={{ margin: 0 }} style={{ margin: 0 }}
value={value} value={Number(value).toFixed(1)}
control={ control={
<NumberFormat <NumberFormat
thousandSeparator={true} thousandSeparator={true}
...@@ -1381,14 +1381,14 @@ export default class CorporateAnnualTargetMR extends Component { ...@@ -1381,14 +1381,14 @@ export default class CorporateAnnualTargetMR extends Component {
: :
<FormControlLabel <FormControlLabel
style={{ margin: 0 }} style={{ margin: 0 }}
value={value} value={Number(value).toFixed(1)}
control={ control={
<NumberFormat <NumberFormat
thousandSeparator={true} thousandSeparator={true}
style={{ 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=""
value={handleAchiement(tableMeta)} value={handleAchiement(tableMeta).toFixed(1)}
decimalScale={1} decimalScale={1}
disabled={true} disabled={true}
/> />
...@@ -1426,7 +1426,7 @@ export default class CorporateAnnualTargetMR extends Component { ...@@ -1426,7 +1426,7 @@ export default class CorporateAnnualTargetMR extends Component {
: :
<FormControlLabel <FormControlLabel
style={{ margin: 0 }} style={{ margin: 0 }}
value={value} value={Number(value).toFixed(1)}
control={ control={
<NumberFormat <NumberFormat
thousandSeparator={true} thousandSeparator={true}
...@@ -1479,7 +1479,7 @@ export default class CorporateAnnualTargetMR extends Component { ...@@ -1479,7 +1479,7 @@ export default class CorporateAnnualTargetMR extends Component {
style={{ color: "black", fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }} style={{ color: "black", fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text" type="text"
placeholder="" placeholder=""
value={handleTotal(tableMeta)} value={handleTotal(tableMeta).toFixed(1)}
decimalScale={2} decimalScale={2}
disabled={true} disabled={true}
/> />
......
This diff is collapsed.
...@@ -111,6 +111,7 @@ export default class OperatingIndicator extends Component { ...@@ -111,6 +111,7 @@ export default class OperatingIndicator extends Component {
"periode": this.state.periode.periode, "periode": this.state.periode.periode,
"report_type": "operating indicator", "report_type": "operating indicator",
} }
console.log(payload);
api.create().getAllOperatingInd(payload).then(response => { api.create().getAllOperatingInd(payload).then(response => {
console.log(response); console.log(response);
if (response.data) { if (response.data) {
...@@ -312,6 +313,18 @@ export default class OperatingIndicator extends Component { ...@@ -312,6 +313,18 @@ export default class OperatingIndicator extends Component {
}) })
} else if (String(item[1]).toLocaleLowerCase().includes("monthly report")) { } else if (String(item[1]).toLocaleLowerCase().includes("monthly report")) {
console.log(item); console.log(item);
let month = String(item[1]).toLocaleLowerCase().includes('jan') ? 1 :
String(item[1]).toLocaleLowerCase().includes('feb') ? 2 :
String(item[1]).toLocaleLowerCase().includes('mar') ? 3 :
String(item[1]).toLocaleLowerCase().includes('apr') ? 4 :
String(item[1]).toLocaleLowerCase().includes('may') ? 5 :
String(item[1]).toLocaleLowerCase().includes('jun') ? 6 :
String(item[1]).toLocaleLowerCase().includes('jul') ? 7 :
String(item[1]).toLocaleLowerCase().includes('aug') ? 8 :
String(item[1]).toLocaleLowerCase().includes('sep') ? 9 :
String(item[1]).toLocaleLowerCase().includes('oct') ? 10 :
String(item[1]).toLocaleLowerCase().includes('nov') ? 11 :
String(item[1]).toLocaleLowerCase().includes('dec') ? 12 : null
this.setState({ this.setState({
statusDetail: String(item[2]).toLocaleLowerCase(), statusDetail: String(item[2]).toLocaleLowerCase(),
dataDetail: { ...this.state.dataReport[index], periode: this.state.periode.periode, operatingIndID: this.state.operatingIndID, company: this.state.company }, dataDetail: { ...this.state.dataReport[index], periode: this.state.periode.periode, operatingIndID: this.state.operatingIndID, company: this.state.company },
...@@ -319,7 +332,7 @@ export default class OperatingIndicator extends Component { ...@@ -319,7 +332,7 @@ export default class OperatingIndicator extends Component {
visibleDetailOpt: false, visibleDetailOpt: false,
visibleDetailMonthly: true, visibleDetailMonthly: true,
visibleDetailRolling: false, visibleDetailRolling: false,
months: id === 22 ? 1 : 23 ? 2 : 24 ? 3 : 25 ? 4 : 27 ? 5 : 28 ? 6 : 29 ? 7 : 31 ? 8 : 32 ? 9 : 33 ? 10 : 35 ? 11 : 36 ? 12 : 0 months: month
}) })
......
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