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

update managdoc qreview

parent b6e614f1
......@@ -231,20 +231,20 @@ export default class VisualisasiAM extends Component {
</ReactDragListView>
</div>
</div>
<div className="row" style={{ 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 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" }}>
<span style={{ color: '#fff', fontSize: 11 }}>Back</span>
</div>
{this.props.btnedit && (
</div> */}
<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" }}>
<span style={{ color: '#354960', fontSize: 11 }} >Cancel</span>
</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" }}>
<span style={{ color: '#fff', fontSize: 11 }}>Save</span>
</div>
)}
</div>
)}
</div>
</div>
</div>
......
......@@ -678,7 +678,7 @@ export default class BudgetTahunan extends Component {
revision={this.state.revisionTable}
periode={this.state.periode.periode}
submissionID={this.state.submissionID}
getDataBalanceSheet={this.getDataBalanceSheet.bind(this)}
saveToMasterBudget={this.saveToMasterBudget.bind(this)}
onClickClose={() => this.setState({ visibleTP: false, visibleBudgetTahunan: true })}
/>
)}
......
......@@ -6,6 +6,8 @@ import api from '../../api';
import AddIcon from '@material-ui/icons/Add';
import { values } from 'ramda';
import PropagateLoader from "react-spinners/PropagateLoader"
import Images from '../../assets/Images';
import ReactTooltip from 'react-tooltip';
var ct = require("../../library/CustomTable");
const getMuiTheme = () => createMuiTheme(ct.customTable3());
......@@ -23,7 +25,7 @@ const style2 = {
zIndex: 100
};
export default class BalanceSheet extends Component {
export default class TaxPlanning extends Component {
constructor(props) {
super(props)
this.state = {
......@@ -56,11 +58,6 @@ export default class BalanceSheet extends Component {
"periode": this.props.periode,
"company_id": this.props.company.company_id,
"submission_id": this.props.submissionID
// "report_id": 1,
// "revision": 0,
// "periode": "2020",
// "company_id": 85098,
// "submission_id": 144414
}
api.create().getDetailReportMB(payload).then(response => {
console.log(response);
......@@ -686,7 +683,6 @@ export default class BalanceSheet extends Component {
})
}
// buat perhitungan data per kolom
handleValue(data) {
let total = 0
this.state.dataTable.map((item, index) => {
......@@ -700,7 +696,6 @@ export default class BalanceSheet extends Component {
return a
}
// buat input
handleChange(value, tableMeta) {
let val = String(value).split(",").join("")
let data = this.state.dataTable
......@@ -753,7 +748,7 @@ export default class BalanceSheet extends Component {
"balance_sheet": data
}
// console.log(data);
this.props.getDataBalanceSheet(payload)
this.props.saveToMasterBudget(payload)
this.props.onClickClose()
}
......@@ -2009,10 +2004,58 @@ export default class BalanceSheet extends Component {
<Typography style={{ fontSize: '12px', color: '#4b4b4b', margin: 10 }}>Budget Tahunan - Tax Planning</Typography>
</div>
<div style={{ padding: 20 }}>
<div>
<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' }}>in IDR mn</Typography>
<div style={{ display: 'flex', justifyContent: 'space-between'}}>
<div>
<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' }}>in IDR mn</Typography>
</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 }}>
......@@ -2029,7 +2072,7 @@ export default class BalanceSheet extends Component {
<div className="col-1">
<button
type="button"
// onClick={() => this.backToMasterBudget('draft')}
onClick={() => this.backToMasterBudget('draft')}
style={{
backgroundColor: 'transparent',
cursor: 'pointer',
......@@ -2062,7 +2105,7 @@ export default class BalanceSheet extends Component {
</button>
<button
type="button"
onClick={() => this.backToMasterBudget('submitted')}
// onClick={() => this.backToMasterBudget('submitted')}
style={{
backgroundColor: 'transparent',
cursor: 'pointer',
......
......@@ -106,7 +106,7 @@ export default class DocumentManagement extends Component {
this.state.id === 68541 ?
<ManualBookTia />
:
this.state.id === 3 ?
this.state.id === 68544 ?
<QReview
data={this.state.listData[this.state.tab]}
/>
......
......@@ -14,35 +14,48 @@ export default class AuditTahunan extends Component {
super(props)
this.state = {
dataTable: [],
visibleCreate: false
visibleCreate: false,
refresh: ''
}
}
componentDidMount() {
console.log(this.props.data)
// console.log(this.props.data)
this.getData()
}
componentWillReceiveProps(props) {
// console.log(props);
const { refresh, id } = this.props;
if (props.refresh !== refresh) {
this.getData()
}
}
getData() {
let payload = {
"company_id": 1,
"document_category_id": 3
"setting_id": this.props.data.setting_id
}
api.create().getAllDocument(payload).then(respone => {
let dataTable = respone.data.data.map(item => {
return [
item.document_name,
item.description,
item.company_name,
"",
item.document_type,
String(Number(item.document_size) / 1000 + ' MB'),
item.created_by,
item.created_at,
]
})
this.setState({ dataTable })
api.create().getAllDocument(payload).then(response => {
console.log(response)
if(response.problem){
alert(response.problem)
} else {
let dataTable = response.data.data.map(item => {
return [
item.document_name,
item.description,
item.company_name,
"",
item.document_type,
String(Number(item.document_size) / 1000 + ' MB'),
item.created_by,
item.created_at,
]
})
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