Browse Source

fix: company_id is null & default value in default page

pull/1/head
wahyun 7 months ago
parent
commit
853edde2d4
  1. 5
      src/views/Master/MasterRoles/DialogForm.js
  2. 1
      src/views/Master/MasterRoles/index.js

5
src/views/Master/MasterRoles/DialogForm.js

@ -112,6 +112,10 @@ class DialogForm extends Component {
alert("Description cannot be empty!");
return true;
}
if (!this.state.selectedMenu || this.state.selectedMenu === "") {
alert("Default page cannot be empty!");
return true;
}
}
handleSave = () => {
@ -216,6 +220,7 @@ class DialogForm extends Component {
onChange={(e) => {
this.setState({ selectedMenu: e.target.value });
}}>
<option value="" selected disabled>Select default page</option>
{this.state.menu.map((item) => (
<option key={item.id} value={item.id}>
{item.name}

1
src/views/Master/MasterRoles/index.js

@ -51,6 +51,7 @@ class index extends Component {
all_project: props.all_project || null,
hierarchy: props.hierarchy || [],
user_name: props.user_name || '',
company_id: props.company_id || 0,
config: {
headers: {
Authorization: `Bearer ${props.token || ''}`,

Loading…
Cancel
Save