Skip to content

fix(pwa): approval actions button for self leaves (backport #4395)#4405

Merged
iamkhanraheel merged 3 commits intoversion-16-hotfixfrom
mergify/bp/version-16-hotfix/pr-4395
Apr 17, 2026
Merged

fix(pwa): approval actions button for self leaves (backport #4395)#4405
iamkhanraheel merged 3 commits intoversion-16-hotfixfrom
mergify/bp/version-16-hotfix/pr-4395

Conversation

@mergify
Copy link
Copy Markdown
Contributor

@mergify mergify bot commented Apr 17, 2026

Reason

  • On PWA, even if the check Prevent self approval for leaves even if user has permissions is enabled in HR Settings, they can see actions button to approve or reject. There is already a backend validation which doesn't allow user to approve their own leaves but these actions button should also be not visible to them
image image

Changes done

  • added conditions in hasPermssion for approval to prevent showing actions button for such case
  • moved hr settings resource into a new resource file
Screen.Recording.2026-04-16.at.6.26.48.PM.mov

Summary by CodeRabbit

  • New Features
    • Added new HR setting to control leave request self-approval. When enabled, this setting prevents employees from approving their own leave requests, ensuring proper separation of duties and enhanced oversight in the leave approval process. This provides organizations with greater control over leave approval workflows and compliance with separation of duties principles.

This is an automatic backport of pull request #4395 done by [Mergify](https://mergify.com).

…leave, create resource for hr settings

(cherry picked from commit 0fae64e)
(cherry picked from commit e4dee64)
@iamkhanraheel iamkhanraheel merged commit 9ae30ce into version-16-hotfix Apr 17, 2026
15 checks passed
@iamkhanraheel iamkhanraheel deleted the mergify/bp/version-16-hotfix/pr-4395 branch April 17, 2026 09:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant