Skip to content

Commit e05c2fd

Browse files
committed
CL Filter
1 parent 0fc29ce commit e05c2fd

6 files changed

Lines changed: 50 additions & 17 deletions

File tree

angular-app/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "jasmarty-app",
3-
"version": "2.4.80",
3+
"version": "2.4.81",
44
"scripts": {
55
"ng": "ng",
66
"start": "ng serve --host 0.0.0.0 --port 3000 --proxy-config proxy.config.ts",

angular-app/src/app/components/_wipf/checkliste/checkliste.component.html

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,16 @@ <h3>CheckListe</h3>
3535

3636
@if (view =='checkliste') {
3737
<div class="iconbox">
38+
Zeige nur offenes:
39+
<button class="btn btn-wipf-default btn-for-icon" (click)="filterDone()">
40+
@if (bFilterDone){
41+
<mat-icon svgIcon="ok" aria-hidden="false" title="Zeige Offenes"></mat-icon>
42+
}
43+
@else {
44+
<mat-icon svgIcon="round" aria-hidden="false" title="Zeige Offenes"></mat-icon>
45+
}
46+
</button>
47+
<br>
3848
Liste zurücksezten:
3949
<button class="btn btn-wipf-default btn-for-icon" (click)="resetListe()">
4050
<mat-icon svgIcon="trash" aria-hidden="false" title="Reset Liste"></mat-icon>

angular-app/src/app/components/_wipf/checkliste/checkliste.component.ts

Lines changed: 36 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@ import { ServiceRest } from 'src/app/service/serviceRest';
88
import { ServiceWipf } from 'src/app/service/serviceWipf';
99

1010
@Component({
11-
selector: 'app-checkliste',
12-
templateUrl: './checkliste.component.html',
13-
styleUrls: ['./checkliste.component.less'],
14-
standalone: false
11+
selector: 'app-checkliste',
12+
templateUrl: './checkliste.component.html',
13+
styleUrls: ['./checkliste.component.less'],
14+
standalone: false
1515
})
1616
export class ChecklisteComponent implements OnInit {
1717

@@ -34,6 +34,8 @@ export class ChecklisteComponent implements OnInit {
3434
public lastNewPrio: number = 0;
3535
public offeneItems: number = 0;
3636
public sFilter: string = "";
37+
public bFilterDone: boolean = false;
38+
public verkListBackupForFilter;
3739
private selectedClID: number;
3840

3941
@ViewChild(MatSort, { static: true }) sort: MatSort;
@@ -365,6 +367,8 @@ export class ChecklisteComponent implements OnInit {
365367
}
366368

367369
public checkItemVerkn(iverk: CheckListeVerkn): void {
370+
this.bFilterDone = false;
371+
this.verkListBackupForFilter = [];
368372
iverk.checked = !iverk.checked;
369373
this.rest.postNoWartenDialog('checkliste/verkn/save', iverk).then((res: any) => {
370374
this.ladeChecklistenView(this.viewCL);
@@ -379,12 +383,31 @@ export class ChecklisteComponent implements OnInit {
379383
});
380384
}
381385

386+
public filterDone(): void {
387+
this.bFilterDone = !this.bFilterDone;
388+
389+
if (this.bFilterDone) {
390+
this.verkListBackupForFilter = [...this.dataSourceCheckListeVerkn.data];
391+
// this.dataSourceCheckListeVerkn.data = this.dataSourceCheckListeVerkn.data.filter((clv: CheckListeVerkn) => {
392+
// !clv.checked;
393+
// });
394+
this.dataSourceCheckListeVerkn.data =
395+
this.dataSourceCheckListeVerkn.data.filter(
396+
clv => !clv.checked
397+
);
398+
}
399+
else {
400+
this.dataSourceCheckListeVerkn.data = [...this.verkListBackupForFilter];
401+
}
402+
403+
this.applyFilter();
404+
}
382405
}
383406

384407
@Component({
385-
selector: 'app-checklisteliste-dialog',
386-
templateUrl: './checkliste.dialog.checkliste.html',
387-
standalone: false
408+
selector: 'app-checklisteliste-dialog',
409+
templateUrl: './checkliste.dialog.checkliste.html',
410+
standalone: false
388411
})
389412
export class CheckListeDialogCheckListe implements OnInit {
390413
constructor(public dialog: MatDialog, private rest: ServiceRest, public dialogRef: MatDialogRef<CheckListeDialogCheckListe>, @Inject(MAT_DIALOG_DATA) public data: CheckListeListe) {
@@ -424,9 +447,9 @@ export class CheckListeDialogCheckListe implements OnInit {
424447
}
425448

426449
@Component({
427-
selector: 'app-checklistetypes-dialog',
428-
templateUrl: './checkliste.dialog.type.html',
429-
standalone: false
450+
selector: 'app-checklistetypes-dialog',
451+
templateUrl: './checkliste.dialog.type.html',
452+
standalone: false
430453
})
431454
export class CheckListeDialogType {
432455
constructor(public dialog: MatDialog, public dialogRef: MatDialogRef<CheckListeDialogType>, @Inject(MAT_DIALOG_DATA) public data: CheckListeType) {
@@ -444,9 +467,9 @@ export class CheckListeDialogType {
444467
}
445468

446469
@Component({
447-
selector: 'app-checklisteitem-dialog',
448-
templateUrl: './checkliste.dialog.item.html',
449-
standalone: false
470+
selector: 'app-checklisteitem-dialog',
471+
templateUrl: './checkliste.dialog.item.html',
472+
standalone: false
450473
})
451474
export class CheckListeDialogItem {
452475
constructor(public dialog: MatDialog, private rest: ServiceRest, public dialogRef: MatDialogRef<CheckListeDialogItem>, @Inject(MAT_DIALOG_DATA) public data: CheckListeItem) {

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<modelVersion>4.0.0</modelVersion>
77
<groupId>de.wipf</groupId>
88
<artifactId>jasmarty</artifactId>
9-
<version>2.4.80</version>
9+
<version>2.4.81</version>
1010
<properties>
1111
<maven.compiler.source>21</maven.compiler.source>
1212
<maven.compiler.target>21</maven.compiler.target>

scripts/startJar.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
java --add-opens java.base/java.lang=ALL-UNNAMED -Dlog4j2.formatMsgNoLookups=True -jar ../target/jasmarty-2.4.80-runner.jar
1+
java --add-opens java.base/java.lang=ALL-UNNAMED -Dlog4j2.formatMsgNoLookups=True -jar ../target/jasmarty-2.4.81-runner.jar

src/main/java/org/wipf/jasmarty/logic/base/MainHome.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ public class MainHome {
4141
AuthKeyService authKeyService;
4242

4343
private static final Logger LOGGER = Logger.getLogger("_MainHome_");
44-
public static final String VERSION = "2.4.80";
44+
public static final String VERSION = "2.4.81";
4545
public static final String AUTH_KEY_NAME = "authKey";
4646

4747
/**

0 commit comments

Comments
 (0)