Commit 2e707e56 authored by Dida Adams Arizona's avatar Dida Adams Arizona

Merge branch 'didam' into 'master'

Didam

See merge request !525
parents fda03a4d e6b46f31
......@@ -7,7 +7,7 @@ import Constant from './library/Constant';
if (sessionStorage.getItem('reloaded') != null) {
console.log('page was reloaded');
} else {
localStorage.removeItem(Constant.TOKEN)
// localStorage.removeItem(Constant.TOKEN)
window.location.reload();
}
sessionStorage.setItem('reloaded', 'yes');
......
......@@ -395,7 +395,7 @@ export default class FixedAssetsMovement extends Component {
async downloadAllData() {
// let url = `https://tia.eksad.com/tia-reporting-dev/public/transaction/master_budget/export_master_budget?submission_id=${this.props.submissionID}&&report_id=${this.props.report_id}&&company_id=${this.props.company.company_id}&&year=${this.props.periode}&&revision=${this.props.revision}`
console.log(url);
// console.log(url);
let resReal = `https://tia.eksad.com/tia-reporting-dev/public/transaction/master_budget/export_master_budget?submission_id=${this.props.submissionID}&&report_id=${this.props.report_id}&&company_id=${this.props.company.company_id}&&year=${this.props.periode}&&revision=${this.props.revision}`
let resNull = `https://tia.eksad.com/tia-reporting-dev/public/transaction/master_budget/export_master_budget?submission_id=&&report_id=${this.props.report_id}&&company_id=${this.props.company.company_id}&&year=${this.props.periode}&&revision=${this.props.revision}`
let res = await fetch(
......
......@@ -54,6 +54,9 @@ class HomePage extends Component {
// }
// })
this.getApprMat()
this.getListUserSubco()
this.getDashboardMB()
this.getDashboard()
}
componentDidUpdate() {
......@@ -99,6 +102,7 @@ class HomePage extends Component {
}
getApprMat() {
this.setState({loading: true})
api.create().getAM().then((response) => {
console.log(response);
let actAM = response.data.data.map((item, index) => {
......@@ -115,6 +119,7 @@ class HomePage extends Component {
}
this.getDashboardMB()
console.log(actAM)
this.setState({loading: false})
})
}
......@@ -147,7 +152,7 @@ class HomePage extends Component {
</div>
);
const columns = ["#", "ID", "Nama Perusahaan", "Jenis Report", "Revisi", "Status", {
const columns = ["#", "ID", "Company", "Report Type", "Revision", "Status", {
name: "Action",
options: {
customBodyRender: (val, tableMeta) => {
......@@ -226,6 +231,16 @@ class HomePage extends Component {
color: '#f65a4c',
name: 'name',
}]
const loadingComponent = (
<div style={{ position: 'absolute', zIndex: 110, top: 0, left: 0, width: '100%', height: '100%', display: 'flex', justifyContent: 'center', alignItems: 'center', background: 'rgba(255,255,255,0.8)' }}>
<PropagateLoader
// css={override}
size={20}
color={"#274B80"}
loading={this.state.loading}
/>
</div>
);
return (
<div style={{ flex: 1, backgroundColor: '#f8f8f8' }}>
{this.state.loading && loadingComponent}
......
......@@ -479,11 +479,12 @@ export default class BalanceSheet extends Component {
const handleParent = (tableMeta) => {
// console.log(tableMeta)
let total = Number(tableMeta.columnIndex == ""? 0 : tableMeta.columnIndex)
let total = 0
dataTable2.map((item, index) => {
if (item[2] == tableMeta.rowData[1]) {
// console.log('masuk')
// console.log(total)
// console.log(item[tableMeta.columnIndex])
total += Number(item[tableMeta.columnIndex])
}
})
......
......@@ -26,6 +26,7 @@ import Constant from "../library/Constant";
// work properly.
export default function BasicExample() {
return (
<Router basename={"/tia-web-dev"}>
<Switch>
......@@ -57,7 +58,15 @@ export default function BasicExample() {
}
function PrivateRoute({ children, ...rest }) {
// React.useEffect(() => {
// token()
// })
const logged = localStorage.getItem(Constant.TOKEN) !== null? true : false
// const token = async() => {
// let a = await localStorage.getItem(Constant.TOKEN)
// alert(a)
// }
return (
<Route
{...rest}
......
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