Commit add4069e authored by Riri Novita's avatar Riri Novita

issue permission

parent 310e25f6
...@@ -1124,6 +1124,7 @@ export default class MonthlyReport extends Component { ...@@ -1124,6 +1124,7 @@ export default class MonthlyReport extends Component {
month={this.state.month} month={this.state.month}
saveToMonthlyReport={this.saveToMonthlyReport.bind(this)} saveToMonthlyReport={this.saveToMonthlyReport.bind(this)}
onClickClose={() => this.setState({ visiblePL: false, visibleMonthlyReport: true })} onClickClose={() => this.setState({ visiblePL: false, visibleMonthlyReport: true })}
isApprover={this.state.isApprover}
// getReport={this.getCompanyActive.bind(this)} // getReport={this.getCompanyActive.bind(this)}
/> />
......
...@@ -912,10 +912,10 @@ export default class ProfitLossMR extends Component { ...@@ -912,10 +912,10 @@ export default class ProfitLossMR extends Component {
control={ control={
<NumberFormat <NumberFormat
thousandSeparator={true} thousandSeparator={true}
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" type="text"
placeholder="" placeholder=""
disabled={false} disabled={this.props.isApprover}
value={Number(tableMeta.rowData[10]).toFixed(1)} value={Number(tableMeta.rowData[10]).toFixed(1)}
onBlur={(event) => { onBlur={(event) => {
handleChange(event.target.value, tableMeta) handleChange(event.target.value, tableMeta)
...@@ -1686,55 +1686,78 @@ export default class ProfitLossMR extends Component { ...@@ -1686,55 +1686,78 @@ export default class ProfitLossMR extends Component {
<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={{ width: '50%' }}>
<div style={{ justifyContent: 'flex-end', display: 'flex', flexFlow: 'wrap' }}> {this.props.isApprover === true ?
<a data-tip={'Download Template'} data-for="template"> <div style={{ justifyContent: 'flex-end', display: 'flex', flexFlow: 'wrap' }}>
<button <a data-tip={'Download'} data-for="download">
style={{ <button
backgroundColor: 'transparent', style={{
cursor: 'pointer', backgroundColor: 'transparent',
borderColor: 'transparent', cursor: 'pointer',
margin: 5 borderColor: 'transparent',
}} margin: 5
onClick={() => this.downloadTemplate()} }}
> onClick={() =>
<img src={Images.template} /> this.setState({ loading: true }, () => {
</button> setTimeout(() => {
</a> this.downloadAllData()
<ReactTooltip border={true} id="template" place="bottom" type="light" effect="solid" /> }, 100);
<a data-tip={'Upload'} data-for="upload"> })}
<button >
style={{ <img src={Images.download} />
backgroundColor: 'transparent', </button>
cursor: 'pointer', </a>
borderColor: 'transparent', <ReactTooltip border={true} id="download" place="bottom" type="light" effect="solid" />
margin: 5 </div> :
}} <div style={{ justifyContent: 'flex-end', display: 'flex', flexFlow: 'wrap' }}>
onClick={() => this.setState({ visibleUpload: true })} <a data-tip={'Download Template'} data-for="template">
> <button
<img src={Images.upload} /> style={{
</button> backgroundColor: 'transparent',
</a> cursor: 'pointer',
<ReactTooltip border={true} id="upload" place="bottom" type="light" effect="solid" /> borderColor: 'transparent',
<a data-tip={'Download'} data-for="download"> margin: 5
<button }}
style={{ onClick={() => this.downloadTemplate()}
backgroundColor: 'transparent', >
cursor: 'pointer', <img src={Images.template} />
borderColor: 'transparent', </button>
margin: 5 </a>
}} <ReactTooltip border={true} id="template" place="bottom" type="light" effect="solid" />
onClick={() => <a data-tip={'Upload'} data-for="upload">
this.setState({ loading: true }, () => { <button
setTimeout(() => { style={{
this.downloadAllData() backgroundColor: 'transparent',
}, 100); cursor: 'pointer',
})} borderColor: 'transparent',
> margin: 5
<img src={Images.download} /> }}
</button> onClick={() => this.setState({ visibleUpload: true })}
</a> >
<ReactTooltip border={true} id="download" place="bottom" type="light" effect="solid" /> <img src={Images.upload} />
</div> </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={() =>
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>
</div> </div>
...@@ -1749,30 +1772,35 @@ export default class ProfitLossMR extends Component { ...@@ -1749,30 +1772,35 @@ export default class ProfitLossMR extends Component {
</MuiThemeProvider> </MuiThemeProvider>
)} )}
</div> </div>
<Typography style={{ fontSize: '11px', color: '#4b4b4b', marginTop: 20 }}>Last Updated by : {this.state.updateBy}</Typography> <Typography style={{ fontSize: '11px', color: '#4b4b4b', marginTop: 20 }}>Last Updated by : {this.state.updateBy}</Typography>
{/* {this.props.isApprover === true || this.state.dataTable.length == 0 ? null : </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.isApprover === true || this.state.dataTable.length == 0 ? null :
<div className="grid grid-2x" style={{ marginTop: 20 }}> (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') ? */}
<div className="col-1"> <div className="grid grid-2x" style={{ padding: 20 }}>
<button <div className="col-1">
type="button" <button
onClick={() => this.setState({ loading: true }, () => { type="button"
setTimeout(() => { onClick={() => this.setState({ loading: true }, () => {
this.props.onClickClose() setTimeout(() => {
}, 100); this.props.onClickClose()
})} }, 100);
style={{ })}
backgroundColor: 'transparent', style={{
cursor: 'pointer', backgroundColor: 'transparent',
borderColor: 'transparent', cursor: 'pointer',
outline: 'none' borderColor: 'transparent',
}} outline: 'none'
> }}
<div style={{ backgroundColor: '#019ce5', width: 105, height: 25, borderRadius: 3, justifyContent: 'center', display: 'flex', alignItems: 'center' }}> >
<Typography style={{ fontSize: '11px', color: '#fff', textAlign: 'center' }}>Back</Typography> <div style={{ backgroundColor: '#019ce5', width: 105, height: 25, borderRadius: 3, justifyContent: 'center', display: 'flex', alignItems: 'center' }}>
</div> <Typography style={{ fontSize: '11px', color: '#fff', textAlign: 'center' }}>Back</Typography>
</button> </div>
</div> </button>
</div>
{this.props.isApprover === true ?
<div className="col-2">
</div> :
<div className="col-2" style={{ display: 'flex', justifyContent: 'flex-end', maxWidth: '100%' }}> <div className="col-2" style={{ display: 'flex', justifyContent: 'flex-end', maxWidth: '100%' }}>
<button <button
className="button" className="button"
...@@ -1843,10 +1871,10 @@ export default class ProfitLossMR extends Component { ...@@ -1843,10 +1871,10 @@ export default class ProfitLossMR extends Component {
</div> </div>
</button> </button>
</div> </div>
</div> }
</div>
{/* : null {/* : null
} */} } */}
</div>
</Paper> </Paper>
: :
<Paper style={{ paddingTop: 10 }}> <Paper style={{ paddingTop: 10 }}>
......
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