Commit 2d443edd authored by Rifka Kurnia Irfiana's avatar Rifka Kurnia Irfiana

update managdoc taxplan

parent df24f678
...@@ -206,7 +206,8 @@ const create = (type = "") => { ...@@ -206,7 +206,8 @@ const create = (type = "") => {
const uploadFoto = (body) => api.post('attachment/upload_foto', body) const uploadFoto = (body) => api.post('attachment/upload_foto', body)
// MANAGEMENT DOCUMENT // MANAGEMENT DOCUMENT
const getDocumentCategory = (body) => api.post('setting/get_all_setting_document_category', body) // const getDocumentCategory = (body) => api.post('setting/get_all_setting_document_category', body)
const getDocumentCategory = () => api.get('setting/get_all_setting_document_category')
const getAllDocument = (body) => api.post('document/get_all_document', body) const getAllDocument = (body) => api.post('document/get_all_document', body)
const uploadDocument = (body) => api.post('document/upload_document', body) const uploadDocument = (body) => api.post('document/upload_document', body)
const updateDocument = (body) => api.post('document/update_document', body) const updateDocument = (body) => api.post('document/update_document', body)
......
...@@ -683,8 +683,7 @@ export default class BudgetTahunan extends Component { ...@@ -683,8 +683,7 @@ export default class BudgetTahunan extends Component {
submissionID={this.state.submissionID} submissionID={this.state.submissionID}
saveToMasterBudget={this.saveToMasterBudget.bind(this)} saveToMasterBudget={this.saveToMasterBudget.bind(this)}
onClickClose={() => this.setState({ visibleTP: false, visibleBudgetTahunan: true })} onClickClose={() => this.setState({ visibleTP: false, visibleBudgetTahunan: true })}
getReport={this.getReport.bind(this)} getReport={this.getCompanyActive.bind(this)}
getReportAttachment={this.getReportAttachment.bind(this)}
/> />
)} )}
{this.state.visibleFAM && ( {this.state.visibleFAM && (
......
import React, { Component } from 'react'; import React, { Component } from 'react';
import { Typography, Paper, createMuiTheme, MuiThemeProvider, TableCell, FormControlLabel, TextField, Input } from '@material-ui/core'; import { Typography, Paper, createMuiTheme, MuiThemeProvider, TableCell, FormControlLabel, TextField, Input, Tooltip, withStyles } from '@material-ui/core';
import MUIDataTable from 'mui-datatables'; import MUIDataTable from 'mui-datatables';
import NumberFormat from 'react-number-format'; import NumberFormat from 'react-number-format';
import api from '../../api'; import api from '../../api';
...@@ -8,6 +8,17 @@ import { values } from 'ramda'; ...@@ -8,6 +8,17 @@ import { values } from 'ramda';
import PropagateLoader from "react-spinners/PropagateLoader" import PropagateLoader from "react-spinners/PropagateLoader"
import Images from '../../assets/Images'; import Images from '../../assets/Images';
import ReactTooltip from 'react-tooltip'; import ReactTooltip from 'react-tooltip';
import UploadFile from "../../library/Upload";
import { ExcelRenderer } from 'react-excel-renderer';
const LightTooltip = withStyles((theme) => ({
tooltip: {
backgroundColor: theme.palette.common.white,
color: 'rgba(0, 0, 0, 0.87)',
boxShadow: theme.shadows[1],
fontSize: 11,
},
}))(Tooltip);
var ct = require("../../library/CustomTable"); var ct = require("../../library/CustomTable");
const getMuiTheme = () => createMuiTheme(ct.customTable3()); const getMuiTheme = () => createMuiTheme(ct.customTable3());
...@@ -30,20 +41,14 @@ export default class TaxPlanning extends Component { ...@@ -30,20 +41,14 @@ export default class TaxPlanning extends Component {
constructor(props) { constructor(props) {
super(props) super(props)
this.state = { this.state = {
dataTable: [ dataTable: [],
// ["TOTAL ASSETS", "11,247,249", "10,702,196"], visibleBalanceSheet: true,
// ["TOTAL CURRENT ASSETS", "2,647,647", "2,058,898"], disabledSave: true,
// ["Cash & Cash Equivalent", "1,464,571", "729,743"], editable: false,
// ["Cash & Bank Balance", "938,707", "265,584"], buttonError: false
// ["Time & Call Deposit", "525,864", "464,159"],
// ["BI Deposit", "", ""],
// ["Marketable Securities", "150,250", "154,500"],
// ["Notes Receivable", "", ""],
// ["Accounts Receivable", "172,031", "97,112"],
// ["Trade Receivables - Third Party", "142,668", "77,480"],
]
} }
this.handleValue = this.handleValue.bind(this) this.handleValue = this.handleValue.bind(this)
this.fileHandler = this.fileHandler.bind(this);
} }
componentDidMount() { componentDidMount() {
...@@ -138,7 +143,7 @@ export default class TaxPlanning extends Component { ...@@ -138,7 +143,7 @@ export default class TaxPlanning extends Component {
} }
} }
}) })
this.setState({ dataTable, loading: false }) this.setState({ dataTable, loading: false, buttonError: true })
}) })
} }
...@@ -146,7 +151,7 @@ export default class TaxPlanning extends Component { ...@@ -146,7 +151,7 @@ export default class TaxPlanning extends Component {
handleValue(data) { handleValue(data) {
let total = 0 let total = 0
this.state.dataTable.map((item, index) => { this.state.dataTable.map((item, index) => {
if (data.rowData[1] == item[2]) { if (data.rowData[4] == item[5]) {
total = item[data.columnIndex] == undefined ? (Number(total) + 0) : (Number(total) + Number(item[data.columnIndex])) total = item[data.columnIndex] == undefined ? (Number(total) + 0) : (Number(total) + Number(item[data.columnIndex]))
} }
}) })
......
This diff is collapsed.
...@@ -6,6 +6,7 @@ import ManualBookTia from './ManualBookTia' ...@@ -6,6 +6,7 @@ import ManualBookTia from './ManualBookTia'
import api from '../../api' import api from '../../api'
import AuditTahunan from './AuditTahunan' import AuditTahunan from './AuditTahunan'
import CreateManagementDoc from './CreateManagementDoc' import CreateManagementDoc from './CreateManagementDoc'
import AllDocument from './AllDocument'
import QReview from './QReview' import QReview from './QReview'
import BOD from './BOD' import BOD from './BOD'
import ManualBookETMS from './ManualBookETMS' import ManualBookETMS from './ManualBookETMS'
...@@ -57,7 +58,7 @@ export default class DocumentManagement extends Component { ...@@ -57,7 +58,7 @@ export default class DocumentManagement extends Component {
selectTab = (event, newEvent) => { selectTab = (event, newEvent) => {
this.setState({ tab: newEvent }) this.setState({ tab: newEvent })
console.log(this.state.tab) // console.log(this.state.tab)
} }
componentDidMount() { componentDidMount() {
...@@ -66,13 +67,13 @@ export default class DocumentManagement extends Component { ...@@ -66,13 +67,13 @@ export default class DocumentManagement extends Component {
} }
getDataDocument(id) { getDataDocument(id) {
let payload = { // let payload = {
"setting_group_id": 7, // "setting_group_id": 7,
"setting_type_id": 167, // "setting_type_id": 167,
"company_id": 0 // "company_id": 0
} // }
api.create().getDocumentCategory(payload).then(response => { api.create().getDocumentCategory().then(response => {
console.log(response); console.log(response);
if (response) { if (response) {
if (response.data.status === "success") { if (response.data.status === "success") {
...@@ -82,7 +83,7 @@ export default class DocumentManagement extends Component { ...@@ -82,7 +83,7 @@ export default class DocumentManagement extends Component {
loadTable: true, loadTable: true,
refresh: id === undefined ? '' : 'create' refresh: id === undefined ? '' : 'create'
}) })
console.log(this.state.listData) // console.log(this.state.listData)
} else { } else {
} }
...@@ -176,6 +177,7 @@ export default class DocumentManagement extends Component { ...@@ -176,6 +177,7 @@ export default class DocumentManagement extends Component {
render() { render() {
return ( return (
<div style={{ height: this.props.height, backgroundColor: '#f8f8f8' }}> <div style={{ height: this.props.height, backgroundColor: '#f8f8f8' }}>
{/* {this.props.load && ()} */}
<Snackbar open={this.state.alert} autoHideDuration={6000} onClose={() => this.closeAlert()}> <Snackbar open={this.state.alert} autoHideDuration={6000} onClose={() => this.closeAlert()}>
<Alert onClose={() => this.closeAlert()} severity={this.state.tipeAlert}> <Alert onClose={() => this.closeAlert()} severity={this.state.tipeAlert}>
{this.state.messageAlert} {this.state.messageAlert}
...@@ -214,56 +216,64 @@ export default class DocumentManagement extends Component { ...@@ -214,56 +216,64 @@ export default class DocumentManagement extends Component {
{this.state.listData.map((item, index) => { {this.state.listData.map((item, index) => {
return ( return (
<Tab <Tab
onClick={() => this.setState({ id: item.setting_id })} onClick={() => this.setState({ id: item.setting_id, refresh: '' })}
label={item.value} label={item.value}
/> />
) )
})} })}
</Tabs> </Tabs>
{this.state.loadTable && ( {this.state.loadTable && (
this.state.id === 68542 ? <AllDocument
<AuditTahunan
data={this.state.listData[this.state.tab]}
refresh={this.state.refresh}
btnedit={this.state.btnedit}
btndelete={this.state.btndelete}
load={this.state.load}
/>
:
this.state.id === 68541 ?
<ManualBookTia
data={this.state.listData[this.state.tab]}
refresh={this.state.refresh}
btnedit={this.state.btnedit}
btndelete={this.state.btndelete}
load={this.state.load}
/>
:
this.state.id === 68544 ?
<QReview
data={this.state.listData[this.state.tab]}
refresh={this.state.refresh}
btnedit={this.state.btnedit}
btndelete={this.state.btndelete}
load={this.state.load}
/>
:
this.state.id === 68543 ?
<BOD
data={this.state.listData[this.state.tab]} data={this.state.listData[this.state.tab]}
refresh={this.state.refresh} refresh={this.state.refresh}
btnedit={this.state.btnedit} btnedit={this.state.btnedit}
btndelete={this.state.btndelete} btndelete={this.state.btndelete}
load={this.state.load} load={this.state.load}
setId={this.state.id}
/> />
// this.state.id === 68542 ?
// <AuditTahunan
// data={this.state.listData[this.state.tab]}
// refresh={this.state.refresh}
// btnedit={this.state.btnedit}
// btndelete={this.state.btndelete}
// load={this.state.load}
// />
// :
// this.state.id === 68541 ?
// <ManualBookTia
// data={this.state.listData[this.state.tab]}
// refresh={this.state.refresh}
// btnedit={this.state.btnedit}
// btndelete={this.state.btndelete}
// load={this.state.load}
// />
// :
// this.state.id === 68544 ?
// <QReview
// data={this.state.listData[this.state.tab]}
// refresh={this.state.refresh}
// btnedit={this.state.btnedit}
// btndelete={this.state.btndelete}
// load={this.state.load}
// />
// : // :
// this.state.id === 68545 ? // this.state.id === 68543 ?
// <ManualBookETMS // <BOD
// data={this.state.listData[this.state.tab]} // data={this.state.listData[this.state.tab]}
// refresh={this.state.refresh} // refresh={this.state.refresh}
// btnedit={this.state.btnedit}
// btndelete={this.state.btndelete}
// load={this.state.load}
// /> // />
: // // :
<span>Coming Soon</span> // // this.state.id === 68545 ?
// // <ManualBookETMS
// // data={this.state.listData[this.state.tab]}
// // refresh={this.state.refresh}
// // />
// :
// <span>Coming Soon</span>
)} )}
</div> </div>
......
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