Commit 6817ca11 authored by Riri Novita's avatar Riri Novita

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

parents a6c69c22 eb184e67
......@@ -567,7 +567,7 @@ export default class BalanceSheetMR extends Component {
if (response.data.data.result && err === false) {
this.setState({ loading: false, buttonError: false, editable: false, saveDraft: false })
} else {
this.setState({ loading: false, buttonError: true, editable: true, saveDraft: false })
this.setState({ loading: false, buttonError: true, editable: true, saveDraft: true })
}
} else {
this.setState({ alert: true, messageAlert: response.data.message, tipeAlert: 'warning', loading: false }, () => {
......@@ -1013,7 +1013,22 @@ export default class BalanceSheetMR extends Component {
<div style={{ textAlign: 'right' }}>
{tableMeta.rowData[0] === 4 || tableMeta.rowData[0] === 1 ?
null :
val
<div style={{ flex: 1 }}>
<FormControlLabel
style={{ margin: 0 }}
value={val}
control={
<NumberFormat
thousandSeparator={true}
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
placeholder=""
disabled={true}
value={Number(val).toFixed(1)}
/>
}
/>
</div>
}
</div>
)
......@@ -2423,35 +2438,31 @@ export default class BalanceSheetMR extends Component {
type="button"
style={{
backgroundColor: 'transparent',
cursor: this.state.saveDraft !== true ? 'pointer' : 'default',
cursor: 'pointer',
borderColor: 'transparent',
outline: 'none',
marginRight: 20
}}
onClick={() =>
this.state.saveDraft === true ?
null :
this.state.saveDraft ?
this.setState({ alert: true, messageAlert: 'Data Incomplete !', tipeAlert: 'error' })
:
this.state.handleTekTekTek == 1 ? null :
this.setState({ handleTekTekTek: 1 }, () => {
this.setState({ handleTekTekTek: 1, loading: true }, () => {
this.backToMonthlyReport('draft')
})
}
>
<div style={{ backgroundColor: '#354960', width: 105, height: 25, borderRadius: 3, justifyContent: 'center', display: 'flex', alignItems: 'center' }}>
{this.state.saveDraft?
<LightTooltip title={"Data Incomplete"} arrow>
<Typography style={{ fontSize: '11px', color: '#fff', textAlign: 'center' }}>Save as Draft</Typography>
</LightTooltip> :
<Typography style={{ fontSize: '11px', color: '#fff', textAlign: 'center' }}>Save as Draft</Typography>
}
</div>
</button>}
{this.state.get_for === 'edit' && <button
type="button"
disabled={this.state.buttonError}
// disabled={this.state.buttonError}
onClick={() =>
this.state.buttonError ?
this.setState({ alert: true, messageAlert: 'Data is not complete !', tipeAlert: 'warning' })
this.setState({ alert: true, messageAlert: 'Data incomplete !', tipeAlert: 'error' })
:
this.state.handleTekTekTek == 1 ? null :
this.setState({ handleTekTekTek: 1 }, () => {
......@@ -2465,12 +2476,7 @@ export default class BalanceSheetMR extends Component {
}}
>
<div style={{ backgroundColor: '#354960', width: 105, height: 25, borderRadius: 3, justifyContent: 'center', display: 'flex', alignItems: 'center' }}>
{this.state.buttonError?
<LightTooltip title={"Data Incomplete"} arrow>
<Typography style={{ fontSize: '11px', color: '#fff', textAlign: 'center' }}>Save & Complete</Typography>
</LightTooltip> :
<Typography style={{ fontSize: '11px', color: '#fff', textAlign: 'center' }}>Save & Complete</Typography>
}
</div>
</button>}
</div>
......@@ -2550,14 +2556,14 @@ export default class BalanceSheetMR extends Component {
type="button"
style={{
backgroundColor: 'transparent',
cursor: this.state.saveDraft !== true ? 'pointer' : 'default',
cursor: 'pointer',
borderColor: 'transparent',
outline: 'none',
marginRight: 20
}}
onClick={() =>
this.state.saveDraft === true ?
this.setState({ alert: true, messageAlert: 'Data is not complete !', tipeAlert: 'warning' })
this.setState({ alert: true, messageAlert: 'Data Incomplete !', tipeAlert: 'error' })
:
this.state.handleTekTekTek == 1 ? null :
this.setState({ handleTekTekTek: 1 }, () => {
......@@ -2571,10 +2577,10 @@ export default class BalanceSheetMR extends Component {
</button>
<button
type="button"
disabled={this.state.buttonError}
// disabled={this.state.buttonError}
onClick={() =>
this.state.buttonError ?
this.setState({ alert: true, messageAlert: 'Data is not complete !', tipeAlert: 'warning' })
this.setState({ alert: true, messageAlert: 'Data Incomplete !', tipeAlert: 'error' })
:
this.state.handleTekTekTek == 1 ? null :
this.setState({ handleTekTekTek: 1 }, () => {
......@@ -2582,7 +2588,7 @@ export default class BalanceSheetMR extends Component {
})}
style={{
backgroundColor: 'transparent',
cursor: this.state.buttonError === true ? 'default' : 'pointer',
cursor: 'pointer',
borderColor: 'transparent',
outline: 'none',
}}
......
......@@ -622,27 +622,7 @@ export default class FixedAssetsMovementMR extends Component {
})
total = R.equals(total, NaN) ? "0.0" : total
// // // total = R.equals(total, NaN) ? "0.0" : total
// // // console.log(dataTable2[tableMeta.rowIndex][22])
// // // console.log(tableMeta.rowData[5])
// // if (tableMeta.rowData[5] == "1.5 Other non-current assets") {
// // if (forecast !== undefined) {
// // if (String(tableMeta.rowData[5]) == "Depreciation & amortisation") {
// console.log(splitFormula)
// console.log(baru)
// console.log(anjay)
// console.log(anjay2)
// console.log(total)
// // console.log(dataTable2[tableMeta.rowIndex])
// // }
// // }
// if (dataTable2[tableMeta.rowIndex][colIdx].value == undefined) {
dataTable2[tableMeta.rowIndex][colIdx] = total
// } else {
// dataTable2[tableMeta.rowIndex][column].value = total
// }
// loading = false
return total
}
......@@ -820,17 +800,6 @@ export default class FixedAssetsMovementMR extends Component {
{
tableMeta.rowData[0] === 1 || tableMeta.rowData[0] === 4 ?
null :
tableMeta.rowData[0] === 5 ?
<span style={{ fontSize: 12, textAlign: 'right' }}>
<NumberFormat
thousandSeparator={true}
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 90, backgroundColor: 'transparent' }}
type="text"
placeholder=""
disabled={true}
value={Number(handleValueFormula(tableMeta, 6)).toFixed(1)}
/>
</span> :
<div style={{ flex: 1 }}>
<FormControlLabel
style={{ margin: 0 }}
......@@ -855,17 +824,6 @@ export default class FixedAssetsMovementMR extends Component {
{
tableMeta.rowData[0] === 1 || tableMeta.rowData[0] === 4 ?
null :
tableMeta.rowData[0] === 5?
<span style={{ fontSize: 12, textAlign: 'right' }}>
<NumberFormat
thousandSeparator={true}
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 90, backgroundColor: 'transparent' }}
type="text"
placeholder=""
disabled={true}
value={Number(handleValueFormula(tableMeta, 7)).toFixed(1)}
/>
</span> :
<div style={{ flex: 1 }}>
<FormControlLabel
style={{ margin: 0 }}
......
......@@ -737,8 +737,8 @@ export default class TaxPlanningMR extends Component {
dataTable2[tableMeta.rowIndex].map((item, index) => {
if (index == 9) {
let valItemFCP = item.fcp == undefined || item.fcp == "" || item.fcp == "undefined" ? 0.0 : item.fcp
total = Number(tableMeta.rowData[16]) + Number(valItemFCP)
let valItemTBF = item.tbf == undefined || item.tbf == "" || item.tbf == "undefined" ? 0.0 : item.tbf
total = Number(tableMeta.rowData[16]) + Number(valItemTBF)
}
})
......
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