Commit 32e17113 authored by Riri Novita's avatar Riri Novita

Merge branch 'master' of http://103.44.149.204/d.arizona/tia-dev into riri

parents bdf261ec 1b6def5d
...@@ -509,10 +509,7 @@ export default class BalanceSheetMR extends Component { ...@@ -509,10 +509,7 @@ export default class BalanceSheetMR extends Component {
} else if ( i[18] === "" && (Number(i[14]) < this.state.minValue || Number(i[14]) > this.state.maxValue)) { } else if ( i[18] === "" && (Number(i[14]) < this.state.minValue || Number(i[14]) > this.state.maxValue)) {
console.log('msk 2'); console.log('msk 2');
err = true err = true
} else if ( i[19] === "" && (Number(i[16]) < this.state.minValue || Number(i[16]) > this.state.maxValue)) { }
console.log('msk 3');
err = true
}
} }
if (String(i[5]) == "Control (should be nil)") { if (String(i[5]) == "Control (should be nil)") {
...@@ -2305,30 +2302,30 @@ export default class BalanceSheetMR extends Component { ...@@ -2305,30 +2302,30 @@ export default class BalanceSheetMR extends Component {
style={{ margin: 0 }} style={{ margin: 0 }}
// value={value} // value={value}
control={ control={
tableMeta.rowData[19] === "" && (Number(tableMeta.rowData[16]) < this.state.minValue || Number(tableMeta.rowData[16]) > this.state.maxValue) ? // tableMeta.rowData[19] === "" && (Number(tableMeta.rowData[16]) < this.state.minValue || Number(tableMeta.rowData[16]) > this.state.maxValue) ?
<LightTooltip title={"MTD Explanation vs RB is Reqiured"} arrow> // <LightTooltip title={"MTD Explanation vs RB is Reqiured"} arrow>
<Input // <Input
disableUnderline={true} // disableUnderline={true}
style={{ fontSize: 12, textAlign: 'left', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }} // style={{ fontSize: 12, textAlign: 'left', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text" // type="text"
multiline={true} // multiline={true}
placeholder="" // placeholder=""
// disabled={false} // // disabled={false}
disabled={this.props.isApprover? true : (this.state.get_for == 'view'? true : false)} // disabled={this.props.isApprover? true : (this.state.get_for == 'view'? true : false)}
defaultValue={tableMeta.rowData[19]} // defaultValue={tableMeta.rowData[19]}
inputProps={{ // inputProps={{
style: { // style: {
color: "#5198ea", // color: "#5198ea",
textAlign: 'left', // textAlign: 'left',
backgroundColor: '#ffac99' // backgroundColor: '#ffac99'
} // }
}} // }}
onBlur={(event) => { // onBlur={(event) => {
handleText(event.target.value, tableMeta, 19) // handleText(event.target.value, tableMeta, 19)
}} // }}
/> // />
</LightTooltip> // </LightTooltip>
: // :
// tableMeta.rowData[0] === 7 ? // tableMeta.rowData[0] === 7 ?
// (Number(handleValueFormula(tableMeta, 19)).toFixed(1) >= Number(this.state.minValue) && Number(handleValueFormula(tableMeta, 19)).toFixed(1) <= Number(this.state.maxValue)) ? // (Number(handleValueFormula(tableMeta, 19)).toFixed(1) >= Number(this.state.minValue) && Number(handleValueFormula(tableMeta, 19)).toFixed(1) <= Number(this.state.maxValue)) ?
// <NumberFormat // <NumberFormat
......
...@@ -340,8 +340,8 @@ export default class TaxPlanningMR extends Component { ...@@ -340,8 +340,8 @@ export default class TaxPlanningMR extends Component {
checkUpload() { checkUpload() {
api.create().checkUploadMonthlyReportTP(this.state.payload).then(response => { api.create().checkUploadMonthlyReportTP(this.state.payload).then(response => {
// console.log(JSON.stringify(this.state.payload)); // console.log(JSON.stringify(this.state.payload));
// console.log(this.state.payload) console.log(this.state.payload)
// console.log(response) console.log(response)
if (response.data) { if (response.data) {
if (response.data.status === 'success') { if (response.data.status === 'success') {
this.setState({ visibleUpload: false, visibleTP: false, loading: true }) this.setState({ visibleUpload: false, visibleTP: false, loading: true })
...@@ -448,7 +448,7 @@ export default class TaxPlanningMR extends Component { ...@@ -448,7 +448,7 @@ export default class TaxPlanningMR extends Component {
}) })
if (String(i[8]) == "Control (should be nil)") { if (String(i[8]) == "Control (should be nil)") {
if (i[9].tbf < this.state.minValue || i[9].tbf > this.state.maxValue || i[10] < this.state.minValue || i[10] > this.state.maxValue) { if (i[9].tbf < this.state.minValue || i[9].tbf > this.state.maxValue) {
errorContrl = true errorContrl = true
editAble = true editAble = true
} else { } else {
...@@ -1207,7 +1207,7 @@ export default class TaxPlanningMR extends Component { ...@@ -1207,7 +1207,7 @@ export default class TaxPlanningMR extends Component {
customBodyRender: (value, tableMeta, updateValue) => { customBodyRender: (value, tableMeta, updateValue) => {
return ( return (
<div style={{ textAlign: 'right', width: 90 }}> <div style={{ textAlign: 'right', width: 90 }}>
{tableMeta.rowData[3] === 4 || tableMeta.rowData[3] === 1 ? {tableMeta.rowData[3] === 4 || tableMeta.rowData[3] === 1 || tableMeta.rowData[3] === 7?
null null
: :
this.state.get_for == 'view'? this.state.get_for == 'view'?
...@@ -1240,46 +1240,46 @@ export default class TaxPlanningMR extends Component { ...@@ -1240,46 +1240,46 @@ export default class TaxPlanningMR extends Component {
/> />
</span> </span>
: :
tableMeta.rowData[3] === 7 ? // tableMeta.rowData[3] === 7 ?
(Number(handleValueFormula(value, tableMeta, 4)).toFixed(1) >= Number(this.state.minValue) && Number(handleValueFormula(value, tableMeta, 4)).toFixed(1) <= Number(this.state.maxValue)) ? // (Number(handleValueFormula(value, tableMeta, 4)).toFixed(1) >= Number(this.state.minValue) && Number(handleValueFormula(value, tableMeta, 4)).toFixed(1) <= Number(this.state.maxValue)) ?
// (Number(value).toFixed(1) >= Number(this.state.minValue) && Number(value).toFixed(1) <= Number(this.state.maxValue)) ? // // (Number(value).toFixed(1) >= Number(this.state.minValue) && Number(value).toFixed(1) <= Number(this.state.maxValue)) ?
<NumberFormat // <NumberFormat
thousandSeparator={true} // thousandSeparator={true}
style={{ // style={{
fontSize: 12, // fontSize: 12,
textAlign: 'right', // textAlign: 'right',
borderColor: 'transparent', // borderColor: 'transparent',
margin: 0, // margin: 0,
width: 96, // width: 96,
backgroundColor: 'transparent', // backgroundColor: 'transparent',
color: 'black' // color: 'black'
}} // }}
type="text" // type="text"
placeholder="" // placeholder=""
disabled={true} // disabled={true}
// value={Number(handleValueFormula(value, tableMeta, 3)).toFixed(1)} // // value={Number(handleValueFormula(value, tableMeta, 3)).toFixed(1)}
value={Number(value).toFixed(1)} // value={Number(value).toFixed(1)}
/> : // /> :
<LightTooltip title={this.state.minValue === null ? `Value Should be ${tableMeta.rowData[14].tbf}` : `Value Should be (${this.state.minValue}) up to (${this.state.maxValue})`} arrow> // <LightTooltip title={this.state.minValue === null ? `Value Should be ${tableMeta.rowData[14].tbf}` : `Value Should be (${this.state.minValue}) up to (${this.state.maxValue})`} arrow>
<NumberFormat // <NumberFormat
thousandSeparator={true} // thousandSeparator={true}
style={{ // style={{
fontSize: 12, // fontSize: 12,
textAlign: 'right', // textAlign: 'right',
borderColor: 'transparent', // borderColor: 'transparent',
margin: 0, // margin: 0,
width: 96, // width: 96,
backgroundColor: 'transparent', // backgroundColor: 'transparent',
color: 'red' // color: 'red'
}} // }}
type="text" // type="text"
placeholder="" // placeholder=""
disabled={true} // disabled={true}
// value={Number(handleValueFormula(value, tableMeta, 4)).toFixed(1)} // // value={Number(handleValueFormula(value, tableMeta, 4)).toFixed(1)}
value={Number(value).toFixed(1)} // value={Number(value).toFixed(1)}
/> // />
</LightTooltip> // </LightTooltip>
: // :
<div style={{ flex: 1 }}> <div style={{ flex: 1 }}>
<FormControlLabel <FormControlLabel
style={{ margin: 0 }} style={{ margin: 0 }}
......
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