Commit f9f73fb2 authored by Rifka Kurnia Irfiana's avatar Rifka Kurnia Irfiana

update managdoc qreview

parent b6e614f1
...@@ -231,24 +231,24 @@ export default class VisualisasiAM extends Component { ...@@ -231,24 +231,24 @@ export default class VisualisasiAM extends Component {
</ReactDragListView> </ReactDragListView>
</div> </div>
</div> </div>
<div className="row" style={{ display: 'flex', flexDirection: 'row', justifyContent: 'space-between', paddingRight: 15, paddingLeft: 15, paddingBottom: 25 }}> <div className="row" style={{ float: 'right', display: 'flex', flexDirection: 'row', justifyContent: 'space-between', paddingRight: 15, paddingLeft: 15, paddingBottom: 25 }}>
<div onClick={() => this.props.onClickClose()} style={{ width: 102, height: 30, marginLeft: 25, backgroundColor: 'dodgerblue', borderRadius: 5, alignItems: 'center', display: 'flex', justifyContent: 'center', cursor:"pointer" }}> {/* <div onClick={() => this.props.onClickClose()} style={{ width: 102, height: 30, marginLeft: 25, backgroundColor: 'dodgerblue', borderRadius: 5, alignItems: 'center', display: 'flex', justifyContent: 'center', cursor:"pointer" }}>
<span style={{ color: '#fff', fontSize: 11 }}>Back</span> <span style={{ color: '#fff', fontSize: 11 }}>Back</span>
</div> </div> */}
{this.props.btnedit && (
<div className="row" style={{ float: 'right', marginRight: 25 }}> <div className="row" style={{ float: 'right', marginRight: 25 }}>
<div onClick={() => this.props.onClickClose()} style={{ width: 102, height: 30, border: 'solid 1px #354960', borderRadius: 5, alignItems: 'center', display: 'flex', justifyContent: 'center', cursor:"pointer" }}> <div onClick={() => this.props.onClickClose()} style={{ width: 102, height: 30, border: 'solid 1px #354960', borderRadius: 5, alignItems: 'center', display: 'flex', justifyContent: 'center', cursor:"pointer" }}>
<span style={{ color: '#354960', fontSize: 11 }} >Cancel</span> <span style={{ color: '#354960', fontSize: 11 }} >Cancel</span>
</div> </div>
{this.props.btnedit && (
<div onClick={() => this.handleSave()} style={{ width: 102, height: 30, marginLeft: 25, backgroundColor: '#354960', borderRadius: 5, alignItems: 'center', display: 'flex', justifyContent: 'center', cursor:"pointer" }}> <div onClick={() => this.handleSave()} style={{ width: 102, height: 30, marginLeft: 25, backgroundColor: '#354960', borderRadius: 5, alignItems: 'center', display: 'flex', justifyContent: 'center', cursor:"pointer" }}>
<span style={{ color: '#fff', fontSize: 11 }}>Save</span> <span style={{ color: '#fff', fontSize: 11 }}>Save</span>
</div> </div>
</div>
)} )}
</div> </div>
</div> </div>
</div> </div>
</div> </div>
</div>
); );
} }
......
...@@ -678,7 +678,7 @@ export default class BudgetTahunan extends Component { ...@@ -678,7 +678,7 @@ export default class BudgetTahunan extends Component {
revision={this.state.revisionTable} revision={this.state.revisionTable}
periode={this.state.periode.periode} periode={this.state.periode.periode}
submissionID={this.state.submissionID} submissionID={this.state.submissionID}
getDataBalanceSheet={this.getDataBalanceSheet.bind(this)} saveToMasterBudget={this.saveToMasterBudget.bind(this)}
onClickClose={() => this.setState({ visibleTP: false, visibleBudgetTahunan: true })} onClickClose={() => this.setState({ visibleTP: false, visibleBudgetTahunan: true })}
/> />
)} )}
......
...@@ -6,6 +6,8 @@ import api from '../../api'; ...@@ -6,6 +6,8 @@ import api from '../../api';
import AddIcon from '@material-ui/icons/Add'; import AddIcon from '@material-ui/icons/Add';
import { values } from 'ramda'; import { values } from 'ramda';
import PropagateLoader from "react-spinners/PropagateLoader" import PropagateLoader from "react-spinners/PropagateLoader"
import Images from '../../assets/Images';
import ReactTooltip from 'react-tooltip';
var ct = require("../../library/CustomTable"); var ct = require("../../library/CustomTable");
const getMuiTheme = () => createMuiTheme(ct.customTable3()); const getMuiTheme = () => createMuiTheme(ct.customTable3());
...@@ -23,7 +25,7 @@ const style2 = { ...@@ -23,7 +25,7 @@ const style2 = {
zIndex: 100 zIndex: 100
}; };
export default class BalanceSheet extends Component { export default class TaxPlanning extends Component {
constructor(props) { constructor(props) {
super(props) super(props)
this.state = { this.state = {
...@@ -56,11 +58,6 @@ export default class BalanceSheet extends Component { ...@@ -56,11 +58,6 @@ export default class BalanceSheet extends Component {
"periode": this.props.periode, "periode": this.props.periode,
"company_id": this.props.company.company_id, "company_id": this.props.company.company_id,
"submission_id": this.props.submissionID "submission_id": this.props.submissionID
// "report_id": 1,
// "revision": 0,
// "periode": "2020",
// "company_id": 85098,
// "submission_id": 144414
} }
api.create().getDetailReportMB(payload).then(response => { api.create().getDetailReportMB(payload).then(response => {
console.log(response); console.log(response);
...@@ -686,7 +683,6 @@ export default class BalanceSheet extends Component { ...@@ -686,7 +683,6 @@ export default class BalanceSheet extends Component {
}) })
} }
// buat perhitungan data per kolom
handleValue(data) { handleValue(data) {
let total = 0 let total = 0
this.state.dataTable.map((item, index) => { this.state.dataTable.map((item, index) => {
...@@ -700,7 +696,6 @@ export default class BalanceSheet extends Component { ...@@ -700,7 +696,6 @@ export default class BalanceSheet extends Component {
return a return a
} }
// buat input
handleChange(value, tableMeta) { handleChange(value, tableMeta) {
let val = String(value).split(",").join("") let val = String(value).split(",").join("")
let data = this.state.dataTable let data = this.state.dataTable
...@@ -753,7 +748,7 @@ export default class BalanceSheet extends Component { ...@@ -753,7 +748,7 @@ export default class BalanceSheet extends Component {
"balance_sheet": data "balance_sheet": data
} }
// console.log(data); // console.log(data);
this.props.getDataBalanceSheet(payload) this.props.saveToMasterBudget(payload)
this.props.onClickClose() this.props.onClickClose()
} }
...@@ -2009,11 +2004,59 @@ export default class BalanceSheet extends Component { ...@@ -2009,11 +2004,59 @@ export default class BalanceSheet extends Component {
<Typography style={{ fontSize: '12px', color: '#4b4b4b', margin: 10 }}>Budget Tahunan - Tax Planning</Typography> <Typography style={{ fontSize: '12px', color: '#4b4b4b', margin: 10 }}>Budget Tahunan - Tax Planning</Typography>
</div> </div>
<div style={{ padding: 20 }}> <div style={{ padding: 20 }}>
<div style={{ display: 'flex', justifyContent: 'space-between'}}>
<div> <div>
<Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>{this.props.company.company_name}</Typography> <Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>{this.props.company.company_name}</Typography>
<Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>Periode : {this.props.periode}</Typography> <Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>Periode : {this.props.periode}</Typography>
<Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>in IDR mn</Typography> <Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>in IDR mn</Typography>
</div> </div>
<div style={{ width: '50%'}}>
<div style={{justifyContent: 'flex-end', display: 'flex', flexFlow: 'wrap' }}>
<a data-tip={'Download Template'} data-for="template">
<button
style={{
backgroundColor: 'transparent',
cursor: 'pointer',
borderColor: 'transparent',
margin: 5
}}
onClick={() => null}
>
<img src={Images.template} />
</button>
</a>
<ReactTooltip border={true} id="template" place="bottom" type="light" effect="solid" />
<a data-tip={'Upload'} data-for="upload">
<button
style={{
backgroundColor: 'transparent',
cursor: 'pointer',
borderColor: 'transparent',
margin: 5
}}
onClick={() => null}
>
<img src={Images.upload} />
</button>
</a>
<ReactTooltip border={true} id="upload" place="bottom" type="light" effect="solid" />
<a data-tip={'Download'} data-for="download">
<button
style={{
backgroundColor: 'transparent',
cursor: 'pointer',
borderColor: 'transparent',
margin: 5
}}
onClick={() => null}
>
<img src={Images.download} />
</button>
</a>
<ReactTooltip border={true} id="download" place="bottom" type="light" effect="solid" />
</div>
</div>
</div>
<div style={{ marginTop: 20, width: this.props.width - (this.props.open === true ? 400 : 150), height: this.props.height - 400 }}> <div style={{ marginTop: 20, width: this.props.width - (this.props.open === true ? 400 : 150), height: this.props.height - 400 }}>
<MuiThemeProvider theme={getMuiTheme()}> <MuiThemeProvider theme={getMuiTheme()}>
...@@ -2029,7 +2072,7 @@ export default class BalanceSheet extends Component { ...@@ -2029,7 +2072,7 @@ export default class BalanceSheet extends Component {
<div className="col-1"> <div className="col-1">
<button <button
type="button" type="button"
// onClick={() => this.backToMasterBudget('draft')} onClick={() => this.backToMasterBudget('draft')}
style={{ style={{
backgroundColor: 'transparent', backgroundColor: 'transparent',
cursor: 'pointer', cursor: 'pointer',
...@@ -2062,7 +2105,7 @@ export default class BalanceSheet extends Component { ...@@ -2062,7 +2105,7 @@ export default class BalanceSheet extends Component {
</button> </button>
<button <button
type="button" type="button"
onClick={() => this.backToMasterBudget('submitted')} // onClick={() => this.backToMasterBudget('submitted')}
style={{ style={{
backgroundColor: 'transparent', backgroundColor: 'transparent',
cursor: 'pointer', cursor: 'pointer',
......
...@@ -106,7 +106,7 @@ export default class DocumentManagement extends Component { ...@@ -106,7 +106,7 @@ export default class DocumentManagement extends Component {
this.state.id === 68541 ? this.state.id === 68541 ?
<ManualBookTia /> <ManualBookTia />
: :
this.state.id === 3 ? this.state.id === 68544 ?
<QReview <QReview
data={this.state.listData[this.state.tab]} data={this.state.listData[this.state.tab]}
/> />
......
...@@ -14,23 +14,35 @@ export default class AuditTahunan extends Component { ...@@ -14,23 +14,35 @@ export default class AuditTahunan extends Component {
super(props) super(props)
this.state = { this.state = {
dataTable: [], dataTable: [],
visibleCreate: false visibleCreate: false,
refresh: ''
} }
} }
componentDidMount() { componentDidMount() {
console.log(this.props.data) // console.log(this.props.data)
this.getData() this.getData()
} }
componentWillReceiveProps(props) {
// console.log(props);
const { refresh, id } = this.props;
if (props.refresh !== refresh) {
this.getData()
}
}
getData() { getData() {
let payload = { let payload = {
"company_id": 1, "setting_id": this.props.data.setting_id
"document_category_id": 3
} }
api.create().getAllDocument(payload).then(respone => { api.create().getAllDocument(payload).then(response => {
let dataTable = respone.data.data.map(item => { console.log(response)
if(response.problem){
alert(response.problem)
} else {
let dataTable = response.data.data.map(item => {
return [ return [
item.document_name, item.document_name,
item.description, item.description,
...@@ -43,6 +55,7 @@ export default class AuditTahunan extends Component { ...@@ -43,6 +55,7 @@ export default class AuditTahunan extends Component {
] ]
}) })
this.setState({ dataTable }) this.setState({ dataTable })
}
}) })
} }
......
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