Commit 8d7eb8e7 authored by faisalhamdi's avatar faisalhamdi

faisal

parent 7ff858c5
...@@ -46,7 +46,8 @@ export default class FixedAssetsMovementMR extends Component { ...@@ -46,7 +46,8 @@ export default class FixedAssetsMovementMR extends Component {
dataTable: [], dataTable: [],
loading: true, loading: true,
visibleFAMMR: true, visibleFAMMR: true,
updateBy: '-' updateBy: '-',
notesUpdate: '-'
} }
this.fileHandler = this.fileHandler.bind(this); this.fileHandler = this.fileHandler.bind(this);
} }
...@@ -69,7 +70,8 @@ export default class FixedAssetsMovementMR extends Component { ...@@ -69,7 +70,8 @@ export default class FixedAssetsMovementMR extends Component {
if (response.data) { if (response.data) {
if (response.data.status === "success") { if (response.data.status === "success") {
this.setState({ this.setState({
updateBy: response.data.data.latest_update === null ? '-' : response.data.data.latest_update updateBy: response.data.data.latest_update === null ? '-' : response.data.data.latest_update,
notesUpdate: response.data.data.notes_update === null ? '-' : response.data.data.notes_update
}) })
} else { } else {
this.setState({ alert: true, messageAlert: response.data.message, typeAlert: 'warning', loading: false }, () => { this.setState({ alert: true, messageAlert: response.data.message, typeAlert: 'warning', loading: false }, () => {
...@@ -873,7 +875,7 @@ export default class FixedAssetsMovementMR extends Component { ...@@ -873,7 +875,7 @@ export default class FixedAssetsMovementMR extends Component {
<NumberFormat <NumberFormat
thousandSeparator={true} thousandSeparator={true}
// style={{ color: "#5198ea", fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }} // style={{ color: "#5198ea", fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
style={{ color: this.props.isApprover ? 'black' : "#5198ea", fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, backgroundColor: 'transparent' }} style={{ color: this.props.isApprover ? 'black' : "#5198ea", fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text" type="text"
placeholder="" placeholder=""
disabled={this.props.isApprover} disabled={this.props.isApprover}
...@@ -1360,9 +1362,10 @@ export default class FixedAssetsMovementMR extends Component { ...@@ -1360,9 +1362,10 @@ export default class FixedAssetsMovementMR extends Component {
)} )}
</div> </div>
<Typography style={{ fontSize: '11px', color: '#4b4b4b', marginTop: 20 }}>Last Updated by : {this.state.updateBy}</Typography> <Typography style={{ fontSize: '11px', color: '#4b4b4b', marginTop: 20 }}>Last Updated by : {this.state.updateBy}</Typography>
<Typography style={{ fontSize: '11px', color: '#4b4b4b', marginTop: 5 }}>Notes : {this.state.notesUpdate}</Typography>
</div> </div>
<div className="grid grid-2x" style={{ marginTop: 20 }}> <div className="grid grid-2x" style={{ padding: 20 }}>
<div className="col-1"> <div className="col-1" style={{ paddingLeft: 0, }}>
<button <button
type="button" type="button"
onClick={() => this.setState({ loading: true }, () => { onClick={() => this.setState({ loading: true }, () => {
...@@ -1385,7 +1388,7 @@ export default class FixedAssetsMovementMR extends Component { ...@@ -1385,7 +1388,7 @@ export default class FixedAssetsMovementMR extends Component {
{this.props.isApprover === true ? {this.props.isApprover === true ?
<div className="col-2"></div> <div className="col-2"></div>
: :
<div className="col-2" style={{ display: 'flex', justifyContent: 'flex-end', maxWidth: '100%' }}> <div className="col-2" style={{ display: 'flex', justifyContent: 'flex-end', maxWidth: '100%', paddingRight: 5 }}>
<button <button
className="button" className="button"
type="button" type="button"
...@@ -1414,13 +1417,13 @@ export default class FixedAssetsMovementMR extends Component { ...@@ -1414,13 +1417,13 @@ export default class FixedAssetsMovementMR extends Component {
type="button" type="button"
style={{ style={{
backgroundColor: 'transparent', backgroundColor: 'transparent',
cursor: this.state.editable !== true ? 'pointer' : 'default', cursor: this.state.saveDraft !== true ? 'pointer' : 'default',
borderColor: 'transparent', borderColor: 'transparent',
outline: 'none', outline: 'none',
marginRight: 20 marginRight: 20
}} }}
onClick={() => onClick={() =>
this.state.editable === true ? this.state.saveDraft === true ?
null : null :
this.state.handleTekTekTek === 1 ? null : this.state.handleTekTekTek === 1 ? null :
this.setState({ handleTekTekTek: 1 }, () => { this.setState({ handleTekTekTek: 1 }, () => {
...@@ -1429,7 +1432,13 @@ export default class FixedAssetsMovementMR extends Component { ...@@ -1429,7 +1432,13 @@ export default class FixedAssetsMovementMR extends Component {
} }
> >
<div style={{ backgroundColor: '#354960', width: 105, height: 25, borderRadius: 3, justifyContent: 'center', display: 'flex', alignItems: 'center' }}> <div style={{ backgroundColor: '#354960', width: 105, height: 25, borderRadius: 3, justifyContent: 'center', display: 'flex', alignItems: 'center' }}>
{this.state.saveDraft === true ?
<LightTooltip title={"Data Incomplete"} arrow>
<Typography style={{ fontSize: '11px', color: '#fff', textAlign: 'center' }}>Save as Draft</Typography> <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> </div>
</button> </button>
<button <button
...@@ -1451,7 +1460,13 @@ export default class FixedAssetsMovementMR extends Component { ...@@ -1451,7 +1460,13 @@ export default class FixedAssetsMovementMR extends Component {
}} }}
> >
<div style={{ backgroundColor: '#354960', width: 105, height: 25, borderRadius: 3, justifyContent: 'center', display: 'flex', alignItems: 'center' }}> <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> <Typography style={{ fontSize: '11px', color: '#fff', textAlign: 'center' }}>Save & Complete</Typography>
}
</div> </div>
</button> </button>
</div> </div>
...@@ -1483,7 +1498,7 @@ export default class FixedAssetsMovementMR extends Component { ...@@ -1483,7 +1498,7 @@ export default class FixedAssetsMovementMR extends Component {
<div className="col-1"> <div className="col-1">
<button <button
type="button" type="button"
onClick={() => this.setState({ loading: true }, () => { onClick={() => this.setState({ loading: true, visibleFAMMR: true }, () => {
setTimeout(() => { setTimeout(() => {
this.getItemHierarki() this.getItemHierarki()
}, 100); }, 100);
...@@ -1546,7 +1561,13 @@ export default class FixedAssetsMovementMR extends Component { ...@@ -1546,7 +1561,13 @@ export default class FixedAssetsMovementMR extends Component {
} }
> >
<div style={{ backgroundColor: '#354960', width: 105, height: 25, borderRadius: 3, justifyContent: 'center', display: 'flex', alignItems: 'center' }}> <div style={{ backgroundColor: '#354960', width: 105, height: 25, borderRadius: 3, justifyContent: 'center', display: 'flex', alignItems: 'center' }}>
{this.state.saveDraft === true ?
<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> <Typography style={{ fontSize: '11px', color: '#fff', textAlign: 'center' }}>Save as Draft</Typography>
}
</div> </div>
</button> </button>
<button <button
...@@ -1568,7 +1589,13 @@ export default class FixedAssetsMovementMR extends Component { ...@@ -1568,7 +1589,13 @@ export default class FixedAssetsMovementMR extends Component {
}} }}
> >
<div style={{ backgroundColor: '#354960', width: 105, height: 25, borderRadius: 3, justifyContent: 'center', display: 'flex', alignItems: 'center' }}> <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> <Typography style={{ fontSize: '11px', color: '#fff', textAlign: 'center' }}>Save & Complete</Typography>
</LightTooltip>
:
<Typography style={{ fontSize: '11px', color: '#fff', textAlign: 'center' }}>Save & Complete</Typography>
}
</div> </div>
</button> </button>
</div> </div>
......
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