if(R.isEmpty(this.state.company))returnalert("Nama perusahaan harus diisi.");
if(R.isEmpty(this.state.company)){
if(R.isEmpty(this.state.totalReport))returnalert("Total Report is Required.");
this.setState({errorNP:true,msgErrorNP:'Nama perusahaan harus diisi'})
if(!R.isEmpty(this.state.startDate)&&!R.isEmpty(this.state.endDate)&&(this.state.startDate>this.state.endDate))returnalert("Masa Berlaku Tidak Boleh Kurang Dari Tanggal Mulai");
}elseif(R.isNil(this.state.types)){
if(R.isEmpty(this.state.startDate))returnalert("Tanggal Mulai is Required.");
this.setState({errorUB:true,msgErrorUB:'Unit Bisnis harus diisi'})
if(R.isEmpty(this.state.endDate))returnalert("Tanggal Berakhir is Required.");
}elseif(R.isNil(this.state.startDate)){
letpayload={
this.setState({errorSD:true,msgErrorSD:'Start Date tidak boleh kosong'})
"company_name":this.state.company,
}elseif(R.isNil(this.state.endDate)){
"parent":this.state.getPerusahaan.company_id,
this.setState({errorED:true,msgErrorED:'End Date tidak boleh kosong'})
if(R.isEmpty(this.state.company))returnalert("Nama perusahaan harus diisi.");
if(R.isEmpty(this.state.totalReport))returnalert("Total Report is Required.");
if(!R.isEmpty(this.state.startDate)&&!R.isEmpty(this.state.endDate)&&(this.state.startDate>this.state.endDate))returnalert("Masa Berlaku Tidak Boleh Kurang Dari Tanggal Mulai");
if(R.isEmpty(this.state.startDate))returnalert("Tanggal Mulai is Required.");
if(R.isEmpty(this.state.endDate))returnalert("Tanggal Berakhir is Required.");