Commit 26423b4c authored by qorri_di's avatar qorri_di

Merge branch 'ENV-DEV' into 'BACKUP-DEV'

Env dev

See merge request !1781
parents 83856731 eef9e9c4
......@@ -480,17 +480,17 @@ export default class BalanceSheetMR extends Component {
// this.props.onClickClose()
if (type == 'submitted') {
this.props.saveToMonthlyReport('BS')
let bodyRatioBs = {
"report": 'ratio',
"monthlyReportId": this.props.monthlyReportId,
"periode": this.props.periode,
"companyId": this.props.company.company_id,
"months": this.props.month.month_id
}
api.create().triggerRatioFromLOCF(bodyRatioBs).then((res) => {
console.log(res)
this.setState({ loading: false })
})
// let bodyRatioBs = {
// "report": 'ratio',
// "monthlyReportId": this.props.monthlyReportId,
// "periode": this.props.periode,
// "companyId": this.props.company.company_id,
// "months": this.props.month.month_id
// }
// api.create().triggerRatioFromLOCF(bodyRatioBs).then((res) => {
// console.log(res)
// this.setState({ loading: false })
// })
} else {
this.props.saveToMonthlyReport()
}
......
......@@ -942,7 +942,7 @@ export default class CashFlow extends Component {
null
}
</div>
<div className="col-2">
<div className="col-2" style={{ left: 14}}>
{
tableMeta.rowData[0] === 3 || tableMeta.rowData[0] === 4 || tableMeta.rowData[0] === 1 ?
null
......@@ -1017,7 +1017,7 @@ export default class CashFlow extends Component {
null
}
</div>
<div className="col-3">
<div className="col-3" style={{ left: 28}}>
{
tableMeta.rowData[0] === 3 || tableMeta.rowData[0] === 4 || tableMeta.rowData[0] === 1 ?
null
......@@ -1091,7 +1091,7 @@ export default class CashFlow extends Component {
null
}
</div>
<div className="col-4">
<div className="col-4" style={{ left: 43}}>
{
tableMeta.rowData[0] === 3 || tableMeta.rowData[0] === 4 || tableMeta.rowData[0] === 1 ?
null
......@@ -1170,7 +1170,7 @@ export default class CashFlow extends Component {
}
</div>
</div>
<div className="grid grid-4x content-center">
<div className="grid grid-4x content-center" style={{ left: 58}}>
<div className="col-1">
{
tableMeta.rowData[0] === 3 || tableMeta.rowData[0] === 4 || tableMeta.rowData[0] === 1 ?
......@@ -1249,7 +1249,7 @@ export default class CashFlow extends Component {
null
}
</div>
<div className="col-2">
<div className="col-2" style={{ left: 15}}>
{
tableMeta.rowData[0] === 3 || tableMeta.rowData[0] === 4 || tableMeta.rowData[0] === 1 ?
null
......@@ -1326,7 +1326,7 @@ export default class CashFlow extends Component {
null
}
</div>
<div className="col-3">
<div className="col-3" style={{ left: 29}}>
{
tableMeta.rowData[0] === 3 || tableMeta.rowData[0] === 4 || tableMeta.rowData[0] === 1 ?
null
......@@ -1403,7 +1403,7 @@ export default class CashFlow extends Component {
null
}
</div>
<div className="col-4">
<div className="col-4" style={{ left: 45}}>
{
tableMeta.rowData[0] === 3 || tableMeta.rowData[0] === 4 || tableMeta.rowData[0] === 1 ?
null
......@@ -1482,7 +1482,7 @@ export default class CashFlow extends Component {
</div>
</div>
<div className="grid grid-5x content-center">
<div className="col-1">
<div className="col-1" style={{ left: 90}}>
{
tableMeta.rowData[0] === 3 || tableMeta.rowData[0] === 4 || tableMeta.rowData[0] === 1 ?
null
......@@ -1559,7 +1559,7 @@ export default class CashFlow extends Component {
null
}
</div>
<div className="col-2">
<div className="col-2" style={{ left: 76}}>
{
tableMeta.rowData[0] === 3 || tableMeta.rowData[0] === 4 || tableMeta.rowData[0] === 1 ?
null
......@@ -1637,7 +1637,7 @@ export default class CashFlow extends Component {
null
}
</div>
<div className="col-3">
<div className="col-3" style={{ left: 63}}>
{
tableMeta.rowData[0] === 3 || tableMeta.rowData[0] === 4 || tableMeta.rowData[0] === 1 ?
null
......@@ -1708,7 +1708,7 @@ export default class CashFlow extends Component {
null
}
</div>
<div className="col-4">
<div className="col-4" style={{ left: 46}}>
{
tableMeta.rowData[0] === 3 || tableMeta.rowData[0] === 4 || tableMeta.rowData[0] === 1 ?
null
......@@ -1781,7 +1781,7 @@ export default class CashFlow extends Component {
null
}
</div>
<div className="col-5">
<div className="col-5" style={{ left: 30}}>
{
tableMeta.rowData[0] === 3 || tableMeta.rowData[0] === 4 || tableMeta.rowData[0] === 1 ?
null
......
......@@ -42,6 +42,7 @@ class ReportProgress extends Component {
alert: false,
tipeAlert: '',
messageAlert: '',
company: null
}
}
......@@ -187,6 +188,8 @@ class ReportProgress extends Component {
item.automatic_reminder_report_date,
item.manual_reminder_report_status,
item.manual_reminder_report_date,
item.submission_status,
item.manual_reminder_report_button,
item.company_id,
])
})
......@@ -241,6 +244,8 @@ class ReportProgress extends Component {
item.automatic_reminder_report_date,
item.manual_reminder_report_status,
item.manual_reminder_report_date,
item.monthly_status,
item.manual_reminder_report_button,
item.company_id,
])
})
......@@ -277,6 +282,8 @@ class ReportProgress extends Component {
item.automatic_reminder_report_date,
item.manual_reminder_report_status,
item.manual_reminder_report_date,
item.rolling_status,
item.manual_reminder_report_button,
item.company_id,
])
})
......@@ -321,6 +328,8 @@ class ReportProgress extends Component {
item.automatic_reminder_report_date,
item.manual_reminder_report_status,
item.manual_reminder_report_date,
item.outlook_status,
item.manual_reminder_report_button,
item.company_id,
])
})
......@@ -567,7 +576,7 @@ class ReportProgress extends Component {
periode={this.state.periode ? this.state.periode.periode : null}
quarter={this.state.quarter.name}
month={this.state.month.month_id}
company={this.state.company}
company={this.state.company_id}
typeReport={String(this.state.reportType.name).toLocaleUpperCase()}
year={this.state.periodeMB.value}
getMonitoringMB={this.getMonitoringMB.bind(this)}
......
......@@ -65,7 +65,6 @@ export default class TableProgressReport extends Component {
"quarter": data.quarter === "Q1" ? "q1" : data.quarter === "Q2" ? "q2" : data.quarter === "Q3" ? "q3" : null
}
console.log(payloadGetData);
api.create().sendEmail(payload).then(response => {
console.log(response);
if (response.data) {
......@@ -98,7 +97,7 @@ export default class TableProgressReport extends Component {
// })
// this.setState({ alert: true, messageAlert: response.data.message, tipeAlert: 'success' })
} else {
this.setState({ alert: true, messageAlert: response.data.message, tipeAlert: 'warning', loading: false }, () => {
this.setState({ alert: true, messageAlert: response.problem, tipeAlert: 'warning', loading: false }, () => {
if (response.data.message.includes("Someone Logged In") || response.data.message.includes("Token Expired")) {
setTimeout(() => {
localStorage.removeItem(Constant.TOKEN)
......@@ -108,10 +107,10 @@ export default class TableProgressReport extends Component {
})
}
} else {
this.setState({ alert: true, messageAlert: response.data.message, tipeAlert: 'error', loading: false })
this.setState({ alert: true, messageAlert: response.problem, tipeAlert: 'error', loading: false })
}
} else {
this.setState({ alert: true, messageAlert: response.data.message, tipeAlert: 'error', loading: false })
this.setState({ alert: true, messageAlert: response.problem, tipeAlert: 'error', loading: false })
}
})
}
......@@ -123,7 +122,7 @@ export default class TableProgressReport extends Component {
render() {
let dataTable2 = this.props.dataTable;
// console.log(this.props);
// console.log(dataTable2);
const handleValue = (tableMeta, itemName) => {
let value = tableMeta.rowData[1].filter((val) => val.report_name == itemName)
// console.log(itemName)
......@@ -201,7 +200,6 @@ export default class TableProgressReport extends Component {
),
setCellProps: () => ({ style2 }),
customBodyRender: (value, tableMeta, updateValue) => {
// console.log(tableMeta);
return (
<div className="grid grid-3x">
<div className="column-1 grid grid-4x" style={{ ...style2, fontSize: 12, position: "sticky" }}>
......@@ -237,17 +235,22 @@ export default class TableProgressReport extends Component {
<div style={{ textAlign: 'center' }}>{tableMeta.rowData[2]}</div>
</div>
<div className="column-2" style={{ placeSelf: 'center', textAlign: 'center', padding: 5, width: 143 }}>
{tableMeta.rowData[5] === "OPEN" ?
<div style={{ textAlign: 'center' }}>
<button
type="button"
style={{ background: 'white' }}
onClick={() => this.handleShowPopup(tableMeta.rowData[5], tableMeta.rowData)}
onClick={() => this.handleShowPopup(tableMeta.rowData[7], tableMeta.rowData)}
>
<div style={{ width: 85, height: 30, backgroundColor: '#354960', borderRadius: 5, alignItems: 'center', display: 'flex', justifyContent: 'center' }}>
<span style={{ color: '#fff', fontSize: 11 }}>{tableMeta.rowData[3] === null || tableMeta.rowData[3] === 0 ? "Send Email" : "Sent"}</span>
</div>
</button>
</div>
:
"-"
}
</div>
<div className="column-3" style={{ placeSelf: 'center', textAlign: 'center', padding: 5, width: 143 }}>
<div style={{ textAlign: 'center' }}>{tableMeta.rowData[4]}</div>
......@@ -276,6 +279,18 @@ export default class TableProgressReport extends Component {
display: false
}
},
{
name: "",
options: {
display: false
}
},
{
name: "",
options: {
display: false
}
},
{
name: "",
options: {
......@@ -399,17 +414,22 @@ export default class TableProgressReport extends Component {
<div style={{ textAlign: 'center' }}>{tableMeta.rowData[2]}</div>
</div>
<div className="column-2" style={{ placeSelf: 'center', textAlign: 'center', padding: 5, width: 143 }}>
{tableMeta.rowData[5] === "OPEN" ?
<div style={{ textAlign: 'center' }}>
<button
type="button"
style={{ background: 'white' }}
onClick={() => this.handleShowPopup(tableMeta.rowData[5], tableMeta.rowData)}
onClick={() => this.handleShowPopup(tableMeta.rowData[7], tableMeta.rowData)}
>
<div style={{ position: 'relative', width: 85, height: 30, backgroundColor: '#354960', borderRadius: 5, alignItems: 'center', display: 'flex', justifyContent: 'center' }}>
<span style={{ color: '#fff', fontSize: 11 }}>{tableMeta.rowData[3] === null || tableMeta.rowData[3] === 0 ? "Send Email" : "Sent"}</span>
</div>
</button>
</div>
:
"-"
}
</div>
<div className="column-3" style={{ placeSelf: 'center', textAlign: 'center', padding: 5, width: 143 }}>
<div style={{ textAlign: 'center' }}>{tableMeta.rowData[4]}</div>
......@@ -438,6 +458,18 @@ export default class TableProgressReport extends Component {
display: false
}
},
{
name: "",
options: {
display: false
}
},
{
name: "",
options: {
display: false
}
},
{
name: "",
options: {
......@@ -545,17 +577,22 @@ export default class TableProgressReport extends Component {
<div style={{ textAlign: 'center' }}>{tableMeta.rowData[2]}</div>
</div>
<div className="column-2" style={{ placeSelf: 'center', textAlign: 'center', padding: 5, width: 143 }}>
{tableMeta.rowData[5] === "OPEN" ?
<div style={{ textAlign: 'center' }}>
<button
type="button"
style={{ background: 'white' }}
onClick={() => this.handleShowPopup(tableMeta.rowData[5], tableMeta.rowData)}
onClick={() => this.handleShowPopup(tableMeta.rowData[7], tableMeta.rowData)}
>
<div style={{ width: 85, height: 30, backgroundColor: '#354960', borderRadius: 5, alignItems: 'center', display: 'flex', justifyContent: 'center' }}>
<span style={{ color: '#fff', fontSize: 11 }}>{tableMeta.rowData[3] === null || tableMeta.rowData[3] === 0 ? "Send Email" : "Sent"}</span>
</div>
</button>
</div>
:
"-"
}
</div>
<div className="column-3" style={{ placeSelf: 'center', textAlign: 'center', padding: 5, width: 143 }}>
<div style={{ textAlign: 'center' }}>{tableMeta.rowData[4]}</div>
......@@ -584,6 +621,18 @@ export default class TableProgressReport extends Component {
display: false
}
},
{
name: "",
options: {
display: false
}
},
{
name: "",
options: {
display: false
}
},
{
name: "",
options: {
......@@ -691,17 +740,22 @@ export default class TableProgressReport extends Component {
<div style={{ textAlign: 'center' }}>{tableMeta.rowData[2]}</div>
</div>
<div className="column-2" style={{ placeSelf: 'center', textAlign: 'center', padding: 5, width: 143 }}>
{tableMeta.rowData[5] === "OPEN" ?
<div style={{ textAlign: 'center' }}>
<button
type="button"
style={{ background: 'white' }}
onClick={() => this.handleShowPopup(tableMeta.rowData[5], tableMeta.rowData)}
onClick={() => this.handleShowPopup(tableMeta.rowData[7], tableMeta.rowData)}
>
<div style={{ width: 85, height: 30, backgroundColor: '#354960', borderRadius: 5, alignItems: 'center', display: 'flex', justifyContent: 'center' }}>
<span style={{ color: '#fff', fontSize: 11 }}>{tableMeta.rowData[3] === null || tableMeta.rowData[3] === 0 ? "Send Email" : "Sent"}</span>
</div>
</button>
</div>
:
"-"
}
</div>
<div className="column-3" style={{ placeSelf: 'center', textAlign: 'center', padding: 5, width: 143 }}>
<div style={{ textAlign: 'center' }}>{tableMeta.rowData[4]}</div>
......@@ -730,6 +784,18 @@ export default class TableProgressReport extends Component {
display: false
}
},
{
name: "",
options: {
display: false
}
},
{
name: "",
options: {
display: false
}
},
{
name: "",
options: {
......
......@@ -4218,7 +4218,7 @@ export default class SubHolding extends Component {
// console.log(yearNow)
// console.log(periode)
if (String(this.state.report.label).toLocaleLowerCase().includes('summary')) {
let index = data.sort((a, b) => a - b).findIndex((val) => val.periode == yearNow)
let index = data.sort((a, b) => a - b).findIndex((val) => val.periode == yearNow - 1)
// console.log(index)
this.setState({ periode: data[index] }, () => {
this.getReportType()
......
......@@ -19053,7 +19053,8 @@ export default class TableSubHolding extends Component {
else {
persenOl = ol / fy
}
value = String(type).includes('MTD') ? persenMtd : String(type).includes('YTD') ? persenYtd : String(type).includes('Quarter') ? persenQuarter : persenFy
// console.log(type);
value = String(type).includes('MTD') ? persenMtd : String(type).includes('YTD') ? persenYtd : String(type).includes('Quarter') ? persenQuarter : String(type).includes('OL') ? persenOl : persenFy
value = (value == null || value == Infinity || value == -Infinity || isNaN(value) ? 0 : Number(value * 100).toFixed(1))
// value = isNaN(value) || value == 'Infinity' || value == '-Infinity' ? (value == '' || value == 0 ? -0 : 0) : (value== '' || value == 0 ? persenFy * -100 : persenFy * 100)
} else {
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