Commit 8c51aa8c authored by Deni Rinaldi's avatar Deni Rinaldi

validasi startDate endDate

parent 0376fe45
...@@ -119,9 +119,9 @@ export default class CreateUnitBisnis extends Component { ...@@ -119,9 +119,9 @@ export default class CreateUnitBisnis extends Component {
validasiCreate() { validasiCreate() {
if (R.isEmpty(this.state.name)) { if (R.isEmpty(this.state.name)) {
this.setState({ errorName: true, msgErrorName: 'Unit Bisnis tidak boleh kosong' }) this.setState({ errorName: true, msgErrorName: 'Unit Bisnis tidak boleh kosong' })
} else if (R.isEmpty(this.state.startDate)) { } else if (R.isNil(this.state.startDate)) {
this.setState({ errorStartDate: true, msgErrorStartDate: 'Berlaku Mulai tidak boleh kosong' }) this.setState({ errorStartDate: true, msgErrorStartDate: 'Berlaku Mulai tidak boleh kosong' })
} else if (R.isEmpty(this.state.endDate)) { } else if (R.isNil(this.state.endDate)) {
this.setState({ errorEndDate: true, msgErrorEndDate: 'Berkahir Hingga tidak boleh kosong' }) this.setState({ errorEndDate: true, msgErrorEndDate: 'Berkahir Hingga tidak boleh kosong' })
} else { } else {
let payload = { let payload = {
......
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