Commit 4fd26de9 authored by Dida Adams Arizona's avatar Dida Adams Arizona

Merge branch 'master' of http://103.44.149.204/d.arizona/tia-dev into didam

parents 39a06a77 10f28123
...@@ -224,6 +224,7 @@ const create = (type = "") => { ...@@ -224,6 +224,7 @@ const create = (type = "") => {
const getLastestUpdateOI = (body) => api.post('transaction/operating_indicator/get_latest_update', body) const getLastestUpdateOI = (body) => api.post('transaction/operating_indicator/get_latest_update', body)
const getLastPeriodeOI = (idCompany) => api.post(`transaction/master_budget/get_last_periode/${idCompany}`) const getLastPeriodeOI = (idCompany) => api.post(`transaction/master_budget/get_last_periode/${idCompany}`)
const getReportHierarkiPL = (body) => api.post('transaction/db_report_detail/get_report_hierarki', body) const getReportHierarkiPL = (body) => api.post('transaction/db_report_detail/get_report_hierarki', body)
const getReportHierarkiFR = (body) => api.post('transaction/db_ratio/get_report_hierarki', body)
//CASH FLOW //CASH FLOW
const getDetailReportCF = (body) => api.post('/transaction/cash_flow/get_report_hierarki', body) const getDetailReportCF = (body) => api.post('/transaction/cash_flow/get_report_hierarki', body)
...@@ -431,7 +432,8 @@ const create = (type = "") => { ...@@ -431,7 +432,8 @@ const create = (type = "") => {
getLastPeriodOI, getLastPeriodOI,
getDashboardUser, getDashboardUser,
getDetailReportCF, getDetailReportCF,
getReportHierarkiPL getReportHierarkiPL,
getReportHierarkiFR
} }
} }
......
...@@ -452,7 +452,7 @@ export default class ApprovalMatrix extends Component { ...@@ -452,7 +452,7 @@ export default class ApprovalMatrix extends Component {
this.getData() this.getData()
this.setState({ alert: true, messageAlert: response.data.message, tipeAlert: 'success' }) this.setState({ alert: true, messageAlert: response.data.message, tipeAlert: 'success' })
} else { } else {
this.setState({ alert: true, messageAlert: response.data.message, tipeAlert: 'warning' }, () => { this.setState({ loading: false, alert: true, messageAlert: response.data.message, tipeAlert: 'warning' }, () => {
if (response.data.message.includes("Someone Logged In")) { if (response.data.message.includes("Someone Logged In")) {
setTimeout(() => { setTimeout(() => {
localStorage.removeItem(Constant.TOKEN) localStorage.removeItem(Constant.TOKEN)
...@@ -462,10 +462,10 @@ export default class ApprovalMatrix extends Component { ...@@ -462,10 +462,10 @@ export default class ApprovalMatrix extends Component {
}) })
} }
} else { } else {
this.setState({ alert: true, messageAlert: response.data.message, tipeAlert: 'error' }) this.setState({ loading: false, alert: true, messageAlert: response.data.message, tipeAlert: 'error' })
} }
} else { } else {
this.setState({ alert: true, messageAlert: response.problem, tipeAlert: 'error' }) this.setState({ loading: false, alert: true, messageAlert: response.problem, tipeAlert: 'error' })
} }
}) })
} }
...@@ -479,7 +479,7 @@ export default class ApprovalMatrix extends Component { ...@@ -479,7 +479,7 @@ export default class ApprovalMatrix extends Component {
this.getData() this.getData()
this.setState({ alert: true, messageAlert: response.data.message, tipeAlert: 'success' }) this.setState({ alert: true, messageAlert: response.data.message, tipeAlert: 'success' })
} else { } else {
this.setState({ alert: true, messageAlert: response.data.message, tipeAlert: 'warning' }, () => { this.setState({ loading: false, alert: true, messageAlert: response.data.message, tipeAlert: 'warning' }, () => {
if (response.data.message.includes("Someone Logged In")) { if (response.data.message.includes("Someone Logged In")) {
setTimeout(() => { setTimeout(() => {
localStorage.removeItem(Constant.TOKEN) localStorage.removeItem(Constant.TOKEN)
...@@ -489,10 +489,10 @@ export default class ApprovalMatrix extends Component { ...@@ -489,10 +489,10 @@ export default class ApprovalMatrix extends Component {
}) })
} }
} else { } else {
this.setState({ alert: true, messageAlert: response.data.message, tipeAlert: 'error' }) this.setState({ loading: false, alert: true, messageAlert: response.data.message, tipeAlert: 'error' })
} }
} else { } else {
this.setState({ alert: true, messageAlert: response.problem, tipeAlert: 'error' }) this.setState({ loading: false, alert: true, messageAlert: response.problem, tipeAlert: 'error' })
} }
}) })
} }
...@@ -506,7 +506,7 @@ export default class ApprovalMatrix extends Component { ...@@ -506,7 +506,7 @@ export default class ApprovalMatrix extends Component {
this.getData() this.getData()
this.setState({ alert: true, messageAlert: response.data.message, tipeAlert: 'success' }) this.setState({ alert: true, messageAlert: response.data.message, tipeAlert: 'success' })
} else { } else {
this.setState({ alert: true, messageAlert: response.data.message, tipeAlert: 'warning' }, () => { this.setState({ loading: false, alert: true, messageAlert: response.data.message, tipeAlert: 'warning' }, () => {
if (response.data.message.includes("Someone Logged In")) { if (response.data.message.includes("Someone Logged In")) {
setTimeout(() => { setTimeout(() => {
localStorage.removeItem(Constant.TOKEN) localStorage.removeItem(Constant.TOKEN)
...@@ -516,10 +516,10 @@ export default class ApprovalMatrix extends Component { ...@@ -516,10 +516,10 @@ export default class ApprovalMatrix extends Component {
}) })
} }
} else { } else {
this.setState({ alert: true, messageAlert: response.data.message, tipeAlert: 'error' }) this.setState({ loading: false, alert: true, messageAlert: response.data.message, tipeAlert: 'error' })
} }
} else { } else {
this.setState({ alert: true, messageAlert: response.problem, tipeAlert: 'error' }) this.setState({ loading: false, alert: true, messageAlert: response.problem, tipeAlert: 'error' })
} }
}) })
} }
...@@ -563,7 +563,7 @@ export default class ApprovalMatrix extends Component { ...@@ -563,7 +563,7 @@ export default class ApprovalMatrix extends Component {
this.getData() this.getData()
this.setState({ visibleAM: true, alert: true, messageAlert: response.data.message, tipeAlert: 'success' }) this.setState({ visibleAM: true, alert: true, messageAlert: response.data.message, tipeAlert: 'success' })
} else { } else {
this.setState({ alert: true, messageAlert: response.data.message, tipeAlert: 'warning' }, () => { this.setState({ loading: false, alert: true, messageAlert: response.data.message, tipeAlert: 'warning' }, () => {
if (response.data.message.includes("Someone Logged In")) { if (response.data.message.includes("Someone Logged In")) {
setTimeout(() => { setTimeout(() => {
localStorage.removeItem(Constant.TOKEN) localStorage.removeItem(Constant.TOKEN)
...@@ -573,10 +573,10 @@ export default class ApprovalMatrix extends Component { ...@@ -573,10 +573,10 @@ export default class ApprovalMatrix extends Component {
}) })
} }
} else { } else {
this.setState({ alert: true, messageAlert: response.data.message, tipeAlert: 'error' }) this.setState({ loading: false, alert: true, messageAlert: response.data.message, tipeAlert: 'error' })
} }
} else { } else {
this.setState({ alert: true, messageAlert: response.problem, tipeAlert: 'error' }) this.setState({ loading: false, alert: true, messageAlert: response.problem, tipeAlert: 'error' })
} }
}) })
} }
...@@ -595,7 +595,7 @@ export default class ApprovalMatrix extends Component { ...@@ -595,7 +595,7 @@ export default class ApprovalMatrix extends Component {
this.getData() this.getData()
this.setState({ alert: true, messageAlert: response.data.message, tipeAlert: 'success' }) this.setState({ alert: true, messageAlert: response.data.message, tipeAlert: 'success' })
} else { } else {
this.setState({ alert: true, messageAlert: response.data.message, tipeAlert: 'warning' }, () => { this.setState({ loading: false, alert: true, messageAlert: response.data.message, tipeAlert: 'warning' }, () => {
if (response.data.message.includes("Someone Logged In")) { if (response.data.message.includes("Someone Logged In")) {
setTimeout(() => { setTimeout(() => {
localStorage.removeItem(Constant.TOKEN) localStorage.removeItem(Constant.TOKEN)
...@@ -605,10 +605,10 @@ export default class ApprovalMatrix extends Component { ...@@ -605,10 +605,10 @@ export default class ApprovalMatrix extends Component {
}) })
} }
} else { } else {
this.setState({ alert: true, messageAlert: response.data.message, tipeAlert: 'error' }) this.setState({ loading: false, alert: true, messageAlert: response.data.message, tipeAlert: 'error' })
} }
} else { } else {
this.setState({ alert: true, messageAlert: response.problem, tipeAlert: 'error' }) this.setState({ loading: false, alert: true, messageAlert: response.problem, tipeAlert: 'error' })
} }
}) })
} }
......
This diff is collapsed.
This diff is collapsed.
...@@ -82,11 +82,9 @@ export default class DocumentManagement extends Component { ...@@ -82,11 +82,9 @@ export default class DocumentManagement extends Component {
loadTable: true, loadTable: true,
refresh: id === undefined ? '' : 'create' refresh: id === undefined ? '' : 'create'
}) })
} else {
} }
} else { } else {
this.setState({ alert: true, messageAlert: response.problem, tipeAlert: 'error', loading: false })
} }
}) })
} }
......
This diff is collapsed.
This diff is collapsed.
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