Commit 76aef77c authored by fahrur huzain's avatar fahrur huzain

Merge branch 'ENV-DEV' into 'ENV-DEPLOYMENT'

Env dev

See merge request !2160
parents 4feb7d21 b2616f89
// contents of .env // contents of .env
REACT_APP_URL_MAIN_BE=https://tia.eksad.com/tia-reporting-staging REACT_APP_URL_MAIN_BE=https://tia.eksad.com/tia-reporting-staging
REACT_APP_URL_MAIN_FE=/web REACT_APP_URL_MAIN_FE=/web-staging
\ No newline at end of file \ No newline at end of file
{ {
"name": "my-app", "name": "my-app",
"version": "0.1.0", "version": "0.1.0",
"homepage": "http://localhost:8080/web/", "homepage": "http://localhost:8080/web-staging/",
"private": true, "private": true,
"dependencies": { "dependencies": {
"@date-io/date-fns": "^1.3.13", "@date-io/date-fns": "^1.3.13",
......
...@@ -227,6 +227,7 @@ const create = (type = "") => { ...@@ -227,6 +227,7 @@ const create = (type = "") => {
const createPeriodeRevision = (body) => api.post('transaction/master_budget/create_periode_revision', body) const createPeriodeRevision = (body) => api.post('transaction/master_budget/create_periode_revision', body)
const getIdDeleteFromExcel = (body) => api.post('transaction/master_budget/delete_from_excel', body) const getIdDeleteFromExcel = (body) => api.post('transaction/master_budget/delete_from_excel', body)
const getIdDeleteFromExcelLOCF = (body) => api.post('transaction/locf/monthly_report/delete_from_excel', body) const getIdDeleteFromExcelLOCF = (body) => api.post('transaction/locf/monthly_report/delete_from_excel', body)
const getIdDeleteFromExcelLOV = (body) => api.post('transaction/lov/monthly_report/delete_from_excel', body)
const getDashboard = (body) => api.get('transaction/get_dashboard') const getDashboard = (body) => api.get('transaction/get_dashboard')
const historyApproval = (body) => api.post('transaction/master_budget/history_approval', body) const historyApproval = (body) => api.post('transaction/master_budget/history_approval', body)
const getDashboardUser = () => api.get('transaction/get_dashboard_sub_co') const getDashboardUser = () => api.get('transaction/get_dashboard_sub_co')
...@@ -392,6 +393,7 @@ const create = (type = "") => { ...@@ -392,6 +393,7 @@ const create = (type = "") => {
// 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 getHierarkiMontlyReportTP = (body) => api.post('transaction/tax_planning/monthly_report/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 getHierarkiMontlyReportLOCF = (body) => api.post('transaction/locf/monthly_report/get_report_hierarki', body)
const getHierarkiMontlyReportInvesment = (body) => api.post('transaction/lov/monthly_report/get_report_hierarki', body)
const getHierarkiMontlyReportFAM = (body) => api.post('transaction/fam/monthly_report/get_report_hierarki', body) const getHierarkiMontlyReportFAM = (body) => api.post('transaction/fam/monthly_report/get_report_hierarki', body)
const getHierarkiMontlyReportCF = (body) => api.post('transaction/cash_flow/monthly_report/get_report_hierarki', body) const getHierarkiMontlyReportCF = (body) => api.post('transaction/cash_flow/monthly_report/get_report_hierarki', body)
const getHierarkiMontlyReportCAT = (body) => api.post('/transaction/cat/monthly_report/get_report_hierarki', body) const getHierarkiMontlyReportCAT = (body) => api.post('/transaction/cat/monthly_report/get_report_hierarki', body)
...@@ -431,7 +433,9 @@ const create = (type = "") => { ...@@ -431,7 +433,9 @@ const create = (type = "") => {
// 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 validateSubmitReportMRTP = (body) => api.post('transaction/tax_planning/monthly_report/validate_save', body) const validateSubmitReportMRTP = (body) => api.post('transaction/tax_planning/monthly_report/validate_save', body)
const getPerBSiMontlyReportLOCF = (body) => api.post('transaction/locf/monthly_report/get_per_bs', body) const getPerBSiMontlyReportLOCF = (body) => api.post('transaction/locf/monthly_report/get_per_bs', body)
const getPerBSiMontlyReportLOV = (body) => api.post('transaction/lov/monthly_report/get_per_bs', body)
const checkUploadMonthlyReportLOCF = (body) => api.post('transaction/locf/monthly_report/check_import', body) const checkUploadMonthlyReportLOCF = (body) => api.post('transaction/locf/monthly_report/check_import', body)
const checkUploadMonthlyReportLOV = (body) => api.post('transaction/lov/monthly_report/check_import', body)
const uploadMonthlyReportLOCF = (body) => api.post('transaction/locf/monthly_report/import_monthly_report', body) const uploadMonthlyReportLOCF = (body) => api.post('transaction/locf/monthly_report/import_monthly_report', body)
const validateSubmitReportOI = (body) => api.post('transaction/operating_indicator/monthly_report/validate_save', body) const validateSubmitReportOI = (body) => api.post('transaction/operating_indicator/monthly_report/validate_save', body)
const validateSubmitReportFAM = (body) => api.post('transaction/fam/monthly_report/validate_save', body) const validateSubmitReportFAM = (body) => api.post('transaction/fam/monthly_report/validate_save', body)
...@@ -545,6 +549,9 @@ const create = (type = "") => { ...@@ -545,6 +549,9 @@ const create = (type = "") => {
const uploadSimulasiMROI = (body) => api.post('transaction/operating_indicator/monthly_report/import_monthly_report/other_currency_existing', body) const uploadSimulasiMROI = (body) => api.post('transaction/operating_indicator/monthly_report/import_monthly_report/other_currency_existing', body)
const uploadSimulasiROOI = (body) => api.post('transaction/operating_indicator/rolling_outlook/import_rolling_outlook/other_currency_existing', body) const uploadSimulasiROOI = (body) => api.post('transaction/operating_indicator/rolling_outlook/import_rolling_outlook/other_currency_existing', body)
// Investment
const getTypeOfInvestment = () => api.get('setting_type/get_all_setting_type_by_investment')
// Superadmin Approve // Superadmin Approve
const getListApprover = (report, monthlyReportId) => api.get(`transaction/${report}/get_approver/${monthlyReportId}`) const getListApprover = (report, monthlyReportId) => api.get(`transaction/${report}/get_approver/${monthlyReportId}`)
const getIdToken = (userId) => api.get(`transaction/get_token/${userId}`) const getIdToken = (userId) => api.get(`transaction/get_token/${userId}`)
...@@ -746,6 +753,7 @@ const create = (type = "") => { ...@@ -746,6 +753,7 @@ const create = (type = "") => {
getDetailHierarkiCF, getDetailHierarkiCF,
getHierarkiMontlyReportPL, getHierarkiMontlyReportPL,
getHierarkiMontlyReportLOCF, getHierarkiMontlyReportLOCF,
getHierarkiMontlyReportInvesment,
getHierarkiMontlyReportFAM, getHierarkiMontlyReportFAM,
getHierarkiMontlyReportCAT, getHierarkiMontlyReportCAT,
checkUploadMonthlyReportTP, checkUploadMonthlyReportTP,
...@@ -766,13 +774,16 @@ const create = (type = "") => { ...@@ -766,13 +774,16 @@ const create = (type = "") => {
validateSubmitReportBS, validateSubmitReportBS,
validateSubmitReportPL, validateSubmitReportPL,
getPerBSiMontlyReportLOCF, getPerBSiMontlyReportLOCF,
getPerBSiMontlyReportLOV,
checkUploadMonthlyReportLOCF, checkUploadMonthlyReportLOCF,
checkUploadMonthlyReportLOV,
uploadMonthlyReportLOCF, uploadMonthlyReportLOCF,
validateSubmitReportOI, validateSubmitReportOI,
getMonthlyOI, getMonthlyOI,
getParameterByGroupName, getParameterByGroupName,
getSubmitMonthlyReport, getSubmitMonthlyReport,
getIdDeleteFromExcelLOCF, getIdDeleteFromExcelLOCF,
getIdDeleteFromExcelLOV,
deleteAllItemReportLOCF, deleteAllItemReportLOCF,
submitMonthlyReport, submitMonthlyReport,
approvalMonthly, approvalMonthly,
...@@ -942,6 +953,7 @@ const create = (type = "") => { ...@@ -942,6 +953,7 @@ const create = (type = "") => {
uploadSimulasiOperatingInd, uploadSimulasiOperatingInd,
uploadSimulasiMROI, uploadSimulasiMROI,
uploadSimulasiROOI, uploadSimulasiROOI,
getTypeOfInvestment
} }
} }
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
} }
/* .main-color{ /* .main-color{
background-color: #1474CA !important; background-color: #0b6b24 !important;
} */ } */
.sub-color{ .sub-color{
...@@ -408,7 +408,6 @@ export default class ListOfCreditFacilities extends Component { ...@@ -408,7 +408,6 @@ export default class ListOfCreditFacilities extends Component {
} }
// console.log(payload) // console.log(payload)
api.create().getLastestUpdateMR(payload).then(response => { api.create().getLastestUpdateMR(payload).then(response => {
console.log(JSON.stringify(response))
if (response.data) { if (response.data) {
if (response.data.status === "success") { if (response.data.status === "success") {
this.setState({ this.setState({
...@@ -1017,12 +1016,16 @@ export default class ListOfCreditFacilities extends Component { ...@@ -1017,12 +1016,16 @@ export default class ListOfCreditFacilities extends Component {
// if (this.state.get_for == 'view') { // if (this.state.get_for == 'view') {
// this.setState({perBS: "0.0"}) // this.setState({perBS: "0.0"})
// } else { // } else {
if (response.data.status == "success") { if (response.data) {
this.setState({ if (response.data.status == "success") {
perBS: this.props.defaultCurrency.id == 1 ? (response.data.data.per_bs == null || response.data.data.per_bs == '' ? fixNumber(Number(0), 1) : fixNumber(Number(response.data.data.per_bs), 1)) : (response.data.data.per_bs == null || response.data.data.per_bs == '' ? Number(0) : Number(response.data.data.per_bs)), this.setState({
totalOutStand: response.data.data.total_loan, perBS: this.props.defaultCurrency.id == 1 ? (response.data.data.per_bs == null || response.data.data.per_bs == '' ? fixNumber(Number(0), 1) : fixNumber(Number(response.data.data.per_bs), 1)) : (response.data.data.per_bs == null || response.data.data.per_bs == '' ? Number(0) : Number(response.data.data.per_bs)),
diff: response.data.data.diff totalOutStand: response.data.data.total_loan,
}) diff: response.data.data.diff
})
}
} else {
this.setState({ alert: true, messageAlert: response.problem, tipeAlert: 'error', loading: false })
} }
// } // }
}) })
...@@ -1532,14 +1535,14 @@ export default class ListOfCreditFacilities extends Component { ...@@ -1532,14 +1535,14 @@ export default class ListOfCreditFacilities extends Component {
if (this.props.defaultCurrency.id == 1) { if (this.props.defaultCurrency.id == 1) {
this.setState({ loading: false, dataTable: newData, diff: this.state.diff == null ? "0.0" : fixNumber(Number(fixNumber(Number(totalLoan), 1) - this.state.perBS), 1), perBS: this.state.totalOutStand == null ? "0.0" : this.state.totalOutStand }) this.setState({ loading: false, dataTable: newData, diff: this.state.diff == null ? "0.0" : fixNumber(Number(fixNumber(Number(totalLoan), 1) - this.state.perBS), 1), perBS: this.state.totalOutStand == null ? "0.0" : this.state.totalOutStand })
} else { } else {
this.setState({ loading: false, dataTable: newData, diff: this.state.diff == null ? "0.0" : fixNumber(Number(Number(totalLoan) - this.state.perBS),1), perBS: this.state.totalOutStand == null ? "0.0" : this.state.totalOutStand }) this.setState({ loading: false, dataTable: newData, diff: this.state.diff == null ? "0.0" : fixNumber(Number(Number(totalLoan) - this.state.perBS), 1), perBS: this.state.totalOutStand == null ? "0.0" : this.state.totalOutStand })
} }
} else { } else {
if (this.props.defaultCurrency.id == 1) { if (this.props.defaultCurrency.id == 1) {
this.setState({ loading: false, dataTable: newData, diff: fixNumber(Number(fixNumber(Number(totalLoan), 1) - this.state.perBS), 1), saveDraft: false, saveComp: Number(fixNumber(Number(totalLoan), 1) - this.state.perBS) == 0 || fixNumber(Number(fixNumber(Number(totalLoan), 1) - this.state.perBS),1) == "-0.0" ? false : true }) this.setState({ loading: false, dataTable: newData, diff: fixNumber(Number(fixNumber(Number(totalLoan), 1) - this.state.perBS), 1), saveDraft: false, saveComp: Number(fixNumber(Number(totalLoan), 1) - this.state.perBS) == 0 || fixNumber(Number(fixNumber(Number(totalLoan), 1) - this.state.perBS), 1) == "-0.0" ? false : true })
} else { } else {
this.setState({ loading: false, dataTable: newData, diff: fixNumber(Number(Number(totalLoan) - this.state.perBS),1), saveDraft: false, saveComp: Number(Number(totalLoan) - this.state.perBS) == 0 || fixNumber(Number(Number(totalLoan) - this.state.perBS),1) == "-0.0" ? false : true }) this.setState({ loading: false, dataTable: newData, diff: fixNumber(Number(Number(totalLoan) - this.state.perBS), 1), saveDraft: false, saveComp: Number(Number(totalLoan) - this.state.perBS) == 0 || fixNumber(Number(Number(totalLoan) - this.state.perBS), 1) == "-0.0" ? false : true })
} }
} }
...@@ -1677,7 +1680,7 @@ export default class ListOfCreditFacilities extends Component { ...@@ -1677,7 +1680,7 @@ export default class ListOfCreditFacilities extends Component {
} }
}) })
if (column == 22) { if (column == 22) {
totalLoan = valuez totalLoan = valuez
} }
} else { } else {
if (column == 21) { if (column == 21) {
...@@ -1689,14 +1692,13 @@ export default class ListOfCreditFacilities extends Component { ...@@ -1689,14 +1692,13 @@ export default class ListOfCreditFacilities extends Component {
} else if (column == 24) { } else if (column == 24) {
valuez = Number(tableMeta.rowData[13]) - Number(tableMeta.rowData[22]) valuez = Number(tableMeta.rowData[13]) - Number(tableMeta.rowData[22])
} }
} }
dataTable2[tableMeta.rowIndex][column] = valuez dataTable2[tableMeta.rowIndex][column] = valuez
return valuez return valuez
} }
const handleTambah = (data, rowIndex) => { const handleTambah = (data, rowIndex) => {
// // console.log(dataTable2)
let newData = [] let newData = []
let indexxx = 0 let indexxx = 0
dataTable2.map((item, index) => { dataTable2.map((item, index) => {
...@@ -1945,7 +1947,7 @@ export default class ListOfCreditFacilities extends Component { ...@@ -1945,7 +1947,7 @@ export default class ListOfCreditFacilities extends Component {
{...this.state.bankNameList} {...this.state.bankNameList}
id="bankNameList" id="bankNameList"
onChange={(event, newInputValue) => handleChange(newInputValue, tableMeta, tableMeta.columnIndex)} onChange={(event, newInputValue) => handleChange(newInputValue, tableMeta, tableMeta.columnIndex)}
debug // debug
disableClearable disableClearable
disabled={this.state.get_for == 'view'} disabled={this.state.get_for == 'view'}
// disabled={!handleAction(tableMeta.rowData[2], tableMeta.rowData[0])} // disabled={!handleAction(tableMeta.rowData[2], tableMeta.rowData[0])}
...@@ -3297,7 +3299,7 @@ export default class ListOfCreditFacilities extends Component { ...@@ -3297,7 +3299,7 @@ export default class ListOfCreditFacilities extends Component {
placeholder="" placeholder=""
disabled={true} disabled={true}
decimalScale={this.props.defaultCurrency.id == 1 ? 2 : 16} decimalScale={this.props.defaultCurrency.id == 1 ? 2 : 16}
value={this.props.defaultCurrency.id == 1 ? (fixNumber(Number(handleTableRatio(tableMeta.rowData[32], tableMeta, 32, "EBITDA to Interest - YTD")), 2)) : (Number(handleTableRatio(tableMeta.rowData[32], tableMeta, 32, "EBITDA to Interest - YTD")) == 0 ? "0.0" : Number(handleTableRatio(tableMeta.rowData[32], tableMeta, 32, "EBITDA to Interest - YTD")) )} value={this.props.defaultCurrency.id == 1 ? (fixNumber(Number(handleTableRatio(tableMeta.rowData[32], tableMeta, 32, "EBITDA to Interest - YTD")), 2)) : (Number(handleTableRatio(tableMeta.rowData[32], tableMeta, 32, "EBITDA to Interest - YTD")) == 0 ? "0.0" : Number(handleTableRatio(tableMeta.rowData[32], tableMeta, 32, "EBITDA to Interest - YTD")))}
/> />
} }
/> />
...@@ -3509,7 +3511,7 @@ export default class ListOfCreditFacilities extends Component { ...@@ -3509,7 +3511,7 @@ export default class ListOfCreditFacilities extends Component {
fixedDecimalScale={this.props.defaultCurrency.id == 1 ? true : false} fixedDecimalScale={this.props.defaultCurrency.id == 1 ? true : false}
// decimalScale={2} // decimalScale={2}
decimalScale={this.props.defaultCurrency.id == 1 ? 2 : 16} decimalScale={this.props.defaultCurrency.id == 1 ? 2 : 16}
value={this.props.defaultCurrency.id == 1 ? fixNumber(Number(tableMeta.rowData[37]), 2) : Number(tableMeta.rowData[37]) == 0 ? "0.0" : Number(tableMeta.rowData[37])} value={this.props.defaultCurrency.id == 1 ? fixNumber(Number(tableMeta.rowData[37]), 2) : Number(tableMeta.rowData[37]) == 0 ? "0.0" : Number(tableMeta.rowData[37])}
onBlur={(event) => { onBlur={(event) => {
handleChange(event.target.value, tableMeta, 37) handleChange(event.target.value, tableMeta, 37)
}} }}
...@@ -4565,4 +4567,4 @@ export default class ListOfCreditFacilities extends Component { ...@@ -4565,4 +4567,4 @@ export default class ListOfCreditFacilities extends Component {
) )
} }
} }
\ No newline at end of file
...@@ -301,7 +301,7 @@ export default class MonthlyReport extends Component { ...@@ -301,7 +301,7 @@ export default class MonthlyReport extends Component {
}) })
} }
} else { } else {
this.setState({ alert: true, messageAlert: response.data.message, tipeAlert: 'error' }) this.setState({ alert: true, messageAlert: response.problem, tipeAlert: 'error' })
} }
}) })
} }
......
...@@ -2192,7 +2192,10 @@ export default class RollingOutlook extends Component { ...@@ -2192,7 +2192,10 @@ export default class RollingOutlook extends Component {
</div> </div>
)} )}
{this.state.checkApprover === true ? {this.state.checkApprover === true ?
this.state.lastStatus === 'WAITING FOR REVIEW' ? this.state.lastStatus === 'SUBMITTED' ?
<div style={{ width: '100%', padding: '10px 20px', backgroundColor: 'yellow', textAlign: 'center', marginTop: 20 }}>
<span>{this.state.lastStatus}</span>
</div> : this.state.lastStatus === 'WAITING FOR REVIEW' ?
<div style={{ width: '100%', padding: '10px 20px', backgroundColor: 'yellow', textAlign: 'center', marginTop: 20 }}> <div style={{ width: '100%', padding: '10px 20px', backgroundColor: 'yellow', textAlign: 'center', marginTop: 20 }}>
<span>{this.state.lastStatus}</span> <span>{this.state.lastStatus}</span>
</div> : this.state.lastStatus === 'WAITING FOR YOUR APPROVAL' ? </div> : this.state.lastStatus === 'WAITING FOR YOUR APPROVAL' ?
...@@ -2213,18 +2216,26 @@ export default class RollingOutlook extends Component { ...@@ -2213,18 +2216,26 @@ export default class RollingOutlook extends Component {
<div style={{ width: '100%', padding: '10px 20px', backgroundColor: 'yellow', textAlign: 'center', marginTop: 20 }}> <div style={{ width: '100%', padding: '10px 20px', backgroundColor: 'yellow', textAlign: 'center', marginTop: 20 }}>
<span>{this.state.lastStatus}</span> <span>{this.state.lastStatus}</span>
</div> : </div> :
this.state.lastStatus === 'WAITING FOR APPROVAL' ? this.state.lastStatus === 'WAITING FOR REVIEW' ?
<div style={{ width: '100%', padding: '10px 20px', backgroundColor: 'yellow', textAlign: 'center', marginTop: 20 }}> <div style={{ width: '100%', padding: '10px 20px', backgroundColor: 'yellow', textAlign: 'center', marginTop: 20 }}>
<span>{`${this.state.lastStatus} - ${this.state.pic}`}</span> <span>{`${this.state.lastStatus} - ${this.state.pic}`}</span>
</div> : </div> :
this.state.lastStatus === 'REVISION' ? this.state.lastStatus === 'WAITING FOR YOUR APPROVAL' ?
<div style={{ width: '100%', padding: '10px 20px', backgroundColor: 'yellow', textAlign: 'center', marginTop: 20 }}> <div style={{ width: '100%', padding: '10px 20px', backgroundColor: 'yellow', textAlign: 'center', marginTop: 20 }}>
<span>NEED REVISION</span> <span>{`${this.state.lastStatus} - ${this.state.pic}`}</span>
</div> : </div> :
this.state.lastStatus === 'APPROVED' ? this.state.lastStatus === 'WAITING FOR APPROVAL' ?
<div style={{ width: '100%', padding: '10px 20px', backgroundColor: 'yellow', textAlign: 'center', marginTop: 20 }}> <div style={{ width: '100%', padding: '10px 20px', backgroundColor: 'yellow', textAlign: 'center', marginTop: 20 }}>
<span>APPROVED</span> <span>{`${this.state.lastStatus} - ${this.state.pic}`}</span>
</div> : null </div> :
this.state.lastStatus === 'REVISION' ?
<div style={{ width: '100%', padding: '10px 20px', backgroundColor: 'yellow', textAlign: 'center', marginTop: 20 }}>
<span>NEED REVISION</span>
</div> :
this.state.lastStatus === 'APPROVED' ?
<div style={{ width: '100%', padding: '10px 20px', backgroundColor: 'yellow', textAlign: 'center', marginTop: 20 }}>
<span>APPROVED</span>
</div> : null
} }
{this.state.visibleTableHistory && ( {this.state.visibleTableHistory && (
<div style={{ marginTop: 20 }}> <div style={{ marginTop: 20 }}>
......
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