Commit 71f98ddc authored by Dida Adams Arizona's avatar Dida Adams Arizona

Merge branch 'didam' into 'master'

apdet banyak

See merge request !852
parents 4ab8d715 1c549820
...@@ -427,7 +427,7 @@ export default class CashFlowMR extends Component { ...@@ -427,7 +427,7 @@ export default class CashFlowMR extends Component {
<div style={{ display: 'flex', justifyContent: 'space-between' }}> <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' }}>Period : {this.props.month.month_value} {this.props.periode} (rev.{this.props.revision})</Typography> <Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>Period : {String(this.props.month.month_value).toLocaleUpperCase()} {this.props.periode} (rev.{this.props.revision})</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={{ width: '50%' }}>
......
...@@ -81,8 +81,10 @@ export default class CorporateAnnualTargetMR extends Component { ...@@ -81,8 +81,10 @@ export default class CorporateAnnualTargetMR extends Component {
handleGetFor(type) { handleGetFor(type) {
this.setState({get_for: type}, () => { this.setState({get_for: type}, () => {
this.getLatestUpdate()
this.getItemHierarki() this.getItemHierarki()
this.getLatestUpdate()
this.getKPIType()
this.getMaxAch()
}) })
} }
...@@ -128,7 +130,8 @@ export default class CorporateAnnualTargetMR extends Component { ...@@ -128,7 +130,8 @@ export default class CorporateAnnualTargetMR extends Component {
"periode": "2021", "periode": "2021",
"company_id": this.props.company.company_id, "company_id": this.props.company.company_id,
"monthly_report_id": this.props.monthlyReportId, "monthly_report_id": this.props.monthlyReportId,
"months": this.props.month.month_id "months": this.props.month.month_id,
"get_for": this.state.get_for
} }
api.create().getHierarkiMontlyReportCAT(payload).then(response => { api.create().getHierarkiMontlyReportCAT(payload).then(response => {
...@@ -937,12 +940,12 @@ export default class CorporateAnnualTargetMR extends Component { ...@@ -937,12 +940,12 @@ export default class CorporateAnnualTargetMR extends Component {
control={ control={
<NumberFormat <NumberFormat
thousandSeparator={true} thousandSeparator={true}
style={{ color: "#5198ea", fontSize: 12, textAlign: 'center', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }} style={{ color: this.state.get_for == 'view'? "black" : "#5198ea", fontSize: 12, textAlign: 'center', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text" type="text"
placeholder="" placeholder=""
value={Number(value).toFixed(1)} value={Number(value).toFixed(1)}
// disabled={this.props.isApprover ? true : ((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') ? false : true)} // disabled={this.props.isApprover ? true : ((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') ? false : true)}
disabled={false} disabled={this.state.get_for == 'view'}
decimalScale={1} decimalScale={1}
onBlur={(event) => { onBlur={(event) => {
// updateValue(event.target.value) // updateValue(event.target.value)
...@@ -1130,11 +1133,11 @@ export default class CorporateAnnualTargetMR extends Component { ...@@ -1130,11 +1133,11 @@ export default class CorporateAnnualTargetMR extends Component {
<ThemeProvider theme={theme}> <ThemeProvider theme={theme}>
<Input <Input
disableUnderline={true} disableUnderline={true}
style={{ color: "#5198ea", fontSize: 12, textAlign: 'left', borderColor: 'transparent', margin: 0, width: 75, backgroundColor: 'transparent' }} style={{ color: this.state.get_for == 'view'? "black" : "#5198ea", fontSize: 12, textAlign: 'left', borderColor: 'transparent', margin: 0, width: 75, backgroundColor: 'transparent' }}
type="text" type="text"
placeholder="" placeholder=""
defaultValue={value} defaultValue={value}
disabled={this.props.isApprover ? true : ((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') ? false : true)} disabled={this.state.get_for == 'view'? true : this.props.isApprover ? true : ((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') ? false : true)}
onBlur={(event) => { onBlur={(event) => {
// updateValue(event.target.value) // updateValue(event.target.value)
handleChange(event.target.value, tableMeta) handleChange(event.target.value, tableMeta)
...@@ -1189,7 +1192,7 @@ export default class CorporateAnnualTargetMR extends Component { ...@@ -1189,7 +1192,7 @@ export default class CorporateAnnualTargetMR extends Component {
</div> </div>
<div style={{ width: '50%' }}> <div style={{ width: '50%' }}>
<div style={{ justifyContent: 'flex-end', display: 'flex', flexFlow: 'wrap' }}> <div style={{ justifyContent: 'flex-end', display: 'flex', flexFlow: 'wrap' }}>
<a data-tip={'Download Template'} data-for="template"> {this.state.get_for == 'edit' && <a data-tip={'Download Template'} data-for="template">
<button <button
style={{ style={{
backgroundColor: 'transparent', backgroundColor: 'transparent',
...@@ -1201,9 +1204,9 @@ export default class CorporateAnnualTargetMR extends Component { ...@@ -1201,9 +1204,9 @@ export default class CorporateAnnualTargetMR extends Component {
> >
<img src={Images.template} /> <img src={Images.template} />
</button> </button>
</a> </a>}
<ReactTooltip border={true} id="template" place="bottom" type="light" effect="solid" /> <ReactTooltip border={true} id="template" place="bottom" type="light" effect="solid" />
<a data-tip={'Upload'} data-for="upload"> {this.state.get_for == 'edit' && <a data-tip={'Upload'} data-for="upload">
<button <button
style={{ style={{
backgroundColor: 'transparent', backgroundColor: 'transparent',
...@@ -1215,7 +1218,7 @@ export default class CorporateAnnualTargetMR extends Component { ...@@ -1215,7 +1218,7 @@ export default class CorporateAnnualTargetMR extends Component {
> >
<img src={Images.upload} /> <img src={Images.upload} />
</button> </button>
</a> </a>}
<ReactTooltip border={true} id="upload" place="bottom" type="light" effect="solid" /> <ReactTooltip border={true} id="upload" place="bottom" type="light" effect="solid" />
<a data-tip={'Download'} data-for="download"> <a data-tip={'Download'} data-for="download">
<button <button
......
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