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