Commit ed408605 authored by syadziy's avatar syadziy

update fixing UAT

parent 1281c5dc
...@@ -19,10 +19,13 @@ export default class CreateCarfmDoc extends Component { ...@@ -19,10 +19,13 @@ export default class CreateCarfmDoc extends Component {
super(props) super(props)
this.state = { this.state = {
perusahaan: null, perusahaan: null,
perusahaanData: null,
getPerusahaan: null, getPerusahaan: null,
errorPerusahaan: false, errorPerusahaan: false,
msgErrorPerusahaan: '', msgErrorPerusahaan: '',
document: null, document: null,
documentData: null,
getDocument: null,
errorDocument: false, errorDocument: false,
msgErrorDocument: '', msgErrorDocument: '',
listPeriode: null, listPeriode: null,
...@@ -43,8 +46,7 @@ export default class CreateCarfmDoc extends Component { ...@@ -43,8 +46,7 @@ export default class CreateCarfmDoc extends Component {
fileType: '', fileType: '',
docId: '', docId: '',
sizeUpload: "1", sizeUpload: "1",
saveDisable: false, isClickSave: 0
submitVal: 0
} }
} }
...@@ -234,6 +236,7 @@ export default class CreateCarfmDoc extends Component { ...@@ -234,6 +236,7 @@ export default class CreateCarfmDoc extends Component {
else if (R.isNil(this.state.file)) { else if (R.isNil(this.state.file)) {
this.setState({ alert: true, messageAlert: 'File Cannot be Empty', tipeAlert: 'warning', saveDisable: false }) this.setState({ alert: true, messageAlert: 'File Cannot be Empty', tipeAlert: 'warning', saveDisable: false })
} else { } else {
console.log(this.state.isClickSave + " ===> di luar");
const formData = new FormData(); const formData = new FormData();
formData.append("file", this.state.file); formData.append("file", this.state.file);
formData.append("companyId", this.state.getPerusahaan.company_id); formData.append("companyId", this.state.getPerusahaan.company_id);
...@@ -430,21 +433,10 @@ export default class CreateCarfmDoc extends Component { ...@@ -430,21 +433,10 @@ export default class CreateCarfmDoc extends Component {
disabled={this.state.saveDisable} disabled={this.state.saveDisable}
type="button" type="button"
onClick={() => onClick={() =>
{ this.state.isClickSave == 1 ? null :
this.props.handleLoading(1); this.setState({ isClickSave: 1 }, () => {
this.setState({
saveDisable: true,
submitVal : this.state.submitVal + 1
}, console.log());
setTimeout(() => {
this.validasi() this.validasi()
console.log("vlidasi " + this.validasi()); })
}, 100)
this.props.handleLoading(0);
}
} }
> >
<div style={{ width: 102, height: 30, backgroundColor: '#354960', borderRadius: 5, alignItems: 'center', display: 'flex', justifyContent: 'center' }}> <div style={{ width: 102, height: 30, backgroundColor: '#354960', borderRadius: 5, alignItems: 'center', display: 'flex', justifyContent: 'center' }}>
......
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