Commit 37903765 authored by Faisal Hamdi's avatar Faisal Hamdi

Merge branch 'faisal' into 'master'

Faisal

See merge request !1394
parents 1ecbe43f 22c03ac0
......@@ -332,6 +332,7 @@ const create = (type = "") => {
const getFullApproveMB = (body) => api.post('/transaction/master_budget/get_approved_submit', body)
const getFullApproveMonthly = (body) => api.post('/transaction/monthly_report/get_approved_submit', body)
const getDashboardFinancial = (body) => api.post('/transaction/dashboard/get_dashboard_financial', body)
const getReportCATPA = (body) => api.post('/transaction/cat/performance_appraisal', body)
//CASH FLOW
const getDetailReportCF = (body) => api.post('/transaction/cash_flow/master_budget/get_report_hierarki', body)
......@@ -734,6 +735,7 @@ const create = (type = "") => {
getFullApproveMB,
getFullApproveMonthly,
getDashboardFinancial,
getReportCATPA,
getHierarkiCronJobMBPL,
getHierarkiCronJobMBCF,
getHierarkiCronJobMBRatio,
......
......@@ -2675,10 +2675,89 @@ export default class SubHolding extends Component {
]
this.setState({ dataTable: dbCatPQ, previewTable: true, loading: false, previewDownload: true })
} else if (this.state.report.value === 11) {
let dbCatPA = [
["ABCD", "%", "Rp Bio", "HIG", "Unlimited", "SUM", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18"]
]
this.setState({ dataTable: dbCatPA, previewTable: true, loading: false, previewDownload: true })
let dbCATPA = []
let payloadCATPA = {...payload, report_id: 17, months: this.state.month.month_id, get_for: "view"}
api.create().getReportCATPA(payloadCATPA).then(response => {
console.log(payloadCATPA);
console.log(response);
if (response.data) {
if (response.data.status === 'success') {
let res = response.data.data
const handlePushChild = (item) => {
let indexIDzz = dbCATPA.findIndex((val) => val[1] === item.id)
if (indexIDzz === -1) {
dbCATPA.push([
item.type_report_id,
item.id,
item.parent,
item.formula,
item.level,
item.description,
item.weight,
item.uom,
item.kpi_type,
item.max_ach,
item.formula_ytd,
item.actual_monthly,
item.target_monthly,
item.achivement_monthly,
item.score,
item.score_x_weight,
item.order
])
}
if (item.children !== null) {
if (item.children.length > 0) {
item.children.map((items, indexs) => {
handlePushChild(items)
})
}
}
}
res.map((item, index) => {
dbCATPA.push([
item.type_report_id,
item.id,
item.parent,
item.formula,
item.level,
item.description,
item.weight,
item.uom,
item.kpi_type,
item.max_ach,
item.formula_ytd,
item.actual_monthly,
item.target_monthly,
item.achivement_monthly,
item.score,
item.score_x_weight,
item.order
])
if (item.children !== null) {
if (item.children.length > 0) {
item.children.map((items, indexs) => {
handlePushChild(items)
})
}
}
})
this.setState({ dataTable: dbCATPA, previewTable: true, loading: false, previewDownload: true })
console.log(this.state.dataTable)
} else {
this.setState({ alert: true, messageAlert: response.data.message, tipeAlert: 'warning', loading: false }, () => {
if (response.data.message.includes("Someone Logged In")) {
setTimeout(() => {
localStorage.removeItem(Constant.TOKEN)
window.location.reload();
}, 1000);
}
})
}
} else {
this.setState({ alert: true, messageAlert: response.problem, tipeAlert: 'error', loading: false })
}
})
}
}
......
......@@ -24064,6 +24064,31 @@ export default class TableSubHolding extends Component {
const columnCatPA = [
{
name: "",
options: {
display: false
}
}, {
name: "",
options: {
display: false
}
}, {
name: "",
options: {
display: false
}
}, {
name: "",
options: {
display: false
}
}, {
name: "",
options: {
display: false
}
}, {
name: "Key Performance Indicator",
options: {
customHeadRender: (columnMeta) => (
......@@ -24349,8 +24374,12 @@ export default class TableSubHolding extends Component {
)
}
}
}
]
},{
name: "",
options: {
display: false
}
}]
const columns = []
......@@ -1802,11 +1802,11 @@ export default class CorporateAnnualTargetRO extends Component {
control={
<NumberFormat
thousandSeparator={true}
style={{ color: this.props.quarter == 'q1' ? "#5198ea" : '#555252', 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"
placeholder=""
value={Number(value).toFixed(1)}
disabled={this.props.quarter == 'q1' ? false : true}
disabled={this.props.quarter == 'q1' || this.props.quarter == 'q2' ? false : true}
decimalScale={1}
onBlur={(event) => {
// updateValue(event.target.value)
......@@ -1902,11 +1902,11 @@ export default class CorporateAnnualTargetRO extends Component {
control={
<NumberFormat
thousandSeparator={true}
style={{ color: this.props.quarter == 'q1' ? "#5198ea" : '#555252', 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"
placeholder=""
value={Number(value).toFixed(1)}
disabled={this.props.quarter == 'q1' ? false : true}
disabled={this.props.quarter == 'q1' || this.props.quarter == 'q2' ? false : true}
decimalScale={1}
onBlur={(event) => {
// updateValue(event.target.value)
......@@ -2002,11 +2002,11 @@ export default class CorporateAnnualTargetRO extends Component {
control={
<NumberFormat
thousandSeparator={true}
style={{ color: this.props.quarter == 'q1' ? "#5198ea" : '#555252', 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"
placeholder=""
value={Number(value).toFixed(1)}
disabled={this.props.quarter == 'q1' ? false : true}
disabled={this.props.quarter == 'q1' || this.props.quarter == 'q2' ? false : true}
decimalScale={1}
onBlur={(event) => {
// updateValue(event.target.value)
......@@ -2102,11 +2102,11 @@ export default class CorporateAnnualTargetRO extends Component {
control={
<NumberFormat
thousandSeparator={true}
style={{ color: this.props.quarter == 'q1' ? "#5198ea" : '#555252', fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
style={{ color: "#5198ea", fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
placeholder=""
value={Number(value).toFixed(1)}
disabled={this.props.quarter == 'q1' ? false : true}
disabled={false}
decimalScale={1}
onBlur={(event) => {
// updateValue(event.target.value)
......@@ -2202,11 +2202,11 @@ export default class CorporateAnnualTargetRO extends Component {
control={
<NumberFormat
thousandSeparator={true}
style={{ color: this.props.quarter == 'q1' ? "#5198ea" : '#555252', fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
style={{ color: "#5198ea", fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
placeholder=""
value={Number(value).toFixed(1)}
disabled={this.props.quarter == 'q1' ? false : true}
disabled={false}
decimalScale={1}
onBlur={(event) => {
// updateValue(event.target.value)
......@@ -2302,11 +2302,11 @@ export default class CorporateAnnualTargetRO extends Component {
control={
<NumberFormat
thousandSeparator={true}
style={{ color: this.props.quarter == 'q1' ? "#5198ea" : '#555252', fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
style={{ color: "#5198ea", fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
placeholder=""
value={Number(value).toFixed(1)}
disabled={this.props.quarter == 'q1' ? false : true}
disabled={false}
decimalScale={1}
onBlur={(event) => {
// updateValue(event.target.value)
......
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