enhanced favorites
This commit is contained in:
@@ -19,7 +19,7 @@
|
||||
<attribute name="gradle_used_by_scope" value="main,test"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-17/"/>
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-21/"/>
|
||||
<classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.web.container"/>
|
||||
<classpathentry kind="con" path="org.eclipse.buildship.core.gradleclasspathcontainer">
|
||||
<attributes>
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
eclipse.preferences.version=1
|
||||
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
|
||||
org.eclipse.jdt.core.compiler.codegen.targetPlatform=17
|
||||
org.eclipse.jdt.core.compiler.codegen.targetPlatform=21
|
||||
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
|
||||
org.eclipse.jdt.core.compiler.compliance=17
|
||||
org.eclipse.jdt.core.compiler.compliance=21
|
||||
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
|
||||
org.eclipse.jdt.core.compiler.debug.localVariable=generate
|
||||
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
|
||||
@@ -11,4 +11,4 @@ org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
|
||||
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
|
||||
org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
|
||||
org.eclipse.jdt.core.compiler.release=enabled
|
||||
org.eclipse.jdt.core.compiler.source=17
|
||||
org.eclipse.jdt.core.compiler.source=21
|
||||
|
||||
@@ -3,5 +3,5 @@
|
||||
<fixed facet="jst.java"/>
|
||||
<fixed facet="jst.web"/>
|
||||
<installed facet="jst.web" version="2.4"/>
|
||||
<installed facet="jst.java" version="17"/>
|
||||
<installed facet="jst.java" version="21"/>
|
||||
</faceted-project>
|
||||
|
||||
26
build.gradle
26
build.gradle
@@ -1,5 +1,5 @@
|
||||
plugins {
|
||||
id 'org.springframework.boot' version '3.4.3'
|
||||
id 'org.springframework.boot' version '3.5.0'
|
||||
id 'java'
|
||||
id 'war'
|
||||
}
|
||||
@@ -7,12 +7,12 @@ plugins {
|
||||
apply plugin: 'io.spring.dependency-management'
|
||||
|
||||
group = 'de.jottyfan'
|
||||
version = '1.5.7'
|
||||
version = '1.5.8'
|
||||
|
||||
description = """timetrack"""
|
||||
|
||||
sourceCompatibility = 17
|
||||
targetCompatibility = 17
|
||||
sourceCompatibility = 21
|
||||
targetCompatibility = 21
|
||||
|
||||
repositories {
|
||||
mavenLocal()
|
||||
@@ -25,24 +25,24 @@ repositories {
|
||||
dependencies {
|
||||
implementation 'de.jottyfan:timetrackjooq:20240109'
|
||||
|
||||
implementation 'org.apache.logging.log4j:log4j-api:2.24.3'
|
||||
implementation 'org.apache.logging.log4j:log4j-core:2.24.3'
|
||||
implementation 'org.apache.logging.log4j:log4j-to-slf4j:2.24.3'
|
||||
implementation 'org.apache.logging.log4j:log4j-api:2.25.2'
|
||||
implementation 'org.apache.logging.log4j:log4j-core:2.25.2'
|
||||
implementation 'org.apache.logging.log4j:log4j-to-slf4j:2.25.2'
|
||||
|
||||
implementation 'org.webjars:bootstrap:5.3.3'
|
||||
implementation 'org.webjars:font-awesome:6.7.2'
|
||||
implementation 'org.webjars:bootstrap:5.3.8'
|
||||
implementation 'org.webjars:font-awesome:7.0.1'
|
||||
implementation 'org.webjars:jquery:3.7.1'
|
||||
implementation 'org.webjars:popper.js:2.11.7'
|
||||
implementation 'org.webjars:datatables:2.1.8'
|
||||
implementation 'org.webjars:datatables:2.3.2'
|
||||
implementation 'org.webjars:jquery-ui:1.14.1'
|
||||
implementation 'org.webjars:fullcalendar:6.1.9'
|
||||
implementation 'org.webjars:fullcalendar:6.1.10'
|
||||
|
||||
implementation 'com.google.code.gson:gson:latest.release';
|
||||
implementation 'com.google.code.gson:gson';
|
||||
|
||||
implementation 'org.springframework.boot:spring-boot-starter-jooq'
|
||||
implementation 'org.springframework.boot:spring-boot-starter-security'
|
||||
implementation "org.springframework.boot:spring-boot-starter-oauth2-client"
|
||||
implementation 'org.springframework.security:spring-security-oauth2-authorization-server:1.4.2'
|
||||
implementation 'org.springframework.security:spring-security-oauth2-authorization-server'
|
||||
implementation 'org.springframework.boot:spring-boot-starter-thymeleaf'
|
||||
implementation 'org.springframework.boot:spring-boot-starter-web'
|
||||
implementation 'org.springframework.boot:spring-boot-starter-test'
|
||||
|
||||
2
gradle/wrapper/gradle-wrapper.properties
vendored
2
gradle/wrapper/gradle-wrapper.properties
vendored
@@ -1,5 +1,5 @@
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.13-bin.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.3-bin.zip
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
|
||||
@@ -24,11 +24,13 @@ import org.jooq.DeleteConditionStep;
|
||||
import org.jooq.InsertOnDuplicateStep;
|
||||
import org.jooq.InsertReturningStep;
|
||||
import org.jooq.InsertValuesStep7;
|
||||
import org.jooq.Record5;
|
||||
import org.jooq.Name;
|
||||
import org.jooq.Record6;
|
||||
import org.jooq.Record7;
|
||||
import org.jooq.Record8;
|
||||
import org.jooq.Result;
|
||||
import org.jooq.SelectConditionStep;
|
||||
import org.jooq.SelectHavingStep;
|
||||
import org.jooq.SelectLimitPercentStep;
|
||||
import org.jooq.UpdateConditionStep;
|
||||
import org.jooq.exception.DataAccessException;
|
||||
@@ -493,31 +495,39 @@ public class DoneGateway {
|
||||
}
|
||||
|
||||
public List<FavoriteBean> getFavorites(Integer login) {
|
||||
SelectConditionStep<Record5<Integer, String, String, String, String>> sql = getJooq()
|
||||
Name COUNT = DSL.name("cnt");
|
||||
SelectHavingStep<Record6<Integer, String, String, String, String, Integer>> sql = getJooq()
|
||||
// @formatter:off
|
||||
.select(T_FAVORITE.PK_FAVORITE,
|
||||
V_PROJECT.NAME,
|
||||
V_MODULE.NAME,
|
||||
V_JOB.NAME,
|
||||
V_BILLING.NAME)
|
||||
V_BILLING.NAME,
|
||||
DSL.count(T_DONE.PK).as(COUNT))
|
||||
.from(T_FAVORITE)
|
||||
.leftJoin(V_PROJECT).on(V_PROJECT.PK.eq(T_FAVORITE.FK_PROJECT))
|
||||
.leftJoin(V_MODULE).on(V_MODULE.PK.eq(T_FAVORITE.FK_MODULE))
|
||||
.leftJoin(V_JOB).on(V_JOB.PK.eq(T_FAVORITE.FK_JOB))
|
||||
.leftJoin(V_BILLING).on(V_BILLING.PK.eq(T_FAVORITE.FK_BILLING))
|
||||
.where(T_FAVORITE.FK_LOGIN.eq(login));
|
||||
.leftJoin(T_DONE).on(T_DONE.FK_PROJECT.eq(T_FAVORITE.FK_PROJECT))
|
||||
.and(T_DONE.FK_MODULE.eq(T_FAVORITE.FK_MODULE))
|
||||
.and(T_DONE.FK_JOB.eq(T_FAVORITE.FK_JOB))
|
||||
.where(T_FAVORITE.FK_LOGIN.eq(login))
|
||||
.groupBy(T_FAVORITE.PK_FAVORITE, V_PROJECT.NAME, V_MODULE.NAME, V_JOB.NAME, V_BILLING.NAME);
|
||||
// @formatter:on
|
||||
LOGGER.trace(sql);
|
||||
List<FavoriteBean> list = new ArrayList<>();
|
||||
for (Record5<Integer, String, String, String, String> r : sql.fetch()) {
|
||||
for (Record6<Integer, String, String, String, String, Integer> r : sql.fetch()) {
|
||||
FavoriteBean bean = new FavoriteBean();
|
||||
bean.setFkFavorite(r.get(T_FAVORITE.PK_FAVORITE));
|
||||
bean.setProject(r.get(V_PROJECT.NAME));
|
||||
bean.setModule(r.get(V_MODULE.NAME));
|
||||
bean.setJob(r.get(V_JOB.NAME));
|
||||
bean.setBilling(r.get(V_BILLING.NAME));
|
||||
bean.setLoad(r.get(COUNT, Integer.class));
|
||||
list.add(bean);
|
||||
}
|
||||
list.sort((o1, o2) -> o1 != null && o1.getModule() != null && o2 != null ? o1.getModule().compareTo(o2.getModule()) : 0);
|
||||
return list;
|
||||
}
|
||||
|
||||
|
||||
@@ -8,13 +8,14 @@ import java.io.Serializable;
|
||||
*
|
||||
*/
|
||||
public class FavoriteBean implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
private static final long serialVersionUID = 2L;
|
||||
|
||||
private Integer fkFavorite;
|
||||
private String project;
|
||||
private String module;
|
||||
private String job;
|
||||
private String billing;
|
||||
private Integer load;
|
||||
|
||||
/**
|
||||
* @return the project
|
||||
@@ -85,4 +86,18 @@ public class FavoriteBean implements Serializable {
|
||||
public void setFkFavorite(Integer fkFavorite) {
|
||||
this.fkFavorite = fkFavorite;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the load
|
||||
*/
|
||||
public Integer getLoad() {
|
||||
return load;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param load the load to set
|
||||
*/
|
||||
public void setLoad(Integer load) {
|
||||
this.load = load;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -101,7 +101,12 @@
|
||||
<ul class="dropdown-menu">
|
||||
<li th:each="f : ${favorites}">
|
||||
<a class="dropdown-item" th:href="@{/done/usefav/{id}(id=${f.fkFavorite})}">
|
||||
<span th:text="${f.project} + ' ' + ${f.module} + ' ' + ${f.job}"></span>
|
||||
<span class="row" style="min-width: 512px">
|
||||
<span class="col-1" th:text="${f.load}"></span>
|
||||
<span class="col-2" th:text="${f.project}"></span>
|
||||
<span class="col-3" th:text="${f.module}"></span>
|
||||
<span class="col-6" th:text="${f.job}"></span>
|
||||
</span>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
@@ -5,19 +5,19 @@
|
||||
|
||||
<title>Timetrack</title>
|
||||
|
||||
<link rel="stylesheet" type="text/css" th:href="@{/webjars/bootstrap/5.3.3/css/bootstrap.min.css}" />
|
||||
<link rel="stylesheet" type="text/css" th:href="@{/webjars/datatables/2.1.8/css/dataTables.dataTables.min.css}" />
|
||||
<link rel="stylesheet" type="text/css" th:href="@{/webjars/font-awesome/6.7.2/css/all.min.css}" />
|
||||
<link rel="stylesheet" type="text/css" th:href="@{/webjars/fullcalendar/6.1.9/main.css}" />
|
||||
<link rel="stylesheet" type="text/css" th:href="@{/webjars/bootstrap/5.3.8/css/bootstrap.min.css}" />
|
||||
<link rel="stylesheet" type="text/css" th:href="@{/webjars/datatables/2.3.2/css/dataTables.dataTables.min.css}" />
|
||||
<link rel="stylesheet" type="text/css" th:href="@{/webjars/font-awesome/7.0.1/css/all.min.css}" />
|
||||
<link rel="stylesheet" type="text/css" th:href="@{/webjars/fullcalendar/6.1.10/main.css}" />
|
||||
<link rel="stylesheet" type="text/css" th:href="@{/css/style.css}">
|
||||
<link rel="stylesheet" type="text/css" th:href="@{/public/dynamicstyle.css}">
|
||||
<link rel="icon" type="image/png" sizes="32x32" th:href="@{/png/favicon/favicon-32x32.png}" />
|
||||
<link rel="icon" type="image/png" sizes="16x16" th:href="@{/png/favicon/favicon-16x16.png}" />
|
||||
|
||||
<script th:src="@{/webjars/jquery/3.7.1/jquery.min.js}"></script>
|
||||
<script th:src="@{/webjars/bootstrap/5.3.3/js/bootstrap.bundle.min.js}"></script>
|
||||
<script th:src="@{/webjars/datatables/2.1.8/js/dataTables.dataTables.min.js}"></script>
|
||||
<script th:src="@{/webjars/fullcalendar/6.1.9/main.js}"></script>
|
||||
<script th:src="@{/webjars/bootstrap/5.3.8/js/bootstrap.bundle.min.js}"></script>
|
||||
<script th:src="@{/webjars/datatables/2.3.2/js/dataTables.dataTables.min.js}"></script>
|
||||
<script th:src="@{/webjars/fullcalendar/6.1.10/main.js}"></script>
|
||||
<script th:src="@{/js/helper.js}"></script>
|
||||
<script th:src="@{/js/clock.js}"></script>
|
||||
<script th:src="@{/js/schedule.js}"></script>
|
||||
|
||||
Reference in New Issue
Block a user