From b4b2e6fb89a2f16b567c911239c341c130fbb637 Mon Sep 17 00:00:00 2001
From: Muhammad Zahran Agung Dewantoro <muhammad.zahran@ui.ac.id>
Date: Sun, 23 May 2021 22:51:44 +0700
Subject: [PATCH 1/2] add gradle-wrapper.properties

---
 gradle/wrapper/gradle-wrapper.properties | 5 +++++
 1 file changed, 5 insertions(+)
 create mode 100644 gradle/wrapper/gradle-wrapper.properties

diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties
new file mode 100644
index 0000000..be52383
--- /dev/null
+++ b/gradle/wrapper/gradle-wrapper.properties
@@ -0,0 +1,5 @@
+distributionBase=GRADLE_USER_HOME
+distributionPath=wrapper/dists
+distributionUrl=https\://services.gradle.org/distributions/gradle-6.7-bin.zip
+zipStoreBase=GRADLE_USER_HOME
+zipStorePath=wrapper/dists
-- 
GitLab


From 9ea8a1df833bcf65dc8bd70a609e89e060820e78 Mon Sep 17 00:00:00 2001
From: Muhammad Zahran Agung Dewantoro <muhammad.zahran@ui.ac.id>
Date: Sun, 23 May 2021 23:21:01 +0700
Subject: [PATCH 2/2] add create courses and schdule to home

---
 build/bootRunMainClassName                    |  1 +
 .../resources/main/application-ci.properties  |  3 +
 .../main/application-heroku.properties        |  3 +
 build/resources/main/application.properties   |  6 ++
 build/resources/main/log4j2.xml               | 37 ++++++++
 .../main/templates/SeeAppointment.html        | 43 ++++++++++
 .../main/templates/accept_reject.html         | 82 ++++++++++++++++++
 build/resources/main/templates/add_roles.html | 84 +++++++++++++++++++
 .../main/templates/create_course.html         | 51 +++++++++++
 .../resources/main/templates/create_slot.html | 64 ++++++++++++++
 .../main/templates/display_schedule.html      | 50 +++++++++++
 build/resources/main/templates/home.html      | 39 +++++++++
 build/resources/main/templates/index.html     | 18 ++++
 build/resources/main/templates/register.html  | 16 ++++
 .../compileJava/source-classes-mapping.txt    | 61 ++++++++++++++
 src/main/resources/templates/home.html        | 14 ++++
 16 files changed, 572 insertions(+)
 create mode 100644 build/bootRunMainClassName
 create mode 100644 build/resources/main/application-ci.properties
 create mode 100644 build/resources/main/application-heroku.properties
 create mode 100644 build/resources/main/application.properties
 create mode 100644 build/resources/main/log4j2.xml
 create mode 100644 build/resources/main/templates/SeeAppointment.html
 create mode 100644 build/resources/main/templates/accept_reject.html
 create mode 100644 build/resources/main/templates/add_roles.html
 create mode 100644 build/resources/main/templates/create_course.html
 create mode 100644 build/resources/main/templates/create_slot.html
 create mode 100644 build/resources/main/templates/display_schedule.html
 create mode 100644 build/resources/main/templates/home.html
 create mode 100644 build/resources/main/templates/index.html
 create mode 100644 build/resources/main/templates/register.html
 create mode 100644 build/tmp/compileJava/source-classes-mapping.txt

diff --git a/build/bootRunMainClassName b/build/bootRunMainClassName
new file mode 100644
index 0000000..801e298
--- /dev/null
+++ b/build/bootRunMainClassName
@@ -0,0 +1 @@
+com.adpro.tasc.TASCApp
\ No newline at end of file
diff --git a/build/resources/main/application-ci.properties b/build/resources/main/application-ci.properties
new file mode 100644
index 0000000..287705e
--- /dev/null
+++ b/build/resources/main/application-ci.properties
@@ -0,0 +1,3 @@
+spring.datasource.url=${SPRING_DATASOURCE_URL}
+spring.datasource.username=${SPRING_DATASOURCE_USERNAME}
+spring.datasource.password=${SPRING_DATASOURCE_PASSWORD}
\ No newline at end of file
diff --git a/build/resources/main/application-heroku.properties b/build/resources/main/application-heroku.properties
new file mode 100644
index 0000000..afb54a4
--- /dev/null
+++ b/build/resources/main/application-heroku.properties
@@ -0,0 +1,3 @@
+spring.datasource.url=${DATABASE_URL}
+spring.datasource.username=
+spring.datasource.password=
\ No newline at end of file
diff --git a/build/resources/main/application.properties b/build/resources/main/application.properties
new file mode 100644
index 0000000..aa058e5
--- /dev/null
+++ b/build/resources/main/application.properties
@@ -0,0 +1,6 @@
+spring.datasource.url=jdbc:postgresql://localhost:5432/tasc
+spring.datasource.username=alifyandra
+spring.datasource.password=chungalip01
+spring.datasource.currentSchema=tasc
+
+logging.level.root=info
\ No newline at end of file
diff --git a/build/resources/main/log4j2.xml b/build/resources/main/log4j2.xml
new file mode 100644
index 0000000..b3c893a
--- /dev/null
+++ b/build/resources/main/log4j2.xml
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Configuration>
+    <Appenders>
+        <Console name="LogToConsole" target="SYSTEM_OUT">
+            <Filters>
+                <LevelRangeFilter minLevel="FATAL" maxLevel="INFO" onMatch="ACCEPT" onMismatch="DENY"/>
+            </Filters>
+            <PatternLayout pattern="%style{%d{ISO8601}}{black} %highlight{%-5level }[%style{%t}{bright,blue}] %style{%c{1.}}{bright,yellow}: %msg%n%throwable"/>
+        </Console>
+
+        <RollingFile name="LogGenericErrorsToFile" fileName="./logs/${date:MM-yyyy}/errors/error.log"
+                     filePattern="./logs/${date:MM-yyyy}/errors/error-%d{MM-yyyy}-%i.log.gz">
+            <Filters>
+                <LevelRangeFilter minLevel="FATAL" maxLevel="ERROR" onMatch="ACCEPT" onMismatch="DENY"/>
+            </Filters>
+            <PatternLayout pattern="%style{%d{ISO8601}}{black} %highlight{%-5level }[%style{%t}{bright,blue}] %style{%c{1.}}{bright,yellow}: %msg%n%throwable"/>
+
+            <Policies>
+                <TimeBasedTriggeringPolicy interval="1" modulate="true"/>
+                <SizeBasedTriggeringPolicy size="25MB"/>
+            </Policies>
+        </RollingFile>
+    </Appenders>
+    <Loggers>
+        <Logger name="com.adpro.tasc" additivity="false">
+            <AppenderRef ref="LogToConsole"/>
+            <AppenderRef ref="LogErrorsToFile"/>
+        </Logger>
+        <Logger name="org.springframework" additivity="false">
+            <AppenderRef ref="LogToConsole"/>
+        </Logger>
+        <Root level="all">
+            <AppenderRef ref="LogToConsole"/>
+            <AppenderRef ref="LogErrorsToFile"/>
+        </Root>
+    </Loggers>
+</Configuration>
diff --git a/build/resources/main/templates/SeeAppointment.html b/build/resources/main/templates/SeeAppointment.html
new file mode 100644
index 0000000..a64397c
--- /dev/null
+++ b/build/resources/main/templates/SeeAppointment.html
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<html lang="en" xmlns:th="http://www.thymeleaf.org">
+<head>
+    <meta charset="UTF-8">
+    <title>See Appointment</title>
+    <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">
+    <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
+    <!-- Bootstrap -->
+    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.0-beta3/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-eOJMYsd53ii+scO/bJGFsiCZc+5NDVN2yr8+0RDqr0Ql0h+rP48ckxlpbzKgwra6" crossorigin="anonymous">
+    <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.0.0-beta3/dist/js/bootstrap.bundle.min.js" integrity="sha384-JEW9xMcG8R+pH31jmWH6WWP0WintQrMb4s7ZOdauHnUtxwoG2vI5DkLtS3qm9Ekf" crossorigin="anonymous"></script>
+    <!-- Datatables CDN-->
+    <link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/1.10.24/css/jquery.dataTables.css">
+    <script type="text/javascript" charset="utf8" src="https://cdn.datatables.net/1.10.24/js/jquery.dataTables.js"></script>
+</head>
+
+<body>
+<h3>See Appointment</h3>
+<table class="table table-striped" style="width:100%">
+    <thead>
+    <th> Student Name </th>
+    <th> Course </th>
+    <th> Date </th>
+    <th> Duration </th>
+    </thead>
+    <tbody>
+    <td> Test Student </td>
+    <td> Software Engineering </td>
+    <td> 5-10-2021</td>
+    <td> 30 min </td>
+    </tbody>
+    <tr th:each="appoint :${newAppointment}">
+        <td th:text="${appoint.student.fullName}"> </td>
+        <td th:text="${appoint.appointment.course.name}"></td>
+        <td th:text="${appoint.appointment.date}"></td>
+        <td th:text="${appoint.requestTime}"></td>
+    </tr>
+</table>
+<br>
+<form th:action="@{/home}">
+    <button type="submit" class="btn btn-outline-dark">Return</button>
+</form>
+</body>
+</html>
\ No newline at end of file
diff --git a/build/resources/main/templates/accept_reject.html b/build/resources/main/templates/accept_reject.html
new file mode 100644
index 0000000..5348c77
--- /dev/null
+++ b/build/resources/main/templates/accept_reject.html
@@ -0,0 +1,82 @@
+<!DOCTYPE html>
+<html lang="en" xmlns:th="http://www.thymeleaf.org">
+<head>
+    <meta charset="UTF-8">
+    <title>Request Appointment</title>
+    <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">
+    <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
+    <!-- Bootstrap -->
+    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.0-beta3/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-eOJMYsd53ii+scO/bJGFsiCZc+5NDVN2yr8+0RDqr0Ql0h+rP48ckxlpbzKgwra6" crossorigin="anonymous">
+    <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.0.0-beta3/dist/js/bootstrap.bundle.min.js" integrity="sha384-JEW9xMcG8R+pH31jmWH6WWP0WintQrMb4s7ZOdauHnUtxwoG2vI5DkLtS3qm9Ekf" crossorigin="anonymous"></script>
+    <!-- Datatables CDN-->
+    <link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/1.10.24/css/jquery.dataTables.css">
+    <script type="text/javascript" charset="utf8" src="https://cdn.datatables.net/1.10.24/js/jquery.dataTables.js"></script>
+</head>
+
+<body>
+<h3>Accept Reject Appointments</h3>
+<table class="table table-striped" style="width:100%">
+    <thead>
+    <tr>
+        <th>Full Name</th>
+        <th>Course</th>
+        <th>Date</th>
+        <th>Duration</th>
+        <th>Status</th>
+        <th>Permission</th>
+        <th>Accept/Reject</th>
+    </tr>
+    </thead>
+    <tbody>
+    <tr>
+        <td> Test Student </td>
+        <td> Software Engineering </td>
+        <td> 5-10-2021</td>
+        <td> 30 min </td>
+        <td> Pending </td>
+        <td> True </td>
+        <td>
+            <form th:action="@{/see}">
+                <button type="submit" class="btn btn-outline-dark">Accept</button>
+            </form>
+            <form th:action="@{/home}">
+                <button onclick="myFunction()" class="btn btn-outline-dark">Reject</button>
+            </form>
+        </td>
+    </tr>
+    <tr th:each="users :${userList}">
+        <td th:text="${users.student.fullName}"> </td>
+        <td th:text="${users.appointment.course.name}"></td>
+        <td th:text="${users.appointment.date}"></td>
+        <td th:text="${users.requestTime}"></td>
+        <td th:text="${users.status}"></td>
+        <td th:text="${users.adminHasPermission}"></td>
+        <!-- Assign role button here-->
+        <td>
+            <form th:action="@{/accepted}" th:object="${users}" method="post">
+                <input id = "fullName" name = "fullName" type = "hidden" value = "${users.student.fullName}"/>
+                <input id = "course" name = "course" type = "hidden" value = "${users.appointment.course.name}"/>
+                <input id = "date" name = "date" type = "hidden" value = "${users.appointment.date}"/>
+                <input id = "duration" name = "duration" type = "hidden" value = "${users.requestTime}"/>
+                <button type="submit" class="btn btn-outline-dark">Accept</button>
+            </form>
+            <form th:action="@{/home}">
+                <button onclick="myFunction()" class="btn btn-outline-dark">Reject</button>
+            </form>
+        </td>
+    </tr>
+    </tbody>
+</table>
+<br>
+<form th:action="@{/home}">
+    <button type="submit" class="btn btn-outline-dark">Return</button>
+</form>
+
+<script>
+function myFunction() {
+  alert("Rejected!");
+}
+</script>
+
+</body>
+</html>
\ No newline at end of file
diff --git a/build/resources/main/templates/add_roles.html b/build/resources/main/templates/add_roles.html
new file mode 100644
index 0000000..d48c535
--- /dev/null
+++ b/build/resources/main/templates/add_roles.html
@@ -0,0 +1,84 @@
+<!DOCTYPE html>
+<html lang="en" xmlns:th="http://www.thymeleaf.org" xmlns:sec="http://www.w3.org/1999/xhtml">
+    <head>
+        <meta charset="UTF-8">
+        <title>Add Roles</title>
+
+        <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">
+        <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
+        <!-- Bootstrap -->
+        <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.0-beta3/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-eOJMYsd53ii+scO/bJGFsiCZc+5NDVN2yr8+0RDqr0Ql0h+rP48ckxlpbzKgwra6" crossorigin="anonymous">
+        <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.0.0-beta3/dist/js/bootstrap.bundle.min.js" integrity="sha384-JEW9xMcG8R+pH31jmWH6WWP0WintQrMb4s7ZOdauHnUtxwoG2vI5DkLtS3qm9Ekf" crossorigin="anonymous"></script>
+        <!-- Datatables CDN-->
+        <link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/1.10.24/css/jquery.dataTables.css">
+        <script type="text/javascript" charset="utf8" src="https://cdn.datatables.net/1.10.24/js/jquery.dataTables.js"></script>
+
+    </head>
+
+    <body>
+
+    <h3>Add Roles to User</h3>
+
+    <div sec:authorize="!isAuthenticated()">
+        <a href="/index"> Login </a>
+    </div>
+
+    <div sec:authorize="hasRole('ROLE_ADMIN')">
+
+        <table id="userList" class="table table-striped" style="width:100%">
+            <thead>
+            <tr>
+                <th>User</th>
+                <th>Full Name</th>
+                <th>Role</th>
+                <th>Select Role</th>
+            </tr>
+            </thead>
+            <tbody>
+            <tr>
+                <td>  </td>
+                <td>  </td>
+                <td>  </td>
+                <td>
+                    <form th:action="@{/home}">
+                        <button type="submit" class="btn btn-outline-dark">Student</button>
+                    </form>
+                    <form th:action="@{/home}">
+                        <button onclick="myFunction()" class="btn btn-outline-dark">Teaching Assistant</button>
+                    </form>
+                </td>
+            </tr>
+            <tr th:each="user :${userList}">
+                <td th:text="${user.userName}"> </td>
+                <td th:text="${user.fullName}"></td>
+                <td th:text="${user.role}"></td>
+                <!-- Assign role button here-->
+                <td>
+                    <form th:action="@{/add-roles/student}" th:object="${user}" method="post">
+                        <input id = "userName" name = "userName" type = "hidden" value = "${user.userName}"/>
+                        <input id = "fullName" name = "fullName" type = "hidden" value = "${user.fullName}"/>
+                        <input id = "password" name = "password" type = "hidden" value = "${user.password}"/>
+                        <button type="submit" class="btn btn-outline-dark" value="STUDENT">Student</button>
+                    </form>
+                    <form th:action="@{/add-roles/ta}" th:object="${user}" method="post">
+                        <input id = "userNameTA" name = "userNameTA" type = "hidden" value = "${user.userName}"/>
+                        <input id = "fullNameTA" name = "fullNameTA" type = "hidden" value = "${user.fullName}"/>
+                        <input id = "passwordTA" name = "passwordTA" type = "hidden" value = "${user.password}"/>
+                    <button type="submit" class="btn btn-outline-dark" value="TEACHING_ASSISTANT">Teaching Assistant</button>
+                    </form>
+                </td>
+            </tr>
+            </tbody>
+        </table>
+    </div>
+    <br>
+    <form th:action="@{/home}">
+        <button type="submit" class="btn btn-outline-dark">Return</button>
+    </form>
+
+
+    <script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js" integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM" crossorigin="anonymous"></script>
+
+    </body>
+
+</html>
\ No newline at end of file
diff --git a/build/resources/main/templates/create_course.html b/build/resources/main/templates/create_course.html
new file mode 100644
index 0000000..19cce00
--- /dev/null
+++ b/build/resources/main/templates/create_course.html
@@ -0,0 +1,51 @@
+<!DOCTYPE html>
+<html lang="en" xmlns:th="http://www.thymeleaf.org" xmlns:sec="http://www.w3.org/1999/xhtml">
+    <head>
+        <meta charset="UTF-8">
+        <title>Create course</title>
+
+        <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">
+        <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
+        <!-- Bootstrap -->
+        <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.0-beta3/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-eOJMYsd53ii+scO/bJGFsiCZc+5NDVN2yr8+0RDqr0Ql0h+rP48ckxlpbzKgwra6" crossorigin="anonymous">
+        <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.0.0-beta3/dist/js/bootstrap.bundle.min.js" integrity="sha384-JEW9xMcG8R+pH31jmWH6WWP0WintQrMb4s7ZOdauHnUtxwoG2vI5DkLtS3qm9Ekf" crossorigin="anonymous"></script>
+        <!-- Datatables CDN-->
+        <link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/1.10.24/css/jquery.dataTables.css">
+        <script type="text/javascript" charset="utf8" src="https://cdn.datatables.net/1.10.24/js/jquery.dataTables.js"></script>
+
+    </head>
+<body>
+    <div style="padding:2em">
+        <div>
+            <form th:action="@{/home}">
+                <button type="submit" class="btn btn-danger">Back</button>
+            </form>
+        </div>
+        <div>
+            <h2>Create Course</h2>
+        </div>
+        <div>
+            <form method="POST">
+                <label for="name">Course Name:</label>
+                <input id="name" name="name" type="text"/>
+                <button type="submit" class="btn btn-success">Submit</button>
+            </form>
+        </div>
+        <div>
+            <table id="courseList" class="table table-striped" style="width:100%">
+                <thead>
+                <tr>
+                    <th>Course Name</th>
+                </tr>
+                </thead>
+                <tbody>
+                <tr th:each="course: ${courses}">
+                    <td th:text="${course.name}"></td>
+                </tr>
+                </tbody>
+            </table>
+        </div>
+    </div>
+    <script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js" integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM" crossorigin="anonymous"></script>
+</body>
+</html>
\ No newline at end of file
diff --git a/build/resources/main/templates/create_slot.html b/build/resources/main/templates/create_slot.html
new file mode 100644
index 0000000..406ec93
--- /dev/null
+++ b/build/resources/main/templates/create_slot.html
@@ -0,0 +1,64 @@
+<!DOCTYPE html>
+<html lang="en" xmlns:th="http://www.thymeleaf.org" xmlns:sec="http://www.w3.org/1999/xhtml">
+<head>
+    <meta charset="UTF-8">
+    <title>Create Slot</title>
+
+    <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">
+    <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
+    <!-- Bootstrap -->
+    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.0-beta3/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-eOJMYsd53ii+scO/bJGFsiCZc+5NDVN2yr8+0RDqr0Ql0h+rP48ckxlpbzKgwra6" crossorigin="anonymous">
+    <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.0.0-beta3/dist/js/bootstrap.bundle.min.js" integrity="sha384-JEW9xMcG8R+pH31jmWH6WWP0WintQrMb4s7ZOdauHnUtxwoG2vI5DkLtS3qm9Ekf" crossorigin="anonymous"></script>
+    <!-- Datatables CDN-->
+    <link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/1.10.24/css/jquery.dataTables.css">
+    <script type="text/javascript" charset="utf8" src="https://cdn.datatables.net/1.10.24/js/jquery.dataTables.js"></script>
+
+</head>
+<body>
+<div style="padding:2em; text-align: center">
+    <div>
+        <form th:action="@{/create-schedule}">
+            <button type="submit" class="btn btn-danger">Back</button>
+        </form>
+    </div>
+    <div>
+        <h2>Add a new available slot to your schedule</h2>
+    </div>
+    <div>
+        <form method="POST" >
+            <div>
+                <label for="day">Day:</label>
+                <select id="day" name="day">
+                    <option th:each="day,iStat: ${days}" th:text="${day}" th:value="${iStat.index}"></option>
+                </select>
+            </div>
+
+            <h4>Start time:</h4>
+            <div>
+                <label for="startHour">Hours:</label>
+                <input id = "startHour" name = "startHour" type = "number"/>
+            </div>
+
+            <div>
+                <label for="startMinute">Minute:</label>
+                <input id = "startMinute" name = "startMinute" type = "number"/>
+            </div>
+
+            <h4>End time:</h4>
+            <div>
+                <label for="endHour">Hours:</label>
+                <input id = "endHour" name = "endHour" type = "number"/>
+            </div>
+
+            <div>
+                <label for="endMinute">Minute:</label>
+                <input id = "endMinute" name = "endMinute" type = "number"/>
+            </div>
+            <button type="submit" class="btn btn-success" >Submit</button>
+
+        </form>
+    </div>
+</div>
+
+</body>
+</html>
\ No newline at end of file
diff --git a/build/resources/main/templates/display_schedule.html b/build/resources/main/templates/display_schedule.html
new file mode 100644
index 0000000..c3661b6
--- /dev/null
+++ b/build/resources/main/templates/display_schedule.html
@@ -0,0 +1,50 @@
+<!DOCTYPE html>
+<html lang="en" xmlns:th="http://www.thymeleaf.org" xmlns:sec="http://www.w3.org/1999/xhtml">
+<head>
+    <meta charset="UTF-8">
+    <title>Display Schedule</title>
+
+    <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">
+    <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
+    <!-- Bootstrap -->
+    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.0-beta3/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-eOJMYsd53ii+scO/bJGFsiCZc+5NDVN2yr8+0RDqr0Ql0h+rP48ckxlpbzKgwra6" crossorigin="anonymous">
+    <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.0.0-beta3/dist/js/bootstrap.bundle.min.js" integrity="sha384-JEW9xMcG8R+pH31jmWH6WWP0WintQrMb4s7ZOdauHnUtxwoG2vI5DkLtS3qm9Ekf" crossorigin="anonymous"></script>
+    <!-- Datatables CDN-->
+    <link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/1.10.24/css/jquery.dataTables.css">
+    <script type="text/javascript" charset="utf8" src="https://cdn.datatables.net/1.10.24/js/jquery.dataTables.js"></script>
+
+</head>
+<body>
+    <div style="padding:2em;" >
+        <div>
+            <form th:action="@{/home}">
+                <button type="submit" class="btn btn-danger">Back</button>
+            </form>
+        </div>
+        <div>
+            <h2>Your schedule</h2>
+        </div>
+        <div>
+            <table id="scheduleList" class="table table-striped" style="width:100%">
+                <thead>
+                <tr>
+                    <th>Day</th>
+                    <th>Available Time Slot</th>
+                </tr>
+                </thead>
+                <tbody>
+                <tr th:each="slot: ${slots}">
+                    <td th:text="${days.get(slot.day)}"></td>
+                    <td th:text="${(slot.startTime / (1000 * 60 * 60))%24}+'.'+${(slot.startTime / 60000) % 60}+' - '+${(slot.finishTime / (1000 * 60 * 60))%24}+'.'+${(slot.finishTime / 60000) % 60}"></td>
+                </tr>
+                </tbody>
+            </table>
+        </div>
+        <div>
+            <form th:action="@{/add-slot}">
+                <button type="submit" class="btn btn-success">Add new available slot</button>
+            </form>
+        </div>
+    </div>
+</body>
+</html>
\ No newline at end of file
diff --git a/build/resources/main/templates/home.html b/build/resources/main/templates/home.html
new file mode 100644
index 0000000..5569898
--- /dev/null
+++ b/build/resources/main/templates/home.html
@@ -0,0 +1,39 @@
+<!DOCTYPE html>
+<html lang="en" xmlns:th="http://www.thymeleaf.org">
+<head>
+    <meta charset="UTF-8">
+    <title>Home</title>
+</head>
+
+<body>
+<h1>Create Courses</h1>
+<form th:action="@{/create-course}">
+    <p><input type="submit" value="Create Courses" ></p>
+</form>
+
+<h1>Create Schedule</h1>
+<form th:action="@{/create-schedule}">
+    <p><input type="submit" value="Create Schedule" ></p>
+</form>
+
+<h1>Roles</h1>
+<form th:action="@{/add-roles}">
+    <p><input type="submit" value="Set Roles" ></p>
+</form>
+
+<h1>See Available Appointment</h1>
+<form th:action="@{/see-appointment}">
+    <p><input type="submit" value="See Appointment" ></p>
+</form>
+
+<h1>See Request Appointment</h1>
+<form th:action="@{/accept_reject}">
+    <p><input type="submit" value="See Request Appointment" ></p>
+</form>
+
+<h3>Logout</h3>
+<form th:action="@{/}">
+    <p><input type="submit" value="Logout" ></p>
+</form>
+</body>
+</html>
\ No newline at end of file
diff --git a/build/resources/main/templates/index.html b/build/resources/main/templates/index.html
new file mode 100644
index 0000000..6cd6c6a
--- /dev/null
+++ b/build/resources/main/templates/index.html
@@ -0,0 +1,18 @@
+<!DOCTYPE html>
+<html lang="en" xmlns:th="http://www.thymeleaf.org">
+<head>
+    <meta charset="UTF-8">
+    <title>TASC</title>
+</head>
+<body>
+<h1>Welcome to TASC</h1>
+<form th:action="@{/home}">
+    <p>Username: <input type="text"></p>
+    <p>Password: <input type="text"></p>
+    <p><input type="submit" value="Login" ></p>
+</form>
+<form th:action="@{/register}">
+    <p><input type="submit" value="Register" ></p>
+</form>
+</body>
+</html>
\ No newline at end of file
diff --git a/build/resources/main/templates/register.html b/build/resources/main/templates/register.html
new file mode 100644
index 0000000..da7becc
--- /dev/null
+++ b/build/resources/main/templates/register.html
@@ -0,0 +1,16 @@
+<!DOCTYPE html>
+<html lang="en" xmlns:th="http://www.thymeleaf.org">
+<head>
+    <meta charset="UTF-8">
+    <title>Register</title>
+</head>
+<body>
+<h1>Register</h1>
+<form th:action="@{/home}">
+    <p>Username: <input type="text"></p>
+    <p>Password: <input type="text"></p>
+    <p>Retype Password: <input type="text"></p>
+    <p><input type="submit" value="Submit" ></p>
+</form>
+</body>
+</html>
\ No newline at end of file
diff --git a/build/tmp/compileJava/source-classes-mapping.txt b/build/tmp/compileJava/source-classes-mapping.txt
new file mode 100644
index 0000000..50078cc
--- /dev/null
+++ b/build/tmp/compileJava/source-classes-mapping.txt
@@ -0,0 +1,61 @@
+com/adpro/tasc/controller/CreateScheduleController.java
+ com.adpro.tasc.controller.CreateScheduleController
+com/adpro/tasc/user/db/model/AcademicUser.java
+ com.adpro.tasc.user.db.model.AcademicUser
+com/adpro/tasc/user/db/model/User.java
+ com.adpro.tasc.user.db.model.User
+com/adpro/tasc/appointment/db/mapper/CourseMapper.java
+ com.adpro.tasc.appointment.db.mapper.CourseMapper
+com/adpro/tasc/controller/HelloController.java
+ com.adpro.tasc.controller.HelloController
+com/adpro/tasc/appointment/db/model/Schedule.java
+ com.adpro.tasc.appointment.db.model.Schedule
+com/adpro/tasc/appointment/db/dao/ScheduleDAO.java
+ com.adpro.tasc.appointment.db.dao.ScheduleDAO
+com/adpro/tasc/appointment/db/template/CourseTemplate.java
+ com.adpro.tasc.appointment.db.template.CourseTemplate
+com/adpro/tasc/appointment/db/dao/CourseDAO.java
+ com.adpro.tasc.appointment.db.dao.CourseDAO
+com/adpro/tasc/TASCApp.java
+ com.adpro.tasc.TASCApp
+com/adpro/tasc/config/DBConfig.java
+ com.adpro.tasc.config.DBConfig
+com/adpro/tasc/appointment/db/mapper/ScheduleMapper.java
+ com.adpro.tasc.appointment.db.mapper.ScheduleMapper
+com/adpro/tasc/appointment/db/mapper/AppointmentMapper.java
+ com.adpro.tasc.appointment.db.mapper.AppointmentMapper
+com/adpro/tasc/appointment/db/model/Course.java
+ com.adpro.tasc.appointment.db.model.Course
+com/adpro/tasc/appointment/db/mapper/SlotMapper.java
+ com.adpro.tasc.appointment.db.mapper.SlotMapper
+com/adpro/tasc/appointment/db/template/AppointmentTemplate.java
+ com.adpro.tasc.appointment.db.template.AppointmentTemplate
+com/adpro/tasc/controller/SeeAppointmentController.java
+ com.adpro.tasc.controller.SeeAppointmentController
+com/adpro/tasc/repository/SlotRepository.java
+ com.adpro.tasc.repository.SlotRepository
+com/adpro/tasc/user/db/model/Role.java
+ com.adpro.tasc.user.db.model.Role
+ com.adpro.tasc.user.db.model.Role$1
+com/adpro/tasc/user/db/mapper/UserMapper.java
+ com.adpro.tasc.user.db.mapper.UserMapper
+com/adpro/tasc/user/db/template/UserTemplate.java
+ com.adpro.tasc.user.db.template.UserTemplate
+com/adpro/tasc/appointment/db/dao/AppointmentDAO.java
+ com.adpro.tasc.appointment.db.dao.AppointmentDAO
+com/adpro/tasc/controller/CreateCoursesController.java
+ com.adpro.tasc.controller.CreateCoursesController
+com/adpro/tasc/appointment/db/model/AppointmentRequest.java
+ com.adpro.tasc.appointment.db.model.AppointmentRequest
+ com.adpro.tasc.appointment.db.model.AppointmentRequest$Status
+com/adpro/tasc/controller/AddRolesController.java
+ com.adpro.tasc.controller.AddRolesController
+com/adpro/tasc/user/db/dao/UserDAO.java
+ com.adpro.tasc.user.db.dao.UserDAO
+com/adpro/tasc/appointment/db/model/Appointment.java
+ com.adpro.tasc.appointment.db.model.Appointment
+com/adpro/tasc/appointment/db/template/ScheduleTemplate.java
+ com.adpro.tasc.appointment.db.template.ScheduleTemplate
+com/adpro/tasc/appointment/db/model/Slot.java
+ com.adpro.tasc.appointment.db.model.Slot
+ com.adpro.tasc.appointment.db.model.Slot$Day
diff --git a/src/main/resources/templates/home.html b/src/main/resources/templates/home.html
index d1a2822..5569898 100644
--- a/src/main/resources/templates/home.html
+++ b/src/main/resources/templates/home.html
@@ -4,19 +4,33 @@
     <meta charset="UTF-8">
     <title>Home</title>
 </head>
+
 <body>
+<h1>Create Courses</h1>
+<form th:action="@{/create-course}">
+    <p><input type="submit" value="Create Courses" ></p>
+</form>
+
+<h1>Create Schedule</h1>
+<form th:action="@{/create-schedule}">
+    <p><input type="submit" value="Create Schedule" ></p>
+</form>
+
 <h1>Roles</h1>
 <form th:action="@{/add-roles}">
     <p><input type="submit" value="Set Roles" ></p>
 </form>
+
 <h1>See Available Appointment</h1>
 <form th:action="@{/see-appointment}">
     <p><input type="submit" value="See Appointment" ></p>
 </form>
+
 <h1>See Request Appointment</h1>
 <form th:action="@{/accept_reject}">
     <p><input type="submit" value="See Request Appointment" ></p>
 </form>
+
 <h3>Logout</h3>
 <form th:action="@{/}">
     <p><input type="submit" value="Logout" ></p>
-- 
GitLab