Commit c2b27433 authored by ardiansyah's avatar ardiansyah

Merge branch 'ENV-PROD' into 'ENV-DEPLOYMENT-PROD'

Env prod

See merge request !2292
parents 8b4e17a2 83b9fb6f
{
"name": "my-app",
"version": "0.1.0",
"homepage": "http://localhost:8080/web/",
"homepage": "http://localhost:8080/web/",
"private": true,
"dependencies": {
"@date-io/date-fns": "^1.3.13",
......
......@@ -175,6 +175,7 @@ const create = (type = "") => {
const createAllItemReport = (body) => api.post('item_report/create_all_item_report', body)
const deleteAllItemReport = (body) => api.post('/item_report/delete_all_item_report', body)
const deleteAllItemReportLOCF = (body) => api.post('/item_report/delete_all_item_report_locf', body)
const getAllSettingBusinessBank = (body) => api.post('setting/get_all_setting_by_group_name', body)
//PARAMETER
const getAllParameter = () => api.get('/setting/get_all_setting')
......@@ -227,6 +228,7 @@ const create = (type = "") => {
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 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 historyApproval = (body) => api.post('transaction/master_budget/history_approval', body)
const getDashboardUser = () => api.get('transaction/get_dashboard_sub_co')
......@@ -392,6 +394,7 @@ const create = (type = "") => {
// 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 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 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)
......@@ -431,7 +434,9 @@ const create = (type = "") => {
// 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 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 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 validateSubmitReportOI = (body) => api.post('transaction/operating_indicator/monthly_report/validate_save', body)
const validateSubmitReportFAM = (body) => api.post('transaction/fam/monthly_report/validate_save', body)
......@@ -545,6 +550,13 @@ const create = (type = "") => {
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)
// Investment
const getTypeOfInvestment = () => api.get('setting_type/get_all_setting_type_by_investment')
const validateSaveLOV = (body) => api.post('transaction/lov/monthly_report/validate_save', body)
const validateSaveLOCF = (body) => api.post('transaction/locf/monthly_report/validate_save', body)
const createMonthlyReportLOV = (body) => api.post('transaction/lov/monthly_report/save_monthly_report', body)
// Superadmin Approve
const getListApprover = (report, monthlyReportId) => api.get(`transaction/${report}/get_approver/${monthlyReportId}`)
const getIdToken = (userId) => api.get(`transaction/get_token/${userId}`)
......@@ -682,6 +694,7 @@ const create = (type = "") => {
createOpetaingInd,
uploadMasterBudget,
getAllSettingByType,
getAllSettingBusinessBank,
getOpetratingIndID,
createAllItemReport,
deleteAllItemReport,
......@@ -746,6 +759,7 @@ const create = (type = "") => {
getDetailHierarkiCF,
getHierarkiMontlyReportPL,
getHierarkiMontlyReportLOCF,
getHierarkiMontlyReportInvesment,
getHierarkiMontlyReportFAM,
getHierarkiMontlyReportCAT,
checkUploadMonthlyReportTP,
......@@ -766,13 +780,16 @@ const create = (type = "") => {
validateSubmitReportBS,
validateSubmitReportPL,
getPerBSiMontlyReportLOCF,
getPerBSiMontlyReportLOV,
checkUploadMonthlyReportLOCF,
checkUploadMonthlyReportLOV,
uploadMonthlyReportLOCF,
validateSubmitReportOI,
getMonthlyOI,
getParameterByGroupName,
getSubmitMonthlyReport,
getIdDeleteFromExcelLOCF,
getIdDeleteFromExcelLOV,
deleteAllItemReportLOCF,
submitMonthlyReport,
approvalMonthly,
......@@ -942,6 +959,10 @@ const create = (type = "") => {
uploadSimulasiOperatingInd,
uploadSimulasiMROI,
uploadSimulasiROOI,
getTypeOfInvestment,
validateSaveLOCF,
validateSaveLOV,
createMonthlyReportLOV
}
}
......
......@@ -2,10 +2,6 @@
background-color: #273b80 !important;
}
/* .main-color{
background-color: #0b6b24 !important;
} */
.sub-color{
background-color: #f0f1f3 !important;
}
......@@ -60,14 +60,27 @@ export default class AddUser extends Component {
errorRoleName: false,
errorStartDate: false,
errorEndDate: false,
errorNotification: false,
msgErrorFN: '',
msgErrorEM: '',
msgErrorRN: '',
msgErrorSD: '',
msgErrorED: '',
msgErrorNotification: '',
alert: false,
tipeAlert: '',
messageAlert: ''
messageAlert: '',
notification: null,
listNotification: [
{
"id": 0,
"value": "No"
},
{
"id": 1,
"value": "Yes"
}
],
}
}
......@@ -101,11 +114,13 @@ export default class AddUser extends Component {
errorRoleName: false,
errorStartDate: false,
errorEndDate: false,
errorNotification: false,
msgErrorFN: '',
msgErrorEM: '',
msgErrorRN: '',
msgErrorSD: '',
msgErrorED: '',
msgErrorNotification: '',
})
} else if (isDate && type === 'end_date') {
this.setState({
......@@ -115,11 +130,13 @@ export default class AddUser extends Component {
errorRoleName: false,
errorStartDate: false,
errorEndDate: false,
errorNotification: false,
msgErrorFN: '',
msgErrorEM: '',
msgErrorRN: '',
msgErrorSD: '',
msgErrorED: '',
msgErrorNotification: '',
})
} else {
this.setState({
......@@ -129,11 +146,13 @@ export default class AddUser extends Component {
errorRoleName: false,
errorStartDate: false,
errorEndDate: false,
errorNotification: false,
msgErrorFN: '',
msgErrorEM: '',
msgErrorRN: '',
msgErrorSD: '',
msgErrorED: '',
msgErrorNotification: '',
})
}
}
......@@ -148,7 +167,7 @@ export default class AddUser extends Component {
}
if (item.children !== null) {
if (item.children.length > 0) {
item.children.map((items,indexs) => {
item.children.map((items, indexs) => {
handlePushChild(items)
})
}
......@@ -161,22 +180,24 @@ export default class AddUser extends Component {
})
let uniqueCompany = company.filter((val, id, array) => {
return array.indexOf(val) == id;
return array.indexOf(val) == id;
});
company = this.state.role == null? [] : this.state.role.role_id === 1? uniqueCompany : []
company = this.state.role == null ? [] : this.state.role.role_id === 1 ? uniqueCompany : []
// console.log(uniqueCompany)
this.setState({
errorFullname: false,
errorEmail: false,
errorRoleName: false,
errorStartDate: false,
errorEndDate: false,
errorNotification: false,
msgErrorFN: '',
msgErrorEM: '',
msgErrorRN: '',
msgErrorSD: '',
msgErrorED: '',
msgErrorNotification: '',
company
}, () => {
// console.log(this.state.company)
......@@ -205,6 +226,8 @@ export default class AddUser extends Component {
this.setState({ errorEndDate: true, msgErrorED: 'Valid To Cannot be Empty' })
} else if (this.state.company.length < 1) {
this.setState({ alert: true, messageAlert: 'Authorization company cannot be empty', tipeAlert: 'warning' })
} else if (R.isNil(this.state.notification)) {
this.setState({ errorNotification: true, msgErrorNotification: 'Email Notification Maintenance Cannot be Empty' })
}
// else if (this.state.privileges.length < 1) {
// alert('Hak Akses belum di pilih !!')
......@@ -217,8 +240,10 @@ export default class AddUser extends Component {
"password": this.state.fullname,
"company": this.state.company,
"start_date": this.state.startDate,
"end_date": this.state.endDate
"end_date": this.state.endDate,
"mail_notif": this.state.notification.id
}
// console.log(payload);
this.props.createUser(payload)
}
}
......@@ -300,7 +325,7 @@ export default class AddUser extends Component {
}
if (item.children !== null) {
if (item.children.length > 0) {
item.children.map((items,indexs) => {
item.children.map((items, indexs) => {
handlePushChild(items)
})
}
......@@ -314,7 +339,7 @@ export default class AddUser extends Component {
}
if (item.children !== null) {
if (item.children.length > 0) {
item.children.map((items,indexs) => {
item.children.map((items, indexs) => {
handleSpliceChild(items)
})
}
......@@ -325,7 +350,7 @@ export default class AddUser extends Component {
company.push(item.id)
if (item.children !== null) {
if (item.children.length > 0) {
item.children.map((items,indexs) => {
item.children.map((items, indexs) => {
handlePushChild(items)
})
}
......@@ -335,15 +360,15 @@ export default class AddUser extends Component {
company.splice(indexID, 1)
if (item.children !== null) {
if (item.children.length > 0) {
item.children.map((items,indexs) => {
item.children.map((items, indexs) => {
handleSpliceChild(items)
})
}
}
}
// console.log(company)
this.setState({ company})
this.setState({ company })
}
renderChildren = (item, pad) => {
......@@ -679,6 +704,37 @@ export default class AddUser extends Component {
</div>
</div>
<div className="grid grid-2x grid-mobile-none gap-15px" style={{ paddingLeft: 20, paddingRight: 20 }}>
<div className="column-1">
<div className="margin-bottom-20px">
<Autocomplete
debug
id="tipe"
options={this.state.listNotification}
getOptionLabel={(option) => option.value}
onChange={(event, newInputValue) => this.setState({ notification: newInputValue }, () => this.clearError())}
renderInput={(params) =>
<TextField
{...params}
label="Email Notification Maintenance"
margin="normal"
style={{ marginTop: 7 }}
InputProps={{ ...params.InputProps, style: { fontSize: 11 } }}
InputLabelProps={{ style: { fontSize: 11, color: '#7e8085' } }}
error={this.state.errorNotification}
helperText={this.state.msgErrorNotification}
/>
}
/>
</div>
</div>
<div className="column-2">
</div>
</div>
<div className="grid grid-2x grid-mobile-none gap-15px" style={{ paddingLeft: 20, paddingRight: 20 }}>
<div className="column-1">
<div className="margin-bottom-20px">
......
......@@ -2522,7 +2522,7 @@ export default class BudgetTahunan extends Component {
"month": "",
"quartal": "",
"type_report_name": "Master Budget",
"currency_id" : defaultCurrency.id
"currency_id": defaultCurrency.id
}
// console.log(payload);
api.create().createDownloadFile(payload).then((response) => {
......@@ -2570,34 +2570,43 @@ export default class BudgetTahunan extends Component {
let datas = data.findIndex((val) => val[4] == items)
let report = data[datas]
if (items === 6) {
let resReal = `${process.env.REACT_APP_URL_MAIN_BE}/public/transaction/cash_flow/master_budget/export_master_budget?submission_id=${submissionID}&company_id=${company.company_id}&year=${periode.periode}&revision=${report[2]}&report_id=${report[4]}&download_file_report_id=${downloadedFileReportId}&currency_id=${defaultCurrency.id}`
let resNull = `${process.env.REACT_APP_URL_MAIN_BE}/public/transaction/cash_flow/master_budget/export_master_budget?submission_id=&&company_id=${company.company_id}&year=${periode.periode}&revision=${report[2]}&report_id=${report[4]}&download_file_report_id=${downloadedFileReportId}&currency_id=${defaultCurrency.id}`
try {
let resReal = `${process.env.REACT_APP_URL_MAIN_BE}/public/transaction/cash_flow/master_budget/export_master_budget?submission_id=${submissionID}&company_id=${company.company_id}&year=${periode.periode}&revision=${report[2]}&report_id=${report[4]}&download_file_report_id=${downloadedFileReportId}&currency_id=${defaultCurrency.id}`
let resNull = `${process.env.REACT_APP_URL_MAIN_BE}/public/transaction/cash_flow/master_budget/export_master_budget?submission_id=&&company_id=${company.company_id}&year=${periode.periode}&revision=${report[2]}&report_id=${report[4]}&download_file_report_id=${downloadedFileReportId}&currency_id=${defaultCurrency.id}`
let res = await fetch(
submissionID == null ? resNull : resReal
)
if (res.size > 0) {
let url = window.URL.createObjectURL(res);
let a = document.createElement('a');
a.href = url;
}
if (res.status === 200) {
result = [...result, res];
let res = await fetch(
submissionID == null ? resNull : resReal
)
if (res.size > 0) {
let url = window.URL.createObjectURL(res);
let a = document.createElement('a');
a.href = url;
}
if (res.status === 200) {
result = [...result, res];
}
} catch (error) {
alert(error)
}
} else {
let resReal = `${process.env.REACT_APP_URL_MAIN_BE}/public/transaction/master_budget/export_master_budget?submission_id=${submissionID}&report_id=${report[4]}&company_id=${company.company_id}&year=${periode.periode}&revision=${report[2]}&download_file_report_id=${downloadedFileReportId}&currency_id=${defaultCurrency.id}`
let resNull = `${process.env.REACT_APP_URL_MAIN_BE}/public/transaction/master_budget/export_master_budget?submission_id=&report_id=${report[4]}&company_id=${company.company_id}&year=${periode.periode}&revision=${report[2]}&download_file_report_id=${downloadedFileReportId}&currency_id=${defaultCurrency.id}`
try {
let resReal = `${process.env.REACT_APP_URL_MAIN_BE}/public/transaction/master_budget/export_master_budget?submission_id=${submissionID}&report_id=${report[4]}&company_id=${company.company_id}&year=${periode.periode}&revision=${report[2]}&download_file_report_id=${downloadedFileReportId}&currency_id=${defaultCurrency.id}`
let resNull = `${process.env.REACT_APP_URL_MAIN_BE}/public/transaction/master_budget/export_master_budget?submission_id=&report_id=${report[4]}&company_id=${company.company_id}&year=${periode.periode}&revision=${report[2]}&download_file_report_id=${downloadedFileReportId}&currency_id=${defaultCurrency.id}`
let res = await fetch(
submissionID == null ? resNull : resReal
)
if (res.size > 0) {
let url = window.URL.createObjectURL(res);
let a = document.createElement('a');
a.href = url;
}
if (res.status === 200) {
result = [...result, res];
let res = await fetch(
submissionID == null ? resNull : resReal
)
if (res.size > 0) {
let url = window.URL.createObjectURL(res);
let a = document.createElement('a');
a.href = url;
}
if (res.status === 200) {
result = [...result, res];
}
} catch (error) {
alert(error)
}
}
}
......
......@@ -555,8 +555,8 @@ export default class TaxPlanning extends Component {
}
console.log(payload);
// console.log(JSON.stringify(data))
this.props.saveToMasterBudget(payload)
this.props.onClickClose()
// this.props.saveToMasterBudget(payload)
// this.props.onClickClose()
if (type == 'submitted') {
this.props.saveToMasterBudget(payload, 'TP')
} else {
......
......@@ -89,6 +89,7 @@ class MaintenanceMode extends Component {
maintenanceStatus: 0,
mailStatusActive: 0,
mailStatusNonActive: 0,
visibleAlertSave: false
}
......@@ -203,6 +204,7 @@ class MaintenanceMode extends Component {
// ]
}
console.log(payload);
this.setState({ visibleAlertSave: true })
api.create().createMaintenanceMode(payload).then((response) => {
console.log(response)
this.setState({ loading: true })
......@@ -271,6 +273,7 @@ class MaintenanceMode extends Component {
// ]
}
console.log(payload);
this.setState({ visibleAlertSave: true })
api.create().updateMaintenanceMode(payload).then((response) => {
console.log(response)
this.setState({ loading: true })
......@@ -846,6 +849,43 @@ class MaintenanceMode extends Component {
</Paper>
</div>
</div>
{this.state.visibleAlertSave && (
<div className="test app-popup-show">
<div className="popup-content border-radius" style={{ background: '#D9D9D9', borderRadius: 10, width: 561, height: 233 }}>
<div style={{ margin: 25 }}>
<div style={{ display: 'flex', marginTop: 76, marginBottom: 43 }}>
<div style={{ alignSelf: 'center', marginRight: 25 }}>
<img src={Images.berhasil} />
</div>
<div style={{ justifyContent: 'center', fontSize: 20, color: '#1D2995', marginTop: 10 }}>
Maintenance mode deactivated successfully!
</div>
</div>
<div style={{ display: 'flex', justifyContent: 'flex-end' }}>
<button
className="button"
type="button"
style={{
background: '#F6F7F9',
cursor: 'pointer',
border: '1px solid #3549609e',
outline: 'none',
marginRight: 20,
borderRadius: 9
}}
onClick={() => this.setState({ visibleAlertSave: false })}
>
<div style={{ backgroundColor: '#fff', width: 105, height: 30, borderRadius: 9, justifyContent: 'center', display: 'flex', alignItems: 'center', border: 'solid 1px #3549609e' }}>
<Typography style={{ fontSize: '15px', color: '#354960', textAlign: 'center' }}>Close</Typography>
</div>
</button>
</div>
</div>
</div>
</div>
)
}
</div>
);
......
......@@ -47,6 +47,7 @@ export default class CreateReportItems extends Component {
errorCondition: false,
errorJenisLaporan: false,
errorPerusahaan: false,
errorCovertible: false,
msgErrorJenisLaporan: '',
msgErrorPerusahaan: '',
msgErrorTipeData: '',
......@@ -57,6 +58,7 @@ export default class CreateReportItems extends Component {
msgErrorRV: '',
msgErrorSD: '',
msgErrorED: '',
msgErrorCovertible: '',
disabledFormula: true,
disabledFormulaSum: true,
disabledCondt: true,
......@@ -115,6 +117,7 @@ export default class CreateReportItems extends Component {
errorEndDate: false,
errorTipeData: false,
errorCondition: false,
errorCovertible: false,
msgErrorTipeData: '',
msgErrorCondition: '',
msgErrorOrder: '',
......@@ -123,6 +126,7 @@ export default class CreateReportItems extends Component {
msgErrorRV: '',
msgErrorSD: '',
msgErrorED: '',
msgErrorCovertible: '',
})
} else if (isDate && type === 'end_date') {
this.setState({
......@@ -135,6 +139,7 @@ export default class CreateReportItems extends Component {
errorEndDate: false,
errorTipeData: false,
errorCondition: false,
errorCovertible: false,
msgErrorTipeData: '',
msgErrorCondition: '',
msgErrorOrder: '',
......@@ -143,6 +148,7 @@ export default class CreateReportItems extends Component {
msgErrorRV: '',
msgErrorSD: '',
msgErrorED: '',
msgErrorCovertible: '',
})
} else {
this.setState({
......@@ -155,6 +161,7 @@ export default class CreateReportItems extends Component {
errorEndDate: false,
errorTipeData: false,
errorCondition: false,
errorCovertible: false,
msgErrorTipeData: '',
msgErrorCondition: '',
msgErrorOrder: '',
......@@ -163,6 +170,7 @@ export default class CreateReportItems extends Component {
msgErrorRV: '',
msgErrorSD: '',
msgErrorED: '',
msgErrorCovertible: '',
})
}
}
......@@ -197,6 +205,9 @@ export default class CreateReportItems extends Component {
else if (R.isNil(this.state.endDate)) {
this.setState({ errorEndDate: true, msgErrorED: 'Valid To Cannot be Empty' })
}
else if (R.isNil(this.state.convertible)){
this.setState({ errorCovertible: true, msgErrorCovertible: 'Convertible Cannot be Empty' })
}
else {
this.addReportItems()
}
......@@ -1072,6 +1083,8 @@ export default class CreateReportItems extends Component {
label="Convertible"
margin="normal"
style={{ marginTop: 7 }}
error={this.state.errorCovertible}
helperText={this.state.msgErrorCovertible}
InputProps={{ ...params.InputProps, style: { fontSize: 11 } }}
InputLabelProps={{ style: { fontSize: 11, color: '#7e8085' } }}
/>
......
......@@ -48,6 +48,7 @@ export default class EditReportItems extends Component {
errorEndDate: false,
errorJenisLaporan: false,
errorPerusahaan: false,
errorCovertible: false,
msgErrorJenisLaporan: '',
msgErrorPerusahaan: '',
msgErrorOrder: '',
......@@ -60,6 +61,7 @@ export default class EditReportItems extends Component {
msgErrorRV: '',
msgErrorSD: '',
msgErrorED: '',
msgErrorCovertible: '',
disabledFormula: true,
disabledCondt: true,
disabledValue: true,
......@@ -105,12 +107,14 @@ export default class EditReportItems extends Component {
errorRV: false,
errorStartDate: false,
errorEndDate: false,
errorCovertible: false,
msgErrorOrder: '',
msgErrorDesc: '',
msgErrorFormula: '',
msgErrorRV: '',
msgErrorSD: '',
msgErrorED: '',
msgErrorCovertible: '',
})
} else if (isDate && type === 'end_date') {
this.setState({
......@@ -121,12 +125,14 @@ export default class EditReportItems extends Component {
errorRV: false,
errorStartDate: false,
errorEndDate: false,
errorCovertible: false,
msgErrorOrder: '',
msgErrorDesc: '',
msgErrorFormula: '',
msgErrorRV: '',
msgErrorSD: '',
msgErrorED: '',
msgErrorCovertible: '',
})
} else {
this.setState({
......@@ -137,12 +143,14 @@ export default class EditReportItems extends Component {
errorRV: false,
errorStartDate: false,
errorEndDate: false,
errorCovertible: false,
msgErrorOrder: '',
msgErrorDesc: '',
msgErrorFormula: '',
msgErrorRV: '',
msgErrorSD: '',
msgErrorED: '',
msgErrorCovertible: '',
})
}
}
......@@ -168,7 +176,9 @@ export default class EditReportItems extends Component {
} else if (R.isNil(this.state.tempData.start_date)) {
this.setState({ errorStartDate: true, msgErrorSD: 'Valid From Cannot be Empty' })
} else if (R.isNil(this.state.tempData.end_date)) {
this.setState({ errorEndDate: true, msgErrorED: 'Valid To Cannot be Empty' })
this.setState({errorEndDate: true, msgErrorED: 'Valid To Cannot be Empty'})
} else if (R.isNil(this.state.convertible)) {
this.setState({errorCovertible: true, msgErrorCovertible: 'Convertible Cannot be Empty' })
} else {
this.updateReportItems()
}
......@@ -1045,6 +1055,8 @@ export default class EditReportItems extends Component {
{...params}
label="Convertible"
margin="normal"
error={this.state.errorCovertible}
helperText={this.state.msgErrorCovertible}
style={{ marginTop: 7 }}
InputProps={{ ...params.InputProps, style: { fontSize: 11 } }}
InputLabelProps={{ style: { fontSize: 11, color: '#7e8085' } }}
......
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -301,7 +301,7 @@ export default class MonthlyReport extends Component {
})
}
} else {
this.setState({ alert: true, messageAlert: response.data.message, tipeAlert: 'error' })
this.setState({ alert: true, messageAlert: response.problem, tipeAlert: 'error' })
}
})
}
......@@ -951,7 +951,7 @@ export default class MonthlyReport extends Component {
visibleOI: false,
visibleCF: false,
})
} else if (item === 'List of Credit Facilities') {
} else if (item === 'List Of Credit Facilities and Investment') {
this.setState({
visibleMonthlyReport: false,
visibleBS: false,
......@@ -2312,7 +2312,7 @@ export default class MonthlyReport extends Component {
"month": month ? String(month.month_id).toString() : "",
"quartal": "",
"type_report_name": "Monthly Report",
"currency_id" : defaultCurrency.id
"currency_id": defaultCurrency.id
}
console.log(payload);
api.create().createDownloadFile(payload).then((response) => {
......@@ -2356,15 +2356,37 @@ export default class MonthlyReport extends Component {
let result = []
console.log('mulai hit')
for (const items of selectReport) {
let urlReport = items === 8 ? "profit_loss" : items === 12 ? "tax_planning" : items === 7 ? "balance_sheet" : items === 9 ? "fam" : items === 13 ? "cash_flow" : items === 11 ? "locf" : items === 10 ? "cat" : null
let urlReport = items === 8 ? "profit_loss" : items === 12 ? "tax_planning" : items === 7 ? "balance_sheet" : items === 9 ? "fam" : items === 13 ? "cash_flow" : items === 10 ? "cat" : null
let datas = data.findIndex((val) => val[4] == items)
let report = data[datas]
let url = `${process.env.REACT_APP_URL_MAIN_BE}/public/transaction/${urlReport}/monthly_report/export_monthly_report?monthly_report_id=${monthlyReportId}&&report_id=${report[4]}&&company_id=${company.company_id}&&year=${periode.periode}&&revision=${report[2]}&&months=${month.month_id}&&download_file_report_id=${downloadedFileReportId}&&currency_id=${defaultCurrency.id}`
let res = await fetch(
`${process.env.REACT_APP_URL_MAIN_BE}/public/transaction/${urlReport}/monthly_report/export_monthly_report?monthly_report_id=${monthlyReportId === null ? "" : monthlyReportId}&&report_id=${report[4]}&&company_id=${company.company_id}&&year=${periode.periode}&&revision=${report[2]}&&months=${month.month_id}&&download_file_report_id=${downloadedFileReportId}&&currency_id=${defaultCurrency.id}`
)
if (res.status === 200) {
result = [...result, res];
if (items !== 11) {
try {
let url = `${process.env.REACT_APP_URL_MAIN_BE}/public/transaction/${urlReport}/monthly_report/export_monthly_report?monthly_report_id=${monthlyReportId}&&report_id=${report[4]}&&company_id=${company.company_id}&&year=${periode.periode}&&revision=${report[2]}&&months=${month.month_id}&&download_file_report_id=${downloadedFileReportId}&&currency_id=${defaultCurrency.id}`
let res = await fetch(
`${process.env.REACT_APP_URL_MAIN_BE}/public/transaction/${urlReport}/monthly_report/export_monthly_report?monthly_report_id=${monthlyReportId === null ? "" : monthlyReportId}&&report_id=${report[4]}&&company_id=${company.company_id}&&year=${periode.periode}&&revision=${report[2]}&&months=${month.month_id}&&download_file_report_id=${downloadedFileReportId}&&currency_id=${defaultCurrency.id}`
)
if (res.status === 200) {
result = [...result, res];
}
} catch (error) {
alert(error)
}
} else {
try {
let res1 = await fetch(
`${process.env.REACT_APP_URL_MAIN_BE}/public/transaction/locf/monthly_report/export_monthly_report?monthly_report_id=${monthlyReportId === null ? "" : monthlyReportId}&&report_id=${report[4]}&&company_id=${company.company_id}&&year=${periode.periode}&&revision=${report[2]}&&months=${month.month_id}&&download_file_report_id=${downloadedFileReportId}&&currency_id=${defaultCurrency.id}`
)
if (res1.status === 200) {
let res2 = await fetch(
`${process.env.REACT_APP_URL_MAIN_BE}/public/transaction/lov/monthly_report/export_monthly_report?monthly_report_id=${monthlyReportId === null ? "" : monthlyReportId}&&report_id=${report[4]}&&company_id=${company.company_id}&&year=${periode.periode}&&revision=${report[2]}&&months=${month.month_id}&&download_file_report_id=${downloadedFileReportId}&&currency_id=${defaultCurrency.id}`
)
if (res2.status === 200) {
result = [...result, res2];
}
}
} catch (error) {
alert(error)
}
}
}
......
......@@ -326,6 +326,7 @@ export default class ProfitLossMR extends Component {
// if (err === true) {
// this.setState({ bebas: true })
// }
console.log(dataTable);
this.setState({ dataTable, loading: false, buttonError: true, saveDraft: true, refresh: false })
} else {
this.setState({ loading: false, alert: true, messageAlert: response.data.message, tipeAlert: 'warning' }, () => {
......@@ -968,12 +969,14 @@ export default class ProfitLossMR extends Component {
// }
dataTable2[tableMeta.rowIndex].map((item, index) => {
if (index == 10) {
// ytd = ytd actual balikan be + actual
let itemActual = item == undefined || item == "" || item == "undefined" ? 0.0 : item
total = Number(tableMeta.rowData[23]) + Number(itemActual)
}
})
if (String(tableMeta.rowData[5]).toLocaleLowerCase() == "sales price") {
// Sales Price = Unit Business / Sales Volume
let value = Number(dataTable2[tableMeta.rowIndex - 2][11]) / Number(dataTable2[tableMeta.rowIndex - 1][11])
dataTable2[tableMeta.rowIndex][11] = R.equals(value, NaN) ? "0.0" : (R.equals(value, Infinity) ? "0.0" : (value == "-Infinity" ? "0.0" : value))
return R.equals(value, NaN) ? "0.0" : (R.equals(value, Infinity) ? "0.0" : (value == "-Infinity" ? "0.0" : value))
......
......@@ -246,6 +246,7 @@ export default class SubHolding extends Component {
this.setState({
defaultCurrencyID: response.data.data.default_currency,
currency: datas,
usdBefore2024: response.data.data.usdBefore2024,
// report: response.data.data.default_currency == 2 && this.state.defaultCurrency == 1 ? this.state.reportType2[0] : this.state.reportType[0],
defaultCurrency: index == -1 ? null : datas[index]
})
......@@ -4262,7 +4263,7 @@ export default class SubHolding extends Component {
}
render() {
let { defaultCurrencyID, report } = this.state
let { defaultCurrencyID, report, usdBefore2024 } = this.state
const loadingComponent = (
<div style={{ position: 'fixed', zIndex: 110, top: 0, left: 0, width: '100%', height: '100%', display: 'flex', justifyContent: 'center', alignItems: 'center', background: 'rgba(255,255,255,0.8)' }}>
<PropagateLoader
......@@ -4325,6 +4326,12 @@ export default class SubHolding extends Component {
{...this.state.listPeriode}
id="periode"
onChange={(event, newInputValue) => this.setState({ periode: newInputValue, loading: true, previewTable: false }, () => {
let tahun = Number(this.state.periode.periode)
let bizpar = tahun >= 2024 && defaultCurrencyID == 2 && newInputValue.id == 1 ? defaultReport.filter(e => e.report === 2) : defaultReport
console.log(bizpar);
console.log(defaultReport);
this.setState({ report: this.state.report, reportType: bizpar })
this.getCurrency(this.state.company.company_id)
this.getReportType()
})}
disabled={this.state.intent === 'Home' ? true : false}
......@@ -4344,8 +4351,11 @@ export default class SubHolding extends Component {
onChange={(event, newInputValue) => this.setState({ company: newInputValue, loading: true, previewTable: false }, () => {
this.getReportType()
this.getCurrency(newInputValue.company_id)
let bizpar = this.state.usdBefore2024 == false && defaultCurrencyID == 2 && newInputValue.id == 1 ? defaultReport.filter(e => e.report === 2) : defaultReport
this.setState({ report: bizpar[0], reportType: bizpar })
let tahun = Number(this.state.periode.periode)
let bizpar = tahun >= 2024 && defaultCurrencyID == 2 && newInputValue.id == 1 ? defaultReport.filter(e => e.report === 2) : defaultReport
console.log(bizpar);
console.log(defaultReport);
this.setState({ report: this.state.report, reportType: bizpar })
})}
disableClearable
style={{ width: 250 }}
......@@ -4384,8 +4394,10 @@ export default class SubHolding extends Component {
// })
// console.log("report 2");
// }
let bizpar = defaultCurrencyID == 2 && newInputValue.id == 1 ? defaultReport.filter(e => e.report === 2) : defaultReport
this.setState({ report: bizpar[0], reportType: bizpar })
let tahun = Number(this.state.periode.periode)
let bizpar = tahun >= 2024 && defaultCurrencyID == 2 && newInputValue.id == 1 ? defaultReport.filter(e => e.report === 2) : defaultReport
let indexID = bizpar.findIndex((val) => val.value == this.state.report.value)
this.setState({ report: indexID == -1 ? bizpar[0] : this.state.report, reportType: bizpar })
this.getReportType()
})}
......
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