Out of office visibility on dashboard in Service

Hi

A lot of users have asked me to activate a kind of warning when you activate Out of office functionality (by changing status on a user) in Service 8. They would like to get a message on their dashboard in Service when their status is Not available.

This warning is now only available on the web panel Status (as shown in the picture below).

 

Is it possible to show this warning directly on the dashboard, or in the framework?

 

Kind regards,

Jeroen

RE: Out of office visibility on dashboard in Service

Hi Jeroen,

 

If you have the availability of Expander Services, you can add someting like I created.

 

Using the systemscript MainMenu, I added a menu group where the title is depending on the current status. (Available or Unavailable.) As a menu item in this group, I added the possibility to change your status, so you don't have to go into you personal settings.

In addition, I also created a selection that shows a list in the Dashboard of all people currently logged in.

Regards,

Niels

By: Niels van Broekhoven 23 Aug 2019

RE: Out of office visibility on dashboard in Service

Hi Niels og thanks a lot for your reply!

This solution could work for us! How do I get the value of the status as text on the button?

In addition, I would like to make it a button which on activation loads the edit user screen for the specific user (as we recommend all users to write an out of office message). 

This should load this page:

...scripts/admin.fcgi?_sf=0&action=editUser&personal=1&id=??

, where id=?? should be depended on the id of the user (which is not equal User ID).

 

Kind regards,

Jeroen

By: Jeroen van den Hoven 23 Aug 2019

RE: Out of office visibility on dashboard in Service

Hi Jeroen,

Niels might have done this differently, but you could do something like this;

#setLanguageLevel 3;
MainMenu menu = getMainMenu();

User u = getActiveUser();

String status = u.getValue("status");
if(status == "1") status ="Available";
else if (status == "2") status = "Unavailable";
else status = "";

if(status != "")
{
	menu.addGroup(status, "../graphics/8/history.png", 0);
  menu.addItem("Set Out of office", getProgramAdmin() + "&action=editUser&personal=1&id=" + getVariable("activeUser"),0,1);
}
By: Michel Krohn-Dale 23 Aug 2019

RE: Out of office visibility on dashboard in Service

Hi Michel,

 

This was indeed about 90% of how I created this. You even guessed the right picture (history.png)!!

 

By: Niels van Broekhoven 23 Aug 2019

RE: Out of office visibility on dashboard in Service

Thanks to both Michel and Niels!

This works perfectly :)

 

 

By: Jeroen van den Hoven 23 Aug 2019