Commit 75ee7b2a authored by rifkaki's avatar rifkaki

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

parents fd3db8fd c7a02ed4
...@@ -424,6 +424,7 @@ export default class SubHolding extends Component { ...@@ -424,6 +424,7 @@ export default class SubHolding extends Component {
console.log(response); console.log(response);
let dataTable = [] let dataTable = []
if (response.data) { if (response.data) {
if (response.data.status === 'success') {
let res = response.data.data let res = response.data.data
const handlePushChild = (item) => { const handlePushChild = (item) => {
let indexIDzz = dataTable.findIndex((val) => val[1] === item.id) let indexIDzz = dataTable.findIndex((val) => val[1] === item.id)
...@@ -554,6 +555,16 @@ export default class SubHolding extends Component { ...@@ -554,6 +555,16 @@ export default class SubHolding extends Component {
// console.log(this.state.dataTable) // console.log(this.state.dataTable)
// this.getPLDetailMR(payload) // this.getPLDetailMR(payload)
// }) // })
} else {
this.setState({ alert: true, messageAlert: response.data.message, tipeAlert: 'warning', loading: false }, () => {
if (response.data.message.includes("Someone Logged In")) {
setTimeout(() => {
localStorage.removeItem(Constant.TOKEN)
window.location.reload();
}, 1000);
}
})
}
} else { } else {
this.setState({ dataTable: [], previewTable: false, loading: false, previewDownload: false }) this.setState({ dataTable: [], previewTable: false, loading: false, previewDownload: false })
} }
...@@ -564,6 +575,7 @@ export default class SubHolding extends Component { ...@@ -564,6 +575,7 @@ export default class SubHolding extends Component {
console.log(response); console.log(response);
let dataTable = [] let dataTable = []
if (response.data) { if (response.data) {
if (response.data.status === 'success') {
let res = response.data.data let res = response.data.data
const handlePushChild = (item) => { const handlePushChild = (item) => {
let indexIDzz = dataTable.findIndex((val) => val[1] === item.id) let indexIDzz = dataTable.findIndex((val) => val[1] === item.id)
...@@ -693,6 +705,16 @@ export default class SubHolding extends Component { ...@@ -693,6 +705,16 @@ export default class SubHolding extends Component {
// console.log(this.state.dataTable) // console.log(this.state.dataTable)
// this.getBalanceSheetMR(payload) // this.getBalanceSheetMR(payload)
// }) // })
} else {
this.setState({ alert: true, messageAlert: response.data.message, tipeAlert: 'warning', loading: false }, () => {
if (response.data.message.includes("Someone Logged In")) {
setTimeout(() => {
localStorage.removeItem(Constant.TOKEN)
window.location.reload();
}, 1000);
}
})
}
} else { } else {
this.setState({ dataTable: [], previewTable: false, loading: false, previewDownload: false }) this.setState({ dataTable: [], previewTable: false, loading: false, previewDownload: false })
} }
...@@ -718,6 +740,7 @@ export default class SubHolding extends Component { ...@@ -718,6 +740,7 @@ export default class SubHolding extends Component {
api.create().getReportPL(payloads).then(response => { api.create().getReportPL(payloads).then(response => {
console.log(response); console.log(response);
if (response.data) { if (response.data) {
if (response.data.status === 'success') {
let dataTable = [] let dataTable = []
console.log(response) console.log(response)
let res = response.data.data let res = response.data.data
...@@ -885,6 +908,16 @@ export default class SubHolding extends Component { ...@@ -885,6 +908,16 @@ export default class SubHolding extends Component {
console.log(this.state.dataTable) console.log(this.state.dataTable)
// this.getReportPLMR(payload) // this.getReportPLMR(payload)
// }) // })
} else {
this.setState({ alert: true, messageAlert: response.data.message, tipeAlert: 'warning', loading: false }, () => {
if (response.data.message.includes("Someone Logged In")) {
setTimeout(() => {
localStorage.removeItem(Constant.TOKEN)
window.location.reload();
}, 1000);
}
})
}
} else { } else {
this.setState({ dataTable: [], previewTable: false, loading: false, previewDownload: false }) this.setState({ dataTable: [], previewTable: false, loading: false, previewDownload: false })
} }
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
...@@ -18,7 +18,8 @@ import MonthlyReport from '../container/MonthlyReport'; ...@@ -18,7 +18,8 @@ import MonthlyReport from '../container/MonthlyReport';
import DocumentManagement from '../container/DocumentManagement/DocumentManagement'; import DocumentManagement from '../container/DocumentManagement/DocumentManagement';
import OutlookPA from '../container/OutlookPA'; import OutlookPA from '../container/OutlookPA';
import SubHolding from '../container/Laporan/SubHolding'; import SubHolding from '../container/Laporan/SubHolding';
import SummaryTriputra from '../container/SummaryTriputra/SummaryOfTriputra' import SummaryTriputra from '../container/SummaryTriputra/SummaryOfTriputra';
import MasterDataCAT from '../container/MasterData/MasterDataCAT/MasterDataCAT'
const routes = [ const routes = [
{ {
...@@ -69,6 +70,10 @@ const routes = [ ...@@ -69,6 +70,10 @@ const routes = [
path: "/home/parameters", path: "/home/parameters",
main: Parameter main: Parameter
}, },
{
path: "/home/master-data-cat",
main: MasterDataCAT
},
{ {
path: "/home/cat-dashboard", path: "/home/cat-dashboard",
main: DashboardCAT main: DashboardCAT
......
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