Skip to content

Commit

Permalink
OHRM5X-604: Fix pim report to action buttons are not placed in the co…
Browse files Browse the repository at this point in the history
…rrect order (orangehrm#971)
  • Loading branch information
yasirunilan authored and RajithaKumara committed Nov 17, 2021
1 parent 43ffab8 commit 1dc5cc9
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -231,14 +231,6 @@ export default {
cellType: 'oxd-table-cell-actions',
cellConfig: {},
};
if (this.$can.update(`subordinates`)) {
headerActions.cellConfig.edit = {
onClick: this.onClickEdit,
props: {
name: 'pencil-fill',
},
};
}
if (this.$can.delete(`subordinates`)) {
headerActions.cellConfig.delete = {
onClick: this.onClickDelete,
Expand All @@ -248,6 +240,14 @@ export default {
},
};
}
if (this.$can.update(`subordinates`)) {
headerActions.cellConfig.edit = {
onClick: this.onClickEdit,
props: {
name: 'pencil-fill',
},
};
}
return Object.keys(headerActions.cellConfig).length > 0
? this.headers.concat([headerActions])
: this.headers;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -231,14 +231,6 @@ export default {
cellType: 'oxd-table-cell-actions',
cellConfig: {},
};
if (this.$can.update(`supervisor`)) {
headerActions.cellConfig.edit = {
onClick: this.onClickEdit,
props: {
name: 'pencil-fill',
},
};
}
if (this.$can.delete(`supervisor`)) {
headerActions.cellConfig.delete = {
onClick: this.onClickDelete,
Expand All @@ -248,6 +240,14 @@ export default {
},
};
}
if (this.$can.update(`supervisor`)) {
headerActions.cellConfig.edit = {
onClick: this.onClickEdit,
props: {
name: 'pencil-fill',
},
};
}
return Object.keys(headerActions.cellConfig).length > 0
? this.headers.concat([headerActions])
: this.headers;
Expand Down

0 comments on commit 1dc5cc9

Please sign in to comment.