Forum

Welcome to ProjeQtOr new Forum. We migrated old forum to the new website.
You will find all your posts here, with your usual account.
Just one point : you’ll have to reinitialize your password. Use “Lost password” feature.

Visibility of Leave...
 
Notifications
Clear all

Visibility of Leaves Calender to All, but Leaves Capacity to self only

2 Posts
2 Users
0 Reactions
2,500 Views
(@yalovali)
Posts: 7
Active Member
Topic starter
 
[#7611]

Hi,
We would like to show everyone the leaves calendar. But I dont want employees to see each other's earned leaves, it is more personel and "earned" value from the company.
I achieved it by changing a few lines in php. Some additional access restrictions for the HR modules will be great.

My solution is to edit dashboardEmployeeManager.php as:
//line 34
  require_once('../tool/projeqtor-hr.php');

 //line 65
  //$employeeList = getUserVisibleResourcesList(true, "List",'',     false, true, true,  true,true);
  $employeeList = getUserVisibleResourcesList(true, "List",'', true,  true, false, true,true);

//LINE 823
                                           foreach($employeeListRequest as $id => $name) {
                                                //errorLog("id:".$id." name:".$name." user-name:".$user->name." user-id:".$user->id);
                                                if ( isLeavesManager(getSessionUser()->id) )
                                                {                                                    
                                                  //  errorLog("user is manager of leaves");
                                                }
                                                else if ($id != $user->id )
                                                {
                                                  //  errorLog("user is NOT manager of leaves");
                                                    continue;
                                                }
   

//AND also give list of resources access to all employees to get a full list of users in the organization.

Best regards

Yasin


 
Posted : 05 Jul 2021 15H32
babynus
(@babynus)
Posts: 14966
Main Contributor Admin
 

I don't understand your issue.
On calendar, member that is not manager only sees himself
 

Manager of absence only sees resources managed
 

and in DashBoard manager sees only resources he manages
 

In my opinion all things work fine.

 


 
Posted : 09 Jul 2021 12H17
Share:

Scroll to Top