* fix: Moved user type to a separate file. fix #7, fix #8

* fix: added more filters

* fix: Added attendence clear button and notes. fix #9, fix #10

* fix: bumped version number

* fix: Changed wording. Resolves #12

* fix: Resolve #13

* fix: Safari no longer displays system ui over lower guide.

* fix: Resolved #14
This commit is contained in:
2025-05-13 19:28:21 +02:00
committed by GitHub
parent 53bfeab116
commit 6ab3598d38
16 changed files with 75 additions and 48 deletions

View File

@@ -10,6 +10,7 @@ import { catchError, throwError } from 'rxjs';
import { UserResetComponent } from './user-reset/user-reset.component';
import { LocalStorageService } from 'src/app/services/local-storage.service';
import { Group } from 'src/app/types/group';
import User from 'src/app/types/user';
@Component({
selector: 'app-account-mgmt',
@@ -20,21 +21,20 @@ import { Group } from 'src/app/types/group';
export class AccountMgmtComponent implements OnInit, AfterViewInit {
protected groups: Group[] = []
users: MatTableDataSource<any>
users: MatTableDataSource<Omit<User, "pass">>
loading = false
@ViewChild(MatPaginator) paginator!: MatPaginator
constructor(readonly ac:AdminCommService, private dialog: MatDialog, private sb: MatSnackBar, protected readonly ls: LocalStorageService) {
this.users = new MatTableDataSource<any>();
this.users = new MatTableDataSource<Omit<User, "pass">>();
this.users.filterPredicate = (data: Record<string, any>, filter: string): boolean => {
const dataStr = Object.keys(data).reduce((curr: string, key: string) => {
if (key == "_id") {
return ''
if (["_id", "admin", "groups", "__v", "locked"].find(v => v == key)) {
return curr + ''
}
return curr + data[key] + '⫂'
}, '').toLowerCase()
const filternew = filter.trim().toLowerCase()
return dataStr.indexOf(filternew) != -1
}
}