Commit d53d8cf3 authored by Dida Adams Arizona's avatar Dida Adams Arizona

Merge branch 'didam' into 'master'

update

See merge request !279
parents 8dac516a e8e6df93
......@@ -163,7 +163,7 @@ export default class AddUser extends Component {
let uniqueCompany = company.filter((val, id, array) => {
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)
this.setState({
......
......@@ -147,7 +147,7 @@ export default class EditUser extends Component {
let uniqueCompany = company.filter((val, id, array) => {
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)
this.setState({
......@@ -213,6 +213,8 @@ export default class EditUser extends Component {
this.setState({ errorStartDate: true, msgErrorSD: 'Valid From Cannot be Empty' })
} else if (R.isNil(this.state.tempData.end_date)) {
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) {
// 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