Here at the 4D Inc. office in California, we are using PTO to manage our vacation requests. This application is a work in progress and we will be releasing updated versions periodically. But PTO is an example of a secure, multi-user business application built with Wakanda that we are planning to use for our office.
PTO consists of two applications:
The main application (index.html) is used by employees to request time off from work, and for managers to authorize those requests.
The second application (admin.html) is used to set up and configure the PTO application. This is where you add user accounts and company holidays. Of course, there are more features to come.
There is one high-level user in the Wakanda directory – "admin" – with a password of "admin". Use this admin user to login to the Admin application. In the Admin application you will notice a user account has an "access level" field. Access level 4 is for a regular employee, and 3 is for a manager. You can assign each employee a manager. All accounts (regular and manager) are stored in the User dataclass. There is an example of a recursive relation attribute in the User dataclass named "myManager". So an employee User entity will point to their manager's User entity with this attribute. Wakanda makes handling recursive relation attributes super easy!
In the Admin application, assign floating holidays and paid time off hours to the users. Each user's password is set to their last name. Go ahead and create a few company holidays.
Next, launch the main PTO application (index.html) and sign in as one of the users. You will see their existing PTO requests in the grid on the left. Hit the "create" button to request some time off.
Employees have floating holidays that can be used in one day increments and PTO hours that can be used in increments from one hour to eight hours. Go ahead and create some PTO requests. I have left the client-side wide open as I am locking down the security and business rules on the server.
Have fun playing with PTO. I hope it helps you get started with your own Wakanda project.