v1.0.1 (#16)
* 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:
@@ -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
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user