Browse Source

Merge pull request 'dev-wahyun' (#95) from dev-wahyun into staging

Reviewed-on: ibnu/generic-ospro-frontend#95
pull/1/head
farhantock 7 months ago
parent
commit
efeff13c43
  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!"); alert("Description cannot be empty!");
return true; return true;
} }
if (!this.state.selectedMenu || this.state.selectedMenu === "") {
alert("Default page cannot be empty!");
return true;
}
} }
handleSave = () => { handleSave = () => {
@ -216,6 +220,7 @@ class DialogForm extends Component {
onChange={(e) => { onChange={(e) => {
this.setState({ selectedMenu: e.target.value }); this.setState({ selectedMenu: e.target.value });
}}> }}>
<option value="" selected disabled>Select default page</option>
{this.state.menu.map((item) => ( {this.state.menu.map((item) => (
<option key={item.id} value={item.id}> <option key={item.id} value={item.id}>
{item.name} {item.name}

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

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

Loading…
Cancel
Save