Commit 2f1d1470 authored by EKSAD's avatar EKSAD

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

parents d5e4ba43 8b8854ef
...@@ -7,7 +7,7 @@ import Constant from './library/Constant'; ...@@ -7,7 +7,7 @@ import Constant from './library/Constant';
if (sessionStorage.getItem('reloaded') != null) { if (sessionStorage.getItem('reloaded') != null) {
console.log('page was reloaded'); console.log('page was reloaded');
} else { } else {
localStorage.removeItem(Constant.TOKEN) // localStorage.removeItem(Constant.TOKEN)
window.location.reload(); window.location.reload();
} }
sessionStorage.setItem('reloaded', 'yes'); sessionStorage.setItem('reloaded', 'yes');
......
...@@ -210,6 +210,8 @@ const create = (type = "") => { ...@@ -210,6 +210,8 @@ const create = (type = "") => {
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 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 getDashboardMB = (body) => api.get('transaction/get_dashboard_table')
const getOpetratingIndID = (body) => api.post('transaction/operating_indicator/get_operating_indicator_id', body) const getOpetratingIndID = (body) => api.post('transaction/operating_indicator/get_operating_indicator_id', body)
const getSubmitOI = (body) => api.post('transaction/operating_indicator/get_latest_periode_submit', body) const getSubmitOI = (body) => api.post('transaction/operating_indicator/get_latest_periode_submit', body)
...@@ -393,6 +395,7 @@ const create = (type = "") => { ...@@ -393,6 +395,7 @@ const create = (type = "") => {
getIdDeleteFromExcel, getIdDeleteFromExcel,
getDashboard, getDashboard,
historyApproval, historyApproval,
getDashboardMB,
checkApprover, checkApprover,
approvalSubmission, approvalSubmission,
getCompanySubmitted, getCompanySubmitted,
...@@ -421,7 +424,8 @@ const create = (type = "") => { ...@@ -421,7 +424,8 @@ const create = (type = "") => {
checkApproverOLPA, checkApproverOLPA,
getLastPeriodeOI, getLastPeriodeOI,
getSubmitOI, getSubmitOI,
getLastPeriodOI getLastPeriodOI,
getDashboardUser
} }
} }
......
...@@ -372,7 +372,7 @@ export default class BudgetTahunan extends Component { ...@@ -372,7 +372,7 @@ export default class BudgetTahunan extends Component {
} }
api.create().getSubmission(payload).then(response => { api.create().getSubmission(payload).then(response => {
console.log(response) console.log(response)
if (response) { if (response.data) {
if (response.data.status === "success") { if (response.data.status === "success") {
this.setState({ this.setState({
submissionID: response.data.data.submission_id, submissionID: response.data.data.submission_id,
...@@ -1345,8 +1345,11 @@ export default class BudgetTahunan extends Component { ...@@ -1345,8 +1345,11 @@ export default class BudgetTahunan extends Component {
periode={this.state.periode.periode} periode={this.state.periode.periode}
submissionID={this.state.submissionID} submissionID={this.state.submissionID}
saveToMasterBudget={this.saveToMasterBudget.bind(this)} saveToMasterBudget={this.saveToMasterBudget.bind(this)}
onClickClose={() => this.setState({ visibleCF: false, visibleBudgetTahunan: true })} onClickClose={() => this.setState({ visibleCAT: false, visibleBudgetTahunan: true })}
getReport={this.getSubmission.bind(this)} getReport={this.getSubmission.bind(this)}
isApprover={this.state.isApprover}
status={this.state.status}
lastStatus={this.state.lastStatus}
prevRevision={this.state.isSubmit ? this.state.prevRevision : true} prevRevision={this.state.isSubmit ? this.state.prevRevision : true}
/> />
)} )}
......
This diff is collapsed.
...@@ -394,10 +394,12 @@ export default class FixedAssetsMovement extends Component { ...@@ -394,10 +394,12 @@ export default class FixedAssetsMovement extends Component {
} }
async downloadAllData() { 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}` // 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( let res = await fetch(
`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}` this.props.submissionID == null ? resNull : resReal
) )
res = await res.blob() res = await res.blob()
this.setState({ loading: false }) this.setState({ loading: false })
...@@ -512,10 +514,15 @@ export default class FixedAssetsMovement extends Component { ...@@ -512,10 +514,15 @@ export default class FixedAssetsMovement extends Component {
} else { } else {
// console.log(item) // console.log(item)
let indexID = dataTable2.findIndex((val) => val[22] == item) let indexID = dataTable2.findIndex((val) => val[22] == item)
// console.log(dataTable2[indexID][tableMeta.columnIndex]) // console.log(dataTable2[indexID])
if (indexID !== -1) { if (indexID !== -1) {
let valuezz = dataTable2[indexID][tableMeta.columnIndex].value == undefined ? dataTable2[indexID][tableMeta.columnIndex] : dataTable2[indexID][tableMeta.columnIndex].value let valuezz = dataTable2[indexID][tableMeta.columnIndex].value == undefined ? dataTable2[indexID][tableMeta.columnIndex] : dataTable2[indexID][tableMeta.columnIndex].value
anjay.push(valuezz == "" ? 0 : valuezz) anjay.push(valuezz == "" ? 0 : valuezz)
} else {
if (item === '(-1)') {
anjay.push(-1)
}
// console.log(item);
} }
} }
} }
...@@ -551,8 +558,8 @@ export default class FixedAssetsMovement extends Component { ...@@ -551,8 +558,8 @@ export default class FixedAssetsMovement extends Component {
// console.log(dataTable2[tableMeta.rowIndex][22]) // console.log(dataTable2[tableMeta.rowIndex][22])
// console.log(tableMeta.rowData[5]) // console.log(tableMeta.rowData[5])
// if (tableMeta.rowData[5] == 'Beginning Balance') { // if (tableMeta.rowData[5] == 'Beginning Balance') {
// console.log(baru) // console.log(baru)
// console.log(anjay) // console.log(anjay)
// console.log(total) // console.log(total)
// } // }
......
...@@ -6209,17 +6209,14 @@ export default class TaxPlanning extends Component { ...@@ -6209,17 +6209,14 @@ export default class TaxPlanning extends Component {
name: `${this.props.periode}`, name: `${this.props.periode}`,
options: { options: {
customHeadRender: (columnMeta) => ( customHeadRender: (columnMeta) => (
<div style={{ ...style2, backgroundColor: '#1c71b8', color: '#fff', fontSize: 13, fontWeight: 1, width: 150, borderRight: "1px solid rgb(255, 255, 255)" }} > <th style={{ ...style2, backgroundColor: '#1c71b8', color: '#fff', fontSize: 13, fontWeight: 1, width: 150, borderRight: "1px solid rgb(255, 255, 255)" }} >
{/* <TableCell style={{ ...style2, top: 0, zIndex: 99, backgroundColor: '#1c71b8', width: 96 }}>
<Typography style={{ color: 'white', fontSize: 12, fontWeight: 'bold', textAlign: 'center' }}>{columnMeta.name}</Typography>
</TableCell> */}
<div style={{ borderBottom: "1px #fff solid", textAlign: 'center', fontSize: 12, fontWeight: 'bold', padding: 5, paddingTop: 8 }}>{columnMeta.name}</div> <div style={{ borderBottom: "1px #fff solid", textAlign: 'center', fontSize: 12, fontWeight: 'bold', padding: 5, paddingTop: 8 }}>{columnMeta.name}</div>
<div style={{ ...style2, backgroundColor: '#1c71b8', color: '#fff', fontSize: 12, fontWeight: 'bold', position: "sticky", paddingBottom: 20 }}> <div className="" style={{ ...style2, backgroundColor: '#1c71b8', color: '#fff', fontSize: 12, fontWeight: 'bold', position: "sticky", paddingBottom: 20 }}>
<div style={{ placeSelf: 'center', textAlign: 'center', padding: 5 }}> <div className="column-1" style={{ placeSelf: 'center', textAlign: 'center', padding: 5 }}>
<span>{"Trial Balance (Fiscal)"}</span> <span>{"Trial Balance (Fiscal)"}</span>
</div> </div>
</div> </div>
</div> </th>
), ),
setCellProps: () => ({ style2 }), setCellProps: () => ({ style2 }),
customBodyRender: (value, tableMeta, updateValue) => { customBodyRender: (value, tableMeta, updateValue) => {
......
This diff is collapsed.
...@@ -26,6 +26,7 @@ import Constant from "../library/Constant"; ...@@ -26,6 +26,7 @@ import Constant from "../library/Constant";
// work properly. // work properly.
export default function BasicExample() { export default function BasicExample() {
return ( return (
<Router basename={"/tia-web-dev"}> <Router basename={"/tia-web-dev"}>
<Switch> <Switch>
...@@ -57,7 +58,15 @@ export default function BasicExample() { ...@@ -57,7 +58,15 @@ export default function BasicExample() {
} }
function PrivateRoute({ children, ...rest }) { function PrivateRoute({ children, ...rest }) {
// React.useEffect(() => {
// token()
// })
const logged = localStorage.getItem(Constant.TOKEN) !== null? true : false const logged = localStorage.getItem(Constant.TOKEN) !== null? true : false
// const token = async() => {
// let a = await localStorage.getItem(Constant.TOKEN)
// alert(a)
// }
return ( return (
<Route <Route
{...rest} {...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