Commit f2a88271 authored by Arfin Syadziy's avatar Arfin Syadziy

Merge branch 'dev/arfin' into 'ENV-DEPLOYMENT'

update permission

See merge request !1569
parents 0dc90474 ce96e220
......@@ -226,7 +226,7 @@ export default class AddRole extends Component {
if (indexID === -1) {
privileges.push({
menu_id: item.menu_id,
button_id: [1, 2, 3, 4]
button_id: [1, 2, 3, 4, 5]
})
if (item.sub_menu.length > 0) {
item.sub_menu.map((items,indexs) => {
......@@ -234,7 +234,7 @@ export default class AddRole extends Component {
if (indexIDs === -1) {
privileges.push({
menu_id: items.menu_id,
button_id: [1,2,3,4]
button_id: [1,2,3,4,5]
})
}
})
......@@ -256,7 +256,7 @@ export default class AddRole extends Component {
if (indexIDref == -1) {
privileges.push({
menu_id: item.reference,
button_id: [1,2,3,4]
button_id: [1,2,3,4,5]
})
} else {
if (total < 1) {
......@@ -290,7 +290,7 @@ export default class AddRole extends Component {
if (indexIDref == -1) {
privileges.push({
menu_id: item.reference,
button_id: [1,2,3,4]
button_id: [1,2,3,4,5]
})
} else {
if (total < 1) {
......@@ -638,7 +638,7 @@ export default class AddRole extends Component {
<div className="column-1">
<Typography style={{ fontSize: 12, color: 'white' }}>Authorization Module</Typography>
</div>
<div className="column-2 grid grid-4x content-center grid-mobile-none gap-15px">
<div className="column-2 grid grid-5x content-center grid-mobile-none gap-15px">
<div className="column-1">
<Typography style={{ fontSize: 12, color: 'white' }}>View</Typography>
</div>
......@@ -651,6 +651,9 @@ export default class AddRole extends Component {
<div className="column 4">
<Typography style={{ fontSize: 12, color: 'white' }}>Delete</Typography>
</div>
<div className="column 5">
<Typography style={{ fontSize: 12, color: 'white' }}>Download</Typography>
</div>
</div>
</div>
......@@ -671,7 +674,7 @@ export default class AddRole extends Component {
</span>
<Typography style={{ fontSize: 12, marginLeft: 5 }}>{item.label}</Typography>
</div>
<div className="column-2 grid grid-4x content-center grid-mobile-none gap-15px margin-left-10px">
<div className="column-2 grid grid-5x content-center grid-mobile-none gap-15px margin-left-10px">
<div className="column-1">
<CustomCheckbox
disabled={!this.handleItemChecked(item)}
......@@ -703,6 +706,14 @@ export default class AddRole extends Component {
onChange={() => this.handleSubItemClick(item, 4)}
/>
</div>
<div className="column 5">
<CustomCheckbox
// disabled
disabled={!this.handleItemChecked(item)}
checked={this.handleSubItemChecked(item, 5)}
onChange={() => this.handleSubItemClick(item, 5)}
/>
</div>
</div>
</div>
{item.sub_menu.length > 0 && item.sub_menu.map((items, indexs) => {
......@@ -716,7 +727,7 @@ export default class AddRole extends Component {
/>
<Typography style={{ fontSize: 12, maxWidth: '100%', marginLeft: 5 }}>{items.label}</Typography>
</div>
<div className="column-2 grid grid-4x content-center grid-mobile-none gap-15px margin-left-10px">
<div className="column-2 grid grid-5x content-center grid-mobile-none gap-15px margin-left-10px">
<div className="column-1">
<CustomCheckbox
disabled={!this.handleItemChecked(items)}
......@@ -745,6 +756,13 @@ export default class AddRole extends Component {
onChange={() => this.handleSubItemClick(items, 4)}
/>
</div>
<div className="column 5">
<CustomCheckbox
disabled={!this.handleItemChecked(items)}
checked={this.handleSubItemChecked(items, 5)}
onChange={() => this.handleSubItemClick(items, 5)}
/>
</div>
</div>
</div>
</Collapse>
......@@ -769,7 +787,7 @@ export default class AddRole extends Component {
</span>
<Typography style={{ fontSize: 12, marginLeft: 5 }}>{item.label}</Typography>
</div>
<div className="column-2 grid grid-4x content-center grid-mobile-none gap-15px margin-left-10px">
<div className="column-2 grid grid-5x content-center grid-mobile-none gap-15px margin-left-10px">
<div className="column-1">
<CustomCheckbox
disabled={!this.handleItemChecked(item)}
......@@ -801,6 +819,14 @@ export default class AddRole extends Component {
onChange={() => this.handleSubItemClick(item, 4)}
/>
</div>
<div className="column 5">
<CustomCheckbox
// disabled
disabled={!this.handleItemChecked(item)}
checked={this.handleSubItemChecked(item, 5)}
onChange={() => this.handleSubItemClick(item, 5)}
/>
</div>
</div>
</div>}
{item.sub_menu.length > 0 && item.sub_menu.map((items, indexs) => {
......@@ -814,7 +840,7 @@ export default class AddRole extends Component {
/>
<Typography style={{ fontSize: 12, maxWidth: '100%', marginLeft: 5 }}>{items.label}</Typography>
</div>
<div className="column-2 grid grid-4x content-center grid-mobile-none gap-15px margin-left-10px">
<div className="column-2 grid grid-5x content-center grid-mobile-none gap-15px margin-left-10px">
<div className="column-1">
<CustomCheckbox
disabled={!this.handleItemChecked(items)}
......@@ -843,6 +869,13 @@ export default class AddRole extends Component {
onChange={() => this.handleSubItemClick(items, 4)}
/>
</div>
<div className="column 5">
<CustomCheckbox
disabled={!this.handleItemChecked(items)}
checked={this.handleSubItemChecked(items, 5)}
onChange={() => this.handleSubItemClick(items, 5)}
/>
</div>
</div>
</div>
</Collapse>
......
......@@ -142,15 +142,15 @@ export default class EditRole extends Component {
let privileges = this.state.privileges
privileges.push({
menu_id: 23,
button_id: [1,2,3,4]
button_id: [1,2,3,4,5]
})
privileges.push({
menu_id: 24,
button_id: [1,2,3,4]
button_id: [1,2,3,4,5]
})
privileges.push({
menu_id: 25,
button_id: [1,2,3,4]
button_id: [1,2,3,4,5]
})
let payload = {
"role_id": this.state.tempData.role_id,
......@@ -254,7 +254,7 @@ export default class EditRole extends Component {
if (indexID === -1) {
privileges.push({
menu_id: item.menu_id,
button_id: [1, 2, 3, 4]
button_id: [1, 2, 3, 4, 5]
})
if (item.sub_menu.length > 0) {
item.sub_menu.map((items,indexs) => {
......@@ -262,7 +262,7 @@ export default class EditRole extends Component {
if (indexIDs === -1) {
privileges.push({
menu_id: items.menu_id,
button_id: [1,2,3,4]
button_id: [1,2,3,4,5]
})
}
})
......@@ -612,7 +612,7 @@ export default class EditRole extends Component {
<div className="column-1">
<Typography style={{ fontSize: 12, color: 'white' }}>Authorization Module</Typography>
</div>
<div className="column-2 grid grid-4x content-center grid-mobile-none gap-15px">
<div className="column-2 grid grid-5x content-center grid-mobile-none gap-15px">
<div className="column-1">
<Typography style={{ fontSize: 12, color: 'white' }}>View</Typography>
</div>
......@@ -625,6 +625,9 @@ export default class EditRole extends Component {
<div className="column 4">
<Typography style={{ fontSize: 12, color: 'white' }}>Delete</Typography>
</div>
<div className="column 5">
<Typography style={{ fontSize: 12, color: 'white' }}>Download</Typography>
</div>
</div>
</div>
......@@ -645,7 +648,7 @@ export default class EditRole extends Component {
</span>
<Typography style={{ fontSize: 12, marginLeft: 5 }}>{item.label}</Typography>
</div>
<div className="column-2 grid grid-4x content-center grid-mobile-none gap-15px margin-left-10px">
<div className="column-2 grid grid-5x content-center grid-mobile-none gap-15px margin-left-10px">
<div className="column-1">
<CustomCheckbox
disabled={!this.handleItemChecked(item)}
......@@ -676,6 +679,13 @@ export default class EditRole extends Component {
onChange={() => this.handleSubItemClick(item, 4)}
/>
</div>
<div className="column 5">
<CustomCheckbox
disabled={!this.handleItemChecked(item)}
checked={this.handleSubItemChecked(item, 5)}
onChange={() => this.handleSubItemClick(item, 5)}
/>
</div>
</div>
</div>
{item.sub_menu.length > 0 && item.sub_menu.map((items, indexs) => {
......@@ -689,7 +699,7 @@ export default class EditRole extends Component {
/>
<Typography style={{ fontSize: 12, maxWidth: '100%', marginLeft: 5 }}>{items.label}</Typography>
</div>
<div className="column-2 grid grid-4x content-center grid-mobile-none gap-15px margin-left-10px">
<div className="column-2 grid grid-5x content-center grid-mobile-none gap-15px margin-left-10px">
<div className="column-1">
<CustomCheckbox
disabled={!this.handleItemChecked(items)}
......@@ -718,6 +728,13 @@ export default class EditRole extends Component {
onChange={() => this.handleSubItemClick(items, 4)}
/>
</div>
<div className="column 5">
<CustomCheckbox
disabled={!this.handleItemChecked(items)}
checked={this.handleSubItemChecked(items, 5)}
onChange={() => this.handleSubItemClick(items, 5)}
/>
</div>
</div>
</div>
</Collapse>
......@@ -742,7 +759,7 @@ export default class EditRole extends Component {
</span>
<Typography style={{ fontSize: 12, marginLeft: 5 }}>{item.label}</Typography>
</div>
<div className="column-2 grid grid-4x content-center grid-mobile-none gap-15px margin-left-10px">
<div className="column-2 grid grid-5x content-center grid-mobile-none gap-15px margin-left-10px">
<div className="column-1">
<CustomCheckbox
disabled={!this.handleItemChecked(item)}
......@@ -773,6 +790,13 @@ export default class EditRole extends Component {
onChange={() => this.handleSubItemClick(item, 4)}
/>
</div>
<div className="column 5">
<CustomCheckbox
disabled={!this.handleItemChecked(item)}
checked={this.handleSubItemChecked(item, 5)}
onChange={() => this.handleSubItemClick(item, 5)}
/>
</div>
</div>
</div>}
{item.sub_menu.length > 0 && item.sub_menu.map((items, indexs) => {
......@@ -786,7 +810,7 @@ export default class EditRole extends Component {
/>
<Typography style={{ fontSize: 12, maxWidth: '100%', marginLeft: 5 }}>{items.label}</Typography>
</div>
<div className="column-2 grid grid-4x content-center grid-mobile-none gap-15px margin-left-10px">
<div className="column-2 grid grid-5x content-center grid-mobile-none gap-15px margin-left-10px">
<div className="column-1">
<CustomCheckbox
disabled={!this.handleItemChecked(items)}
......@@ -815,6 +839,13 @@ export default class EditRole extends Component {
onChange={() => this.handleSubItemClick(items, 4)}
/>
</div>
<div className="column 5">
<CustomCheckbox
disabled={!this.handleItemChecked(items)}
checked={this.handleSubItemChecked(items, 5)}
onChange={() => this.handleSubItemClick(items, 5)}
/>
</div>
</div>
</div>
</Collapse>
......
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