feat: Added notification dialog on frontend

This commit is contained in:
2025-05-31 19:56:31 +02:00
parent 375bb1ceb4
commit efd76e16a1
15 changed files with 191 additions and 30 deletions

View File

@@ -7,6 +7,7 @@ import * as moment from 'moment';
import { map } from 'rxjs';
import { UKey } from '../types/key';
import { CleanNote } from '../types/clean-note';
import { Status } from '../types/status';
@Injectable({
providedIn: 'root'
@@ -55,4 +56,12 @@ export class UpdatesService {
getClean(date: moment.Moment) {
return this.http.get<{grade: number, notes: CleanNote[], tips: string}>(environment.apiEndpoint+`/app/clean/${date.toISOString()}`, {withCredentials: true})
}
getNotifCheck() {
return this.http.get<{_id: string, message: {title: string, body: string}, sentDate: moment.Moment}[]>(environment.apiEndpoint+`/app/notif/check`, {withCredentials: true})
}
postInfoAck(id: string) {
return this.http.post<Status>(environment.apiEndpoint+`/app/notif/${id}/ack`, undefined, {withCredentials: true})
}
}