E-Leave is a leave management software that provides to employees of a company the ability to create leave requests to their respective managers/supervisors. It also allows administrators to process those applications and oversee the incoming leave requests.
This is the main repository that hosts E-Leave Leave Management Tool's source code. It can be deployed in 4 containerized web services via Docker Engine, which are the following:
- MySQL DB (image: mysql:8.0, port: 3306)
- Apache PHP Server (image: php:7.1.33-apache, port: 80)
- MailHog (image: mailhog/mailhog:v1.0.0, port: 8025)
- phpMyAdmin (image: phpmyadmin/phpmyadmin, port 8080)
The project tree consists of the following base folders:
/css
: Contains the basic.css
styles that can be included in all pages./database
: Contains a sample dump of theeleave
MySQL database, and its EER diagram./img
: Contains image assets./lib
: Contains a collection of PHP functions that are commonly used across all pages./pages
: Contains all the pages that a user can navigate through the tool, written in PHP./sample navigation
: Contains PNG images of a simple usage guide./templates
: Contains HTML templates that can be used dynamically for leave request e-mails.
- Docker Engine
- docker-compose
Run the following commands:
$ git clone https://github.com/savvas-leoussis/e-leave.git
$ cd e-leave
To get all the web service's Docker containers up, simply run the following command:
$ docker-compose up -d
After a while, all services should be up, and you can simply hit the address localhost:80
on your browser to access the main page.
Also, you can access phpMyAdmin via localhost:8080
, with username root
and password root
.
To shutdown all services, simply run:
$ docker-compose down
To pause all services, and maintain their state, run:
$ docker-compose pause
To unpause:
$ docker-compose unpause
To restart all services at once:
$ docker-compose restart
See Compose command-line reference for more details.
The employee logs into the tool on the URL: http://localhost with his/her credentials provided by the company (Email: employee@company.com, Password: password).
He/She enters the main tool dashboard.
The employee clicks the
Submit Request
button to create a new application, filling out all the fields.
The new application is added to the dashboard, with the
Pending
status.
Meanwhile, the corresponding supervisor receives an e-mail and either accepts or rejects the employee's request.
The supervisor clicks either the
Accept
or theReject
button.
The employee receives an e-mail with information about the outcome of his/her request.
Going back to the dashboard, the status of the request is updated.
The administrator logs into the tool admin page on the URL: http://localhost/admin.php with his/her credentials provided by the company (Email: admin@company.com, Password: password).
Then he/she enters the main tool admin dashboard.
The admin clicks the
Create User
button to create a new user, filling out all the fields.
The new user is added to the admin dashboard.
The administrator logs into the tool admin page on the URL: http://localhost/admin.php with his/her credentials provided by the company (Email: admin@company.com, Password: password).
Then he/she enters the main tool admin dashboard.
The admin clicks the row containing the user he/she wants to edit from the table of users, filling out all the fields.
The edited user is added to the admin dashboard.
The eleave
database complies with the following EER diagram: