From 8bb44d0d7f2aecf02f787a3838b0c1c4bf87b203 Mon Sep 17 00:00:00 2001 From: Stephan Richter Date: Mon, 18 Aug 2025 01:23:29 +0200 Subject: [PATCH] working on time list Signed-off-by: Stephan Richter --- frontend/src/routes/document/List.svelte | 4 +-- frontend/src/routes/document/TimeList.svelte | 6 ++-- .../de/srsoftware/umbrella/time/SqliteDb.java | 31 +++++++++++++++++-- .../de/srsoftware/umbrella/time/TimeDb.java | 5 ++- .../srsoftware/umbrella/time/TimeModule.java | 16 +++++++--- translations/src/main/resources/de.json | 2 +- web/src/main/resources/web/css/bloodshed.css | 1 + web/src/main/resources/web/css/default.css | 1 + web/src/main/resources/web/css/winter.css | 1 + 9 files changed, 52 insertions(+), 15 deletions(-) diff --git a/frontend/src/routes/document/List.svelte b/frontend/src/routes/document/List.svelte index bd930c2..5c6d793 100644 --- a/frontend/src/routes/document/List.svelte +++ b/frontend/src/routes/document/List.svelte @@ -27,7 +27,7 @@ } if (company_id) { - for (let comp of companies){ + for (let comp of Object.keys(companies)){ if (comp.id == company_id){ load(comp); break; @@ -80,7 +80,7 @@
- {selected_company ? t( 'list_of',selected_company.name) : t('document_list')} + {selected_company ? t( 'docs_of_company',{company:selected_company.name}) : t('document_list')} {#if error}
{error}
{/if} diff --git a/frontend/src/routes/document/TimeList.svelte b/frontend/src/routes/document/TimeList.svelte index 160f7ed..e2f8390 100644 --- a/frontend/src/routes/document/TimeList.svelte +++ b/frontend/src/routes/document/TimeList.svelte @@ -49,8 +49,8 @@

Times

{#if projects} - {#each projects as project,idx1} - + {#each Object.entries(projects) as [pid,project]} + {/each} {/if} {#if times} @@ -63,4 +63,4 @@
{/each} {/if} - \ No newline at end of file + diff --git a/time/src/main/java/de/srsoftware/umbrella/time/SqliteDb.java b/time/src/main/java/de/srsoftware/umbrella/time/SqliteDb.java index d33736e..a4d0efe 100644 --- a/time/src/main/java/de/srsoftware/umbrella/time/SqliteDb.java +++ b/time/src/main/java/de/srsoftware/umbrella/time/SqliteDb.java @@ -1,10 +1,12 @@ /* © SRSoftware 2025 */ package de.srsoftware.umbrella.time; +import static de.srsoftware.tools.jdbc.Condition.equal; import static de.srsoftware.tools.jdbc.Condition.in; import static de.srsoftware.tools.jdbc.Query.SelectQuery.ALL; import static de.srsoftware.tools.jdbc.Query.select; import static de.srsoftware.umbrella.core.Constants.ID; +import static de.srsoftware.umbrella.core.Constants.USER_ID; import static de.srsoftware.umbrella.time.Constants.*; import de.srsoftware.umbrella.core.exceptions.UmbrellaException; @@ -24,7 +26,7 @@ public class SqliteDb implements TimeDb { } @Override - public Collection