Commit 92ff89be authored by Riri Novita's avatar Riri Novita

Merge branch 'riri' into 'master'

apdet

See merge request !892
parents b16b9314 67aeec3d
...@@ -389,12 +389,19 @@ export default class ProfitLossMR extends Component { ...@@ -389,12 +389,19 @@ export default class ProfitLossMR extends Component {
if (response.data.status === "success") { if (response.data.status === "success") {
this.props.saveToMonthlyReport() this.props.saveToMonthlyReport()
} else { } else {
this.setState({ loading: false, handleTekTekTek: 0 }, () => { this.setState({ alert: true, messageAlert: response.data.message, tipeAlert: 'warning', loading: false, handleTekTekTek: 0 }, () => {
document.body.style.overflow = 'unset';
if (response.data.message.includes("Someone Logged In")) {
setTimeout(() => {
localStorage.removeItem(Constant.TOKEN)
window.location.reload();
}, 1000);
}
this.props.saveToMonthlyReport() this.props.saveToMonthlyReport()
}) })
} }
} else { } else {
this.setState({ loading: false, handleTekTekTek: 0 }) this.setState({ alert: true, messageAlert: response.data.message, tipeAlert: 'warning', loading: false, handleTekTekTek: 0 })
} }
}) })
} }
...@@ -615,7 +622,7 @@ export default class ProfitLossMR extends Component { ...@@ -615,7 +622,7 @@ export default class ProfitLossMR extends Component {
if (response.data.data.result && err === false) { if (response.data.data.result && err === false) {
this.setState({ loading: false, buttonError: false, editable: false, saveDraft: false }) this.setState({ loading: false, buttonError: false, editable: false, saveDraft: false })
} else { } else {
this.setState({ loading: false, buttonError: true, editable: true, saveDraft: true }) this.setState({ loading: false, buttonError: true, editable: true, saveDraft: false })
} }
} else { } else {
this.setState({ alert: true, messageAlert: response.data.message, tipeAlert: 'warning', loading: false }, () => { this.setState({ alert: true, messageAlert: response.data.message, tipeAlert: 'warning', loading: false }, () => {
...@@ -1782,7 +1789,7 @@ export default class ProfitLossMR extends Component { ...@@ -1782,7 +1789,7 @@ export default class ProfitLossMR extends Component {
<LightTooltipError title={"MTD Explanation vs Prev. Month is Reqiured"} arrow> <LightTooltipError title={"MTD Explanation vs Prev. Month is Reqiured"} arrow>
<Input <Input
disableUnderline={true} disableUnderline={true}
style={{ color: "#5198ea", fontSize: 12, textAlign: 'left', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }} style={{ color: "#5198ea", fontSize: 12, textAlign: 'left', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent', minHeight: 30 , padding: 0 }}
type="text" type="text"
placeholder="" placeholder=""
multiline={true} multiline={true}
...@@ -1793,7 +1800,9 @@ export default class ProfitLossMR extends Component { ...@@ -1793,7 +1800,9 @@ export default class ProfitLossMR extends Component {
style: { style: {
color: "#5198ea", color: "#5198ea",
textAlign: 'left', textAlign: 'left',
backgroundColor: '#ffac99' backgroundColor: '#ffac99',
minHeight: 30,
padding: 0
} }
}} }}
onBlur={(event) => { onBlur={(event) => {
...@@ -1862,7 +1871,7 @@ export default class ProfitLossMR extends Component { ...@@ -1862,7 +1871,7 @@ export default class ProfitLossMR extends Component {
<LightTooltipError title={"MTD Explanation vs MB is Reqiured"} arrow> <LightTooltipError title={"MTD Explanation vs MB is Reqiured"} arrow>
<Input <Input
disableUnderline={true} disableUnderline={true}
style={{ color: "#5198ea", fontSize: 12, textAlign: 'left', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }} style={{ color: "#5198ea", fontSize: 12, textAlign: 'left', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent', minHeight: 30 , padding: 0 }}
type="text" type="text"
placeholder="" placeholder=""
multiline={true} multiline={true}
...@@ -1873,7 +1882,9 @@ export default class ProfitLossMR extends Component { ...@@ -1873,7 +1882,9 @@ export default class ProfitLossMR extends Component {
style: { style: {
color: "#5198ea", color: "#5198ea",
textAlign: 'left', textAlign: 'left',
backgroundColor: '#ffac99' backgroundColor: '#ffac99',
minHeight: 30 ,
padding: 0
} }
}} }}
onBlur={(event) => { onBlur={(event) => {
...@@ -1942,7 +1953,7 @@ export default class ProfitLossMR extends Component { ...@@ -1942,7 +1953,7 @@ export default class ProfitLossMR extends Component {
<LightTooltipError title={"MTD Explanation vs RB is Reqiured"} arrow> <LightTooltipError title={"MTD Explanation vs RB is Reqiured"} arrow>
<Input <Input
disableUnderline={true} disableUnderline={true}
style={{ color: "#5198ea", fontSize: 12, textAlign: 'left', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }} style={{ color: "#5198ea", fontSize: 12, textAlign: 'left', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent', minHeight: 30 , padding: 0 }}
type="text" type="text"
placeholder="" placeholder=""
multiline={true} multiline={true}
...@@ -1953,7 +1964,9 @@ export default class ProfitLossMR extends Component { ...@@ -1953,7 +1964,9 @@ export default class ProfitLossMR extends Component {
style: { style: {
color: "#5198ea", color: "#5198ea",
textAlign: 'left', textAlign: 'left',
backgroundColor: '#ffac99' backgroundColor: '#ffac99',
minHeight: 30 ,
padding: 0
} }
}} }}
onBlur={(event) => { onBlur={(event) => {
......
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