Commit 7b70ba52 authored by Riri Novita's avatar Riri Novita

Merge branch 'ENV-STAGING' of http://103.44.149.204/d.arizona/tia-dev into dev/riri

parents bcadcd8e a4804090
// contents of .env
REACT_APP_URL_MAIN_BE=https://tia.eksad.com/tia-reporting-staging
REACT_APP_URL_MAIN_FE=/web
\ No newline at end of file
REACT_APP_URL_MAIN_FE=/web-staging
\ No newline at end of file
{
"name": "my-app",
"version": "0.1.0",
"homepage": "http://localhost:8080/web/",
"homepage": "http://localhost:8080/web-staging/",
"private": true,
"dependencies": {
"@date-io/date-fns": "^1.3.13",
......
.main-color{
background-color: #273b80 !important;
}
/* .main-color{
background-color: #1474CA !important;
background-color: #273b80 !important;
} */
.main-color{
background-color: #0b6b24 !important;
}
.sub-color{
background-color: #f0f1f3 !important;
}
......@@ -71,7 +71,7 @@ const useStyles = makeStyles((theme) => ({
easing: theme.transitions.easing.sharp,
duration: theme.transitions.duration.enteringScreen,
}),
backgroundColor: '#273b80'
backgroundColor: '#0b6b24'
},
topleftClose: {
borderRight: 0,
......@@ -87,7 +87,7 @@ const useStyles = makeStyles((theme) => ({
},
padding: 20,
display: 'flex',
backgroundColor: '#273b80'
backgroundColor: '#0b6b24'
},
drawerOpen: {
width: drawerWidth,
......
......@@ -432,82 +432,88 @@ export default class ListOfCreditFacilities extends Component {
})
}
// fileHandler = (event) => {
// let fileObj = event
// ExcelRenderer(fileObj, (err, resp) => {
// // console.log(resp)
// if (err) {
// console.log(err);
// }
// else {
// let isi = resp.rows.slice(3)
// console.log(isi);
// let payload = []
// let reg = /^[-+]?(?:[0-9]+,)*[0-9]+(?:\.[0-9]+)?$/;
// isi.map((i, index) => {
// if (i.length > 0) {
// let tgl = String(i[5]).split('-')
// console.log(i[5])
// console.log(tgl)
// payload.push({
// "item_report_id": i[1],
// "borrower_comp_name": this.props.company.company_name,
// "bank_name": i[2],
// "type_of_credit": i[3],
// "remarks": i[4],
// "loan_maturity_date": i[5] !== undefined ? tgl[2] + '-' + tgl[1] + '-' + tgl[0] : null,
// "interest": i[6],
// "currency": i[7],
// "loan_plafond_amount_ori": i[8] !== undefined ? Number(i[8]) : i[8],
// "loan_plafond_amount_idr": i[9] !== undefined ? Number(i[9]) : i[9],
// "out_loan_ki_amount_ori": i[10] !== undefined ? Number(i[10]) : i[10],
// "out_loan_ki_amount_idr": i[11] !== undefined ? Number(i[11]) : i[11],
// "out_loan_kmk_amount_ori": i[12] !== undefined ? Number(i[12]) : i[12],
// "out_loan_kmk_amount_idr": i[13] !== undefined ? Number(i[13]) : i[13],
// "out_loan_other_type": i[14],
// "out_loan_other_amount_ori": i[15] !== undefined ? Number(i[15]) : i[15],
// "out_loan_other_amount_idr": i[16] !== undefined ? Number(i[16]) : i[16],
// // "total_out_loan_ori": i[18],
// // "total_out_loan_idr": i[19],
// // "remaining_plafond_ori": i[20],
// // "remaining_plafond_idr": i[21],
// "current_ratio_financial": i[17],
// "der_financial": i[18],
// "debt_to_ebitda_financial": i[19],
// "ebitda_to_interest_financial": i[20],
// "other_ratio1_ratio_name": i[21],
// "other_ratio1_financial": i[22],
// "other_ratio1_current": i[23],
// "other_ratio2_ratio_name": i[24],
// "other_ratio2_financial": i[25],
// "other_ratio2_current": i[26],
// "other_ratio3_ratio_name": i[27],
// "other_ratio3_financial": i[28],
// "other_ratio3_current": i[29],
// "other_ratio4_ratio_name": i[30],
// "other_ratio4_financial": i[31],
// "other_ratio4_current": i[32],
// "notes": i[33],
// })
// }
// })
// let body = {
// "monthly_report_id": this.props.monthlyReportId,
// "company_id": this.props.company.company_id,
// "periode": this.props.periode,
// "report_id": this.props.report_id,
// "status": 'submitted',
// "months": this.props.month.month_id,
// "locf": payload,
// "per_bs": this.state.perBS,
// "diff": this.state.diff,
// "total_loan": this.state.perBS
// }
// console.log(body)
// this.setState({ payload: body, judul: resp.rows[1][0], judulColumn: resp.rows[0][0] })
// }
// });
// }
fileHandler = (event) => {
let fileObj = event
ExcelRenderer(fileObj, (err, resp) => {
console.log(resp)
if (err) {
console.log(err);
}
else {
let isi = resp.rows.slice(3)
console.log(isi);
let payload = []
let reg = /^[-+]?(?:[0-9]+,)*[0-9]+(?:\.[0-9]+)?$/;
isi.map((i, index) => {
if (i.length > 0) {
let excelDate = i[5]
let excelBaseDate = new Date('1900-01-01');
let javascriptBaseDate = new Date('1970-01-01');
let daysBetween = excelDate - 1;
let javascriptDate = new Date(excelBaseDate.getTime() + (daysBetween * 24 * 60 * 60 * 1000));
let tgl = String(i[5]).split('-')
console.log(i[5])
console.log(tgl)
console.log(javascriptDate);
payload.push({
"item_report_id": i[1],
"borrower_comp_name": this.props.company.company_name,
"bank_name": i[2],
"type_of_credit": i[3],
"remarks": i[4],
"loan_maturity_date": i[5] !== undefined ? tgl[2] + '-' + tgl[1] + '-' + tgl[0] : null,
"interest": i[6],
"currency": i[7],
"loan_plafond_amount_ori": i[8] !== undefined ? Number(i[8]) : i[8],
"loan_plafond_amount_idr": i[9] !== undefined ? Number(i[9]) : i[9],
"out_loan_ki_amount_ori": i[10] !== undefined ? Number(i[10]) : i[10],
"out_loan_ki_amount_idr": i[11] !== undefined ? Number(i[11]) : i[11],
"out_loan_kmk_amount_ori": i[12] !== undefined ? Number(i[12]) : i[12],
"out_loan_kmk_amount_idr": i[13] !== undefined ? Number(i[13]) : i[13],
"out_loan_other_type": i[14],
"out_loan_other_amount_ori": i[15] !== undefined ? Number(i[15]) : i[15],
"out_loan_other_amount_idr": i[16] !== undefined ? Number(i[16]) : i[16],
// "total_out_loan_ori": i[18],
// "total_out_loan_idr": i[19],
// "remaining_plafond_ori": i[20],
// "remaining_plafond_idr": i[21],
"current_ratio_financial": i[17],
"der_financial": i[18],
"debt_to_ebitda_financial": i[19],
"ebitda_to_interest_financial": i[20],
"other_ratio1_ratio_name": i[21],
"other_ratio1_financial": i[22],
"other_ratio1_current": i[23],
"other_ratio2_ratio_name": i[24],
"other_ratio2_financial": i[25],
"other_ratio2_current": i[26],
"other_ratio3_ratio_name": i[27],
"other_ratio3_financial": i[28],
"other_ratio3_current": i[29],
"other_ratio4_ratio_name": i[30],
"other_ratio4_financial": i[31],
"other_ratio4_current": i[32],
"notes": i[33],
})
}
})
let body = {
"monthly_report_id": this.props.monthlyReportId,
"company_id": this.props.company.company_id,
"periode": this.props.periode,
"report_id": this.props.report_id,
"status": 'submitted',
"months": this.props.month.month_id,
"locf": payload,
"per_bs": this.state.perBS,
"diff": this.state.diff,
"total_loan": this.state.perBS
}
console.log(body)
this.setState({ payload: body, judul: resp.rows[1][0], judulColumn: resp.rows[0][0] })
}
});
}
deleteReport() {
......
......@@ -951,7 +951,7 @@ export default class MonthlyReport extends Component {
visibleOI: false,
visibleCF: false,
})
} else if (item === 'List Of Credit Facilities and Investment') {
} else if (item === 'List of Credit Facilities') {
this.setState({
visibleMonthlyReport: false,
visibleBS: false,
......
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