Commit 94ee6781 authored by r.kurnia's avatar r.kurnia

usapprover tp

parent cd9c7f4c
......@@ -1159,6 +1159,7 @@ export default class MonthlyReport extends Component {
onClickClose={() => this.setState({ visibleTP: false, visibleMonthlyReport: true })}
btnCreate={this.state.btnCreate}
loadview={this.state.loadview}
isApprover={this.state.isApprover}
// getReport={this.getCompanyActive.bind(this)}
/>
)}
......
......@@ -62,6 +62,7 @@ export default class TaxPlanningMR extends Component {
this.getSettingControl()
// this.getItemHierarki()
this.getLatestUpdate()
console.log(this.props.isApprover)
}
getSettingControl() {
......@@ -245,8 +246,8 @@ export default class TaxPlanningMR extends Component {
}
api.create('UPLOAD').createMonthlyReportTP(payload).then(response => {
// console.log(payload);
// console.log(response);
console.log(payload);
console.log(response);
if (response.data) {
if (response.data.status === "success") {
this.props.saveToMonthlyReport()
......@@ -903,10 +904,10 @@ export default class TaxPlanningMR extends Component {
<NumberFormat
thousandSeparator={true}
decimalSeparator={"."}
style={{ color: "#5198ea", fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
style={{ color: this.props.isApprover ? 'black' : "#5198ea", fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
placeholder="input"
disabled={true}
disabled={this.props.isApprover}
value={Number(value.tbc).toFixed(1)}
onBlur={(event) => {
handleChange(event.target.value, tableMeta, 0)
......@@ -1428,8 +1429,8 @@ export default class TaxPlanningMR extends Component {
<Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>in IDR mn</Typography>
</div>
<div style={{ width: '50%' }}>
{/* {this.state.dataTable.length == 0 ? null : this.props.isApprover == true ? */}
{/* <div style={{ justifyContent: 'flex-end', display: 'flex', flexFlow: 'wrap' }}>
{this.props.isApprover === true ?
<div style={{ justifyContent: 'flex-end', display: 'flex', flexFlow: 'wrap' }}>
<a data-tip={'Download'} data-for="download">
<button
style={{
......@@ -1438,24 +1439,19 @@ export default class TaxPlanningMR extends Component {
borderColor: 'transparent',
margin: 5
}}
onClick={() => null
// this.setState({ loading: true }, () => {
// setTimeout(() => {
// this.downloadAllData()
// }, 100);
// })
}
onClick={() =>
this.setState({ loading: true }, () => {
setTimeout(() => {
this.downloadAllData()
}, 100);
})}
>
<img src={Images.download} />
</button>
</a>
<ReactTooltip border={true} id="download" place="bottom" type="light" effect="solid" />
</div>
: */}
</div> :
<div style={{ justifyContent: 'flex-end', display: 'flex', flexFlow: 'wrap' }}>
{/* {((this.props.lastStatus === 'SUBMIT' || this.props.lastStatus === 'REVISION') && this.props.prevRevision === false && (this.props.status === 'revision' || this.props.status === 'not-yet' || this.props.status === 'draft' || this.props.status === 'submitted')) && ( */}
{this.props.btncreate === true &&
<div>
<a data-tip={'Download Template'} data-for="template">
<button
style={{
......@@ -1470,12 +1466,6 @@ export default class TaxPlanningMR extends Component {
</button>
</a>
<ReactTooltip border={true} id="template" place="bottom" type="light" effect="solid" />
</div>
}
{/* )} */}
{/* {((this.props.lastStatus === 'SUBMIT' || this.props.lastStatus === 'REVISION') && this.props.prevRevision === false && (this.props.status === 'revision' || this.props.status === 'not-yet' || this.props.status === 'draft' || this.props.status === 'submitted')) && ( */}
{this.props.btncreate === true &&
<div>
<a data-tip={'Upload'} data-for="upload">
<button
style={{
......@@ -1484,19 +1474,12 @@ export default class TaxPlanningMR extends Component {
borderColor: 'transparent',
margin: 5
}}
onClick={() =>
this.setState({ visibleUpload: true })
}
onClick={() => this.setState({ visibleUpload: true })}
>
<img src={Images.upload} />
</button>
</a>
<ReactTooltip border={true} id="upload" place="bottom" type="light" effect="solid" />
</div>
}
{/* )} */}
{(this.props.loadview === true || this.props.btncreate === true) && (
<div>
<a data-tip={'Download'} data-for="download">
<button
style={{
......@@ -1510,17 +1493,14 @@ export default class TaxPlanningMR extends Component {
setTimeout(() => {
this.downloadAllData()
}, 100);
})
}
})}
>
<img src={Images.download} />
</button>
</a>
<ReactTooltip border={true} id="download" place="bottom" type="light" effect="solid" />
</div>
)}
</div>
{/* } */}
}
</div>
</div>
......@@ -1560,7 +1540,9 @@ export default class TaxPlanningMR extends Component {
</div>
{/* {this.props.isApprover === true || this.state.dataTable.length == 0 ? null :
(this.props.lastStatus === 'SUBMIT' || this.props.lastStatus === 'REVISION') && this.props.prevRevision === false && (this.props.status === 'revision' || this.props.status === 'not-yet' || this.props.status === 'draft' || this.props.status === 'submitted') ? */}
{this.props.btncreate === true &&
{this.props.isApprover === true ?
<div className="col-2">
</div> :
<div className="col-2" style={{ display: 'flex', justifyContent: 'flex-end', maxWidth: '100%' }}>
<button
className="button"
......@@ -1639,7 +1621,6 @@ export default class TaxPlanningMR extends Component {
</button>
</div>
}
{/* : null } */}
</div>
</Paper>
:
......
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