add dueDate, fix icons, add CSV export, UI fixes

This commit is contained in:
2024-10-06 18:16:48 +02:00
parent fb5b17bc45
commit 0b977603da
39 changed files with 381 additions and 303 deletions
+1 -1
View File
@@ -14,7 +14,7 @@
<maven.compiler.source>${java.version}</maven.compiler.source>
<maven.compiler.target>${java.version}</maven.compiler.target>
<querydsl.version>5.1.0</querydsl.version>
<revision>0.2.0</revision>
<revision>0.4.0</revision>
</properties>
<parent>
@@ -55,6 +55,9 @@ public class TurnoverManager {
case "created":
path = qTurnover.created;
break;
case "dueDate":
path = qTurnover.dueDate;
break;
case "updated":
path = qTurnover.updated;
break;
@@ -90,6 +93,14 @@ public class TurnoverManager {
builder.and(qTurnover.created.before(filter.getCreated().getMax()));
}
}
if (filter.getDueDate() != null) {
if (filter.getDueDate().getMin() != null) {
builder.and(qTurnover.dueDate.after(filter.getDueDate().getMin()));
}
if (filter.getDueDate().getMax() != null) {
builder.and(qTurnover.dueDate.before(filter.getDueDate().getMax()));
}
}
if (filter.getUpdated() != null) {
if (filter.getUpdated().getMin() != null) {
builder.and(qTurnover.updated.after(filter.getUpdated().getMin()));
@@ -53,16 +53,19 @@ public class TurnoverController extends BaseController {
@RequestParam("descending") Optional<Boolean> descending,
@RequestParam("from") Optional<Instant> from,
@RequestParam("to") Optional<Instant> to,
@RequestParam("created_from") Optional<Instant> fromCreated,
@RequestParam("created_to") Optional<Instant> toCreated,
@RequestParam("customer") Optional<String> customer,
@RequestParam("motif") Optional<String> motif) {
TurnoverFilterModel filter = new TurnoverFilterModel();
filter.setCreated(new MinMax<Instant>(from.orElse(null), to.orElse(null)));
filter.setDueDate(new MinMax<Instant>(from.orElse(null), to.orElse(null)));
filter.setCreated(new MinMax<Instant>(fromCreated.orElse(null), toCreated.orElse(null)));
filter.setCustomer(customer.orElse(null));
filter.setMotif(motif.orElse(null));
return turnoverManager.fetch(getCurrentUsername(), limitParameter.orElse(15L), offsetParameter.orElse(0L),
sort.orElse("created"), descending.orElse(false), filter);
sort.orElse("dueDate"), descending.orElse(false), filter);
}
@PreAuthorize("isAuthenticated()")
@@ -75,11 +78,14 @@ public class TurnoverController extends BaseController {
@RequestParam("descending") Optional<Boolean> descending,
@RequestParam("from") Optional<Instant> from,
@RequestParam("to") Optional<Instant> to,
@RequestParam("created_from") Optional<Instant> fromCreated,
@RequestParam("created_to") Optional<Instant> toCreated,
@RequestParam("customer") Optional<String> customer,
@RequestParam("motif") Optional<String> motif) {
TurnoverFilterModel filter = new TurnoverFilterModel();
filter.setCreated(new MinMax<Instant>(from.orElse(null), to.orElse(null)));
filter.setDueDate(new MinMax<Instant>(from.orElse(null), to.orElse(null)));
filter.setCreated(new MinMax<Instant>(fromCreated.orElse(null), toCreated.orElse(null)));
filter.setCustomer(customer.orElse(null));
filter.setMotif(motif.orElse(null));
@@ -124,6 +130,9 @@ public class TurnoverController extends BaseController {
}
turnover.setCreated(Instant.now());
turnover.setUpdated(turnover.getCreated());
if (turnover.getDueDate() == null) {
turnover.setDueDate(turnover.getCreated());
}
return turnoverManager.save(turnover);
}
@@ -154,18 +163,12 @@ public class TurnoverController extends BaseController {
throw new EntityResponseStatusException(HttpStatus.NOT_MODIFIED);
}
if (turnover.getDueDate() == null) {
turnover.setDueDate(turnover.getCreated());
}
turnover.setUpdated(Instant.now());
return turnoverManager.save(turnover);
}
@PreAuthorize("hasRole('ROLE_ADMIN')")
@DeleteMapping("/{id}")
public void deleteById(@PathVariable("id") Long id) {
if (!turnoverManager.exists(id)) {
throw new EntityResponseStatusException(HttpStatus.NO_CONTENT);
}
turnoverManager.deleteById(id);
}
}
@@ -77,6 +77,8 @@ public class DebugController {
turnover.setCreated(randomDate(startInclusive, endExclusive));
turnover.setUpdated(splittableRandom.nextBoolean() ? turnover.getCreated()
: randomDate(turnover.getCreated(), endExclusive));
turnover.setDueDate(splittableRandom.nextBoolean() ? turnover.getCreated()
: randomDate(startInclusive, turnover.getCreated()));
turnover.setCustomer(RandomStringUtils.randomAlphabetic(splittableRandom.nextInt(3, 10)));
turnover.setMotif(RandomStringUtils.randomAlphabetic(splittableRandom.nextInt(5, 30)));
@@ -49,16 +49,19 @@ public class TurnoverManagementController extends BaseController {
@RequestParam("descending") Optional<Boolean> descending,
@RequestParam("from") Optional<Instant> from,
@RequestParam("to") Optional<Instant> to,
@RequestParam("created_from") Optional<Instant> fromCreated,
@RequestParam("created_to") Optional<Instant> toCreated,
@RequestParam("customer") Optional<String> customer,
@RequestParam("motif") Optional<String> motif) {
TurnoverFilterModel filter = new TurnoverFilterModel();
filter.setCreated(new MinMax<Instant>(from.orElse(null), to.orElse(null)));
filter.setDueDate(new MinMax<Instant>(from.orElse(null), to.orElse(null)));
filter.setCreated(new MinMax<Instant>(fromCreated.orElse(null), toCreated.orElse(null)));
filter.setCustomer(customer.orElse(null));
filter.setMotif(motif.orElse(null));
return turnoverManager.fetch(usernameParameter.orElse(null), limitParameter.orElse(15L),
offsetParameter.orElse(0L), sort.orElse("created"), descending.orElse(false), filter);
offsetParameter.orElse(0L), sort.orElse("dueDate"), descending.orElse(false), filter);
}
@PreAuthorize("hasRole('ROLE_ADMIN')")
@@ -72,11 +75,14 @@ public class TurnoverManagementController extends BaseController {
@RequestParam("descending") Optional<Boolean> descending,
@RequestParam("from") Optional<Instant> from,
@RequestParam("to") Optional<Instant> to,
@RequestParam("created_from") Optional<Instant> fromCreated,
@RequestParam("created_to") Optional<Instant> toCreated,
@RequestParam("customer") Optional<String> customer,
@RequestParam("motif") Optional<String> motif) {
TurnoverFilterModel filter = new TurnoverFilterModel();
filter.setCreated(new MinMax<Instant>(from.orElse(null), to.orElse(null)));
filter.setDueDate(new MinMax<Instant>(from.orElse(null), to.orElse(null)));
filter.setCreated(new MinMax<Instant>(fromCreated.orElse(null), toCreated.orElse(null)));
filter.setCustomer(customer.orElse(null));
filter.setMotif(motif.orElse(null));
return turnoverManager.overview(usernameParameter.orElse(null), limitParameter.orElse(15L),
@@ -106,6 +112,15 @@ public class TurnoverManagementController extends BaseController {
throw new EntityResponseStatusException(errors.getAllErrors(), HttpStatus.CONFLICT);
}
Turnover existing = turnoverManager.get(turnover.getId());
if (existing.equals(turnover)) {
throw new EntityResponseStatusException(HttpStatus.NOT_MODIFIED);
}
if (turnover.getDueDate() == null) {
turnover.setDueDate(turnover.getCreated());
}
turnover.setUpdated(Instant.now());
return turnoverManager.save(turnover);
@@ -5,6 +5,7 @@ import java.time.Instant;
public class TurnoverFilterModel {
private MinMax<Instant> created;
private MinMax<Instant> dueDate;
private MinMax<Instant> updated;
private String customer;
private String motif;
@@ -19,6 +20,14 @@ public class TurnoverFilterModel {
this.created = created;
}
public MinMax<Instant> getDueDate() {
return dueDate;
}
public void setDueDate(MinMax<Instant> dueDate) {
this.dueDate = dueDate;
}
public MinMax<Instant> getUpdated() {
return updated;
}
@@ -25,6 +25,9 @@ public class Turnover {
@Column(name = "created", nullable = false, updatable = false)
private Instant created;
@Column(name = "due_date", nullable = false)
private Instant dueDate;
@Column(name = "updated", nullable = false)
private Instant updated;
@@ -72,6 +75,14 @@ public class Turnover {
this.created = created;
}
public Instant getDueDate() {
return dueDate;
}
public void setDueDate(Instant dueDate) {
this.dueDate = dueDate;
}
public Instant getUpdated() {
return updated;
}
@@ -136,6 +147,8 @@ public class Turnover {
Turnover turnover = (Turnover) obj;
boolean equals = true;
equals &= dueDate.equals(turnover.getDueDate());
equals &= id == null && turnover.getId() == null || id.equals(turnover.getId());
equals &= username == null && turnover.getUsername() == null || username.equals(turnover.getUsername());
+28 -28
View File
@@ -1,22 +1,22 @@
{
"name": "buntspecht-web",
"version": "0.3.1",
"version": "0.4.0",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "buntspecht-web",
"version": "0.3.1",
"version": "0.4.0",
"license": "AGPL3",
"dependencies": {
"@angular/animations": "^18.2.7",
"@angular/cdk": "^18.2.6",
"@angular/cdk": "^18.2.7",
"@angular/common": "^18.2.7",
"@angular/compiler": "^18.2.7",
"@angular/core": "^18.2.7",
"@angular/forms": "^18.2.7",
"@angular/material": "^18.2.6",
"@angular/material-moment-adapter": "^18.2.6",
"@angular/material": "^18.2.7",
"@angular/material-moment-adapter": "^18.2.7",
"@angular/platform-browser": "^18.2.7",
"@angular/platform-browser-dynamic": "^18.2.7",
"@angular/router": "^18.2.7",
@@ -359,9 +359,9 @@
}
},
"node_modules/@angular/cdk": {
"version": "18.2.6",
"resolved": "https://registry.npmjs.org/@angular/cdk/-/cdk-18.2.6.tgz",
"integrity": "sha512-Gfq/iv4zhlKYpdQkDaBRwxI71NHNUHM1Cs1XhnZ0/oFct5HXvSv1RHRGTKqBJLLACaAPzZKXJ/UglLoyO5CNiQ==",
"version": "18.2.7",
"resolved": "https://registry.npmjs.org/@angular/cdk/-/cdk-18.2.7.tgz",
"integrity": "sha512-Dfl37WBLeEUURQrDeuMcOgX2bkQJ+BGMOlr1qsFXzUWHH+qgYW2YwO1rbna/rjxyeFzc2Sy569dYRzNPqMewzg==",
"license": "MIT",
"dependencies": {
"tslib": "^2.3.0"
@@ -534,16 +534,16 @@
}
},
"node_modules/@angular/material": {
"version": "18.2.6",
"resolved": "https://registry.npmjs.org/@angular/material/-/material-18.2.6.tgz",
"integrity": "sha512-ObxC/vomSb9QF3vIztuiInQzws+D6u09Dhfx6uNFjtyICqxEFpF7+Qx7QVDWrsuXOgxZTKgacK8f46iV8hWUfg==",
"version": "18.2.7",
"resolved": "https://registry.npmjs.org/@angular/material/-/material-18.2.7.tgz",
"integrity": "sha512-mgPj2TCIrsngmu3iNnoaPc6su7uPv+NPCv9HaiKhTx4QGae8EW+RvUxEZJvh4Qaym1fJTi3hjnVeWvQDLQt4CA==",
"license": "MIT",
"dependencies": {
"tslib": "^2.3.0"
},
"peerDependencies": {
"@angular/animations": "^18.0.0 || ^19.0.0",
"@angular/cdk": "18.2.6",
"@angular/cdk": "18.2.7",
"@angular/common": "^18.0.0 || ^19.0.0",
"@angular/core": "^18.0.0 || ^19.0.0",
"@angular/forms": "^18.0.0 || ^19.0.0",
@@ -552,16 +552,16 @@
}
},
"node_modules/@angular/material-moment-adapter": {
"version": "18.2.6",
"resolved": "https://registry.npmjs.org/@angular/material-moment-adapter/-/material-moment-adapter-18.2.6.tgz",
"integrity": "sha512-9RwdilTesMBAxIEeY6JzMpWIOU+dS4Ned/1wdRQN33x3Qb/POhyqAv+3XfeLqoJyn7GXkl6dHFu8VEE/1WYaKg==",
"version": "18.2.7",
"resolved": "https://registry.npmjs.org/@angular/material-moment-adapter/-/material-moment-adapter-18.2.7.tgz",
"integrity": "sha512-zY9ukZeZqJ/VwEvsNl1LjU4YduYA+GGA+IxBpaTcv/nS4JFPfi6n6StjOzcEOFstCx6G+4JP6qq5wcn3LvoaOg==",
"license": "MIT",
"dependencies": {
"tslib": "^2.3.0"
},
"peerDependencies": {
"@angular/core": "^18.0.0 || ^19.0.0",
"@angular/material": "18.2.6",
"@angular/material": "18.2.7",
"moment": "^2.18.1"
}
},
@@ -3473,9 +3473,9 @@
}
},
"node_modules/@jsonjoy.com/util": {
"version": "1.3.0",
"resolved": "https://registry.npmjs.org/@jsonjoy.com/util/-/util-1.3.0.tgz",
"integrity": "sha512-Cebt4Vk7k1xHy87kHY7KSPLT77A7Ev7IfOblyLZhtYEhrdQ6fX4EoLq3xOQ3O/DRMEh2ok5nyC180E+ABS8Wmw==",
"version": "1.5.0",
"resolved": "https://registry.npmjs.org/@jsonjoy.com/util/-/util-1.5.0.tgz",
"integrity": "sha512-ojoNsrIuPI9g6o8UxhraZQSyF2ByJanAY4cTFbc8Mf2AXEF4aQRGY1dJxyJpuyav8r9FGflEt/Ff3u5Nt6YMPA==",
"dev": true,
"license": "Apache-2.0",
"engines": {
@@ -5634,9 +5634,9 @@
}
},
"node_modules/caniuse-lite": {
"version": "1.0.30001666",
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001666.tgz",
"integrity": "sha512-gD14ICmoV5ZZM1OdzPWmpx+q4GyefaK06zi8hmfHV5xe4/2nOQX3+Dw5o+fSqOws2xVwL9j+anOPFwHzdEdV4g==",
"version": "1.0.30001667",
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001667.tgz",
"integrity": "sha512-7LTwJjcRkzKFmtqGsibMeuXmvFDfZq/nzIjnmgCGzKKRVzjD72selLDK1oPF/Oxzmt4fNcPvTDvGqSDG4tCALw==",
"dev": true,
"funding": [
{
@@ -6696,9 +6696,9 @@
"license": "MIT"
},
"node_modules/electron-to-chromium": {
"version": "1.5.31",
"resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.31.tgz",
"integrity": "sha512-QcDoBbQeYt0+3CWcK/rEbuHvwpbT/8SV9T3OSgs6cX1FlcUAkgrkqbg9zLnDrMM/rLamzQwal4LYFCiWk861Tg==",
"version": "1.5.32",
"resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.32.tgz",
"integrity": "sha512-M+7ph0VGBQqqpTT2YrabjNKSQ2fEl9PVx6AK3N558gDH9NO8O6XN9SXXFWRo9u9PbEg/bWq+tjXQr+eXmxubCw==",
"dev": true,
"license": "ISC"
},
@@ -11612,9 +11612,9 @@
"license": "MIT"
},
"node_modules/regjsparser": {
"version": "0.11.0",
"resolved": "https://registry.npmjs.org/regjsparser/-/regjsparser-0.11.0.tgz",
"integrity": "sha512-vTbzVAjQDzwQdKuvj7qEq6OlAprCjE656khuGQ4QaBLg7abQ9I9ISpmLuc6inWe7zP75AECjqUa4g4sdQvOXhg==",
"version": "0.11.1",
"resolved": "https://registry.npmjs.org/regjsparser/-/regjsparser-0.11.1.tgz",
"integrity": "sha512-1DHODs4B8p/mQHU9kr+jv8+wIC9mtG4eBHxWxIq5mhjE3D5oORhCc6deRKzTjs9DcfRFmj9BHSDguZklqCGFWQ==",
"dev": true,
"license": "BSD-2-Clause",
"dependencies": {
+4 -4
View File
@@ -1,6 +1,6 @@
{
"name": "buntspecht-web",
"version": "0.3.1",
"version": "0.4.0",
"license": "AGPL3",
"scripts": {
"ng": "ng",
@@ -13,13 +13,13 @@
"private": true,
"dependencies": {
"@angular/animations": "^18.2.7",
"@angular/cdk": "^18.2.6",
"@angular/cdk": "^18.2.7",
"@angular/common": "^18.2.7",
"@angular/compiler": "^18.2.7",
"@angular/core": "^18.2.7",
"@angular/forms": "^18.2.7",
"@angular/material": "^18.2.6",
"@angular/material-moment-adapter": "^18.2.6",
"@angular/material": "^18.2.7",
"@angular/material-moment-adapter": "^18.2.7",
"@angular/platform-browser": "^18.2.7",
"@angular/platform-browser-dynamic": "^18.2.7",
"@angular/router": "^18.2.7",
@@ -29,9 +29,7 @@
</mat-card-content>
<mat-card-actions>
<button type="submit" (click)="loginForm.submit()" mat-raised-button color="primary"
[disabled]="loginForm.invalid">{{'login' |
i18n}}<mat-icon style="font-size: 1em;">open_in_new
</mat-icon></button>
[disabled]="loginForm.invalid"><mat-icon>open_in_new</mat-icon>{{'login' | i18n}}</button>
</mat-card-actions>
</mat-card>
</form>
@@ -24,12 +24,12 @@
@if (filterOpen) {
<form class="flex wrap filter">
<mat-form-field class="margin">
<mat-label>{{'management.filter.created' | i18n}}</mat-label>
<mat-label>{{'management.filter.dueDate' | i18n}}</mat-label>
<mat-date-range-input [rangePicker]="picker">
<input matStartDate placeholder="{{'turnovers.filter.created.from' | i18n}}"
<input matStartDate placeholder="{{'turnovers.filter.dueDate.from' | i18n}}"
[value]="entries && entries.filter && entries.filter.from"
(dateChange)="setFilter('from', $event.value && $event.value.toISOString() || undefined)">
<input matEndDate placeholder="{{'turnovers.filter.created.to' | i18n}}"
<input matEndDate placeholder="{{'turnovers.filter.dueDate.to' | i18n}}"
[value]="entries && entries.filter && entries.filter.to"
(dateChange)="setFilter('to', $event.value && $event.value.endOf('day').toISOString() || undefined)">
</mat-date-range-input>
@@ -50,6 +50,10 @@
</mat-form-field>
</form>
}
<span class="spacer"></span>
<a class="margin" mat-icon-button (click)="export()" title="{{'turnovers.export' | i18n}}" color="primary" [disabled]="!entries.total">
<mat-icon>file_download</mat-icon>
</a>
</div>
@if (entries && entries.total == 0) {
@@ -123,7 +127,7 @@
<ng-container matColumnDef="expanded">
<td mat-cell *matCellDef="let entry" [attr.colspan]="columns.length">
@if (expanded && entries.total && entries.filter && entries.filter.username == entry[0]) {
<ui-turnovers class="flex column fill" [turnovers]="turnovers" (page)="applyTurnoverPage($event)"
<ui-turnovers #uiTurnovers class="flex column fill" [turnovers]="turnovers" (page)="applyTurnoverPage($event)"
[enableSort]="false"></ui-turnovers>
}
</td>
@@ -1,11 +1,13 @@
import { Component, Input, OnInit } from '@angular/core';
import { Component, Input, OnInit, ViewChild } from '@angular/core';
import { FormControl } from '@angular/forms';
import { PageEvent } from '@angular/material/paginator';
import { Sort } from '@angular/material/sort';
import { ActivatedRoute, Params, Router } from '@angular/router';
import { debounceTime, Observable, switchMap } from 'rxjs';
import { I18nService } from 'src/app/services/i18n.service';
import { TurnoverManagementService } from 'src/app/services/turnover.management.service';
import { UserManagementService } from 'src/app/services/user.management.service';
import { UiTurnovers } from 'src/app/ui/turnovers/turnovers.ui';
@Component({
selector: 'ui-management',
@@ -26,11 +28,14 @@ export class PageManagement implements OnInit {
users: Observable<any>;
usersFormControl = new FormControl();
@ViewChild('uiTurnovers') uiTurnovers: UiTurnovers;
turnovers: any;
constructor(
private turnoverManagementService: TurnoverManagementService,
private userManagementService: UserManagementService,
private i18n: I18nService,
private router: Router,
private route: ActivatedRoute
) { }
@@ -173,7 +178,7 @@ export class PageManagement implements OnInit {
if (this.entries.total) {
this.expanded = true;
const filter = JSON.parse(JSON.stringify(this.entries.filter || {}));
this.turnoverManagementService.fetch(this.turnovers.limit || 100, this.turnovers.offset || 0, 'created', true, filter).subscribe({
this.turnoverManagementService.fetch(this.turnovers.limit || 100, this.turnovers.offset || 0, 'dueDate', true, filter).subscribe({
next: (data: any) => {
this.turnovers = data;
this.turnovers.filter = filter;
@@ -190,4 +195,32 @@ export class PageManagement implements OnInit {
this.applyUser(this.usersFormControl.value);
}
export() {
if (this.entries.total) {
let rows = [[this.i18n.get('user.username'), this.i18n.get('turnover.price'), this.i18n.get('turnover.price.suffix')]];
this.entries.results.forEach(result => {
rows[rows.length] = [result[0], result[1], [result[2]]]
});
if (this.uiTurnovers) {
rows.push(...this.uiTurnovers.getCsvRows());
}
if (rows.length) {
let csvContent = "data:text/csv;charset=utf-8,"
+ rows.map(e => e.join(";")).join("\n");
var encodedUri = encodeURI(csvContent);
var link = document.createElement("a");
link.setAttribute("href", encodedUri);
link.setAttribute("download", "export.csv");
document.body.appendChild(link);
link.click();
document.body.removeChild(link);
}
}
}
}
@@ -13,6 +13,14 @@
i18n:(turnover.created | datef:'LLL' ):turnover.username}}</span>
}
</div>
<mat-form-field [floatLabel]="'always'">
<mat-label>{{'turnover.dueDate' | i18n}}</mat-label>
<input matInput formControlName="dueDate" [matDatepicker]="picker"
[placeholder]="(turnover.created || today) | datef:'L'">
<mat-datepicker-toggle matIconSuffix [for]="picker"></mat-datepicker-toggle>
<mat-datepicker #picker></mat-datepicker>
</mat-form-field>
<mat-form-field>
<mat-label>{{'turnover.customer' | i18n}}</mat-label>
<input matInput formControlName="customer" type="text" [required]="true">
@@ -64,23 +72,27 @@
</mat-form-field>
</mat-card-content>
<mat-card-actions>
@if (!working) {
<button type="submit" mat-raised-button color="primary" [disabled]="form.invalid">
{{(turnover.id ? 'turnover.update' : 'turnover.create') | i18n}}
</button>
}
<mat-card-actions class="flex column">
<div class="flex fill">
@if (!working) {
<button type="submit" mat-raised-button color="primary" [disabled]="form.invalid">
{{(turnover.id ? 'turnover.update' : 'turnover.create') | i18n}}
</button>
}
@if (success) {
<a mat-button color="primary" disabled="true">{{'turnover.success' | i18n}}</a>
}
@if (admin && turnover.id) {
<span class="spacer"></span>
<a mat-raised-button color="warn" (click)="deleteTurnover()">
<mat-icon>delete</mat-icon> {{'turnover.delete' | i18n}}
</a>
}
</div>
@if (turnover.updated && turnover.updated != turnover.created) {
<span class="margin">{{'turnover.updated.label' | i18n:(turnover.updated | datef:'LLL' )}}</span>
}
@if (success) {
<a mat-button color="primary" disabled="true">{{'turnover.success' | i18n}}</a>
}
@if (admin && turnover.id) {
<span class="spacer"></span>
<a mat-raised-button color="warn" (click)="deleteTurnover()">
<mat-icon>delete</mat-icon> {{'turnover.delete' | i18n}}
</a>
<div class="flex">
<span class="margin">{{'turnover.updated.label' | i18n:(turnover.updated | datef:'LLL' )}}</span>
</div>
}
</mat-card-actions>
</mat-card>
@@ -19,3 +19,7 @@ form {
max-width: 50%;
}
}
mat-card-actions .flex:first-child {
margin-bottom: 15px;
}
@@ -1,8 +1,10 @@
import { Component, OnInit } from '@angular/core';
import { FormBuilder, FormGroup, Validators } from '@angular/forms';
import { MatDatepickerInputEvent } from '@angular/material/datepicker';
import { MatDialog } from '@angular/material/dialog';
import { MatSnackBar } from '@angular/material/snack-bar';
import { ActivatedRoute, Router } from '@angular/router';
import moment, { Moment } from 'moment';
import { AuthService } from 'src/app/services/auth.service';
import { TurnoverManagementService } from 'src/app/services/turnover.management.service';
import { TurnoverService } from 'src/app/services/turnover.service';
@@ -23,6 +25,7 @@ export class PageTurnover implements OnInit {
form: FormGroup;
username: string = "";
admin: boolean = false;
today: Moment = moment();
constructor(
private turnoverService: TurnoverService,
@@ -36,6 +39,7 @@ export class PageTurnover implements OnInit {
ngOnInit(): void {
this.form = this.formBuilder.group({
dueDate: ['', Validators.nullValidator],
customer: ['', Validators.required],
motif: ['', Validators.required],
price: ['', Validators.required],
@@ -64,6 +68,9 @@ export class PageTurnover implements OnInit {
request.subscribe({
next: (data) => {
this.turnover = data;
if (this.turnover.dueDate != this.turnover.created) {
this.form.get("dueDate").setValue(this.turnover.dueDate);
}
this.form.get("customer").setValue(this.turnover.customer);
this.form.get("motif").setValue(this.turnover.motif);
this.form.get("price").setValue(this.turnover.price);
@@ -102,6 +109,7 @@ export class PageTurnover implements OnInit {
this.working = true;
this.turnover.dueDate = this.form.get("dueDate").value;
this.turnover.customer = this.form.get("customer").value;
this.turnover.motif = this.form.get("motif").value;
this.turnover.price = this.form.get("price").value;
@@ -137,6 +145,7 @@ export class PageTurnover implements OnInit {
}
this.working = true;
this.turnover.dueDate = this.form.get("dueDate").value;
this.turnover.customer = this.form.get("customer").value;
this.turnover.motif = this.form.get("motif").value;
this.turnover.price = this.form.get("price").value;
@@ -1,5 +1,5 @@
<div class="flex column fill">
<div class="flex wrap filter-container">
<div class="flex wrap middle filter-container">
<a mat-icon-button (click)="filterOpen=!filterOpen" title="{{'turnovers.filter' | i18n}}"
[color]="filterOpen ? 'primary': 'accent'">
<mat-icon>filter_alt</mat-icon>
@@ -8,12 +8,12 @@
@if(filterOpen) {
<form class="flex wrap filter">
<mat-form-field class="margin">
<mat-label>{{'turnovers.filter.created' | i18n}}</mat-label>
<mat-label>{{'turnovers.filter.dueDate' | i18n}}</mat-label>
<mat-date-range-input [rangePicker]="picker">
<input matStartDate placeholder="{{'turnovers.filter.created.from' | i18n}}"
<input matStartDate placeholder="{{'turnovers.filter.dueDate.from' | i18n}}"
[value]="turnovers && turnovers.filter && turnovers.filter.from"
(dateChange)="setFilter('from', $event.value && $event.value.toISOString() || undefined)">
<input matEndDate placeholder="{{'turnovers.filter.created.to' | i18n}}"
<input matEndDate placeholder="{{'turnovers.filter.dueDate.to' | i18n}}"
[value]="turnovers && turnovers.filter && turnovers.filter.to"
(dateChange)="setFilter('to', $event.value && $event.value.endOf('day').toISOString() || undefined)">
</mat-date-range-input>
@@ -47,8 +47,12 @@
</mat-form-field>
</form>
}
<span class="spacer"></span>
<a class="margin" mat-icon-button (click)="export()" title="{{'turnovers.export' | i18n}}" color="primary" [disabled]="!turnovers.total">
<mat-icon>file_download</mat-icon>
</a>
</div>
<ui-turnovers class="flex column grow" [turnovers]="turnovers" (page)="applyPage($event)" (sort)="applySort($event)"
[username]="true"></ui-turnovers>
<ui-turnovers #uiTurnovers class="flex column grow" [turnovers]="turnovers" (page)="applyPage($event)"
(sort)="applySort($event)" [username]="true"></ui-turnovers>
</div>
@@ -1,4 +1,4 @@
import { Component, OnInit } from '@angular/core';
import { Component, OnInit, ViewChild } from '@angular/core';
import { FormControl } from '@angular/forms';
import { PageEvent } from '@angular/material/paginator';
import { Sort } from '@angular/material/sort';
@@ -6,6 +6,7 @@ import { ActivatedRoute, Params, Router } from '@angular/router';
import { debounceTime, Observable, switchMap } from 'rxjs';
import { TurnoverManagementService } from 'src/app/services/turnover.management.service';
import { UserManagementService } from 'src/app/services/user.management.service';
import { UiTurnovers } from 'src/app/ui/turnovers/turnovers.ui';
@Component({
selector: 'page-turnovers-manage',
@@ -15,13 +16,15 @@ import { UserManagementService } from 'src/app/services/user.management.service'
export class PageTurnoversManage implements OnInit {
turnovers: any;
sort: string = "created";
sort: string = "dueDate";
descending: boolean = true;
filterOpen: boolean = false;
users: Observable<any>;
usersFormControl = new FormControl();
@ViewChild('uiTurnovers') uiTurnovers: UiTurnovers;
constructor(
private turnoverManagementService: TurnoverManagementService,
private userManagementService: UserManagementService,
@@ -104,7 +107,7 @@ export class PageTurnoversManage implements OnInit {
params['o'] = this.turnovers.offset;
}
if (this.sort != 'created') {
if (this.sort != 'dueDate') {
params['s'] = this.sort;
}
@@ -134,7 +137,7 @@ export class PageTurnoversManage implements OnInit {
}
applySort(event: Sort) {
this.sort = event.direction ? event.active : 'created';
this.sort = event.direction ? event.active : 'dueDate';
this.descending = event.direction !== 'asc';
this.update();
}
@@ -150,4 +153,21 @@ export class PageTurnoversManage implements OnInit {
this.update();
}
}
export() {
let rows = this.uiTurnovers.getCsvRows();
if (rows.length) {
let csvContent = "data:text/csv;charset=utf-8,"
+ rows.map(e => e.join(";")).join("\n");
var encodedUri = encodeURI(csvContent);
var link = document.createElement("a");
link.setAttribute("href", encodedUri);
link.setAttribute("download", "export.csv");
document.body.appendChild(link);
link.click();
document.body.removeChild(link);
}
}
}
@@ -8,12 +8,12 @@
@if (filterOpen) {
<form class="flex wrap filter">
<mat-form-field class="margin">
<mat-label>{{'turnovers.filter.created' | i18n}}</mat-label>
<mat-label>{{'turnovers.filter.dueDate' | i18n}}</mat-label>
<mat-date-range-input [rangePicker]="picker">
<input matStartDate placeholder="{{'turnovers.filter.created.from' | i18n}}"
<input matStartDate placeholder="{{'turnovers.filter.dueDate.from' | i18n}}"
[value]="turnovers && turnovers.filter && turnovers.filter.from"
(dateChange)="setFilter('from', $event.value && $event.value.toISOString() || undefined)">
<input matEndDate placeholder="{{'turnovers.filter.created.to' | i18n}}"
<input matEndDate placeholder="{{'turnovers.filter.dueDate.to' | i18n}}"
[value]="turnovers && turnovers.filter && turnovers.filter.to"
(dateChange)="setFilter('to', $event.value && $event.value.endOf('day').toISOString() || undefined)">
</mat-date-range-input>
@@ -34,8 +34,12 @@
</mat-form-field>
</form>
}
<span class="spacer"></span>
<a class="margin" mat-icon-button (click)="export()" title="{{'turnovers.export' | i18n}}" color="primary" [disabled]="!turnovers.total">
<mat-icon>file_download</mat-icon>
</a>
</div>
<ui-turnovers class="flex column grow" [turnovers]="turnovers" [overview]="overview" (page)="applyPage($event)"
<ui-turnovers #uiTurnovers class="flex column grow" [turnovers]="turnovers" [overview]="overview" (page)="applyPage($event)"
(sort)="applySort($event)"></ui-turnovers>
</div>
@@ -1,11 +1,9 @@
import { Component, OnInit } from '@angular/core';
import { FormControl } from '@angular/forms';
import { Component, OnInit, ViewChild } from '@angular/core';
import { PageEvent } from '@angular/material/paginator';
import { Sort } from '@angular/material/sort';
import { ActivatedRoute, Params, Router } from '@angular/router';
import { debounceTime, Observable, switchMap } from 'rxjs';
import { TurnoverService } from 'src/app/services/turnover.service';
import { UserManagementService } from 'src/app/services/user.management.service';
import { UiTurnovers } from 'src/app/ui/turnovers/turnovers.ui';
@Component({
selector: 'page-turnovers',
@@ -16,11 +14,13 @@ export class PageTurnovers implements OnInit {
turnovers: any;
overview: any[];
sort: string = "created";
sort: string = "dueDate";
descending: boolean = true;
filterOpen: boolean = false;
init: boolean = true;
@ViewChild('uiTurnovers') uiTurnovers: UiTurnovers;
constructor(
private turnoverService: TurnoverService,
private router: Router,
@@ -102,7 +102,7 @@ export class PageTurnovers implements OnInit {
params['o'] = this.turnovers.offset;
}
if (this.sort != 'created') {
if (this.sort != 'dueDate') {
params['s'] = this.sort;
}
@@ -132,7 +132,7 @@ export class PageTurnovers implements OnInit {
}
applySort(event: Sort) {
this.sort = event.direction ? event.active : 'created';
this.sort = event.direction ? event.active : 'dueDate';
this.descending = event.direction !== 'asc';
this.update();
}
@@ -148,4 +148,20 @@ export class PageTurnovers implements OnInit {
this.update();
}
}
export() {
let rows = this.uiTurnovers.getCsvRows();
if (rows.length) {
let csvContent = "data:text/csv;charset=utf-8,"
+ rows.map(e => e.join(";")).join("\n");
var encodedUri = encodeURI(csvContent);
var link = document.createElement("a");
link.setAttribute("href", encodedUri);
link.setAttribute("download", "export.csv");
document.body.appendChild(link);
link.click();
document.body.removeChild(link);
}
}
}
@@ -40,8 +40,9 @@
</mat-card-content>
<mat-card-actions>
@if (!working) {
<button type="submit" mat-raised-button color="primary" [disabled]="form.invalid">{{'user.create' |
i18n}}<mat-icon style="font-size: 1em;">person_add</mat-icon></button>
<button type="submit" mat-raised-button color="primary"
[disabled]="form.invalid"><mat-icon>person_add</mat-icon>{{'user.create' |
i18n}}</button>
}
</mat-card-actions>
</mat-card>
@@ -82,9 +82,11 @@
<span class="spacer"></span>
<div class="mat-mdc-paginator flex middle">
<a class="margin" routerLink="/user" mat-raised-button color="primary">{{'user.create' | i18n}}<mat-icon
style="font-size: 1em;">person_add</mat-icon></a>
<div class="mat-mdc-paginator flex wrap middle">
<a class="margin" routerLink="/user" mat-raised-button color="primary">
<mat-icon>person_add</mat-icon>
<span class="hide-small">{{'user.create' | i18n}}</span>
</a>
<span class="spacer"></span>
<mat-paginator [pageSizeOptions]="pageSizeOptions" [pageIndex]="users.offset / users.limit"
[length]="users.total" [pageSize]="users.limit" (page)="applyPage($event)" showFirstLastButtons>
@@ -1,3 +1,21 @@
.filter-container {
padding-left: 15px;
justify-content: flex-start;
align-items: center;
.filter {
justify-content: flex-start;
align-items: center;
&>* {
margin-top: 5px;
margin-bottom: 5px;
margin-left: 15px;
}
}
}
tr.user {
&:hover {
cursor: pointer;
@@ -8,3 +26,7 @@ tr.user {
pointer-events: none;
}
}
.mat-mdc-paginator a.margin {
margin: 15px;
}
@@ -53,7 +53,7 @@ export class I18nService {
}
get(key, args: string[]): string {
get(key, args: string[] = []): string {
return this.getInternal(key, args, this.i18n, "", true);
}
@@ -34,13 +34,13 @@
<td mat-cell *matCellDef="let turnover">{{turnover.username}}</td>
</ng-container>
<ng-container matColumnDef="created">
<th mat-header-cell *matHeaderCellDef mat-sort-header [disableClear]="false">{{'turnover.created' |
<ng-container matColumnDef="dueDate">
<th mat-header-cell *matHeaderCellDef mat-sort-header [disableClear]="false">{{'turnover.dueDate' |
i18n}}
</th>
<td mat-cell *matCellDef="let turnover"><span
matTooltip="{{turnover.created | datef:'LLLL'}}">{{turnover.created | datef}}</span></td>
<td mat-cell *matCellDef="let turnover" matTooltip="{{turnover.dueDate | datef:'LL'}}">
<span class="nowrap">{{turnover.dueDate | datef:'L'}}</span>
</td>
</ng-container>
<ng-container matColumnDef="customer">
@@ -100,17 +100,25 @@
</td>
</ng-container>
<ng-container matColumnDef="created">
<th mat-header-cell *matHeaderCellDef mat-sort-header>{{'turnover.created' |
i18n}}
</th>
<td mat-cell *matCellDef="let turnover" matTooltip="{{turnover.created | datef:'LLLL'}}">
<span class="nowrap">{{turnover.created | datef}}</span>
</td>
</ng-container>
<ng-container matColumnDef="updated">
<th mat-header-cell *matHeaderCellDef mat-sort-header>
<span class="spacer"></span>
<span>{{'turnover.updated' | i18n}}</span>
</th>
<td mat-cell *matCellDef="let turnover">
<td mat-cell *matCellDef="let turnover" matTooltip="{{turnover.updated | datef:'LLLL'}}">
<div class="flex">
<span class="spacer"></span>
@if(turnover.created != turnover.updated) {
<span class="nowrap" matTooltip="{{turnover.updated | datef:'LLLL'}}">{{turnover.updated |
datef}}</span>
<span class="nowrap">{{turnover.updated | datef}}</span>
}
</div>
</td>
@@ -127,9 +135,9 @@
<span class="spacer"></span>
<div class="mat-mdc-paginator flex">
<div class="mat-mdc-paginator flex wrap">
@if (overview && overview.length > 2) {
<div class="flex middle">
<div class="overview flex middle">
<span class="margin">{{'turnover.price.total' | i18n:(overview[1] | number: '1.2-2')}}</span> <span
class="margin">{{'turnover.timeInvestment.total' | i18n:(overview[2] | number: '1.1-1')}}</span>
</div>
@@ -14,3 +14,7 @@ tr.turnover {
min-width: 160px;
}
}
.overview {
margin: 5px;
}
@@ -2,6 +2,8 @@ import { Component, EventEmitter, HostListener, Input, OnInit, Output } from '@a
import { PageEvent } from '@angular/material/paginator';
import { Sort } from '@angular/material/sort';
import { Router } from '@angular/router';
import moment from 'moment';
import { I18nService } from 'src/app/services/i18n.service';
@Component({
selector: 'ui-turnovers',
@@ -23,7 +25,10 @@ export class UiTurnovers implements OnInit {
columns: string[] = [];
constructor(private router: Router) { }
constructor(
private router: Router,
private i18n: I18nService
) { }
ngOnInit(): void {
this.applyResize(window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth);
@@ -36,19 +41,56 @@ export class UiTurnovers implements OnInit {
applyResize(width: number) {
if (width < 992) {
this.columns = ['customer', 'price'];
this.columns = ['customer', 'price', 'motif'];
} else {
this.columns = ['customer', 'motif', 'price', 'timeInvestment', 'remark', 'materialConsumption', 'updated'];
this.columns = ['customer', 'motif', 'price', 'timeInvestment', 'remark', 'materialConsumption', 'created', 'updated'];
}
if (this.username) {
this.columns.unshift('username');
} else {
this.columns.push('motif');
}
this.columns.unshift('created');
this.columns.unshift('dueDate');
}
select(row: any) {
this.router.navigateByUrl('/t/' + row.id);
}
getCsvRows(): any[] {
if (this.turnovers.total) {
let rows = [[
this.i18n.get('turnover.dueDate'),
this.i18n.get('turnover.customer'),
this.i18n.get('turnover.motif'),
this.i18n.get('turnover.price'),
this.i18n.get('turnover.timeInvestment'),
this.i18n.get('turnover.remark'),
this.i18n.get('turnover.materialConsumption'),
this.i18n.get('turnover.created'),
this.i18n.get('turnover.updated')]];
if (this.username) {
rows[0].unshift(
this.i18n.get('turnover.username'));
}
this.turnovers.results.forEach(turnover => {
rows[rows.length] = [
moment(turnover.dueDate).format('L'),
turnover.customer,
turnover.motif,
turnover.price.toFixed(2),
turnover.timeInvestment.toFixed(1),
turnover.remark,
turnover.materialConsumption,
moment(turnover.created).format(this.i18n.get('turnovers.export.dateformat')),
moment(turnover.updated).format(this.i18n.get('turnovers.export.dateformat'))
]
if (this.username) {
rows[rows.length - 1].unshift(turnover.username);
}
});
return rows;
}
return [];
}
}
@@ -34,6 +34,11 @@
".": "Verwaltung",
"filter": {
"created": {
".": "Erstellt",
"from": "von",
"to": "bis"
},
"dueDate": {
".": "Zeitraum",
"from": "von",
"to": "bis"
@@ -104,6 +109,12 @@
".": "Kunde",
"error": "Angabe von Kunde erforderlich"
},
"dueDate": {
".": "Fälligkeitsdatum",
"label": {
".": "Fällig am {0}"
}
},
"delete": "Löschen",
"edit": "Buchung bearbeiten",
"info": "Neue Buchung erstellen",
@@ -134,14 +145,24 @@
},
"turnovers": {
".": "Buchungen",
"export": {
".": "Als CSV exportieren",
"dateformat": "DD.MM.YYYY-HH:mm"
},
"filter": {
".": "Filter",
"created": {
".": "Erstellt",
"from": "von",
"to": "bis"
},
"dueDate": {
".": "Zeitraum",
"from": "von",
"to": "bis"
},
"customer": "Kunde durchsuchen",
"motif": "Motif durchsuchen",
"motif": "Motiv durchsuchen",
"username": "User auswählen"
},
"mine": "Eigene Buchungen"
Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.5 KiB

After

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.2 KiB

After

Width:  |  Height:  |  Size: 46 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.3 KiB

After

Width:  |  Height:  |  Size: 53 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.8 KiB

After

Width:  |  Height:  |  Size: 59 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 81 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 26 KiB

After

Width:  |  Height:  |  Size: 232 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 36 KiB

After

Width:  |  Height:  |  Size: 359 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.2 KiB

After

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.0 KiB

After

Width:  |  Height:  |  Size: 34 KiB

@@ -1,183 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="180mm"
height="180mm"
viewBox="0 0 637.79528 637.79527"
id="svg2"
version="1.1"
inkscape:version="0.92.5 (2060ec1f9f, 2020-04-08)"
sodipodi:docname="logo.svg"
inkscape:export-filename="/home/lurkars/ownCloud/Bastelei/development/bstl_ui/build/gfx/bstl.png"
inkscape:export-xdpi="24.190475"
inkscape:export-ydpi="24.190475">
<defs
id="defs4">
<marker
inkscape:stockid="Arrow1Lend"
orient="auto"
refY="0"
refX="0"
id="Arrow1Lend"
style="overflow:visible"
inkscape:isstock="true">
<path
id="path4410"
d="M 0,0 5,-5 -12.5,0 5,5 Z"
style="fill:#7560ff;fill-opacity:1;fill-rule:evenodd;stroke:#7560ff;stroke-width:1.00000003pt;stroke-opacity:1"
transform="matrix(-0.8,0,0,-0.8,-10,0)"
inkscape:connector-curvature="0" />
</marker>
</defs>
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="1"
inkscape:pageshadow="2"
inkscape:zoom="0.98994949"
inkscape:cx="-75.221162"
inkscape:cy="305.4019"
inkscape:document-units="px"
inkscape:current-layer="layer1"
showgrid="false"
showguides="true"
inkscape:guide-bbox="true"
inkscape:window-width="1848"
inkscape:window-height="1016"
inkscape:window-x="72"
inkscape:window-y="27"
inkscape:window-maximized="1"
fit-margin-top="0"
fit-margin-left="0"
fit-margin-right="0"
fit-margin-bottom="0" />
<metadata
id="metadata7">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title />
</cc:Work>
</rdf:RDF>
</metadata>
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1"
transform="translate(-49.288974,-360.43866)"
style="display:inline">
<g
id="g4145"
style="stroke:#ebb400;stroke-width:20;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
transform="translate(0,-15.000001)">
<path
sodipodi:nodetypes="cc"
inkscape:connector-curvature="0"
id="path4154"
d="m 468.57022,631.84443 -42.94501,131.608"
style="fill:none;fill-rule:evenodd;stroke:#ebb400;stroke-width:20;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
<path
sodipodi:nodetypes="cc"
inkscape:connector-curvature="0"
id="path4156"
d="M 355.63121,547.02142 660.78242,768.72229"
style="fill:none;fill-rule:evenodd;stroke:#ebb400;stroke-width:20;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
</g>
<path
style="fill:none;fill-rule:evenodd;stroke:#006100;stroke-width:20;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="M 563.03718,392.90301 492.79039,606.93332 674.34654,739.73223"
id="path4158"
inkscape:connector-curvature="0"
sodipodi:nodetypes="ccc" />
<path
style="fill:none;fill-rule:evenodd;stroke:#5e45ff;stroke-width:20;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="m 546.82821,387.53706 -286.72601,207.38363 44.34514,139.99727 125.28725,-0.48581 -72.0052,221.3299"
id="path4152"
inkscape:connector-curvature="0"
sodipodi:nodetypes="ccccc" />
<g
id="g4141"
style="stroke:#c1008d;stroke-width:20;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
transform="translate(0,-15.000001)">
<path
sodipodi:nodetypes="cc"
inkscape:connector-curvature="0"
id="path4150"
d="M 85.517039,769.35462 298.59321,768.46556"
style="fill:none;fill-rule:evenodd;stroke:#c1008d;stroke-width:20;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
<path
sodipodi:nodetypes="cccc"
inkscape:connector-curvature="0"
id="path4148"
d="M 347.86433,949.1813 89.095578,757.90563 249.71676,642.08318 Z"
style="fill:none;fill-rule:evenodd;stroke:#c1008d;stroke-width:20;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
</g>
<path
sodipodi:type="star"
style="fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:18.2419529;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="path4138"
sodipodi:sides="5"
sodipodi:cx="360"
sodipodi:cy="583.79077"
sodipodi:r1="294.93686"
sodipodi:r2="238.60893"
sodipodi:arg1="0.95054684"
sodipodi:arg2="1.5788654"
inkscape:flatsided="true"
inkscape:rounded="0"
inkscape:randomized="0"
d="M 531.42857,823.79077 184.72078,820.9931 80.242919,490.38988 362.37983,288.86351 641.2279,494.91659 Z"
inkscape:transform-center-x="0.32354069"
inkscape:transform-center-y="30.570376"
transform="matrix(-1.096361,0.00529662,-0.00529662,-1.096361,766.69563,1285.6526)" />
</g>
<g
inkscape:groupmode="layer"
id="layer2"
inkscape:label="template"
style="display:none"
transform="translate(-49.288974,-52.170936)">
<path
style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="M 663.78063,451.04608 185.86807,102.14254"
id="path4446"
inkscape:connector-curvature="0"
sodipodi:nodetypes="cc" />
<path
style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="M 551.54329,102.64762 71.720831,450.1401"
id="path4448"
inkscape:connector-curvature="0" />
<path
style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="m 186.37315,102.14255 180.8173,564.9278"
id="path4450"
inkscape:connector-curvature="0"
sodipodi:nodetypes="cc" />
<path
style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="M 551.54329,103.15269 366.93791,666.81782"
id="path4452"
inkscape:connector-curvature="0"
sodipodi:nodetypes="cc" />
<path
style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="m 72.730983,451.15025 590.686697,0.25254"
id="path4454"
inkscape:connector-curvature="0"
sodipodi:nodetypes="cc" />
</g>
</svg>

Before

Width:  |  Height:  |  Size: 7.2 KiB

+4
View File
@@ -361,6 +361,10 @@ a[href*="//"]::after {
background-color: #303030;
}
a {
color: $accent;
}
table.default-table {
background: #424242;
+2 -2
View File
@@ -18,8 +18,8 @@ $light-theme: mat.m2-define-light-theme((color: (primary: $light-primary,
// Define an alternate dark theme.
$dark-theme: mat.m2-define-dark-theme((color: (primary: $dark-primary,
accent: $light-accent,
warn: $light-warn,
accent: $dark-accent,
warn: $dark-warn,
)));
$primary: mat.get-theme-color($light-theme, primary, default);