Commit 68c1bc05 authored by rifkaki's avatar rifkaki

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

parents dd87395c c62d2739
......@@ -3112,7 +3112,7 @@ export default class TableSubHolding extends Component {
type="text"
placeholder=""
disabled={true}
value={String(tableMeta.rowData[23]) === "" ? "" : Number(tableMeta.rowData[23]).toFixed(1)}
value={String(tableMeta.rowData[23]) === "" ? "" : tableMeta.rowData[23] === "0.00" ? "" : Number(tableMeta.rowData[23]).toFixed(1)}
/>
}
/>
......@@ -3135,7 +3135,7 @@ export default class TableSubHolding extends Component {
type="text"
placeholder=""
disabled={true}
value={String(tableMeta.rowData[24]) === "" ? "" : Number(tableMeta.rowData[24]).toFixed(1)}
value={String(tableMeta.rowData[24]) === "" ? "" : tableMeta.rowData[24] === "0.00" ? "" : Number(tableMeta.rowData[24]).toFixed(1)}
/>
}
/>
......@@ -3158,7 +3158,7 @@ export default class TableSubHolding extends Component {
type="text"
placeholder=""
disabled={true}
value={String(tableMeta.rowData[25]) === "" ? "" : Number(tableMeta.rowData[25]).toFixed(1)}
value={String(tableMeta.rowData[25]) === "" ? "" : tableMeta.rowData[25] === "0.00" ? "" : Number(tableMeta.rowData[25]).toFixed(1)}
/>
}
/>
......@@ -3181,7 +3181,7 @@ export default class TableSubHolding extends Component {
type="text"
placeholder=""
disabled={true}
value={String(tableMeta.rowData[26]) === "" ? "" : Number(tableMeta.rowData[26]).toFixed(1)}
value={String(tableMeta.rowData[26]) === "" ? "" : tableMeta.rowData[26] === "0.00" ? "" : Number(tableMeta.rowData[26]).toFixed(1)}
/>
}
/>
......@@ -3206,7 +3206,7 @@ export default class TableSubHolding extends Component {
type="text"
placeholder=""
disabled={true}
value={String(tableMeta.rowData[27]) === "" ? "" : Number(tableMeta.rowData[27]).toFixed(1)}
value={String(tableMeta.rowData[27]) === "" ? "" : tableMeta.rowData[27] === "0.00" ? "" : Number(tableMeta.rowData[27]).toFixed(1)}
/>
}
/>
......@@ -3229,7 +3229,7 @@ export default class TableSubHolding extends Component {
type="text"
placeholder=""
disabled={true}
value={String(tableMeta.rowData[28]) === "" ? "" : Number(tableMeta.rowData[28]).toFixed(1)}
value={String(tableMeta.rowData[28]) === "" ? "" : tableMeta.rowData[28] === "0.00" ? "" : Number(tableMeta.rowData[28]).toFixed(1)}
/>
}
/>
......@@ -3252,7 +3252,7 @@ export default class TableSubHolding extends Component {
type="text"
placeholder=""
disabled={true}
value={String(tableMeta.rowData[29]) === "" ? "" : Number(tableMeta.rowData[29]).toFixed(1)}
value={String(tableMeta.rowData[29]) === "" ? "" : tableMeta.rowData[29] === "0.00" ? "" : Number(tableMeta.rowData[29]).toFixed(1)}
/>
}
/>
......@@ -3275,7 +3275,7 @@ export default class TableSubHolding extends Component {
type="text"
placeholder=""
disabled={true}
value={String(tableMeta.rowData[30]) === "" ? "" : Number(tableMeta.rowData[30]).toFixed(1)}
value={String(tableMeta.rowData[30]) === "" ? "" : tableMeta.rowData[30] === "0.00" ? "" : Number(tableMeta.rowData[30]).toFixed(1)}
/>
}
/>
......@@ -3300,7 +3300,7 @@ export default class TableSubHolding extends Component {
type="text"
placeholder=""
disabled={true}
value={String(tableMeta.rowData[31]) === "" ? "" : Number(tableMeta.rowData[31]).toFixed(1)}
value={String(tableMeta.rowData[31]) === "" ? "" : tableMeta.rowData[31] === "0.00" ? "" : Number(tableMeta.rowData[31]).toFixed(1)}
/>
}
/>
......@@ -3323,7 +3323,7 @@ export default class TableSubHolding extends Component {
type="text"
placeholder=""
disabled={true}
value={String(tableMeta.rowData[32]) === "" ? "" : Number(tableMeta.rowData[32]).toFixed(1)}
value={String(tableMeta.rowData[32]) === "" ? "" : tableMeta.rowData[32] === "0.00" ? "" : Number(tableMeta.rowData[32]).toFixed(1)}
/>
}
/>
......@@ -3346,7 +3346,7 @@ export default class TableSubHolding extends Component {
type="text"
placeholder=""
disabled={true}
value={String(tableMeta.rowData[33]) === "" ? "" : Number(tableMeta.rowData[33]).toFixed(1)}
value={String(tableMeta.rowData[33]) === "" ? "" : tableMeta.rowData[33] === "0.00" ? "" : Number(tableMeta.rowData[33]).toFixed(1)}
/>
}
/>
......@@ -3369,7 +3369,7 @@ export default class TableSubHolding extends Component {
type="text"
placeholder=""
disabled={true}
value={String(tableMeta.rowData[34]) === "" ? "" : Number(tableMeta.rowData[34]).toFixed(1)}
value={String(tableMeta.rowData[34]) === "" ? "" : tableMeta.rowData[34] === "0.00" ? "" : Number(tableMeta.rowData[34]).toFixed(1)}
/>
}
/>
......@@ -3516,7 +3516,7 @@ export default class TableSubHolding extends Component {
type="text"
placeholder=""
disabled={true}
value={String(tableMeta.rowData[35]) === "" ? "" : Number(tableMeta.rowData[35]).toFixed(1)}
value={String(tableMeta.rowData[35]) === "" ? "" : tableMeta.rowData[35] === "0.00" ? "" : Number(tableMeta.rowData[35]).toFixed(1)}
/>
}
/>
......@@ -3539,7 +3539,7 @@ export default class TableSubHolding extends Component {
type="text"
placeholder=""
disabled={true}
value={String(tableMeta.rowData[36]) === "" ? "" : Number(tableMeta.rowData[36]).toFixed(1)}
value={String(tableMeta.rowData[36]) === "" ? "" : tableMeta.rowData[36] === "0.00" ? "" : Number(tableMeta.rowData[36]).toFixed(1)}
/>
}
/>
......@@ -3562,7 +3562,7 @@ export default class TableSubHolding extends Component {
type="text"
placeholder=""
disabled={true}
value={String(tableMeta.rowData[37]) === "" ? "" : Number(tableMeta.rowData[37]).toFixed(1)}
value={String(tableMeta.rowData[37]) === "" ? "" : tableMeta.rowData[37] === "0.00" ? "" : Number(tableMeta.rowData[37]).toFixed(1)}
/>
}
/>
......@@ -3585,7 +3585,7 @@ export default class TableSubHolding extends Component {
type="text"
placeholder=""
disabled={true}
value={String(tableMeta.rowData[38]) === "" ? "" : Number(tableMeta.rowData[38]).toFixed(1)}
value={String(tableMeta.rowData[38]) === "" ? "" : tableMeta.rowData[38] === "0.00" ? "" : Number(tableMeta.rowData[38]).toFixed(1)}
/>
}
/>
......@@ -3610,7 +3610,7 @@ export default class TableSubHolding extends Component {
type="text"
placeholder=""
disabled={true}
value={String(tableMeta.rowData[39]) === "" ? "" : Number(tableMeta.rowData[39]).toFixed(1)}
value={String(tableMeta.rowData[39]) === "" ? "" : tableMeta.rowData[39] === "0.00" ? "" : Number(tableMeta.rowData[39]).toFixed(1)}
/>
}
/>
......@@ -3633,7 +3633,7 @@ export default class TableSubHolding extends Component {
type="text"
placeholder=""
disabled={true}
value={String(tableMeta.rowData[40]) === "" ? "" : Number(tableMeta.rowData[40]).toFixed(1)}
value={String(tableMeta.rowData[40]) === "" ? "" : tableMeta.rowData[40] === "0.00" ? "" : Number(tableMeta.rowData[40]).toFixed(1)}
/>
}
/>
......@@ -3656,7 +3656,7 @@ export default class TableSubHolding extends Component {
type="text"
placeholder=""
disabled={true}
value={String(tableMeta.rowData[41]) === "" ? "" : Number(tableMeta.rowData[41]).toFixed(1)}
value={String(tableMeta.rowData[41]) === "" ? "" : tableMeta.rowData[41] === "0.00" ? "" : Number(tableMeta.rowData[41]).toFixed(1)}
/>
}
/>
......@@ -3679,7 +3679,7 @@ export default class TableSubHolding extends Component {
type="text"
placeholder=""
disabled={true}
value={String(tableMeta.rowData[42]) === "" ? "" : Number(tableMeta.rowData[42]).toFixed(1)}
value={String(tableMeta.rowData[42]) === "" ? "" : tableMeta.rowData[42] === "0.00" ? "" : Number(tableMeta.rowData[42]).toFixed(1)}
/>
}
/>
......@@ -3704,7 +3704,7 @@ export default class TableSubHolding extends Component {
type="text"
placeholder=""
disabled={true}
value={String(tableMeta.rowData[43]) === "" ? "" : Number(tableMeta.rowData[43]).toFixed(1)}
value={String(tableMeta.rowData[43]) === "" ? "" : tableMeta.rowData[43] === "0.00" ? "" : Number(tableMeta.rowData[43]).toFixed(1)}
/>
}
/>
......@@ -3727,7 +3727,7 @@ export default class TableSubHolding extends Component {
type="text"
placeholder=""
disabled={true}
value={String(tableMeta.rowData[44]) === "" ? "" : Number(tableMeta.rowData[44]).toFixed(1)}
value={String(tableMeta.rowData[44]) === "" ? "" : tableMeta.rowData[44] === "0.00" ? "" : Number(tableMeta.rowData[44]).toFixed(1)}
/>
}
/>
......@@ -3750,7 +3750,7 @@ export default class TableSubHolding extends Component {
type="text"
placeholder=""
disabled={true}
value={String(tableMeta.rowData[45]) === "" ? "" : Number(tableMeta.rowData[45]).toFixed(1)}
value={String(tableMeta.rowData[45]) === "" ? "" : tableMeta.rowData[45] === "0.00" ? "" : Number(tableMeta.rowData[45]).toFixed(1)}
/>
}
/>
......@@ -3773,7 +3773,7 @@ export default class TableSubHolding extends Component {
type="text"
placeholder=""
disabled={true}
value={String(tableMeta.rowData[46]) === "" ? "" : Number(tableMeta.rowData[46]).toFixed(1)}
value={String(tableMeta.rowData[46]) === "" ? "" : tableMeta.rowData[46] === "0.00" ? "" : Number(tableMeta.rowData[46]).toFixed(1)}
/>
}
/>
......@@ -81,9 +81,8 @@ export default class OperatingIndicatorMR extends Component {
handleViewOnly() {
let checkCreate = this.props.permission.create
let checkEdit = this.props.permission.edit
let checkIsSubmit = this.props.isSubmit
this.setState({viewOnly: checkCreate && checkEdit && checkIsSubmit})
this.setState({viewOnly: checkCreate && checkEdit})
}
handleGetFor(type) {
......@@ -1102,7 +1101,7 @@ export default class OperatingIndicatorMR extends Component {
placeholder=""
decimalScale={1}
fixedDecimalScale={1}
disabled={!this.props.permission.create || !this.props.permission.edit || !this.props.isSubmit || this.state.get_for == 'view'}
disabled={!this.props.permission.create || !this.props.permission.edit || this.state.get_for == 'view'}
value={Number(tableMeta.rowData[10]).toFixed(1)}
decimalScale={1}
onBlur={(event) => {
......@@ -1649,7 +1648,7 @@ export default class OperatingIndicatorMR extends Component {
</div>
<div style={{ width: '50%' }}>
<div style={{ justifyContent: 'flex-end', display: 'flex', flexFlow: 'wrap' }}>
{this.state.get_for == 'edit' && (this.props.permission.create || this.props.permission.edit) && this.props.isSubmit && <a data-tip={'Download Template'} data-for="template">
{this.state.get_for == 'edit' && (this.props.permission.create || this.props.permission.edit) && <a data-tip={'Download Template'} data-for="template">
<button
style={{
backgroundColor: 'transparent',
......@@ -1663,7 +1662,7 @@ export default class OperatingIndicatorMR extends Component {
</button>
</a>}
<ReactTooltip border={true} id="template" place="bottom" type="light" effect="solid" />
{this.state.get_for == 'edit' && (this.props.permission.create || this.props.permission.edit) && this.props.isSubmit && <a data-tip={'Upload'} data-for="upload">
{this.state.get_for == 'edit' && (this.props.permission.create || this.props.permission.edit) && <a data-tip={'Upload'} data-for="upload">
<button
style={{
backgroundColor: 'transparent',
......@@ -1733,8 +1732,8 @@ export default class OperatingIndicatorMR extends Component {
</div>
</button>
</div>
{!this.state.emptyData && (this.props.permission.create || this.props.permission.edit) && this.props.isSubmit && <div className="col-2" style={{ display: 'flex', justifyContent: 'flex-end', maxWidth: '100%', paddingRight: 2 }}>
{this.state.get_for == 'view' && <button
{!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 && <button
type="button"
onClick={() => {
this.setState({loading: true}, () => {
......
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