Commit 1736b4f7 authored by Martins Berzins's avatar Martins Berzins
Browse files

Deleted isAllDayEvent as if we never had it in the first place ;)

parent bbf80b86
......@@ -37,8 +37,6 @@ public class Event{
private int event_ID;
@Column(name = "EventType")
private EventType eventType;
@Column(name = "IsAllDayEvent")
private boolean isAllDayEvent;
@ManyToOne
@JoinColumn(name = "ID_c")
private Calendar calendar;
......@@ -46,12 +44,11 @@ public class Event{
//Constructor, all parameters
public Event(String name, String description, LocalDate startDate, LocalTime startTime, EventType eventType, boolean isAllDayEvent) {
public Event(String name, String description, LocalDate startDate, LocalTime startTime, EventType eventType) {
setName(name);
setDescription(description);
setStartDate(startDate);
setStartTime(startTime);
setIsAllDayEvent(isAllDayEvent);
this.eventType = eventType;
}
......@@ -99,13 +96,6 @@ public class Event{
this.eventType = eventType;
}
public boolean getIsAllDayEvent() {
return isAllDayEvent;
}
public void setIsAllDayEvent(boolean isAllDayEvent) {
this.isAllDayEvent = isAllDayEvent;
}
public LocalTime getStartTime() {
return startTime;
......@@ -119,7 +109,7 @@ public class Event{
@Override
public String toString() {
return "Event [name=" + name + ", description=" + description + ", startDate=" + startDate + ", startTime="
+ startTime + ", event_ID=" + event_ID + ", eventType=" + eventType + ", isAllDayEvent=" + isAllDayEvent
+ startTime + ", event_ID=" + event_ID + ", eventType=" + eventType + ", isAllDayEvent="
+ "]";
}
......@@ -136,12 +126,6 @@ public class Event{
this.calendar = calendar;
}
public void setAllDayEvent(boolean isAllDayEvent) {
this.isAllDayEvent = isAllDayEvent;
}
/*Comparator for sorting the list by Student Name*/
public static Comparator<Event> eventDateComp = new Comparator<Event>() {
......
......@@ -86,14 +86,6 @@ a:hover {
<div class="col-sm-5" th:classappend="${#fields.hasErrors('*')} ? 'has-error' : ''">Date: <input id="datePicker" type="date" th:field="*{startDate}" />
<p class="alert alert-danger" th:if="${#fields.hasErrors('startDate')}" th:errors="*{startDate}"></p></div>
<div class="col-sm-4">Time: <input id="timePicker" type="time" th:field="*{startTime}" /></div>
<div class="col-sm-3">
<div class="form-check">
<input name="isAllDayEvent" th:field="*{isAllDayEvent}" class="form-check-input" type="checkbox" value="" id="defaultCheck1">
<label class="form-check-label" for="defaultCheck1">
All day event?
</label>
</div>
</div>
</div>
<br> <button class="btn btn-lg btn-primary btn-block" type="submit">Add</button><br>
</form>
......
<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<Head><title>View event</title></Head>
<body>
<h2>View event</h2>
<table>
<tr>
<td th:text = "'currentEvent: | ' + ${currentEvent.getName()}"/>
<td th:text = "'Desc: ' + ${currentEvent.getDescription()}"/>
<td th:text = "${currentEvent.getStartDate()}"/>
<td th:text = "${currentEvent.getStartTime()}"/>
<td th:text = "${currentEvent.getIsAllDayEvent()}"/>
<td th:text = "${currentEvent.getCalendar().getName()}"/>
</table>
<button type="button">Edit</button>
<button type="button">Delete</button>
<button type="button">Return</button>
</body>
</html>
\ No newline at end of file
<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<Head><title>View event (edit mode)</title></Head>
<body>
<h2>View event (edit mode)</h2>
<table>
<tr>
<td th:text = "'currentEvent: | ' + ${currentEvent.getName()}"/>
<td th:text = "'Desc: ' + ${currentEvent.getDescription()}"/>
<td th:text = "${currentEvent.getStartDate()}"/>
<td th:text = "${currentEvent.getStartTime()}"/>
<td th:text = "${currentEvent.getIsAllDayEvent()}"/>
<td th:text = "${currentEvent.getCalendar().getName()}"/>
</table>
<button type="button">Save</button>
<button type="button">Return</button>
<button type="button">Delete</button>
</body>
</html>
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment