enhanced modeling
This commit is contained in:
@ -11,7 +11,7 @@ import org.springframework.context.annotation.Bean;
|
|||||||
import org.springframework.context.annotation.Configuration;
|
import org.springframework.context.annotation.Configuration;
|
||||||
import org.springframework.jdbc.datasource.TransactionAwareDataSourceProxy;
|
import org.springframework.jdbc.datasource.TransactionAwareDataSourceProxy;
|
||||||
|
|
||||||
import de.jottyfan.timetrack.spring.done.DoneModel;
|
import de.jottyfan.timetrack.modules.done.DoneModel;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
package de.jottyfan.timetrack.spring;
|
package de.jottyfan.timetrack.modules;
|
||||||
|
|
||||||
import java.time.Duration;
|
import java.time.Duration;
|
||||||
import java.time.LocalDate;
|
import java.time.LocalDate;
|
||||||
@ -17,10 +17,10 @@ import org.springframework.web.bind.annotation.GetMapping;
|
|||||||
import org.springframework.web.bind.annotation.ModelAttribute;
|
import org.springframework.web.bind.annotation.ModelAttribute;
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
|
||||||
import de.jottyfan.timetrack.spring.done.DoneBean;
|
import de.jottyfan.timetrack.modules.done.DoneBean;
|
||||||
import de.jottyfan.timetrack.spring.done.DoneModel;
|
import de.jottyfan.timetrack.modules.done.DoneModel;
|
||||||
import de.jottyfan.timetrack.spring.done.IDoneService;
|
import de.jottyfan.timetrack.modules.done.IDoneService;
|
||||||
import de.jottyfan.timetrack.spring.done.SummaryBean;
|
import de.jottyfan.timetrack.modules.done.SummaryBean;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
@ -1,5 +1,6 @@
|
|||||||
package de.jottyfan.timetrack.spring.calendar;
|
package de.jottyfan.timetrack.modules.calendar;
|
||||||
|
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Controller;
|
import org.springframework.stereotype.Controller;
|
||||||
import org.springframework.ui.Model;
|
import org.springframework.ui.Model;
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
@ -12,9 +13,12 @@ import org.springframework.web.bind.annotation.GetMapping;
|
|||||||
@Controller
|
@Controller
|
||||||
public class CalendarController {
|
public class CalendarController {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private CalendarService service;
|
||||||
|
|
||||||
@GetMapping("/calendar")
|
@GetMapping("/calendar")
|
||||||
public String getCalendar(Model model) {
|
public String getCalendar(Model model) {
|
||||||
// TODO: implement
|
model.addAttribute("events", service.getJsonEvents());
|
||||||
return "/calendar/calendar";
|
return "/calendar/calendar";
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -0,0 +1,31 @@
|
|||||||
|
package de.jottyfan.timetrack.modules.calendar;
|
||||||
|
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author jotty
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class CalendarService {
|
||||||
|
|
||||||
|
// TODO: implement a davical database reader as a repository
|
||||||
|
// TODO: implement a caldav client as repository
|
||||||
|
// TODO: implement a radicale file reader as repository
|
||||||
|
// TODO: create resource management database table for the calendar
|
||||||
|
|
||||||
|
public String getJsonEvents() {
|
||||||
|
StringBuilder buf = new StringBuilder("[");
|
||||||
|
|
||||||
|
// TODO: use List<EventBean> instead
|
||||||
|
|
||||||
|
buf.append(
|
||||||
|
"{ id: 'example3', title: 'all day event', start: '2023-05-08', allDay: true, backgroundColor: 'darkcyan'},");
|
||||||
|
buf.append(" { id: 'i1', title: 'overlapping', start: '2023-05-08T10:00', end: '2023-05-09T10:00'},");
|
||||||
|
buf.append(" { id: 'i2', title: 'developing', start: '2023-05-09T08:00', end: '2023-05-09T10:15'}");
|
||||||
|
buf.append("]");
|
||||||
|
return buf.toString();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,363 @@
|
|||||||
|
package de.jottyfan.timetrack.modules.calendar;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author jotty
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public class EventBean implements Serializable {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
private String id;
|
||||||
|
private String groupId;
|
||||||
|
private Boolean allDay;
|
||||||
|
private LocalDateTime start;
|
||||||
|
private LocalDateTime end;
|
||||||
|
private String startStr;
|
||||||
|
private String endStr;
|
||||||
|
private String title;
|
||||||
|
private String url;
|
||||||
|
private final List<String> classNames;
|
||||||
|
private Boolean editable;
|
||||||
|
private Boolean startEditable;
|
||||||
|
private Boolean durationEditable;
|
||||||
|
private Boolean resourceEditable;
|
||||||
|
private String display; // valid values are: auto, block, list-item, background, inverse-background,
|
||||||
|
// none
|
||||||
|
private Boolean overlap;
|
||||||
|
private String constraint;
|
||||||
|
private String backgroundColor;
|
||||||
|
private String boderColor;
|
||||||
|
private String textColor;
|
||||||
|
private String extendedProps;
|
||||||
|
private String source;
|
||||||
|
|
||||||
|
public EventBean() {
|
||||||
|
classNames = new ArrayList<>();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
StringBuilder buf = new StringBuilder("{");
|
||||||
|
buf.append("id:'").append(id).append("',");
|
||||||
|
buf.append("groupId:'").append(groupId).append("',");
|
||||||
|
buf.append("allDay:'").append(allDay).append("',");
|
||||||
|
// TODO: extend; also, only on demand (not null), or better use Gson for the json conversion
|
||||||
|
// .append(", start=").append(start).append(", end=").append(end).append(", startStr=").append(startStr)
|
||||||
|
// .append(", endStr=").append(endStr).append(", title=").append(title).append(", url=").append(url)
|
||||||
|
// .append(", classNames=").append(classNames).append(", editable=").append(editable).append(", startEditable=")
|
||||||
|
// .append(startEditable).append(", durationEditable=").append(durationEditable).append(", resourceEditable=")
|
||||||
|
// .append(resourceEditable).append(", display=").append(display).append(", overlap=").append(overlap)
|
||||||
|
// .append(", constraint=").append(constraint).append(", backgroundColor=").append(backgroundColor)
|
||||||
|
// .append(", boderColor=").append(boderColor).append(", textColor=").append(textColor).append(", extendedProps=")
|
||||||
|
// .append(extendedProps).append(", source=").append(source).append("]");
|
||||||
|
return buf.toString();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return the id
|
||||||
|
*/
|
||||||
|
public String getId() {
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param id the id to set
|
||||||
|
*/
|
||||||
|
public void setId(String id) {
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return the groupId
|
||||||
|
*/
|
||||||
|
public String getGroupId() {
|
||||||
|
return groupId;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param groupId the groupId to set
|
||||||
|
*/
|
||||||
|
public void setGroupId(String groupId) {
|
||||||
|
this.groupId = groupId;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return the allDay
|
||||||
|
*/
|
||||||
|
public Boolean getAllDay() {
|
||||||
|
return allDay;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param allDay the allDay to set
|
||||||
|
*/
|
||||||
|
public void setAllDay(Boolean allDay) {
|
||||||
|
this.allDay = allDay;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return the start
|
||||||
|
*/
|
||||||
|
public LocalDateTime getStart() {
|
||||||
|
return start;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param start the start to set
|
||||||
|
*/
|
||||||
|
public void setStart(LocalDateTime start) {
|
||||||
|
this.start = start;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return the end
|
||||||
|
*/
|
||||||
|
public LocalDateTime getEnd() {
|
||||||
|
return end;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param end the end to set
|
||||||
|
*/
|
||||||
|
public void setEnd(LocalDateTime end) {
|
||||||
|
this.end = end;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return the startStr
|
||||||
|
*/
|
||||||
|
public String getStartStr() {
|
||||||
|
return startStr;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param startStr the startStr to set
|
||||||
|
*/
|
||||||
|
public void setStartStr(String startStr) {
|
||||||
|
this.startStr = startStr;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return the endStr
|
||||||
|
*/
|
||||||
|
public String getEndStr() {
|
||||||
|
return endStr;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param endStr the endStr to set
|
||||||
|
*/
|
||||||
|
public void setEndStr(String endStr) {
|
||||||
|
this.endStr = endStr;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return the title
|
||||||
|
*/
|
||||||
|
public String getTitle() {
|
||||||
|
return title;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param title the title to set
|
||||||
|
*/
|
||||||
|
public void setTitle(String title) {
|
||||||
|
this.title = title;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return the url
|
||||||
|
*/
|
||||||
|
public String getUrl() {
|
||||||
|
return url;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param url the url to set
|
||||||
|
*/
|
||||||
|
public void setUrl(String url) {
|
||||||
|
this.url = url;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return the classNames
|
||||||
|
*/
|
||||||
|
public List<String> getClassNames() {
|
||||||
|
return classNames;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return the editable
|
||||||
|
*/
|
||||||
|
public Boolean getEditable() {
|
||||||
|
return editable;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param editable the editable to set
|
||||||
|
*/
|
||||||
|
public void setEditable(Boolean editable) {
|
||||||
|
this.editable = editable;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return the startEditable
|
||||||
|
*/
|
||||||
|
public Boolean getStartEditable() {
|
||||||
|
return startEditable;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param startEditable the startEditable to set
|
||||||
|
*/
|
||||||
|
public void setStartEditable(Boolean startEditable) {
|
||||||
|
this.startEditable = startEditable;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return the durationEditable
|
||||||
|
*/
|
||||||
|
public Boolean getDurationEditable() {
|
||||||
|
return durationEditable;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param durationEditable the durationEditable to set
|
||||||
|
*/
|
||||||
|
public void setDurationEditable(Boolean durationEditable) {
|
||||||
|
this.durationEditable = durationEditable;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return the resourceEditable
|
||||||
|
*/
|
||||||
|
public Boolean getResourceEditable() {
|
||||||
|
return resourceEditable;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param resourceEditable the resourceEditable to set
|
||||||
|
*/
|
||||||
|
public void setResourceEditable(Boolean resourceEditable) {
|
||||||
|
this.resourceEditable = resourceEditable;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return the display
|
||||||
|
*/
|
||||||
|
public String getDisplay() {
|
||||||
|
return display;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param display the display to set
|
||||||
|
*/
|
||||||
|
public void setDisplay(String display) {
|
||||||
|
this.display = display;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return the overlap
|
||||||
|
*/
|
||||||
|
public Boolean getOverlap() {
|
||||||
|
return overlap;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param overlap the overlap to set
|
||||||
|
*/
|
||||||
|
public void setOverlap(Boolean overlap) {
|
||||||
|
this.overlap = overlap;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return the constraint
|
||||||
|
*/
|
||||||
|
public String getConstraint() {
|
||||||
|
return constraint;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param constraint the constraint to set
|
||||||
|
*/
|
||||||
|
public void setConstraint(String constraint) {
|
||||||
|
this.constraint = constraint;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return the backgroundColor
|
||||||
|
*/
|
||||||
|
public String getBackgroundColor() {
|
||||||
|
return backgroundColor;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param backgroundColor the backgroundColor to set
|
||||||
|
*/
|
||||||
|
public void setBackgroundColor(String backgroundColor) {
|
||||||
|
this.backgroundColor = backgroundColor;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return the boderColor
|
||||||
|
*/
|
||||||
|
public String getBoderColor() {
|
||||||
|
return boderColor;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param boderColor the boderColor to set
|
||||||
|
*/
|
||||||
|
public void setBoderColor(String boderColor) {
|
||||||
|
this.boderColor = boderColor;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return the textColor
|
||||||
|
*/
|
||||||
|
public String getTextColor() {
|
||||||
|
return textColor;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param textColor the textColor to set
|
||||||
|
*/
|
||||||
|
public void setTextColor(String textColor) {
|
||||||
|
this.textColor = textColor;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return the extendedProps
|
||||||
|
*/
|
||||||
|
public String getExtendedProps() {
|
||||||
|
return extendedProps;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param extendedProps the extendedProps to set
|
||||||
|
*/
|
||||||
|
public void setExtendedProps(String extendedProps) {
|
||||||
|
this.extendedProps = extendedProps;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return the source
|
||||||
|
*/
|
||||||
|
public String getSource() {
|
||||||
|
return source;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param source the source to set
|
||||||
|
*/
|
||||||
|
public void setSource(String source) {
|
||||||
|
this.source = source;
|
||||||
|
}
|
||||||
|
}
|
@ -1,4 +1,4 @@
|
|||||||
package de.jottyfan.timetrack.spring.contact;
|
package de.jottyfan.timetrack.modules.contact;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
|
|
@ -1,4 +1,4 @@
|
|||||||
package de.jottyfan.timetrack.spring.contact;
|
package de.jottyfan.timetrack.modules.contact;
|
||||||
|
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.List;
|
import java.util.List;
|
@ -1,4 +1,4 @@
|
|||||||
package de.jottyfan.timetrack.spring.contact.impl;
|
package de.jottyfan.timetrack.modules.contact;
|
||||||
|
|
||||||
import static de.jottyfan.timetrack.db.contact.Tables.T_CONTACT;
|
import static de.jottyfan.timetrack.db.contact.Tables.T_CONTACT;
|
||||||
|
|
||||||
@ -24,7 +24,6 @@ import org.springframework.stereotype.Repository;
|
|||||||
|
|
||||||
import de.jottyfan.timetrack.db.contact.enums.EnumContacttype;
|
import de.jottyfan.timetrack.db.contact.enums.EnumContacttype;
|
||||||
import de.jottyfan.timetrack.db.contact.tables.records.TContactRecord;
|
import de.jottyfan.timetrack.db.contact.tables.records.TContactRecord;
|
||||||
import de.jottyfan.timetrack.spring.contact.ContactBean;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
@ -1,4 +1,4 @@
|
|||||||
package de.jottyfan.timetrack.spring.contact.impl;
|
package de.jottyfan.timetrack.modules.contact;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@ -13,9 +13,6 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
import de.jottyfan.timetrack.spring.contact.ContactBean;
|
|
||||||
import de.jottyfan.timetrack.spring.contact.IContactService;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @author henkej
|
* @author henkej
|
@ -1,4 +1,4 @@
|
|||||||
package de.jottyfan.timetrack.spring.contact;
|
package de.jottyfan.timetrack.modules.contact;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
@ -1,4 +1,4 @@
|
|||||||
package de.jottyfan.timetrack.spring.done;
|
package de.jottyfan.timetrack.modules.done;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.time.Duration;
|
import java.time.Duration;
|
@ -1,4 +1,4 @@
|
|||||||
package de.jottyfan.timetrack.spring.done;
|
package de.jottyfan.timetrack.modules.done;
|
||||||
|
|
||||||
import java.time.Duration;
|
import java.time.Duration;
|
||||||
import java.time.LocalDate;
|
import java.time.LocalDate;
|
@ -1,4 +1,4 @@
|
|||||||
package de.jottyfan.timetrack.spring.done.impl;
|
package de.jottyfan.timetrack.modules.done;
|
||||||
|
|
||||||
import static de.jottyfan.timetrack.db.done.Tables.T_DONE;
|
import static de.jottyfan.timetrack.db.done.Tables.T_DONE;
|
||||||
import static de.jottyfan.timetrack.db.done.Tables.V_BILLING;
|
import static de.jottyfan.timetrack.db.done.Tables.V_BILLING;
|
||||||
@ -36,7 +36,6 @@ import de.jottyfan.timetrack.db.done.tables.records.VModuleRecord;
|
|||||||
import de.jottyfan.timetrack.db.done.tables.records.VProjectRecord;
|
import de.jottyfan.timetrack.db.done.tables.records.VProjectRecord;
|
||||||
import de.jottyfan.timetrack.db.profile.tables.records.TLoginRecord;
|
import de.jottyfan.timetrack.db.profile.tables.records.TLoginRecord;
|
||||||
import de.jottyfan.timetrack.help.LocalDateHelper;
|
import de.jottyfan.timetrack.help.LocalDateHelper;
|
||||||
import de.jottyfan.timetrack.spring.done.DoneBean;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
@ -1,4 +1,4 @@
|
|||||||
package de.jottyfan.timetrack.spring.done;
|
package de.jottyfan.timetrack.modules.done;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.time.LocalDate;
|
import java.time.LocalDate;
|
@ -1,4 +1,4 @@
|
|||||||
package de.jottyfan.timetrack.spring.done.impl;
|
package de.jottyfan.timetrack.modules.done;
|
||||||
|
|
||||||
import java.time.LocalDate;
|
import java.time.LocalDate;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
@ -18,9 +18,7 @@ import de.jottyfan.timetrack.db.done.tables.records.VBillingRecord;
|
|||||||
import de.jottyfan.timetrack.db.done.tables.records.VJobRecord;
|
import de.jottyfan.timetrack.db.done.tables.records.VJobRecord;
|
||||||
import de.jottyfan.timetrack.db.done.tables.records.VModuleRecord;
|
import de.jottyfan.timetrack.db.done.tables.records.VModuleRecord;
|
||||||
import de.jottyfan.timetrack.db.done.tables.records.VProjectRecord;
|
import de.jottyfan.timetrack.db.done.tables.records.VProjectRecord;
|
||||||
import de.jottyfan.timetrack.spring.done.DoneBean;
|
import de.jottyfan.timetrack.modules.note.NoteService;
|
||||||
import de.jottyfan.timetrack.spring.done.IDoneService;
|
|
||||||
import de.jottyfan.timetrack.spring.note.impl.NoteService;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
@ -1,4 +1,4 @@
|
|||||||
package de.jottyfan.timetrack.spring.done;
|
package de.jottyfan.timetrack.modules.done;
|
||||||
|
|
||||||
import java.time.LocalDate;
|
import java.time.LocalDate;
|
||||||
import java.util.List;
|
import java.util.List;
|
@ -1,4 +1,4 @@
|
|||||||
package de.jottyfan.timetrack.spring.done;
|
package de.jottyfan.timetrack.modules.done;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.time.Duration;
|
import java.time.Duration;
|
@ -1,4 +1,4 @@
|
|||||||
package de.jottyfan.timetrack.spring.done.job;
|
package de.jottyfan.timetrack.modules.done.job;
|
||||||
|
|
||||||
import de.jottyfan.timetrack.db.done.tables.records.TJobRecord;
|
import de.jottyfan.timetrack.db.done.tables.records.TJobRecord;
|
||||||
|
|
@ -1,4 +1,4 @@
|
|||||||
package de.jottyfan.timetrack.spring.done.job;
|
package de.jottyfan.timetrack.modules.done.job;
|
||||||
|
|
||||||
import javax.annotation.security.RolesAllowed;
|
import javax.annotation.security.RolesAllowed;
|
||||||
|
|
||||||
@ -14,8 +14,8 @@ import org.springframework.web.bind.annotation.RequestMapping;
|
|||||||
import org.springframework.web.bind.annotation.RequestMethod;
|
import org.springframework.web.bind.annotation.RequestMethod;
|
||||||
|
|
||||||
import de.jottyfan.timetrack.db.done.tables.records.TJobRecord;
|
import de.jottyfan.timetrack.db.done.tables.records.TJobRecord;
|
||||||
import de.jottyfan.timetrack.spring.done.DoneController;
|
import de.jottyfan.timetrack.modules.done.DoneController;
|
||||||
import de.jottyfan.timetrack.spring.done.DoneModel;
|
import de.jottyfan.timetrack.modules.done.DoneModel;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
@ -1,4 +1,4 @@
|
|||||||
package de.jottyfan.timetrack.spring.done.job.impl;
|
package de.jottyfan.timetrack.modules.done.job;
|
||||||
|
|
||||||
import static de.jottyfan.timetrack.db.done.Tables.T_JOB;
|
import static de.jottyfan.timetrack.db.done.Tables.T_JOB;
|
||||||
|
|
@ -1,4 +1,4 @@
|
|||||||
package de.jottyfan.timetrack.spring.done.job.impl;
|
package de.jottyfan.timetrack.modules.done.job;
|
||||||
|
|
||||||
import org.apache.logging.log4j.LogManager;
|
import org.apache.logging.log4j.LogManager;
|
||||||
import org.apache.logging.log4j.Logger;
|
import org.apache.logging.log4j.Logger;
|
||||||
@ -9,7 +9,6 @@ import org.springframework.transaction.annotation.Transactional;
|
|||||||
|
|
||||||
import de.jottyfan.timetrack.db.done.tables.records.TJobRecord;
|
import de.jottyfan.timetrack.db.done.tables.records.TJobRecord;
|
||||||
import de.jottyfan.timetrack.db.done.tables.records.TModuleRecord;
|
import de.jottyfan.timetrack.db.done.tables.records.TModuleRecord;
|
||||||
import de.jottyfan.timetrack.spring.done.job.IJobService;
|
|
||||||
|
|
||||||
@Service
|
@Service
|
||||||
@Transactional(transactionManager = "transactionManager")
|
@Transactional(transactionManager = "transactionManager")
|
@ -1,4 +1,4 @@
|
|||||||
package de.jottyfan.timetrack.spring.done.module;
|
package de.jottyfan.timetrack.modules.done.module;
|
||||||
|
|
||||||
import de.jottyfan.timetrack.db.done.tables.records.TModuleRecord;
|
import de.jottyfan.timetrack.db.done.tables.records.TModuleRecord;
|
||||||
|
|
@ -1,4 +1,4 @@
|
|||||||
package de.jottyfan.timetrack.spring.done.module;
|
package de.jottyfan.timetrack.modules.done.module;
|
||||||
|
|
||||||
import javax.annotation.security.RolesAllowed;
|
import javax.annotation.security.RolesAllowed;
|
||||||
|
|
||||||
@ -14,8 +14,8 @@ import org.springframework.web.bind.annotation.RequestMapping;
|
|||||||
import org.springframework.web.bind.annotation.RequestMethod;
|
import org.springframework.web.bind.annotation.RequestMethod;
|
||||||
|
|
||||||
import de.jottyfan.timetrack.db.done.tables.records.TModuleRecord;
|
import de.jottyfan.timetrack.db.done.tables.records.TModuleRecord;
|
||||||
import de.jottyfan.timetrack.spring.done.DoneController;
|
import de.jottyfan.timetrack.modules.done.DoneController;
|
||||||
import de.jottyfan.timetrack.spring.done.DoneModel;
|
import de.jottyfan.timetrack.modules.done.DoneModel;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
@ -1,4 +1,4 @@
|
|||||||
package de.jottyfan.timetrack.spring.done.module.impl;
|
package de.jottyfan.timetrack.modules.done.module;
|
||||||
|
|
||||||
import static de.jottyfan.timetrack.db.done.Tables.T_MODULE;
|
import static de.jottyfan.timetrack.db.done.Tables.T_MODULE;
|
||||||
|
|
@ -1,4 +1,4 @@
|
|||||||
package de.jottyfan.timetrack.spring.done.module.impl;
|
package de.jottyfan.timetrack.modules.done.module;
|
||||||
|
|
||||||
import org.apache.logging.log4j.LogManager;
|
import org.apache.logging.log4j.LogManager;
|
||||||
import org.apache.logging.log4j.Logger;
|
import org.apache.logging.log4j.Logger;
|
||||||
@ -9,8 +9,7 @@ import org.springframework.transaction.annotation.Transactional;
|
|||||||
|
|
||||||
import de.jottyfan.timetrack.db.done.tables.records.TModuleRecord;
|
import de.jottyfan.timetrack.db.done.tables.records.TModuleRecord;
|
||||||
import de.jottyfan.timetrack.db.done.tables.records.TProjectRecord;
|
import de.jottyfan.timetrack.db.done.tables.records.TProjectRecord;
|
||||||
import de.jottyfan.timetrack.spring.done.module.IModuleService;
|
import de.jottyfan.timetrack.modules.done.project.IProjectService;
|
||||||
import de.jottyfan.timetrack.spring.done.project.IProjectService;
|
|
||||||
|
|
||||||
@Service
|
@Service
|
||||||
@Transactional(transactionManager = "transactionManager")
|
@Transactional(transactionManager = "transactionManager")
|
@ -1,4 +1,4 @@
|
|||||||
package de.jottyfan.timetrack.spring.done.project;
|
package de.jottyfan.timetrack.modules.done.project;
|
||||||
|
|
||||||
import de.jottyfan.timetrack.db.done.tables.records.TProjectRecord;
|
import de.jottyfan.timetrack.db.done.tables.records.TProjectRecord;
|
||||||
|
|
@ -1,7 +1,6 @@
|
|||||||
package de.jottyfan.timetrack.spring.done.project;
|
package de.jottyfan.timetrack.modules.done.project;
|
||||||
|
|
||||||
import javax.annotation.security.RolesAllowed;
|
import javax.annotation.security.RolesAllowed;
|
||||||
import javax.servlet.http.HttpServletRequest;
|
|
||||||
|
|
||||||
import org.apache.logging.log4j.LogManager;
|
import org.apache.logging.log4j.LogManager;
|
||||||
import org.apache.logging.log4j.Logger;
|
import org.apache.logging.log4j.Logger;
|
||||||
@ -15,8 +14,8 @@ import org.springframework.web.bind.annotation.RequestMapping;
|
|||||||
import org.springframework.web.bind.annotation.RequestMethod;
|
import org.springframework.web.bind.annotation.RequestMethod;
|
||||||
|
|
||||||
import de.jottyfan.timetrack.db.done.tables.records.TProjectRecord;
|
import de.jottyfan.timetrack.db.done.tables.records.TProjectRecord;
|
||||||
import de.jottyfan.timetrack.spring.done.DoneController;
|
import de.jottyfan.timetrack.modules.done.DoneController;
|
||||||
import de.jottyfan.timetrack.spring.done.DoneModel;
|
import de.jottyfan.timetrack.modules.done.DoneModel;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
@ -1,4 +1,4 @@
|
|||||||
package de.jottyfan.timetrack.spring.done.project.impl;
|
package de.jottyfan.timetrack.modules.done.project;
|
||||||
|
|
||||||
import static de.jottyfan.timetrack.db.done.Tables.T_PROJECT;
|
import static de.jottyfan.timetrack.db.done.Tables.T_PROJECT;
|
||||||
|
|
@ -1,4 +1,4 @@
|
|||||||
package de.jottyfan.timetrack.spring.done.project.impl;
|
package de.jottyfan.timetrack.modules.done.project;
|
||||||
|
|
||||||
import org.apache.logging.log4j.LogManager;
|
import org.apache.logging.log4j.LogManager;
|
||||||
import org.apache.logging.log4j.Logger;
|
import org.apache.logging.log4j.Logger;
|
||||||
@ -8,7 +8,6 @@ import org.springframework.stereotype.Service;
|
|||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
import de.jottyfan.timetrack.db.done.tables.records.TProjectRecord;
|
import de.jottyfan.timetrack.db.done.tables.records.TProjectRecord;
|
||||||
import de.jottyfan.timetrack.spring.done.project.IProjectService;
|
|
||||||
|
|
||||||
@Service
|
@Service
|
||||||
@Transactional(transactionManager = "transactionManager")
|
@Transactional(transactionManager = "transactionManager")
|
@ -1,4 +1,4 @@
|
|||||||
package de.jottyfan.timetrack.spring.note;
|
package de.jottyfan.timetrack.modules.note;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
@ -1,4 +1,4 @@
|
|||||||
package de.jottyfan.timetrack.spring.note;
|
package de.jottyfan.timetrack.modules.note;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
|
|
@ -1,4 +1,4 @@
|
|||||||
package de.jottyfan.timetrack.spring.note;
|
package de.jottyfan.timetrack.modules.note;
|
||||||
|
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.List;
|
import java.util.List;
|
@ -1,4 +1,4 @@
|
|||||||
package de.jottyfan.timetrack.spring.note.impl;
|
package de.jottyfan.timetrack.modules.note;
|
||||||
|
|
||||||
import static de.jottyfan.timetrack.db.note.Tables.T_NOTE;
|
import static de.jottyfan.timetrack.db.note.Tables.T_NOTE;
|
||||||
|
|
||||||
@ -25,7 +25,6 @@ import org.springframework.stereotype.Repository;
|
|||||||
import de.jottyfan.timetrack.db.note.enums.EnumCategory;
|
import de.jottyfan.timetrack.db.note.enums.EnumCategory;
|
||||||
import de.jottyfan.timetrack.db.note.enums.EnumNotetype;
|
import de.jottyfan.timetrack.db.note.enums.EnumNotetype;
|
||||||
import de.jottyfan.timetrack.db.note.tables.records.TNoteRecord;
|
import de.jottyfan.timetrack.db.note.tables.records.TNoteRecord;
|
||||||
import de.jottyfan.timetrack.spring.note.NoteBean;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
@ -1,4 +1,4 @@
|
|||||||
package de.jottyfan.timetrack.spring.note.impl;
|
package de.jottyfan.timetrack.modules.note;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@ -13,9 +13,6 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
import de.jottyfan.timetrack.spring.note.INoteService;
|
|
||||||
import de.jottyfan.timetrack.spring.note.NoteBean;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @author henkej
|
* @author henkej
|
@ -6,7 +6,7 @@
|
|||||||
<body>
|
<body>
|
||||||
<font layout:fragment="title">Kalender</font>
|
<font layout:fragment="title">Kalender</font>
|
||||||
<ul layout:fragment="menu">
|
<ul layout:fragment="menu">
|
||||||
<li class="nav-item" sec:authorize="hasRole('timetrack_user')"><a class="nav-link btn btn-outline-success" th:href="@{/calendar/add}">Neuen Termin anlegen</a></li>
|
<li class="nav-item" sec:authorize="hasRole('timetrack_user')"><a class="btn btn-outline-success" th:href="@{/calendar/add}"><i class="fas fa-plus"></i></a></li>
|
||||||
</ul>
|
</ul>
|
||||||
<main layout:fragment="content">
|
<main layout:fragment="content">
|
||||||
<ul class="nav nav-tabs navback" role="tablist">
|
<ul class="nav nav-tabs navback" role="tablist">
|
||||||
@ -17,30 +17,28 @@
|
|||||||
<div id="div_dashboard" class="tab-pane active tab-pane-glassy">
|
<div id="div_dashboard" class="tab-pane active tab-pane-glassy">
|
||||||
<div sec:authorize="hasRole('timetrack_user')">
|
<div sec:authorize="hasRole('timetrack_user')">
|
||||||
<div id="calendar"></div>
|
<div id="calendar"></div>
|
||||||
<script type="text/javascript">
|
<script th:inline="javascript">
|
||||||
|
/*<![CDATA[*/
|
||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
var the_events = [ { id: 'example1', title: 'überlappend', start: '2023-05-08T08:00:00.000Z', end: '2023-05-09T08:00:00.000Z'},
|
var the_events = /*[(${events})]*/ '[]';
|
||||||
{ id: 'example2', title: 'der ganze Tag', allDay: true, start: '2023-05-08', backgroundColor: '#aa77aa'},
|
|
||||||
];
|
|
||||||
|
|
||||||
var the_div = document.getElementById('calendar');
|
var the_div = document.getElementById('calendar');
|
||||||
var c = new FullCalendar.Calendar(the_div, {
|
var c = new FullCalendar.Calendar(the_div, {
|
||||||
initialView: 'timeGridWeek',
|
initialView: 'timeGridWeek',
|
||||||
events: the_events,
|
events: the_events,
|
||||||
dateClick: function(info) {
|
dateClick: function(info) {
|
||||||
alert('Clicked on: ' + info.dateStr);
|
alert(info.dateStr);
|
||||||
// TODO: call /calendar/add/{d}(d='info.dateStr')
|
// TODO: call /calendar/add/{d}(d='info.dateStr')
|
||||||
},
|
},
|
||||||
eventClick: function(info) {
|
eventClick: function(info) {
|
||||||
alert('Clicked on event: ' + info.event.title);
|
alert(info.event.title);
|
||||||
// TODO: call /calendar/edit/{d}(d='info.dateStr')
|
// TODO: call /calendar/edit/{d}(d='info.dateStr')
|
||||||
},
|
}
|
||||||
height: 800
|
|
||||||
});
|
});
|
||||||
c.setOption('locale', 'de');
|
c.setOption('locale', 'de');
|
||||||
c.addEvent( { id: 'example3', title: 'added after init', start: '2023-05-08', allDay: true, backgroundColor: 'darkcyan'} );
|
c.setOption('height', 'auto');
|
||||||
c.render();
|
c.render();
|
||||||
});
|
});
|
||||||
|
/*]]>*/
|
||||||
</script>
|
</script>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
Reference in New Issue
Block a user