The ability to open and close personal shifts has been added
Starting from V7, personal shifts can be managed via the API, allowing users to open personal shifts and switch roles directly from mobile terminals.
Opening and closing a personal shift, like other operations tied to the user and their rights, is confirmed by a pin code (see AuthenticateByPin, ICredentials).
In some establishments, instead of one fixed position, an employee may work in different roles at different times. For example, they may work one shift as a waiter according to the schedule, and another as a hostess, bartender, cashier, etc., while having different rights and a different set of available operations, as well as different pay rates. In this case, when opening a personal shift, it is necessary to specify which role the employee will be working in. To change roles, the current personal shift must be closed and a new one opened with a different role.
New methods and fields:
OpenPersonalSession— open a personal shift,ClosePersonalSession— close a personal shift,IRestaurant.UsePersonalRoles— whether roles are used in the restaurant,IUser.GetUserRoles— get the list of roles available to the user at the moment.
An example of managing personal shifts can be seen in the PersonalSessionsTester class included in the SDK for V7 of the SamplePlugin.