notification and chat slow

This commit is contained in:
Peter Maquiran
2024-12-16 12:04:02 +01:00
parent aef73625f0
commit 18a8d90d99
60 changed files with 363 additions and 381 deletions
+6 -2
View File
@@ -85,19 +85,23 @@
<div class="line"></div>
<ion-progress-bar type="indeterminate" *ngIf="isloading"></ion-progress-bar>
<!-- <ion-label (click)="asyncNotification()" *ngIf="NotificationHolderService.notificationList">{{notificationStatus}}</ion-label> -->
<button *ngIf="(notificationList$ | async) as notificationList" style="background: transparent; padding-top: 5px; float: right;" (click)="deleteAllNotification()" class="pointer cursor-pointer">
<ion-icon *ngIf="notificationList.length >= 1" (click)="deleteAllNotification()" style="height: 25px;width: 25px;float: right;" class="delete" src='assets/images/theme/gov/icons-delete.svg'></ion-icon>
</button>
</div>
</ion-header>
<ion-content class=" bg-blue">
<div class="d-flex flex-column height-100 overflow-y-auto">
<div class="notifications-content height-100">
<ion-list *ngIf="(notificationList$ | async) as notificationList">
<div class=" cursor-pointer ion-no-padding ion-no-margin" lines="none"
*ngFor="let item of notificationList; let i = index">
<div *ngIf="item.status==false " class="item" (click)="notificatinsRoutes(item.index, item)">
<div class="item" (click)="notificatinsRoutes(item.index, item)">
<div *ngIf="objectRead[item.notificationId] != true" class="item-conten1 item-conten-{{item.service}}-{{item.typeAgenda}}-{{item.role}} llll" >
<div class="notification-item">
+1
View File
@@ -77,6 +77,7 @@
}
.profile-content {
padding: 20px 20px;
padding-bottom: 5px;
//color: var(--profile-text-color) !important;
}
+10 -4
View File
@@ -4,7 +4,6 @@ import { AnimationController, ModalController } from '@ionic/angular';
import { AuthService } from 'src/app/services/auth.service';
import { EditProfilePage } from './edit-profile/edit-profile.page';
import { StorageService } from '../../services/storage.service';
import { NotificationsService } from '../../services/notifications.service';
import { SessionStore } from 'src/app/store/session.service';
import { ThemeService } from 'src/app/services/theme.service'
import { environment } from 'src/environments/environment';
@@ -20,7 +19,7 @@ import { isHttpError } from 'src/app/services/http.service';
import { UserRepositoryService } from 'src/app/module/user/data/user-repository.service';
import { UserProfilePicture } from 'src/app/module/user/data/datasource/user-local-repository.service';
import { UserService } from 'src/app/module/user/domain/user.service'
import { NotificationService } from 'src/app/module/notification/domain/notification.service'
@Component({
selector: 'app-profile',
@@ -63,7 +62,7 @@ export class ProfilePage implements OnInit {
private router: Router,
private zone: NgZone,
public ThemeService: ThemeService,
private notificationService: NotificationsService,
private NotificationService: NotificationService,
private processesService: ProcessesService,
private storageService: StorageService,
public NotificationHolderService: NotificationHolderService,
@@ -72,7 +71,7 @@ export class ProfilePage implements OnInit {
private toastService: ToastService,
private notificationRepositoryService: NotificationRepositoryService,
private UserRepositoryService: UserRepositoryService,
private UserService:UserService
private UserService:UserService,
) {
this.profilePictureSubject = this.UserRepositoryService.getProfilePictureLive() as any
@@ -417,4 +416,11 @@ export class ProfilePage implements OnInit {
this.deleteNotification(item);
}
async deleteAllNotification() {
console.log('nice job')
await this.NotificationService.deleteAllNotificationByUserId()
this.notificationRepositoryService.init()
}
}