Commit e8e6df93 authored by d.arizona's avatar d.arizona

update

parent 8dac516a
...@@ -163,7 +163,7 @@ export default class AddUser extends Component { ...@@ -163,7 +163,7 @@ export default class AddUser extends Component {
let uniqueCompany = company.filter((val, id, array) => { let uniqueCompany = company.filter((val, id, array) => {
return array.indexOf(val) == id; return array.indexOf(val) == id;
}); });
company = this.state.role.role_id === 1? uniqueCompany : [] company = this.state.role == null? [] : this.state.role.role_id === 1? uniqueCompany : []
// console.log(uniqueCompany) // console.log(uniqueCompany)
this.setState({ this.setState({
......
...@@ -147,7 +147,7 @@ export default class EditUser extends Component { ...@@ -147,7 +147,7 @@ export default class EditUser extends Component {
let uniqueCompany = company.filter((val, id, array) => { let uniqueCompany = company.filter((val, id, array) => {
return array.indexOf(val) == id; return array.indexOf(val) == id;
}); });
company = this.state.role.role_id === 1? uniqueCompany : [] company = this.state.role == null? [] : this.state.role.role_id === 1? uniqueCompany : []
// console.log(uniqueCompany) // console.log(uniqueCompany)
this.setState({ this.setState({
...@@ -213,6 +213,8 @@ export default class EditUser extends Component { ...@@ -213,6 +213,8 @@ export default class EditUser extends Component {
this.setState({ errorStartDate: true, msgErrorSD: 'Valid From Cannot be Empty' }) this.setState({ errorStartDate: true, msgErrorSD: 'Valid From Cannot be Empty' })
} else if (R.isNil(this.state.tempData.end_date)) { } else if (R.isNil(this.state.tempData.end_date)) {
this.setState({ errorEndDate: true, msgErrorED: 'Valid To Cannot be Empty' }) this.setState({ errorEndDate: true, msgErrorED: 'Valid To Cannot be Empty' })
} else if (this.state.company.length < 1) {
this.setState({ alert: true, messageAlert: 'Authorization company cannot be empty', tipeAlert: 'warning' })
} }
// else if (this.state.privileges.length < 1) { // else if (this.state.privileges.length < 1) {
// alert('Hak Akses belum di pilih !!') // alert('Hak Akses belum di pilih !!')
......
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