Commit 5713e936 authored by Riri Novita's avatar Riri Novita

ro

parent fe22144d
......@@ -241,7 +241,7 @@ const create = (type = "") => {
const getLastestUpdateMROI = (body) => api.post('transaction/operating_indicator/monthly_report/get_latest_update', body)
// Rolling Outlook
const getRollingOutlookID = (body) => api.post('transaction/rolling_outlook/get_monthly_report_id', body)
const getRollingOutlookID = (body) => api.post('transaction/rolling_outlook/get_rolling_outlook_id', body)
const getRollingOutlookAttachment = (body) => api.post('transaction/rolling_outlook/get_report_attachment', body)
const uploadRollingOutlookAttachment = (body) => api.post('transaction/rolling_outlook/upload_attachment', body)
const deleteRollingOutlookAttachment = (body) => api.post(`transaction/rolling_outlook/delete_attachment/${body}`)
......
......@@ -508,10 +508,10 @@ export default class OperatingIndicator extends Component {
borderColor: 'transparent'
}}
onClick={() =>
tableMeta.rowData[4] ?
// tableMeta.rowData[4] ?
this.clickDetail(tableMeta.rowData, tableMeta.rowData[1], tableMeta.rowData[3], tableMeta.rowData[2])
:
null
// :
// null
}
>
<Typography style={{ color: tableMeta.rowData[4] ? '#5198ea' : 'GrayText', fontSize: 12, }}>Detail</Typography>
......
......@@ -810,47 +810,47 @@ export default class OperatingIndicatorRO extends Component {
value={Number(value).toFixed(1)}
/>
:
// tableMeta.rowData[0] == 2 ?
// <div style={{ flex: 1 }}>
// <FormControlLabel
// style={{ margin: 0 }}
// value={value}
// control={
// <NumberFormat
// thousandSeparator={true}
// style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
// type="text"
// placeholder=""
// value={Number(handleParent(tableMeta)).toFixed(1)}
// disabled={true}
// decimalScale={1}
// />
// }
// />
// </div>
// :
// (tableMeta.rowData[0] == 5 || tableMeta.rowData[0] == 6 ?
// <div style={{ flex: 1 }}>
// <FormControlLabel
// style={{ margin: 0 }}
// value={value}
// control={
// <NumberFormat
// thousandSeparator={true}
// style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
// type="text"
// placeholder=""
// value={Number(handleFormula(tableMeta)).toFixed(1)}
// disabled={true}
// decimalScale={1}
// onBlur={(event) => {
// handleChange(event.target.value, tableMeta)
// }}
// />
// }
// />
// </div>
// :
tableMeta.rowData[0] == 2 ?
<div style={{ flex: 1 }}>
<FormControlLabel
style={{ margin: 0 }}
value={value}
control={
<NumberFormat
thousandSeparator={true}
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
placeholder=""
value={ value === "0" ? "" : Number(handleParent(tableMeta)).toFixed(1)}
disabled={true}
decimalScale={1}
/>
}
/>
</div>
:
(tableMeta.rowData[0] == 5 || tableMeta.rowData[0] == 6 ?
<div style={{ flex: 1 }}>
<FormControlLabel
style={{ margin: 0 }}
value={value}
control={
<NumberFormat
thousandSeparator={true}
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
placeholder=""
value={ value === "0" ? "" : Number(handleFormula(tableMeta)).toFixed(1)}
disabled={true}
decimalScale={1}
onBlur={(event) => {
handleChange(event.target.value, tableMeta)
}}
/>
}
/>
</div>
:
<div style={{ flex: 1 }}>
<FormControlLabel
style={{ margin: 0 }}
......@@ -873,7 +873,7 @@ export default class OperatingIndicatorRO extends Component {
}
/>
</div>
// )
)
}
</div>
)
......@@ -906,47 +906,47 @@ export default class OperatingIndicatorRO extends Component {
value={Number(value).toFixed(1)}
/>
:
// tableMeta.rowData[0] == 2 ?
// <div style={{ flex: 1 }}>
// <FormControlLabel
// style={{ margin: 0 }}
// value={value}
// control={
// <NumberFormat
// thousandSeparator={true}
// style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
// type="text"
// placeholder=""
// value={Number(handleParent(tableMeta)).toFixed(1)}
// disabled={true}
// decimalScale={1}
// />
// }
// />
// </div>
// :
// (tableMeta.rowData[0] == 5 || tableMeta.rowData[0] == 6 ?
// <div style={{ flex: 1 }}>
// <FormControlLabel
// style={{ margin: 0 }}
// value={value}
// control={
// <NumberFormat
// thousandSeparator={true}
// style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
// type="text"
// placeholder=""
// value={Number(handleFormula(tableMeta)).toFixed(1)}
// disabled={true}
// decimalScale={1}
// onBlur={(event) => {
// handleChange(event.target.value, tableMeta)
// }}
// />
// }
// />
// </div>
// :
tableMeta.rowData[0] == 2 ?
<div style={{ flex: 1 }}>
<FormControlLabel
style={{ margin: 0 }}
value={value}
control={
<NumberFormat
thousandSeparator={true}
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
placeholder=""
value={ value === "0" ? "" :Number(handleParent(tableMeta)).toFixed(1)}
disabled={true}
decimalScale={1}
/>
}
/>
</div>
:
(tableMeta.rowData[0] == 5 || tableMeta.rowData[0] == 6 ?
<div style={{ flex: 1 }}>
<FormControlLabel
style={{ margin: 0 }}
value={value}
control={
<NumberFormat
thousandSeparator={true}
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
placeholder=""
value={ value === "0" ? "" : Number(handleFormula(tableMeta)).toFixed(1)}
disabled={true}
decimalScale={1}
onBlur={(event) => {
handleChange(event.target.value, tableMeta)
}}
/>
}
/>
</div>
:
<div style={{ flex: 1 }}>
<FormControlLabel
style={{ margin: 0 }}
......@@ -969,7 +969,7 @@ export default class OperatingIndicatorRO extends Component {
}
/>
</div>
// )
)
}
</div>
)
......@@ -1001,47 +1001,47 @@ export default class OperatingIndicatorRO extends Component {
value={Number(value).toFixed(1)}
/>
:
// tableMeta.rowData[0] == 2 ?
// <div style={{ flex: 1 }}>
// <FormControlLabel
// style={{ margin: 0 }}
// value={value}
// control={
// <NumberFormat
// thousandSeparator={true}
// style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
// type="text"
// placeholder=""
// value={Number(handleParent(tableMeta)).toFixed(1)}
// disabled={true}
// decimalScale={1}
// />
// }
// />
// </div>
// :
// (tableMeta.rowData[0] == 5 || tableMeta.rowData[0] == 6 ?
// <div style={{ flex: 1 }}>
// <FormControlLabel
// style={{ margin: 0 }}
// value={value}
// control={
// <NumberFormat
// thousandSeparator={true}
// style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
// type="text"
// placeholder=""
// value={Number(handleFormula(tableMeta)).toFixed(1)}
// disabled={true}
// decimalScale={1}
// onBlur={(event) => {
// handleChange(event.target.value, tableMeta)
// }}
// />
// }
// />
// </div>
// :
tableMeta.rowData[0] == 2 ?
<div style={{ flex: 1 }}>
<FormControlLabel
style={{ margin: 0 }}
value={value}
control={
<NumberFormat
thousandSeparator={true}
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
placeholder=""
value={ value === "0" ? "" : Number(handleParent(tableMeta)).toFixed(1)}
disabled={true}
decimalScale={1}
/>
}
/>
</div>
:
(tableMeta.rowData[0] == 5 || tableMeta.rowData[0] == 6 ?
<div style={{ flex: 1 }}>
<FormControlLabel
style={{ margin: 0 }}
value={value}
control={
<NumberFormat
thousandSeparator={true}
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
placeholder=""
value={value === "0" ? "" : Number(handleFormula(tableMeta)).toFixed(1)}
disabled={true}
decimalScale={1}
onBlur={(event) => {
handleChange(event.target.value, tableMeta)
}}
/>
}
/>
</div>
:
<div style={{ flex: 1 }}>
<FormControlLabel
style={{ margin: 0 }}
......@@ -1064,7 +1064,7 @@ export default class OperatingIndicatorRO extends Component {
}
/>
</div>
// )
)
}
</div>
)
......@@ -2137,7 +2137,7 @@ export default class OperatingIndicatorRO extends Component {
</button>
</div>
{!this.state.emptyData && (this.props.permission.create || this.props.permission.edit) && <div className="col-2" style={{ display: 'flex', justifyContent: 'flex-end', maxWidth: '100%', paddingRight: 2 }}>
{this.state.get_for == 'view' && this.state.viewOnly &&
{this.state.get_for == 'view' &&
<button
type="button"
onClick={() => {
......
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