Commit 1c557940 authored by Rifka Kurnia Irfiana's avatar Rifka Kurnia Irfiana

issue managdoc

parent 8255a843
......@@ -254,16 +254,14 @@ export default class CreateManagementDoc extends Component {
validasi() {
if (this.state.disabledPeriode === true) {
if (R.isNil(this.state.getPerusahaan)) {
this.setState({ errorPerusahaan: true, msgErrorPerusahaan: 'Company Cannot be Empty' })
} else if (R.isNil(this.state.getDocument)) {
if (R.isNil(this.state.getDocument)) {
this.setState({ errorDocument: true, msgErrorDocument: 'Category Cannot be Empty' })
} else if (R.isNil(this.state.file)) {
this.setState({ alert: true, messageAlert: 'File Cannot be Empty', tipeAlert: 'warning' })
} else {
const formData = new FormData();
formData.append("file", this.state.file);
formData.append("companyId", this.state.getPerusahaan.company_id);
formData.append("companyId", 1);
formData.append("settingId", this.state.getDocument.document_category_id);
formData.append("description", this.state.description);
formData.append("extension", this.state.fileType);
......@@ -392,7 +390,6 @@ export default class CreateManagementDoc extends Component {
/>
</div>
</div>
{/* {String(this.props.name).includes('Manual Book TIA') ? false : ( */}
{this.state.disabledPeriode === false ?
<div className="column-1">
<div style={{ padding: 10, borderRadius: 5 }}>
......@@ -414,8 +411,6 @@ export default class CreateManagementDoc extends Component {
/>
</div>
</div>
// )}
// {String(this.props.name).includes('Manual Book TIA') ? false : (
: true}
{this.state.disabledPeriode === false ?
<div className="column-2">
......
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