* 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

@@ -11,6 +11,7 @@ import { News } from '../types/news';
import { AKey } from '../types/key';
import * as moment from 'moment';
import { IUSettings } from './settings/settings.component';
import User from '../types/user';
@Injectable({
providedIn: 'root'
@@ -121,17 +122,7 @@ export class AdminCommService {
accs = {
getAccs: () => {
return this.http.get<{
users: {
_id: string;
uname: string;
pass: string;
room?: string;
admin?: number;
locked?: boolean;
fname?: string;
surname?: string;
groups: string[];
}[],
users: Omit<User, "pass">[],
groups: Group[]
}>(environment.apiEndpoint+`/admin/accs`, {withCredentials: true})
},
@@ -236,13 +227,16 @@ export class AdminCommService {
},
attendence: {
getUsers: (room: string) => {
return this.http.get<{users: {fname: string, surname: string, _id: string}[], attendence?: {id: string, hour?: string}[]}>(environment.apiEndpoint+`/admin/clean/attendence/${room}`, {withCredentials: true})
return this.http.get<{users: {fname: string, surname: string, _id: string}[], attendence?: {auto: {id: string, hour?: string}[], notes: string}}>(environment.apiEndpoint+`/admin/clean/attendence/${room}`, {withCredentials: true})
},
postAttendence: (room: string, attendence: {id: string, hour?: string}[]) => {
postAttendence: (room: string, attendence: {auto: {id: string, hour?: string}[], notes: string}) => {
return this.http.post<Status>(environment.apiEndpoint+`/admin/clean/attendence/${room}`, attendence, {withCredentials: true})
},
getSummary: () => {
return this.http.get<{room: string, hours: string[]}[]>(environment.apiEndpoint+`/admin/clean/attendenceSummary`, {withCredentials: true})
return this.http.get<{room: string, hours: string[], notes: string}[]>(environment.apiEndpoint+`/admin/clean/attendenceSummary`, {withCredentials: true})
},
deleteRoom: (room: string) => {
return this.http.delete<Status>(environment.apiEndpoint+`/admin/clean/attendence/${room}`, {withCredentials: true})
}
}
}