DEV Community

Cover image for Employee Management System
Kithmini
Kithmini

Posted on • Updated on

Employee Management System

Employee Leave Management system
Enter fullscreen mode Exit fullscreen mode

Overview of My Submission

This is a leave management system for employees. Which is a process within an organization that determines how leave is requested by employees and approve by managers, as well as how it tracked for payroll balance, and other purposes.

First employee can select their leave type as sick leave,vacation, floating holiday, jury duty likewise.
Then can select the date range of the leave and fill the reasons detail wise and should click the submit button.

In the home screen all the leaves applied by the employee is listed down. As well as Pending requests, Approved requests, declined are listed seperately.

And there is a another screen that shows holidays.

On the manager login side, manager can view all the leave requests of the employee. Then he can see the details and consider that approve or decline the request.As well , there is another screen in the manager side that, manager can send an email to the employee via the system.

These are the main functions of the system.

Image description

Image description

Below are few code lines in employee management part.

Set(_selectedLeaveItem, ThisItem);

If(_managerView, 
    //If manager view, get user's leave balance record and determine any overlaps this request has from other people I manage
    Set(_requesterBalanceRecord, LookUp(Balance, Year = Text(Year(Now())) && EmployeeEmail = ThisItem.Requester));
    ClearCollect(RequestOverlaps, Filter(Leave, EndDate >= _selectedLeaveItem.StartDate && StartDate <= _selectedLeaveItem.EndDate 
    && Requester <>_selectedLeaveItem.Requester));

    If(CountRows(RequestOverlaps) > 0, Set(_requestOverlapMessage, Concat(Distinct(RequestOverlaps, Requester), Result, ", ")))
);

Concurrent(
    //gather requester or approver info depending on view
    If(_managerView, 
        Set(_requester, Office365Users.UserProfile(ThisItem.Requester)), 
        Set(_selectedApprover, Office365Users.UserProfile(ThisItem.Approver)); If(Office365Users.UserPhotoMetadata(_selectedApprover.Id).HasPhoto, Set(_selectedApproverPhoto, Office365Users.UserPhoto(_selectedApprover.Id)))),
    //**** CALCULATION USED TO DETERMINE TOTAL WORK DAYS REQUESTED ****
     Set(_inclusiveTotalDaysRequested, DateDiff(ThisItem.StartDate, ThisItem.EndDate, Days) + 1);
        Set(_numFullWeeks, RoundDown(_inclusiveTotalDaysRequested / 7, 0));
        Set(_numFullDaysPartialWeek, _inclusiveTotalDaysRequested - _numFullWeeks * 7);
        Set(_startWeekday, Weekday(ThisItem.StartDate)); 
        Set(_endWeekday, Weekday(ThisItem.EndDate));


       //calculates the number of business days in the partial week left over after whole weeks are subtracted out of total days requested
    If(_numFullDaysPartialWeek = 6, 
        If(_startWeekday <= 2, Set(_numPartialWeekdays, 5), Set(_numPartialWeekdays, 4)
        ),
      _numFullDaysPartialWeek = 5,
        If(_startWeekday = 2, Set(_numPartialWeekdays, 5), _startWeekday = 1 || _startWeekday = 3 || _startWeekday = 4, Set(_numPartialWeekdays, 4), Set(_numPartialWeekdays, 3)
        ),
      _numFullDaysPartialWeek = 4,
        If(_startWeekday = 2 || _startWeekday = 3, Set(_numPartialWeekdays, 4), _startWeekday = 1 || _startWeekday = 4, Set(_numPartialWeekdays, 3), Set(_numPartialWeekdays, 2)
        ),
      _numFullDaysPartialWeek = 3,
        If(_startWeekday = 6 || _startWeekday = 7, Set(_numPartialWeekdays, 1), _startWeekday = 1 || _startWeekday = 5, Set(_numPartialWeekdays, 2), Set(_numPartialWeekdays, 3)
        ),
      _numFullDaysPartialWeek = 2,
        If(_startWeekday = 7, Set(_numPartialWeekdays, 0), _startWeekday = 1 || _startWeekday = 6, Set(_numPartialWeekdays, 1), Set(_numPartialWeekdays, 2)),
      _numFullDaysPartialWeek = 1,
        If(_startWeekday = 1 || _startWeekday = 7, Set(_numPartialWeekdays, 0), Set(_numPartialWeekdays, 1)
        ),
      _numFullDaysPartialWeek = 0, Set(_numPartialWeekdays, 0)
    );
      Set(_workDaysInRequest, _numFullWeeks * 5 + _numPartialWeekdays),
      Set(_holidaysInRequest, CountIf(Holidays, StartDate >= ThisItem.StartDate, StartDate <= ThisItem.EndDate))
);
Set(_requestedDays, _workDaysInRequest - _holidaysInRequest);
//**** END CALCULATION ****
Set(_showDetails, true);

Enter fullscreen mode Exit fullscreen mode

Submission Category:

Low-Code Legends

Link to Code on GitHub

Employee Leaves Managment System

Overview of the System

This is a leave management system for employees. Which is a process within an organization that determines how leave is requested by employees and approve by managers, as well as how it tracked for payroll balance, and other purposes.

Image description

Image description

Submission Category

Low Code Legends

License

Apache License 2.0

Screen Shots of the System

Thre are 10 interfaces in this system.

1.Login Screen

Image description

2.Home Screen

Image description

3.New Request Screen

Image description

4.Company Holidays Screen

Image description

5.Leave Balance Screen

Image description

6.Confirmation Screen

Image description

7.Change Approver Screen

Image description

8.Manager Change Request Screen

Image description

9.Manager Send Email Screen

Image description

10.About Screen

Image description

Link to the system:

https://apps.powerapps.com/play/41b5329c-2c1b-4c74-91bf-30156794f6b9?tenantId=44e3cf94-19c9-4e32-96c3-14f5bf01391a

Demo Video of the System:

https://drive.google.com/file/d/1-4YefJUhL1tUjZ6vnBQvRCX8ZxGilwOe/view?usp=sharing

Additional Resources / Info

Thre are 10 interfaces I used to create the system.

1.Login Screen

Image description

2.Home Screen

Image description

3.New Request Screen

Image description

4.Company Holidays Screen

Image description

5.Leave Balance Screen

Image description

6.Confirmation Screen

Image description

7.Change Approver Screen

Image description

8.Manager Change Request Screen

Image description

9.Manager Send Email Screen

Image description

10.About Screen

Image description

Top comments (0)