Need to see the leaves applied that particular manager only

0
I have 3 entites Manager, employee and Leave. Manager entity has 2 attributes, manager_name, and manager id.  I am building a leave application app in Mendix where Employee applies leave on the left dashboard and also selects the manager's name from the dropdown button. When the manager login into the application only leaves submitted to that manager appear to that particular manager. FOr example Employee1 applies leaves and select Manager1 name from managers drop down. when Manager1 logins in system only leaves applied to Maanager1 should be available to him to reject or approve. How to do this in Mendix? Please find the screenshots below.   Domain Model:   Dashboard page where manager approve/rejects the leaves:   Employee dashboard where they applies the leaves.      
asked
2 answers
0

Harsh, you can use a microflow data source. Put a retrieve action to get Leaves from database with XPath constraint like this

[Test.Leave_Employee/Test.Employee/Test.Employee_Manager/Test.Manager/Test.Manager_Account = $currentUser]

answered
0

Hi Harsh Bhanushali,

In the list view of manager dashboard page use xpath to retrieve only the leave which is assigned to him. when an employee requests leave you are directly assigning a manager to whom it needs to go for approval, so use like this in that list view of manager dashboard page,

Xpath: 

[XXX.Leave_Manager/XXX.Manager/XXX.Manager_Account = $currentUser]

 

Note: make sure you are associating manager and account

 

answered