-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Code format and added "spring-servlet file" to Git
- Loading branch information
Showing
76 changed files
with
13,375 additions
and
10,077 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
.idea | ||
leavetrack.iml | ||
target | ||
src/main/webapp/WEB-INF/spring-servlet.xml | ||
src/main/resources/config.properties |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,52 +2,54 @@ CREATE DATABASE leaveDatabase; | |
|
||
USE leaveDatabase; | ||
|
||
Create table LeaveDays( | ||
id BIGINT UNSIGNED NOT NULL AUTO_INCREMENT, | ||
PRIMARY KEY (id), | ||
yearEmployed DATE NOT NULL, | ||
sickDaysLeft INT UNSIGNED NOT NULL DEFAULT 0, | ||
sickDaysTotal INT UNSIGNED NOT NULL DEFAULT 0, | ||
familyDaysLeft INT UNSIGNED NOT NULL DEFAULT 0, | ||
familyDaysTotal INT UNSIGNED NOT NULL DEFAULT 0, | ||
maternityDaysLeft INT UNSIGNED NOT NULL DEFAULT 0, | ||
maternityDaysTotal INT UNSIGNED NOT NULL DEFAULT 0, | ||
annualDaysLeft INT UNSIGNED NOT NULL DEFAULT 0, | ||
annualDaysTotal INT UNSIGNED NOT NULL DEFAULT 0 ); | ||
|
||
Create table Employee(id BIGINT UNSIGNED NOT NULL AUTO_INCREMENT, | ||
PRIMARY KEY (id), | ||
leaveId BIGINT UNSIGNED NOT NULL, | ||
FOREIGN KEY (leaveId) REFERENCES leavedays (id), | ||
username varchar (20) NOT NULL, | ||
firstName varchar (255) NOT NULL, | ||
lastName varchar (255) NOT NULL , | ||
phoneNumber varchar (255) NOT NULL, | ||
email varchar (255) NOT NULL, | ||
jobTitle varchar (255), | ||
supervisorId BIGINT unsigned, | ||
FOREIGN KEY (supervisorId) REFERENCES Employee (id), | ||
active Boolean NOT NULL DEFAULT TRUE, | ||
password varchar(255) NOT NULL, | ||
role varchar(255) NOT NULL DEFAULT 'employee', | ||
version INT UNSIGNED DEFAULT 0); | ||
|
||
Create table Request( | ||
id BIGINT UNSIGNED NOT NULL AUTO_INCREMENT, | ||
PRIMARY KEY (id), | ||
employeeid BIGINT UNSIGNED NOT NULL, | ||
FOREIGN KEY (employeeid) REFERENCES Employee (id), | ||
timestamp timestamp NOT NULL , | ||
leaveType varchar (255) NOT NULL , | ||
reason TEXT NOT NULL , | ||
startDate Date NOT NULL , | ||
endDate Date NOT NULL , | ||
state varchar (255), | ||
comment TEXT); | ||
|
||
|
||
INSERT INTO leavedays(yearEmployed) VALUE ('2006-01-01'); | ||
INSERT INTO Employee (leaveId,username,firstName,lastName,phoneNumber,email,jobTitle,password)VALUES (1,'Vzulu','Vane','Zulu','27718903620','[email protected]','Trainee','$2a$10$HTwDZJ1tLQobcObmlQH28.DC3fe1coMj.9H1dXj.Ul7A0q9Ktk9P.'); | ||
CREATE TABLE LeaveDays ( | ||
id BIGINT UNSIGNED NOT NULL AUTO_INCREMENT, | ||
PRIMARY KEY (id), | ||
yearEmployed DATE NOT NULL, | ||
sickDaysLeft INT UNSIGNED NOT NULL DEFAULT 0, | ||
sickDaysTotal INT UNSIGNED NOT NULL DEFAULT 0, | ||
familyDaysLeft INT UNSIGNED NOT NULL DEFAULT 0, | ||
familyDaysTotal INT UNSIGNED NOT NULL DEFAULT 0, | ||
maternityDaysLeft INT UNSIGNED NOT NULL DEFAULT 0, | ||
maternityDaysTotal INT UNSIGNED NOT NULL DEFAULT 0, | ||
annualDaysLeft INT UNSIGNED NOT NULL DEFAULT 0, | ||
annualDaysTotal INT UNSIGNED NOT NULL DEFAULT 0); | ||
|
||
CREATE TABLE Employee (id BIGINT UNSIGNED NOT NULL AUTO_INCREMENT, | ||
PRIMARY KEY (id), | ||
leaveId BIGINT UNSIGNED NOT NULL, | ||
FOREIGN KEY (leaveId) REFERENCES leavedays (id), | ||
username VARCHAR(20) NOT NULL, | ||
firstName VARCHAR(255) NOT NULL, | ||
lastName VARCHAR(255) NOT NULL, | ||
phoneNumber VARCHAR(255) NOT NULL, | ||
email VARCHAR(255) NOT NULL, | ||
jobTitle VARCHAR(255), | ||
supervisorId BIGINT UNSIGNED, | ||
FOREIGN KEY (supervisorId) REFERENCES Employee (id), | ||
active BOOLEAN NOT NULL DEFAULT TRUE, | ||
password VARCHAR(255) NOT NULL, | ||
role VARCHAR(255) NOT NULL DEFAULT 'employee', | ||
version INT UNSIGNED DEFAULT 0); | ||
|
||
CREATE TABLE Request ( | ||
id BIGINT UNSIGNED NOT NULL AUTO_INCREMENT, | ||
PRIMARY KEY (id), | ||
employeeid BIGINT UNSIGNED NOT NULL, | ||
FOREIGN KEY (employeeid) REFERENCES Employee (id), | ||
timestamp TIMESTAMP NOT NULL, | ||
leaveType VARCHAR(255) NOT NULL, | ||
reason TEXT NOT NULL, | ||
startDate DATE NOT NULL, | ||
endDate DATE NOT NULL, | ||
state VARCHAR(255), | ||
comment TEXT); | ||
|
||
|
||
INSERT INTO leavedays (yearEmployed) VALUE ('2006-01-01'); | ||
INSERT INTO Employee (leaveId, username, firstName, lastName, phoneNumber, email, jobTitle, password) VALUES | ||
(1, 'Vzulu', 'Vane', 'Zulu', '27718903620', '[email protected]', 'Trainee', | ||
'$2a$10$HTwDZJ1tLQobcObmlQH28.DC3fe1coMj.9H1dXj.Ul7A0q9Ktk9P.'); | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
src/main/java/com/ubiquitech/leaveTrack/calendar/FullCalendar.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.