Forum

Visibility of Leave...
 
Notifications
Retirer tout

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

2 Posts
2 Utilisateurs
0 Reactions
2,479 Vu
(@yalovali)
Posts: 7
Active Member
Début du sujet
 
[#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


 
Posté : 05/07/2021 3:32 pm
(@babynus)
Posts: 14952
Membre 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.

 


 
Posté : 09/07/2021 12:17 pm
Share:
Retour en haut