Commit da33b9d0 authored by qorri_di's avatar qorri_di

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

 Conflicts:
	src/container/BudgetTahunan/BalanceSheet.js
	src/container/BudgetTahunan/CorporateAnnualTarget.js
parents 69c56d85 d4933ae8
// 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-staging REACT_APP_URL_MAIN_FE=/web
\ 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-staging/", "homepage": "http://localhost:8080/web/",
"private": true, "private": true,
"dependencies": { "dependencies": {
"@date-io/date-fns": "^1.3.13", "@date-io/date-fns": "^1.3.13",
......
...@@ -175,6 +175,7 @@ const create = (type = "") => { ...@@ -175,6 +175,7 @@ const create = (type = "") => {
const createAllItemReport = (body) => api.post('item_report/create_all_item_report', body) 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 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 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 //PARAMETER
const getAllParameter = () => api.get('/setting/get_all_setting') const getAllParameter = () => api.get('/setting/get_all_setting')
...@@ -227,6 +228,7 @@ const create = (type = "") => { ...@@ -227,6 +228,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 +394,7 @@ const create = (type = "") => { ...@@ -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/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 +434,9 @@ const create = (type = "") => { ...@@ -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/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 +550,13 @@ const create = (type = "") => { ...@@ -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 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')
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 // 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}`)
...@@ -682,6 +694,7 @@ const create = (type = "") => { ...@@ -682,6 +694,7 @@ const create = (type = "") => {
createOpetaingInd, createOpetaingInd,
uploadMasterBudget, uploadMasterBudget,
getAllSettingByType, getAllSettingByType,
getAllSettingBusinessBank,
getOpetratingIndID, getOpetratingIndID,
createAllItemReport, createAllItemReport,
deleteAllItemReport, deleteAllItemReport,
...@@ -746,6 +759,7 @@ const create = (type = "") => { ...@@ -746,6 +759,7 @@ const create = (type = "") => {
getDetailHierarkiCF, getDetailHierarkiCF,
getHierarkiMontlyReportPL, getHierarkiMontlyReportPL,
getHierarkiMontlyReportLOCF, getHierarkiMontlyReportLOCF,
getHierarkiMontlyReportInvesment,
getHierarkiMontlyReportFAM, getHierarkiMontlyReportFAM,
getHierarkiMontlyReportCAT, getHierarkiMontlyReportCAT,
checkUploadMonthlyReportTP, checkUploadMonthlyReportTP,
...@@ -766,13 +780,16 @@ const create = (type = "") => { ...@@ -766,13 +780,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 +959,10 @@ const create = (type = "") => { ...@@ -942,6 +959,10 @@ const create = (type = "") => {
uploadSimulasiOperatingInd, uploadSimulasiOperatingInd,
uploadSimulasiMROI, uploadSimulasiMROI,
uploadSimulasiROOI, uploadSimulasiROOI,
getTypeOfInvestment,
validateSaveLOCF,
validateSaveLOV,
createMonthlyReportLOV
} }
} }
......
/* .main-color{
background-color: #273b80 !important;
} */
.main-color{ .main-color{
background-color: #0b6b24 !important; background-color: #273b80 !important;
} }
/* .main-color{
background-color: #1474CA !important;
} */
.sub-color{ .sub-color{
background-color: #f0f1f3 !important; background-color: #f0f1f3 !important;
} }
...@@ -60,14 +60,27 @@ export default class AddUser extends Component { ...@@ -60,14 +60,27 @@ export default class AddUser extends Component {
errorRoleName: false, errorRoleName: false,
errorStartDate: false, errorStartDate: false,
errorEndDate: false, errorEndDate: false,
errorNotification: false,
msgErrorFN: '', msgErrorFN: '',
msgErrorEM: '', msgErrorEM: '',
msgErrorRN: '', msgErrorRN: '',
msgErrorSD: '', msgErrorSD: '',
msgErrorED: '', msgErrorED: '',
msgErrorNotification: '',
alert: false, alert: false,
tipeAlert: '', tipeAlert: '',
messageAlert: '' messageAlert: '',
notification: null,
listNotification: [
{
"id": 0,
"value": "No"
},
{
"id": 1,
"value": "Yes"
}
],
} }
} }
...@@ -101,11 +114,13 @@ export default class AddUser extends Component { ...@@ -101,11 +114,13 @@ export default class AddUser extends Component {
errorRoleName: false, errorRoleName: false,
errorStartDate: false, errorStartDate: false,
errorEndDate: false, errorEndDate: false,
errorNotification: false,
msgErrorFN: '', msgErrorFN: '',
msgErrorEM: '', msgErrorEM: '',
msgErrorRN: '', msgErrorRN: '',
msgErrorSD: '', msgErrorSD: '',
msgErrorED: '', msgErrorED: '',
msgErrorNotification: '',
}) })
} else if (isDate && type === 'end_date') { } else if (isDate && type === 'end_date') {
this.setState({ this.setState({
...@@ -115,11 +130,13 @@ export default class AddUser extends Component { ...@@ -115,11 +130,13 @@ export default class AddUser extends Component {
errorRoleName: false, errorRoleName: false,
errorStartDate: false, errorStartDate: false,
errorEndDate: false, errorEndDate: false,
errorNotification: false,
msgErrorFN: '', msgErrorFN: '',
msgErrorEM: '', msgErrorEM: '',
msgErrorRN: '', msgErrorRN: '',
msgErrorSD: '', msgErrorSD: '',
msgErrorED: '', msgErrorED: '',
msgErrorNotification: '',
}) })
} else { } else {
this.setState({ this.setState({
...@@ -129,11 +146,13 @@ export default class AddUser extends Component { ...@@ -129,11 +146,13 @@ export default class AddUser extends Component {
errorRoleName: false, errorRoleName: false,
errorStartDate: false, errorStartDate: false,
errorEndDate: false, errorEndDate: false,
errorNotification: false,
msgErrorFN: '', msgErrorFN: '',
msgErrorEM: '', msgErrorEM: '',
msgErrorRN: '', msgErrorRN: '',
msgErrorSD: '', msgErrorSD: '',
msgErrorED: '', msgErrorED: '',
msgErrorNotification: '',
}) })
} }
} }
...@@ -148,7 +167,7 @@ export default class AddUser extends Component { ...@@ -148,7 +167,7 @@ export default class AddUser extends Component {
} }
if (item.children !== null) { if (item.children !== null) {
if (item.children.length > 0) { if (item.children.length > 0) {
item.children.map((items,indexs) => { item.children.map((items, indexs) => {
handlePushChild(items) handlePushChild(items)
}) })
} }
...@@ -163,7 +182,7 @@ export default class AddUser extends Component { ...@@ -163,7 +182,7 @@ export default class AddUser extends Component {
let uniqueCompany = company.filter((val, id, array) => { 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) // console.log(uniqueCompany)
this.setState({ this.setState({
...@@ -172,11 +191,13 @@ export default class AddUser extends Component { ...@@ -172,11 +191,13 @@ export default class AddUser extends Component {
errorRoleName: false, errorRoleName: false,
errorStartDate: false, errorStartDate: false,
errorEndDate: false, errorEndDate: false,
errorNotification: false,
msgErrorFN: '', msgErrorFN: '',
msgErrorEM: '', msgErrorEM: '',
msgErrorRN: '', msgErrorRN: '',
msgErrorSD: '', msgErrorSD: '',
msgErrorED: '', msgErrorED: '',
msgErrorNotification: '',
company company
}, () => { }, () => {
// console.log(this.state.company) // console.log(this.state.company)
...@@ -205,6 +226,8 @@ export default class AddUser extends Component { ...@@ -205,6 +226,8 @@ export default class AddUser extends Component {
this.setState({ errorEndDate: true, msgErrorED: 'Valid To Cannot be Empty' }) this.setState({ errorEndDate: true, msgErrorED: 'Valid To Cannot be Empty' })
} else if (this.state.company.length < 1) { } else if (this.state.company.length < 1) {
this.setState({ alert: true, messageAlert: 'Authorization company cannot be empty', tipeAlert: 'warning' }) 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) { // else if (this.state.privileges.length < 1) {
// alert('Hak Akses belum di pilih !!') // alert('Hak Akses belum di pilih !!')
...@@ -217,8 +240,10 @@ export default class AddUser extends Component { ...@@ -217,8 +240,10 @@ export default class AddUser extends Component {
"password": this.state.fullname, "password": this.state.fullname,
"company": this.state.company, "company": this.state.company,
"start_date": this.state.startDate, "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) this.props.createUser(payload)
} }
} }
...@@ -300,7 +325,7 @@ export default class AddUser extends Component { ...@@ -300,7 +325,7 @@ export default class AddUser extends Component {
} }
if (item.children !== null) { if (item.children !== null) {
if (item.children.length > 0) { if (item.children.length > 0) {
item.children.map((items,indexs) => { item.children.map((items, indexs) => {
handlePushChild(items) handlePushChild(items)
}) })
} }
...@@ -314,7 +339,7 @@ export default class AddUser extends Component { ...@@ -314,7 +339,7 @@ export default class AddUser extends Component {
} }
if (item.children !== null) { if (item.children !== null) {
if (item.children.length > 0) { if (item.children.length > 0) {
item.children.map((items,indexs) => { item.children.map((items, indexs) => {
handleSpliceChild(items) handleSpliceChild(items)
}) })
} }
...@@ -325,7 +350,7 @@ export default class AddUser extends Component { ...@@ -325,7 +350,7 @@ export default class AddUser extends Component {
company.push(item.id) company.push(item.id)
if (item.children !== null) { if (item.children !== null) {
if (item.children.length > 0) { if (item.children.length > 0) {
item.children.map((items,indexs) => { item.children.map((items, indexs) => {
handlePushChild(items) handlePushChild(items)
}) })
} }
...@@ -335,7 +360,7 @@ export default class AddUser extends Component { ...@@ -335,7 +360,7 @@ export default class AddUser extends Component {
company.splice(indexID, 1) company.splice(indexID, 1)
if (item.children !== null) { if (item.children !== null) {
if (item.children.length > 0) { if (item.children.length > 0) {
item.children.map((items,indexs) => { item.children.map((items, indexs) => {
handleSpliceChild(items) handleSpliceChild(items)
}) })
} }
...@@ -343,7 +368,7 @@ export default class AddUser extends Component { ...@@ -343,7 +368,7 @@ export default class AddUser extends Component {
} }
// console.log(company) // console.log(company)
this.setState({ company}) this.setState({ company })
} }
renderChildren = (item, pad) => { renderChildren = (item, pad) => {
...@@ -679,6 +704,37 @@ export default class AddUser extends Component { ...@@ -679,6 +704,37 @@ export default class AddUser extends Component {
</div> </div>
</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="grid grid-2x grid-mobile-none gap-15px" style={{ paddingLeft: 20, paddingRight: 20 }}>
<div className="column-1"> <div className="column-1">
<div className="margin-bottom-20px"> <div className="margin-bottom-20px">
......
...@@ -54,14 +54,27 @@ export default class EditUser extends Component { ...@@ -54,14 +54,27 @@ export default class EditUser extends Component {
errorRoleName: false, errorRoleName: false,
errorStartDate: false, errorStartDate: false,
errorEndDate: false, errorEndDate: false,
errorNotification: false,
msgErrorFN: '', msgErrorFN: '',
msgErrorEM: '', msgErrorEM: '',
msgErrorRN: '', msgErrorRN: '',
msgErrorSD: '', msgErrorSD: '',
msgErrorED: '', msgErrorED: '',
msgErrorNotification: '',
alert: false, alert: false,
tipeAlert: '', tipeAlert: '',
messageAlert: '' messageAlert: '',
notification: null,
listNotification: [
{
"id": 0,
"value": "No"
},
{
"id": 1,
"value": "Yes"
}
],
} }
} }
...@@ -85,11 +98,13 @@ export default class EditUser extends Component { ...@@ -85,11 +98,13 @@ export default class EditUser extends Component {
errorRoleName: false, errorRoleName: false,
errorStartDate: false, errorStartDate: false,
errorEndDate: false, errorEndDate: false,
errorNotification: false,
msgErrorFN: '', msgErrorFN: '',
msgErrorEM: '', msgErrorEM: '',
msgErrorRN: '', msgErrorRN: '',
msgErrorSD: '', msgErrorSD: '',
msgErrorED: '', msgErrorED: '',
msgErrorNotification: '',
}) })
} else if (isDate && type === 'end_date') { } else if (isDate && type === 'end_date') {
this.setState({ this.setState({
...@@ -99,11 +114,13 @@ export default class EditUser extends Component { ...@@ -99,11 +114,13 @@ export default class EditUser extends Component {
errorRoleName: false, errorRoleName: false,
errorStartDate: false, errorStartDate: false,
errorEndDate: false, errorEndDate: false,
errorNotification: false,
msgErrorFN: '', msgErrorFN: '',
msgErrorEM: '', msgErrorEM: '',
msgErrorRN: '', msgErrorRN: '',
msgErrorSD: '', msgErrorSD: '',
msgErrorED: '', msgErrorED: '',
msgErrorNotification: '',
}) })
} else { } else {
this.setState({ this.setState({
...@@ -113,11 +130,13 @@ export default class EditUser extends Component { ...@@ -113,11 +130,13 @@ export default class EditUser extends Component {
errorRoleName: false, errorRoleName: false,
errorStartDate: false, errorStartDate: false,
errorEndDate: false, errorEndDate: false,
errorNotification: false,
msgErrorFN: '', msgErrorFN: '',
msgErrorEM: '', msgErrorEM: '',
msgErrorRN: '', msgErrorRN: '',
msgErrorSD: '', msgErrorSD: '',
msgErrorED: '', msgErrorED: '',
msgErrorNotification: '',
}) })
} }
} }
...@@ -132,7 +151,7 @@ export default class EditUser extends Component { ...@@ -132,7 +151,7 @@ export default class EditUser extends Component {
} }
if (item.children !== null) { if (item.children !== null) {
if (item.children.length > 0) { if (item.children.length > 0) {
item.children.map((items,indexs) => { item.children.map((items, indexs) => {
handlePushChild(items) handlePushChild(items)
}) })
} }
...@@ -147,7 +166,7 @@ export default class EditUser extends Component { ...@@ -147,7 +166,7 @@ export default class EditUser extends Component {
let uniqueCompany = company.filter((val, id, array) => { 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) // console.log(uniqueCompany)
this.setState({ this.setState({
...@@ -156,23 +175,26 @@ export default class EditUser extends Component { ...@@ -156,23 +175,26 @@ export default class EditUser extends Component {
errorRoleName: false, errorRoleName: false,
errorStartDate: false, errorStartDate: false,
errorEndDate: false, errorEndDate: false,
errorNotification: false,
msgErrorFN: '', msgErrorFN: '',
msgErrorEM: '', msgErrorEM: '',
msgErrorRN: '', msgErrorRN: '',
msgErrorSD: '', msgErrorSD: '',
msgErrorED: '', msgErrorED: '',
msgErrorNotification: '',
company company
}) })
} }
getDetailUser() { getDetailUser() {
api.create().getDetailUser(this.state.paramsId).then((response) => { api.create().getDetailUser(this.state.paramsId).then((response) => {
// console.log(response);
if (response.data) { if (response.data) {
if (response.ok) { if (response.ok) {
if (response.data.status === 'success') { if (response.data.status === 'success') {
this.setState({ tempData: response.data.data, company: response.data.data.company }, ()=> let index = this.state.listNotification.findIndex((val) => val.id === response.data.data.mail_notif)
this.setState({ tempData: response.data.data, company: response.data.data.company, notification: index === -1 ? null : this.state.listNotification[index] }, () =>
this.getRole(response.data.data.role_id)) this.getRole(response.data.data.role_id))
// console.log(response.data.data)
} else { } else {
this.setState({ alert: true, messageAlert: response.data.message, tipeAlert: 'warning' }, () => { this.setState({ alert: true, messageAlert: response.data.message, tipeAlert: 'warning' }, () => {
if (response.data.message.includes("Someone Logged In") || response.data.message.includes("Token Expired")) { if (response.data.message.includes("Someone Logged In") || response.data.message.includes("Token Expired")) {
...@@ -215,6 +237,8 @@ export default class EditUser extends Component { ...@@ -215,6 +237,8 @@ export default class EditUser extends Component {
this.setState({ errorEndDate: true, msgErrorED: 'Valid To Cannot be Empty' }) this.setState({ errorEndDate: true, msgErrorED: 'Valid To Cannot be Empty' })
} else if (this.state.company.length < 1) { } else if (this.state.company.length < 1) {
this.setState({ alert: true, messageAlert: 'Authorization company cannot be empty', tipeAlert: 'warning' }) 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) { // else if (this.state.privileges.length < 1) {
// alert('Hak Akses belum di pilih !!') // alert('Hak Akses belum di pilih !!')
...@@ -224,7 +248,7 @@ export default class EditUser extends Component { ...@@ -224,7 +248,7 @@ export default class EditUser extends Component {
} }
} }
updateUser(){ updateUser() {
let payload = { let payload = {
"user_id": this.state.tempData.user_id, "user_id": this.state.tempData.user_id,
"role_id": this.state.role.role_id, "role_id": this.state.role.role_id,
...@@ -232,7 +256,8 @@ export default class EditUser extends Component { ...@@ -232,7 +256,8 @@ export default class EditUser extends Component {
"fullname": this.state.tempData.fullname, "fullname": this.state.tempData.fullname,
"company": this.state.company, "company": this.state.company,
"start_date": this.state.tempData.start_date, "start_date": this.state.tempData.start_date,
"end_date": this.state.tempData.end_date "end_date": this.state.tempData.end_date,
"mail_notif": this.state.notification.id
} }
this.props.updateUser(payload) this.props.updateUser(payload)
} }
...@@ -281,8 +306,8 @@ export default class EditUser extends Component { ...@@ -281,8 +306,8 @@ export default class EditUser extends Component {
if (response.data) { if (response.data) {
if (response.ok) { if (response.ok) {
if (response.data.status === 'success') { if (response.data.status === 'success') {
let dataBaru = response.data.data.map((item,index) => { let dataBaru = response.data.data.map((item, index) => {
return {...item, check: false} return { ...item, check: false }
}) })
this.setState({ listCompany: dataBaru }) this.setState({ listCompany: dataBaru })
} else { } else {
...@@ -319,7 +344,7 @@ export default class EditUser extends Component { ...@@ -319,7 +344,7 @@ export default class EditUser extends Component {
} }
if (item.children !== null) { if (item.children !== null) {
if (item.children.length > 0) { if (item.children.length > 0) {
item.children.map((items,indexs) => { item.children.map((items, indexs) => {
handlePushChild(items) handlePushChild(items)
}) })
} }
...@@ -333,7 +358,7 @@ export default class EditUser extends Component { ...@@ -333,7 +358,7 @@ export default class EditUser extends Component {
} }
if (item.children !== null) { if (item.children !== null) {
if (item.children.length > 0) { if (item.children.length > 0) {
item.children.map((items,indexs) => { item.children.map((items, indexs) => {
handleSpliceChild(items) handleSpliceChild(items)
}) })
} }
...@@ -344,7 +369,7 @@ export default class EditUser extends Component { ...@@ -344,7 +369,7 @@ export default class EditUser extends Component {
company.push(item.id) company.push(item.id)
if (item.children !== null) { if (item.children !== null) {
if (item.children.length > 0) { if (item.children.length > 0) {
item.children.map((items,indexs) => { item.children.map((items, indexs) => {
handlePushChild(items) handlePushChild(items)
}) })
} }
...@@ -354,7 +379,7 @@ export default class EditUser extends Component { ...@@ -354,7 +379,7 @@ export default class EditUser extends Component {
company.splice(indexID, 1) company.splice(indexID, 1)
if (item.children !== null) { if (item.children !== null) {
if (item.children.length > 0) { if (item.children.length > 0) {
item.children.map((items,indexs) => { item.children.map((items, indexs) => {
handleSpliceChild(items) handleSpliceChild(items)
}) })
} }
...@@ -362,7 +387,7 @@ export default class EditUser extends Component { ...@@ -362,7 +387,7 @@ export default class EditUser extends Component {
} }
// console.log(company) // console.log(company)
this.setState({ company}) this.setState({ company })
} }
renderChildren = (item, pad) => { renderChildren = (item, pad) => {
...@@ -380,7 +405,7 @@ export default class EditUser extends Component { ...@@ -380,7 +405,7 @@ export default class EditUser extends Component {
return ( return (
// <li> // <li>
<Collapse key={index} timeout="auto" unmountOnExit in={item.collapse}> <Collapse key={index} timeout="auto" unmountOnExit in={item.collapse}>
<div style={{ display: 'flex', flexDirection: 'row', alignItems: 'center', justifyContent: 'flex-start', paddingLeft: !R.isNil(data.children)? (data.children.length > 0? padding : padding + 30) : padding + 30}}> <div style={{ display: 'flex', flexDirection: 'row', alignItems: 'center', justifyContent: 'flex-start', paddingLeft: !R.isNil(data.children) ? (data.children.length > 0 ? padding : padding + 30) : padding + 30 }}>
{R.isNil(data.children) ? {R.isNil(data.children) ?
null null
: :
...@@ -600,7 +625,7 @@ export default class EditUser extends Component { ...@@ -600,7 +625,7 @@ export default class EditUser extends Component {
<Autocomplete <Autocomplete
{...this.state.listRole} {...this.state.listRole}
id="role" id="role"
onChange={(event, newInputValue) => this.setState({ role: newInputValue }, ()=> this.clearError())} onChange={(event, newInputValue) => this.setState({ role: newInputValue }, () => this.clearError())}
debug debug
renderInput={(params) => <TextField renderInput={(params) => <TextField
...@@ -693,6 +718,38 @@ export default class EditUser extends Component { ...@@ -693,6 +718,38 @@ export default class EditUser extends Component {
</div> </div>
</div> </div>
<div className="grid grid-2x grid-mobile-none gap-15px" style={{ paddingLeft: 20, paddingRight: 20 }}>
<div className="column-1">
<div className="margin-top-10px" style={{ padding: 10, borderRadius: 5 }}>
<Autocomplete
debug
id="tipe"
options={this.state.listNotification}
getOptionLabel={(option) => option.value}
value={this.state.notification}
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="grid grid-2x grid-mobile-none gap-15px" style={{ paddingLeft: 20, paddingRight: 20 }}>
<div className="column-1"> <div className="column-1">
<div className="margin-bottom-20px"> <div className="margin-bottom-20px">
......
...@@ -2522,7 +2522,7 @@ export default class BudgetTahunan extends Component { ...@@ -2522,7 +2522,7 @@ export default class BudgetTahunan extends Component {
"month": "", "month": "",
"quartal": "", "quartal": "",
"type_report_name": "Master Budget", "type_report_name": "Master Budget",
"currency_id" : defaultCurrency.id "currency_id": defaultCurrency.id
} }
// console.log(payload); // console.log(payload);
api.create().createDownloadFile(payload).then((response) => { api.create().createDownloadFile(payload).then((response) => {
...@@ -2570,6 +2570,7 @@ export default class BudgetTahunan extends Component { ...@@ -2570,6 +2570,7 @@ export default class BudgetTahunan extends Component {
let datas = data.findIndex((val) => val[4] == items) let datas = data.findIndex((val) => val[4] == items)
let report = data[datas] let report = data[datas]
if (items === 6) { if (items === 6) {
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 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 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}`
...@@ -2584,7 +2585,12 @@ export default class BudgetTahunan extends Component { ...@@ -2584,7 +2585,12 @@ export default class BudgetTahunan extends Component {
if (res.status === 200) { if (res.status === 200) {
result = [...result, res]; result = [...result, res];
} }
} catch (error) {
alert(error)
}
} else { } else {
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 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 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}`
...@@ -2599,6 +2605,9 @@ export default class BudgetTahunan extends Component { ...@@ -2599,6 +2605,9 @@ export default class BudgetTahunan extends Component {
if (res.status === 200) { if (res.status === 200) {
result = [...result, res]; result = [...result, res];
} }
} catch (error) {
alert(error)
}
} }
} }
......
...@@ -89,6 +89,7 @@ class MaintenanceMode extends Component { ...@@ -89,6 +89,7 @@ class MaintenanceMode extends Component {
maintenanceStatus: 0, maintenanceStatus: 0,
mailStatusActive: 0, mailStatusActive: 0,
mailStatusNonActive: 0, mailStatusNonActive: 0,
visibleAlertSave: false
} }
...@@ -203,6 +204,7 @@ class MaintenanceMode extends Component { ...@@ -203,6 +204,7 @@ class MaintenanceMode extends Component {
// ] // ]
} }
console.log(payload); console.log(payload);
this.setState({ visibleAlertSave: true })
api.create().createMaintenanceMode(payload).then((response) => { api.create().createMaintenanceMode(payload).then((response) => {
console.log(response) console.log(response)
this.setState({ loading: true }) this.setState({ loading: true })
...@@ -271,6 +273,7 @@ class MaintenanceMode extends Component { ...@@ -271,6 +273,7 @@ class MaintenanceMode extends Component {
// ] // ]
} }
console.log(payload); console.log(payload);
this.setState({ visibleAlertSave: true })
api.create().updateMaintenanceMode(payload).then((response) => { api.create().updateMaintenanceMode(payload).then((response) => {
console.log(response) console.log(response)
this.setState({ loading: true }) this.setState({ loading: true })
...@@ -846,6 +849,43 @@ class MaintenanceMode extends Component { ...@@ -846,6 +849,43 @@ class MaintenanceMode extends Component {
</Paper> </Paper>
</div> </div>
</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> </div>
); );
......
...@@ -71,7 +71,7 @@ const useStyles = makeStyles((theme) => ({ ...@@ -71,7 +71,7 @@ const useStyles = makeStyles((theme) => ({
easing: theme.transitions.easing.sharp, easing: theme.transitions.easing.sharp,
duration: theme.transitions.duration.enteringScreen, duration: theme.transitions.duration.enteringScreen,
}), }),
backgroundColor: '#0b6b24' backgroundColor: '#273b80'
}, },
topleftClose: { topleftClose: {
borderRight: 0, borderRight: 0,
...@@ -87,7 +87,7 @@ const useStyles = makeStyles((theme) => ({ ...@@ -87,7 +87,7 @@ const useStyles = makeStyles((theme) => ({
}, },
padding: 20, padding: 20,
display: 'flex', display: 'flex',
backgroundColor: '#0b6b24' backgroundColor: '#273b80'
}, },
drawerOpen: { drawerOpen: {
width: drawerWidth, width: drawerWidth,
......
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.
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 { ...@@ -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' })
} }
}) })
} }
...@@ -951,7 +951,7 @@ export default class MonthlyReport extends Component { ...@@ -951,7 +951,7 @@ export default class MonthlyReport extends Component {
visibleOI: false, visibleOI: false,
visibleCF: false, visibleCF: false,
}) })
} else if (item === 'List of Credit Facilities') { } else if (item === 'List Of Credit Facilities and Investment') {
this.setState({ this.setState({
visibleMonthlyReport: false, visibleMonthlyReport: false,
visibleBS: false, visibleBS: false,
...@@ -2312,7 +2312,7 @@ export default class MonthlyReport extends Component { ...@@ -2312,7 +2312,7 @@ export default class MonthlyReport extends Component {
"month": month ? String(month.month_id).toString() : "", "month": month ? String(month.month_id).toString() : "",
"quartal": "", "quartal": "",
"type_report_name": "Monthly Report", "type_report_name": "Monthly Report",
"currency_id" : defaultCurrency.id "currency_id": defaultCurrency.id
} }
console.log(payload); console.log(payload);
api.create().createDownloadFile(payload).then((response) => { api.create().createDownloadFile(payload).then((response) => {
...@@ -2356,9 +2356,11 @@ export default class MonthlyReport extends Component { ...@@ -2356,9 +2356,11 @@ export default class MonthlyReport extends Component {
let result = [] let result = []
console.log('mulai hit') console.log('mulai hit')
for (const items of selectReport) { 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 datas = data.findIndex((val) => val[4] == items)
let report = data[datas] let report = data[datas]
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 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( 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}` `${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}`
...@@ -2366,6 +2368,26 @@ export default class MonthlyReport extends Component { ...@@ -2366,6 +2368,26 @@ export default class MonthlyReport extends Component {
if (res.status === 200) { if (res.status === 200) {
result = [...result, res]; 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)
}
}
} }
console.log('ini result', result); console.log('ini result', result);
......
...@@ -326,6 +326,7 @@ export default class ProfitLossMR extends Component { ...@@ -326,6 +326,7 @@ export default class ProfitLossMR extends Component {
// if (err === true) { // if (err === true) {
// this.setState({ bebas: true }) // this.setState({ bebas: true })
// } // }
console.log(dataTable);
this.setState({ dataTable, loading: false, buttonError: true, saveDraft: true, refresh: false }) this.setState({ dataTable, loading: false, buttonError: true, saveDraft: true, refresh: false })
} else { } else {
this.setState({ loading: false, alert: true, messageAlert: response.data.message, tipeAlert: 'warning' }, () => { this.setState({ loading: false, alert: true, messageAlert: response.data.message, tipeAlert: 'warning' }, () => {
...@@ -968,12 +969,14 @@ export default class ProfitLossMR extends Component { ...@@ -968,12 +969,14 @@ export default class ProfitLossMR extends Component {
// } // }
dataTable2[tableMeta.rowIndex].map((item, index) => { dataTable2[tableMeta.rowIndex].map((item, index) => {
if (index == 10) { if (index == 10) {
// ytd = ytd actual balikan be + actual
let itemActual = item == undefined || item == "" || item == "undefined" ? 0.0 : item let itemActual = item == undefined || item == "" || item == "undefined" ? 0.0 : item
total = Number(tableMeta.rowData[23]) + Number(itemActual) total = Number(tableMeta.rowData[23]) + Number(itemActual)
} }
}) })
if (String(tableMeta.rowData[5]).toLocaleLowerCase() == "sales price") { 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]) 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)) 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)) 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 { ...@@ -246,6 +246,7 @@ export default class SubHolding extends Component {
this.setState({ this.setState({
defaultCurrencyID: response.data.data.default_currency, defaultCurrencyID: response.data.data.default_currency,
currency: datas, 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], // 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] defaultCurrency: index == -1 ? null : datas[index]
}) })
...@@ -4262,7 +4263,7 @@ export default class SubHolding extends Component { ...@@ -4262,7 +4263,7 @@ export default class SubHolding extends Component {
} }
render() { render() {
let { defaultCurrencyID, report } = this.state let { defaultCurrencyID, report, usdBefore2024 } = this.state
const loadingComponent = ( 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)' }}> <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 <PropagateLoader
...@@ -4384,7 +4385,7 @@ export default class SubHolding extends Component { ...@@ -4384,7 +4385,7 @@ export default class SubHolding extends Component {
// }) // })
// console.log("report 2"); // console.log("report 2");
// } // }
let bizpar = defaultCurrencyID == 2 && newInputValue.id == 1 ? defaultReport.filter(e => e.report === 2) : defaultReport 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 }) this.setState({ report: bizpar[0], reportType: bizpar })
this.getReportType() 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