Compare commits
15
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b1af757976 | ||
|
|
9694b90a88 | ||
|
|
b69429e09e | ||
|
|
3b0693560e | ||
|
|
af1bca6b99 | ||
|
|
ba841978ae | ||
|
|
f2a176ea9b | ||
|
|
097336d66d | ||
|
|
1d7b47aaa0 | ||
|
|
f49b44cd56 | ||
|
|
60777feaa3 | ||
|
|
bcc1182dea | ||
|
|
4a83bb6bee | ||
|
|
0879b53a88 | ||
|
|
6aa858e299 |
@@ -13,6 +13,13 @@ jobs:
|
|||||||
- name: Clone Repository
|
- name: Clone Repository
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Login to registry
|
||||||
|
uses: docker/login-action@v2
|
||||||
|
with:
|
||||||
|
registry: ${{ secrets.REGISTRY_PATH }}
|
||||||
|
username: ${{ secrets.REGISTRY_USER }}
|
||||||
|
password: ${{ secrets.REGISTRY_PASS }}
|
||||||
|
|
||||||
- name: Build docker image
|
- name: Build docker image
|
||||||
run: docker build -t umbrella .
|
run: docker build -t umbrella .
|
||||||
|
|
||||||
@@ -28,24 +35,12 @@ jobs:
|
|||||||
docker tag umbrella ${{ secrets.REGISTRY_PATH }}/umbrella:${{ gitea.ref_name }}
|
docker tag umbrella ${{ secrets.REGISTRY_PATH }}/umbrella:${{ gitea.ref_name }}
|
||||||
docker tag umbrella ${{ secrets.REGISTRY_PATH }}/umbrella:$TAG
|
docker tag umbrella ${{ secrets.REGISTRY_PATH }}/umbrella:$TAG
|
||||||
|
|
||||||
- name: Login to registry
|
|
||||||
uses: docker/login-action@v2
|
|
||||||
with:
|
|
||||||
registry: ${{ secrets.REGISTRY_PATH }}
|
|
||||||
username: ${{ secrets.REGISTRY_USER }}
|
|
||||||
password: ${{ secrets.REGISTRY_PASS }}
|
|
||||||
|
|
||||||
- name: Push to registry
|
- name: Push to registry
|
||||||
run: |
|
run: |
|
||||||
TAG=$(cat /tmp/tag)
|
TAG=$(cat /tmp/tag)
|
||||||
docker push ${{ secrets.REGISTRY_PATH }}/umbrella:${{ gitea.ref_name }}
|
docker push ${{ secrets.REGISTRY_PATH }}/umbrella:${{ gitea.ref_name }}
|
||||||
docker push ${{ secrets.REGISTRY_PATH }}/umbrella:$TAG
|
docker push ${{ secrets.REGISTRY_PATH }}/umbrella:$TAG
|
||||||
|
|
||||||
- name: Restart umbrella.srsoftware.de
|
|
||||||
if: github.ref == 'refs/heads/dev'
|
|
||||||
run: |
|
|
||||||
curl -X POST -H "Authorization: Bearer ${{ secrets.ELDORADO_MAKE_BEARER }}" -d umbrella_25_start https://make.eldorado.srsoftware.de/launch
|
|
||||||
|
|
||||||
Clean-Registry:
|
Clean-Registry:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
|
|||||||
@@ -90,7 +90,7 @@
|
|||||||
{#if messages.warning}
|
{#if messages.warning}
|
||||||
<span class="warn">{@html messages.warning}</span>
|
<span class="warn">{@html messages.warning}</span>
|
||||||
{/if}
|
{/if}
|
||||||
<Route path="/" component={User} />
|
<Route path="/" component={ProjectList} />
|
||||||
<Route path="/account/:id" component={Account} />
|
<Route path="/account/:id" component={Account} />
|
||||||
<Route path="/accounting" component={Accounts} />
|
<Route path="/accounting" component={Accounts} />
|
||||||
<Route path="/accounting/new" component={NewAccount} />
|
<Route path="/accounting/new" component={NewAccount} />
|
||||||
|
|||||||
@@ -18,15 +18,16 @@
|
|||||||
|
|
||||||
function calcSums(){
|
function calcSums(){
|
||||||
let sums = {};
|
let sums = {};
|
||||||
sums[0] = 0;
|
sums[ 0] = 0;
|
||||||
|
sums[-1] = 0;
|
||||||
for (let user of Object.values(users)) sums[user.id] = 0;
|
for (let user of Object.values(users)) sums[user.id] = 0;
|
||||||
for (let transaction of filtered) {
|
for (let transaction of filtered) {
|
||||||
for (let user of Object.values(users)){
|
for (let user of Object.values(users)){
|
||||||
if (user.id == transaction.destination.id) sums[user.id] += transaction.amount;
|
if (user.id == transaction.destination.id) sums[user.id] += transaction.amount;
|
||||||
if (user.id == transaction.source.id) sums[user.id] -= transaction.amount;
|
if (user.id == transaction.source.id) sums[user.id] -= transaction.amount;
|
||||||
}
|
}
|
||||||
if (!transaction.destination.id) sums[0] += transaction.amount;
|
if (!transaction.destination.id) sums[ 0] += transaction.amount;
|
||||||
if (!transaction.source.id) sums[0] -= transaction.amount;
|
if (!transaction.source.id) sums[-1] += transaction.amount;
|
||||||
}
|
}
|
||||||
return sums;
|
return sums;
|
||||||
}
|
}
|
||||||
@@ -102,7 +103,10 @@
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
.amount{ text-align: right }
|
:global {
|
||||||
|
.amount{ text-align: right }
|
||||||
|
.nowrap{ whitespace: nowrap }
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<svelte:head>
|
<svelte:head>
|
||||||
@@ -154,10 +158,16 @@
|
|||||||
</th>
|
</th>
|
||||||
{/each}
|
{/each}
|
||||||
<td class="amount">
|
<td class="amount">
|
||||||
<br/>
|
{sums[-1].toFixed(2)} {account.currency} <br/>
|
||||||
{sums[0].toFixed(2)} {account.currency}
|
-{sums[0].toFixed(2)} {account.currency}<br/>
|
||||||
|
{(sums[-1]-sums[0]).toFixed(2)} {account.currency}
|
||||||
</td>
|
</td>
|
||||||
<td colspan="3"></td>
|
<td class="nowrap">
|
||||||
|
{t('external gains')}<br/>
|
||||||
|
{t('external expenses')}<br/>
|
||||||
|
{t('sum external')}
|
||||||
|
</td>
|
||||||
|
<td colspan="2"></td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
|||||||
@@ -44,9 +44,9 @@
|
|||||||
</span>
|
</span>
|
||||||
|
|
||||||
<ul>
|
<ul>
|
||||||
{#each accounts as account (account.id)}
|
{#each accounts.toSorted((a,b) => a.name.localeCompare(b.name)) as account (account.id)}
|
||||||
<li>
|
<li>
|
||||||
<a {onclick} href="/account/{account.id}">{account.name} ({account.id})</a>
|
<a {onclick} href="/account/{account.id}">{account.name}</a>
|
||||||
</li>
|
</li>
|
||||||
{/each}
|
{/each}
|
||||||
</ul>
|
</ul>
|
||||||
|
|||||||
@@ -137,7 +137,7 @@
|
|||||||
<legend>{t('state_open')}</legend>
|
<legend>{t('state_open')}</legend>
|
||||||
{#if sorted}
|
{#if sorted}
|
||||||
{#each sorted as task}
|
{#each sorted as task}
|
||||||
{#if task.status == 20 && match(task)}
|
{#if task.status < 60 && task.status >= 20 && match(task)}
|
||||||
<div href={`/task/${task.id}/view`} title={task.description.source} task_id={task.id} {onclick} {oncontextmenu} {ontouchstart} {ontouchend} onmousedown={ontouchstart} onmouseup={ontouchend} >
|
<div href={`/task/${task.id}/view`} title={task.description.source} task_id={task.id} {onclick} {oncontextmenu} {ontouchstart} {ontouchend} onmousedown={ontouchstart} onmouseup={ontouchend} >
|
||||||
{task.name}
|
{task.name}
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<script>
|
<script>
|
||||||
import { onMount } from 'svelte';
|
import { onMount } from 'svelte';
|
||||||
import { useTinyRouter } from 'svelte-tiny-router';
|
import { useTinyRouter } from 'svelte-tiny-router';
|
||||||
import { api, drop, patch, post } from '../../urls.svelte.js';
|
import { api, drop, get, patch, post } from '../../urls.svelte.js';
|
||||||
import { error, yikes } from '../../warn.svelte';
|
import { error, yikes } from '../../warn.svelte';
|
||||||
import { t } from '../../translations.svelte.js';
|
import { t } from '../../translations.svelte.js';
|
||||||
import { timetrack } from '../../user.svelte.js';
|
import { timetrack } from '../../user.svelte.js';
|
||||||
@@ -41,10 +41,18 @@
|
|||||||
});
|
});
|
||||||
|
|
||||||
async function addTime(task_id){
|
async function addTime(task_id){
|
||||||
const url = api(`time/track_task/${task_id}`);
|
let url = api(`time/track_task/${task_id}`);
|
||||||
const resp = await post(url,now()); // create new time or return time with assigned tasks
|
let resp = await post(url,now()); // create new time or return time with assigned tasks
|
||||||
if (resp.ok) {
|
if (resp.ok) {
|
||||||
const track = await resp.json();
|
const track = await resp.json();
|
||||||
|
if (timetrack.running){
|
||||||
|
url = api(`time/${timetrack.running.id}`);
|
||||||
|
resp = await get(url);
|
||||||
|
if (resp.ok){
|
||||||
|
let previous = await resp.json();
|
||||||
|
times[previous.id] = previous;
|
||||||
|
}
|
||||||
|
}
|
||||||
timetrack.running = track;
|
timetrack.running = track;
|
||||||
} else {
|
} else {
|
||||||
error(resp);
|
error(resp);
|
||||||
|
|||||||
@@ -79,8 +79,15 @@ public class TimeModule extends BaseHandler implements TimeService {
|
|||||||
if (user.isEmpty()) return unauthorized(ex);
|
if (user.isEmpty()) return unauthorized(ex);
|
||||||
var head = path.pop();
|
var head = path.pop();
|
||||||
return switch (head) {
|
return switch (head) {
|
||||||
case STARTED -> getStartedTime(user.get(),ex);
|
case STARTED -> getStartedTime(user.get(),ex);
|
||||||
case null, default -> super.doGet(path,ex);
|
case null -> super.doGet(path,ex);
|
||||||
|
default -> {
|
||||||
|
try {
|
||||||
|
yield sendContent(ex,timeDb.load(Long.parseLong(head)));
|
||||||
|
} catch (NumberFormatException ignored) {
|
||||||
|
yield super.doGet(path,ex);
|
||||||
|
}
|
||||||
|
}
|
||||||
};
|
};
|
||||||
} catch (UmbrellaException e){
|
} catch (UmbrellaException e){
|
||||||
return send(ex,e);
|
return send(ex,e);
|
||||||
|
|||||||
@@ -17,6 +17,7 @@
|
|||||||
"abort": "abbrechen",
|
"abort": "abbrechen",
|
||||||
"account": "Konto",
|
"account": "Konto",
|
||||||
"accounting": "Konten",
|
"accounting": "Konten",
|
||||||
|
"account name": "Konto-Name",
|
||||||
"accounts": "Konten",
|
"accounts": "Konten",
|
||||||
"actions": "Aktionen",
|
"actions": "Aktionen",
|
||||||
"add_login_service": "Login-Service anlegen",
|
"add_login_service": "Login-Service anlegen",
|
||||||
@@ -75,6 +76,7 @@
|
|||||||
"CREATE_USERS": "Nutzer anlegen",
|
"CREATE_USERS": "Nutzer anlegen",
|
||||||
"create_pdf": "PDF erzeugen",
|
"create_pdf": "PDF erzeugen",
|
||||||
"created_with": "erzeugt mit {tool} von {producer}",
|
"created_with": "erzeugt mit {tool} von {producer}",
|
||||||
|
"currency": "Währung",
|
||||||
"customer": "Kunde",
|
"customer": "Kunde",
|
||||||
"customer_address": "Adresse",
|
"customer_address": "Adresse",
|
||||||
"customer_email": "Emailadresse des Kunden",
|
"customer_email": "Emailadresse des Kunden",
|
||||||
@@ -124,6 +126,8 @@
|
|||||||
"evaluate": "auswerten",
|
"evaluate": "auswerten",
|
||||||
"expand_on_click": "Anklicken zum Anzeigen",
|
"expand_on_click": "Anklicken zum Anzeigen",
|
||||||
"extended_settings": "erweiterte Einstellungen",
|
"extended_settings": "erweiterte Einstellungen",
|
||||||
|
"external expenses": "externe Ausgaben",
|
||||||
|
"external gains": "externe Einnahmen",
|
||||||
|
|
||||||
"failed": "fehlgeschlagen",
|
"failed": "fehlgeschlagen",
|
||||||
"failed_login_attempts" : "Account nach {attempts} fehlgeschlagenen Logins gesperrt bis {release_time}",
|
"failed_login_attempts" : "Account nach {attempts} fehlgeschlagenen Logins gesperrt bis {release_time}",
|
||||||
@@ -162,6 +166,7 @@
|
|||||||
"files": "Dateien",
|
"files": "Dateien",
|
||||||
"filter": "Filter",
|
"filter": "Filter",
|
||||||
"filter by tags": "Nach Tags filtern",
|
"filter by tags": "Nach Tags filtern",
|
||||||
|
"first_transaction": "erste Transaktion",
|
||||||
"footer": "Fuß-Text",
|
"footer": "Fuß-Text",
|
||||||
"foreign_id": "externe Kennung",
|
"foreign_id": "externe Kennung",
|
||||||
"forgot_pass" : "Password vergessen?",
|
"forgot_pass" : "Password vergessen?",
|
||||||
@@ -374,6 +379,7 @@
|
|||||||
"subtask": "Unteraufgabe",
|
"subtask": "Unteraufgabe",
|
||||||
"subtasks": "Unteraufgaben",
|
"subtasks": "Unteraufgaben",
|
||||||
"succeeding_document": "Nachfolge-Dokument",
|
"succeeding_document": "Nachfolge-Dokument",
|
||||||
|
"sum external": "Summe externe Umsätze",
|
||||||
"sum_of_records": "Summe der ausgewählten Einträge",
|
"sum_of_records": "Summe der ausgewählten Einträge",
|
||||||
"sums": "Summen",
|
"sums": "Summen",
|
||||||
|
|
||||||
|
|||||||
@@ -17,6 +17,7 @@
|
|||||||
"abort": "abort",
|
"abort": "abort",
|
||||||
"account": "account",
|
"account": "account",
|
||||||
"accounting": "accounting",
|
"accounting": "accounting",
|
||||||
|
"account name": "Account name",
|
||||||
"accounts": "accounts",
|
"accounts": "accounts",
|
||||||
"actions": "actions",
|
"actions": "actions",
|
||||||
"add_login_service": "add login service",
|
"add_login_service": "add login service",
|
||||||
@@ -75,6 +76,7 @@
|
|||||||
"CREATE_USERS": "create users",
|
"CREATE_USERS": "create users",
|
||||||
"create_pdf": "create PDF",
|
"create_pdf": "create PDF",
|
||||||
"created_with": "created with {tool} by {producer}",
|
"created_with": "created with {tool} by {producer}",
|
||||||
|
"currency": "Currency",
|
||||||
"customer": "customer",
|
"customer": "customer",
|
||||||
"customer_address": "address",
|
"customer_address": "address",
|
||||||
"customer_email": "customer email address",
|
"customer_email": "customer email address",
|
||||||
@@ -124,6 +126,8 @@
|
|||||||
"evaluate": "evaluate",
|
"evaluate": "evaluate",
|
||||||
"expand_on_click": "click to expand",
|
"expand_on_click": "click to expand",
|
||||||
"extended_settings": "extended settings",
|
"extended_settings": "extended settings",
|
||||||
|
"external expenses": "external expenses",
|
||||||
|
"external gains": "external gains",
|
||||||
|
|
||||||
"failed": "failed",
|
"failed": "failed",
|
||||||
"failed_login_attempts" : "account locked until {release_time} after {attempts} failed login attempts",
|
"failed_login_attempts" : "account locked until {release_time} after {attempts} failed login attempts",
|
||||||
@@ -162,6 +166,7 @@
|
|||||||
"files": "files",
|
"files": "files",
|
||||||
"filter": "filter",
|
"filter": "filter",
|
||||||
"filter by tags": "filter by tags",
|
"filter by tags": "filter by tags",
|
||||||
|
"first_transaction": "first transaction",
|
||||||
"footer": "footer",
|
"footer": "footer",
|
||||||
"foreign_id": "external ID",
|
"foreign_id": "external ID",
|
||||||
"forgot_pass" : "forgot password?",
|
"forgot_pass" : "forgot password?",
|
||||||
@@ -374,6 +379,7 @@
|
|||||||
"subtask": "subtask",
|
"subtask": "subtask",
|
||||||
"subtasks": "subtasks",
|
"subtasks": "subtasks",
|
||||||
"succeeding_document": "succeeding document",
|
"succeeding_document": "succeeding document",
|
||||||
|
"sum external";"sum of external positions",
|
||||||
"sum_of_records": "sum of records",
|
"sum_of_records": "sum of records",
|
||||||
"sums": "sums",
|
"sums": "sums",
|
||||||
|
|
||||||
@@ -459,11 +465,11 @@
|
|||||||
"wiki_pages": "wiki pages",
|
"wiki_pages": "wiki pages",
|
||||||
|
|
||||||
"year": "year",
|
"year": "year",
|
||||||
"You have been added to the new project '{project}', created by {user}:\n\n{body}": "You have been added to the new project '{project}', created by {user}:\n\n{body}",
|
"You can view/edit this transaction at {base_url}/account/{id}": "You can view/edit this transaction at {base_url}/account/{id}",
|
||||||
"You can view/edit this transaction at {base_url}/account/{id}": "Du kannst diese transaktion unter {base_url}/account/{id} ansehen",
|
|
||||||
"You can view/edit this project at {base_url}/project/{id}/view": "You can view/edit this project at {base_url}/project/{id}/view",
|
"You can view/edit this project at {base_url}/project/{id}/view": "You can view/edit this project at {base_url}/project/{id}/view",
|
||||||
"You can view/edit this task at {base_url}/task/{id}/view": "You can view/edit this task at {base_url}/task/{id}/view",
|
"You can view/edit this task at {base_url}/task/{id}/view": "You can view/edit this task at {base_url}/task/{id}/view",
|
||||||
"You can view/edit this wiki page at {base_url}/wiki/{id}/view": "You can view/edit this wiki page at {base_url}/wiki/{id}/view",
|
"You can view/edit this wiki page at {base_url}/wiki/{id}/view": "You can view/edit this wiki page at {base_url}/wiki/{id}/view",
|
||||||
|
"You have been added to the new project '{project}', created by {user}:\n\n{body}": "You have been added to the new project '{project}', created by {user}:\n\n{body}",
|
||||||
"You may change your notification settings at {base_url}/message/settings": "You may change your notification settings at {base_url}/message/settings .",
|
"You may change your notification settings at {base_url}/message/settings": "You may change your notification settings at {base_url}/message/settings .",
|
||||||
"Your token to create a new password" : "Your token to create a new password",
|
"Your token to create a new password" : "Your token to create a new password",
|
||||||
"your_profile": "your profile"
|
"your_profile": "your profile"
|
||||||
|
|||||||
Reference in New Issue
Block a user