fix notification

This commit is contained in:
Peter Maquiran
2024-06-28 07:44:43 +01:00
parent ac0ead4885
commit 0281db0d83
18 changed files with 243 additions and 218 deletions
+7 -1
View File
@@ -24,7 +24,7 @@ import { StorageService } from 'src/app/services/storage.service';
import { DeviceService } from 'src/app/services/device.service'
import { Cy } from 'cypress/enum'
import { AgendaDataRepositoryService } from 'src/app/services/Repositorys/Agenda/agenda-data-repository.service';
import { NotificationRepositoryService } from 'src/app/module/notification/data/notification-repository.service'
@Component({
selector: 'app-login',
templateUrl: './login.page.html',
@@ -66,6 +66,7 @@ export class LoginPage implements OnInit {
private NotificationHolderService: NotificationHolderService,
private DeviceService: DeviceService,
public AgendaDataRepositoryService: AgendaDataRepositoryService,
private NotificationRepositoryService: NotificationRepositoryService
) { }
ngOnInit() { }
@@ -161,6 +162,8 @@ export class LoginPage implements OnInit {
await this.authService.loginToChatWs();
this.ChatService.setheader()
this.NotificationRepositoryService.init()
} catch(error) {
console.log("faild to clear chat")
}
@@ -178,6 +181,8 @@ export class LoginPage implements OnInit {
} else {
await this.NotificationRepositoryService.clearData()
await this.AgendaDataRepositoryService.clearSharedCalendar()
this.RochetChatConnectorService.logout();
this.clearStoreService.clear();
@@ -191,6 +196,7 @@ export class LoginPage implements OnInit {
this.storage.clear();
await this.authService.SetSession(attempt, this.userattempt);
this.NotificationRepositoryService.init()
/* CPSession.save(data) */
this.changeProfileService.run();
+9 -2
View File
@@ -23,6 +23,7 @@ import { SessionStore } from 'src/app/store/session.service';
import { TracingType, XTracerAsync } from 'src/app/services/monitoring/opentelemetry/tracer';
import { isHttpError } from 'src/app/services/http.service';
import { ToastService } from 'src/app/services/toast.service';
import { EEventFilterStatus } from 'src/app/services/Repositorys/Agenda/model/enums';
const CUSTOM_DATE_FORMATS: NgxMatDateFormats = {
parse: {
@@ -388,7 +389,7 @@ export class SearchPage implements OnInit {
}
if (this.type == "Agenda") {
this.showLoader = true
if (this.searchSubject.trim() == "" && searchDocumentDate == null && searchDocumentDateEnd == null && this.searchSenderId == null && this.searchOrganicEntiryCode == null && this.searchDocTypeId == null) {
@@ -397,7 +398,11 @@ export class SearchPage implements OnInit {
} else {
const searchEvents = await this.agendaDataRepository.searchEvent({value: this.searchSubject.trim() }, tracing)
const searchEvents = await this.agendaDataRepository.searchEvent({
value: this.searchSubject.trim(),
status: EEventFilterStatus.AllToCommunicate
}, tracing)
if(searchEvents.isOk()) {
this.showDocuments = true;
@@ -468,6 +473,8 @@ export class SearchPage implements OnInit {
// // console.log(error)
// });
}
this.showLoader = false
}
else if (this.type == "AccoesPresidenciais & ArquivoDespachoElect" && this.eventAgenda == true) {
this.showLoader = true;