monitoring notifications

This commit is contained in:
Peter Maquiran
2024-06-20 15:40:08 +01:00
parent 2d6d5a9492
commit 9ea120bfcd
17 changed files with 279 additions and 347 deletions
+3
View File
@@ -5,6 +5,9 @@
}, },
{ {
"path": "../socket-server" "path": "../socket-server"
},
{
"path": "../logs"
} }
], ],
"settings": { "settings": {
+14 -3
View File
@@ -103,15 +103,26 @@ export class ChatTokenInterceptor implements HttpInterceptor {
private addToken(request: HttpRequest<any>, token: string) { private addToken(request: HttpRequest<any>, token: string) {
let headers = new HttpHeaders(); let headers = new HttpHeaders();
headers = headers.set('X-User-Id', SessionStore.user.ChatData.data.userId); try {
headers = headers.set('X-Auth-Token', SessionStore.user.ChatData.data.authToken);
headers = headers.set('X-User-Id', SessionStore?.user?.ChatData?.data?.userId);
headers = headers.set('X-Auth-Token', SessionStore?.user?.ChatData?.data.authToken);
return request.clone({ return request.clone({
setHeaders: { setHeaders: {
Authorization: `Bearer ${token}`, Authorization: `Bearer ${token}`,
...headers.keys().reduce((acc, key) => ({ ...acc, [key]: headers.get(key) }), {}), ...headers.keys().reduce((acc, key) => ({ ...acc, [key]: headers.get(key) }), {}),
}, },
}); })
} catch (error) {
return request.clone({
setHeaders: {
Authorization: `Bearer ${token}`,
},
})
}
} }
/* private addToken(request: HttpRequest<any>, token: string) { /* private addToken(request: HttpRequest<any>, token: string) {
@@ -134,6 +134,10 @@
<img style="width: 40px;" src="assets/images/logo-removebg-preview.png" /> <img style="width: 40px;" src="assets/images/logo-removebg-preview.png" />
</div> </div>
<!-- <div class="btn-close d-flex cursor-pointer pr-10 pl-10" (click)="changeTheme('default')">
<img style="width: 40px;" src="assets/images/logo-removebg-preview.png" />
</div> -->
</div> </div>
</div> </div>
+16 -56
View File
@@ -13,6 +13,7 @@ import { environment } from 'src/environments/environment';
import { ProcessesService } from 'src/app/services/processes.service'; import { ProcessesService } from 'src/app/services/processes.service';
import { EventsService } from 'src/app/services/events.service'; import { EventsService } from 'src/app/services/events.service';
import { NotificationHolderService } from 'src/app/store/notification-holder.service'; import { NotificationHolderService } from 'src/app/store/notification-holder.service';
import { TracingType, XTracer } from 'src/app/services/monitoring/opentelemetry/tracer';
@Component({ @Component({
selector: 'app-profile', selector: 'app-profile',
@@ -211,10 +212,12 @@ export class ProfilePage implements OnInit {
return time; return time;
} }
notificatinsRoutes = (index, Service, Object, IdObject, FolderId, i) => { @XTracer({name:'profile/notificatinsRoutes', bugPrint: true, module:'notification'})
notificatinsRoutes (index, Service, Object, IdObject, FolderId, i, tracing?: TracingType) {
console.log(index, i) console.log(index, i)
try {
if (Service === "agenda") { if (Service === "agenda") {
this.isloading = true this.isloading = true
if (Service === "agenda" && IdObject.length > 10) { if (Service === "agenda" && IdObject.length > 10) {
@@ -311,65 +314,22 @@ export class ProfilePage implements OnInit {
this.deleteNotification(index); this.deleteNotification(index);
} else {
console.log({Service, Object, IdObject, FolderId})
tracing.setAttribute('notification.route', 'false')
tracing.setAttribute('outcome', 'failed')
tracing.setAttribute('parameters', JSON.stringify({Service, Object, IdObject, FolderId}))
} }
} catch(error) {
console.log({Service, Object, IdObject, FolderId})
/* if (Service === "agenda" && IdObject.length > 10) { tracing.setAttribute('outcome', 'failed')
this.zone.run(() => this.router.navigate(['/home/agenda', IdObject, 'agenda'])); tracing.setAttribute('parameters', JSON.stringify({Service, Object, IdObject, FolderId}))
tracing.setAttribute('error', JSON.stringify(error))
} }
else if (Service === "gabinete-digital" && Object === "expedientes") {
this.processesService.GetTask(IdObject).subscribe((task) => {
this.zone.run(() => this.router.navigate(['/home/gabinete-digital/expediente', IdObject, 'gabinete-digital']));
}, (error) => {
this.notificationdata[i].read = true;
})
}
else if (Service === "agenda" && Object === "event-list") {
//this.zone.run(() => this.router.navigate(['/home/gabinete-digital/event-list/approve-event',IdObject, 'agenda']));
this.zone.run(() => this.router.navigate(['/home/agenda/event-list/approve-event', IdObject, 'agenda']));
} else if (Service === "gabinete-digital" && Object === "despachos") {
this.processesService.GetTask(IdObject).subscribe((task) => {
this.zone.run(() => this.router.navigate(['/home/gabinete-digital/despachos', IdObject, 'gabinete-digital'], { replaceUrl: true }));
}, (error) => {
this.notificationdata[i].read = true;
})
}
else if (Service === "gabinete-digital" && Object === "parecer") {
this.zone.run(() => this.router.navigate(['/home/gabinete-digital/pedidos', IdObject, 'gabinete-digital']));
}
else if (Service === "gabinete-digital" && Object === "deferimento") {
this.zone.run(() => this.router.navigate(['/home/gabinete-digital/pedidos', IdObject, 'gabinete-digital']));
}
else if (Service === "gabinete-digital" && Object === "despachos-pr") {
this.zone.run(() => this.router.navigate(['/home/gabinete-digital/despachos-pr', IdObject, 'gabinete-digital']));
}
else if (Service === "accoes" && Object === "accao") {
this.zone.run(() => this.router.navigate(['/home/publications', IdObject]));
}
else if (Service === "accoes" && Object === "publicacao") {
this.zone.run(() => this.router.navigate(['/home/publications/view-publications', FolderId, IdObject]));
}
else if (Service === "gabinete-digital" && Object === "diplomas") {
this.zone.run(() => this.router.navigate(['/home/gabinete-digital/diplomas', IdObject, 'gabinete-digital']));
}
else if (Service === "gabinete-digital" && Object === "diplomas-assinar") {
this.zone.run(() => this.router.navigate(['/home/gabinete-digital/diplomas-assinar', IdObject, 'gabinete-digital']));
}
else if (Service === "gabinete-digital" && Object === "expedientes-pr") {
this.zone.run(() => this.router.navigate(['/home/gabinete-digital/expedientes-pr', IdObject, 'gabinete-digital']));
} else if (Service === "chat") {
let navigationExtras: NavigationExtras = { queryParams: { "roomId": IdObject, } };
this.zone.run(() => this.router.navigate(['/home/chat'], navigationExtras));
} */
// this.notificationservice.tempClearArray();
@@ -675,18 +675,14 @@ export class EditEventPage implements OnInit {
} }
deleteAttachment(attachmentID: string, index) { deleteAttachment(attachmentID: string, index) {
console.log(this.loadedEventAttachments) const indexToRemove = index; // Assuming you already know the index you want to remove
const id: any = this.loadedEventAttachments[index].docId
let update = this.removeItemById(this.loadedEventAttachments, id)
this.loadedEventAttachments = update
this.deletedAttachmentsList.push(id)
/* if (id == 'add') { const DocumentId: any = this.loadedEventAttachments[index].Id
this.loadedEventAttachments = this.loadedEventAttachments.filter((e, i) => i != index) if (indexToRemove > -1 && indexToRemove < this.loadedEventAttachments.length) {
} else { this.loadedEventAttachments.splice(indexToRemove, 1);
this.loadedEventAttachments[index]['remove'] = true }
} */
this.deletedAttachmentsList.push(DocumentId)
} }
@@ -63,8 +63,8 @@
<ion-segment-button *ngFor="let calendars of calendarData" value="{{calendars.wxUserId}}" > <ion-segment-button *ngFor="let calendars of calendarData" value="{{calendars.wxUserId}}" >
<div *ngIf="environment.presidential"> <div *ngIf="environment.presidential">
<div *ngIf="calendars.roleId == RoleIdService.PRES">AGEANDA DO PR </div> <div *ngIf="calendars.roleId == RoleIdService.PRES">AGENDA DO PR </div>
<div *ngIf="calendars.roleId == RoleIdService.MD && calendars.roleId != SessionStore.user.RoleID">AGEANDA DO MDGPR</div> <div *ngIf="calendars.roleId == RoleIdService.MD && calendars.roleId != SessionStore.user.RoleID">AGENDA DO MDGPR</div>
<div *ngIf="calendars.roleId != RoleIdService.MD && calendars.roleId != RoleIdService.PRES && calendars.wxFullName && calendars.wxUserId != SessionStore.user.UserId "> Agenda {{calendars.wxFullName}} </div> <div *ngIf="calendars.roleId != RoleIdService.MD && calendars.roleId != RoleIdService.PRES && calendars.wxFullName && calendars.wxUserId != SessionStore.user.UserId "> Agenda {{calendars.wxFullName}} </div>
<div *ngIf="calendars.wxUserId == SessionStore.user.UserId "> <div *ngIf="calendars.wxUserId == SessionStore.user.UserId ">
Minha agenda Minha agenda
@@ -50,7 +50,7 @@ export class AgendaDataRepositoryService {
try { try {
const result = await this.agendaDataService.getEvent(id).pipe( const result = await this.agendaDataService.getEvent(id).pipe(
map((response) => { map((response) => {
APINODReturn(EventOutputDTOSchema, response, 'get/Events/${id}', tracing) APINODReturn(EventOutputDTOSchema, response, `get/Events/${id}`, tracing)
return EventMapper.toDomain(response) return EventMapper.toDomain(response)
}) })
).toPromise() ).toPromise()
@@ -78,7 +78,7 @@ export class AgendaDataRepositoryService {
try { try {
const result = await this.agendaDataService.getEvent(id).pipe( const result = await this.agendaDataService.getEvent(id).pipe(
map((response) => { map((response) => {
APINODReturn(EventOutputDTOSchema, response, 'get/Events/${id}', tracing) APINODReturn(EventOutputDTOSchema, response, `get/Events/${id}`, tracing)
console.log('response',response) console.log('response',response)
console.log('ToDomain',EventToApproveDetailsMapper.toDomain(response)) console.log('ToDomain',EventToApproveDetailsMapper.toDomain(response))
return EventToApproveDetailsMapper.toDomain(response) return EventToApproveDetailsMapper.toDomain(response)
@@ -0,0 +1,16 @@
import { TestBed } from '@angular/core/testing';
import { NotificationRepositoryService } from './notification-repository.service';
describe('NotificationRepositoryService', () => {
let service: NotificationRepositoryService;
beforeEach(() => {
TestBed.configureTestingModule({});
service = TestBed.inject(NotificationRepositoryService);
});
it('should be created', () => {
expect(service).toBeTruthy();
});
});
@@ -0,0 +1,9 @@
import { Injectable } from '@angular/core';
@Injectable({
providedIn: 'root'
})
export class NotificationRepositoryService {
constructor() { }
}
@@ -3,6 +3,7 @@ import { SemanticAttributes } from '@opentelemetry/semantic-conventions';
import { Tracer, Span } from '@opentelemetry/sdk-trace-base'; import { Tracer, Span } from '@opentelemetry/sdk-trace-base';
import { OpentelemetryAgendaProvider, OpentelemetryInterceptorProvider, OpentelemetryNotificationProvider } from './opentelemetry'; import { OpentelemetryAgendaProvider, OpentelemetryInterceptorProvider, OpentelemetryNotificationProvider } from './opentelemetry';
import { Device, DeviceInfo } from '@capacitor/device'; import { Device, DeviceInfo } from '@capacitor/device';
import { SessionStore } from 'src/app/store/session.service';
const tracerInstance = OpentelemetryAgendaProvider.getTracer('example-tracer-hole', '111', {}) const tracerInstance = OpentelemetryAgendaProvider.getTracer('example-tracer-hole', '111', {})
@@ -58,9 +59,7 @@ const createTracingInstance = ({bugPrint, name, module, autoFinish}): TracingTyp
span.setAttribute(key, value); span.setAttribute(key, value);
}, },
finish: () => { finish: () => {
if(!window.location.origin.includes('https')) {
span.end(); span.end();
}
if(bugPrint && hasBug) { if(bugPrint && hasBug) {
console.error(name, data) console.error(name, data)
@@ -87,6 +86,7 @@ export function XTracerAsync({ name, bugPrint, module = null, autoFinish = true
const tracing = createTracingInstance({bugPrint, name, module, autoFinish}) const tracing = createTracingInstance({bugPrint, name, module, autoFinish})
tracing.setAttribute('User', SessionStore?.user?.FullName);
tracing.setAttribute('current.page', window.location.pathname); tracing.setAttribute('current.page', window.location.pathname);
tracing.setAttribute('device.name', device?.name || device?.model) tracing.setAttribute('device.name', device?.name || device?.model)
@@ -95,11 +95,17 @@ export function XTracerAsync({ name, bugPrint, module = null, autoFinish = true
try { try {
const result = await originalMethod.apply(this, args); const result = await originalMethod.apply(this, args);
if(autoFinish) {
tracing.finish() tracing.finish()
}
return result return result
} catch (e) { } catch (e) {
tracing.setAttribute('catch', 'true') tracing.setAttribute('catch', 'true')
if(autoFinish) {
tracing.finish() tracing.finish()
}
console.error(e); console.error(e);
return false return false
} }
@@ -119,6 +125,7 @@ export function XTracer({ name, bugPrint, module, autoFinish = true }) {
const tracing = createTracingInstance({bugPrint, name, module, autoFinish}) const tracing = createTracingInstance({bugPrint, name, module, autoFinish})
tracing.setAttribute('User', SessionStore?.user?.FullName);
tracing.setAttribute('current.page', window.location.pathname); tracing.setAttribute('current.page', window.location.pathname);
tracing.setAttribute('device.name', device?.name || device?.model) tracing.setAttribute('device.name', device?.name || device?.model)
@@ -127,12 +134,18 @@ export function XTracer({ name, bugPrint, module, autoFinish = true }) {
try { try {
const result = originalMethod.apply(this, args); const result = originalMethod.apply(this, args);
if(autoFinish) {
tracing.finish() tracing.finish()
}
return result return result
} catch (e) { } catch (e) {
tracing.setAttribute('catch', 'true') tracing.setAttribute('catch', 'true')
if(autoFinish) {
tracing.finish() tracing.finish()
}
console.error(e); console.error(e);
return false return false
} }
+43 -2
View File
@@ -18,7 +18,22 @@ import { ChatService } from 'src/app/services/chat.service';
import { FCM } from '@capacitor-community/fcm'; import { FCM } from '@capacitor-community/fcm';
import { ChatSystemService } from './chat/chat-system.service'; import { ChatSystemService } from './chat/chat-system.service';
import {ChatController} from 'src/app/controller/chat' import {ChatController} from 'src/app/controller/chat'
import { TracingType, XTracerAsync } from 'src/app/services/monitoring/opentelemetry/tracer'; import { TracingType, XTracer, XTracerAsync } from 'src/app/services/monitoring/opentelemetry/tracer';
import { z } from 'zod';
const notificationDataSchema = z.object({
Service: z.string(),
IdObject: z.string().optional(),
Object: z.string().optional(),
FolderId: z.string().optional(),
});
const notificationSchema = z.object({
notification: z.object({
data: notificationDataSchema,
}),
});
@Injectable({ @Injectable({
providedIn: 'root' providedIn: 'root'
}) })
@@ -105,6 +120,8 @@ export class NotificationsService {
if (this.platform.is('mobile')) { if (this.platform.is('mobile')) {
if (!this.isPushNotificationsAvailable) { if (!this.isPushNotificationsAvailable) {
tracing.setAttribute('notification.available', 'false')
tracing.setAttribute('outcome', 'failed')
return false return false
} }
if (this.platform.is('ios')) { if (this.platform.is('ios')) {
@@ -143,11 +160,13 @@ export class NotificationsService {
this.token = token this.token = token
tracing.setAttribute('notification.token', 'true') tracing.setAttribute('notification.token', 'true')
tracing.setAttribute('outcome', 'success') tracing.setAttribute('outcome', 'success')
tracing.finish()
}, },
(error) => { (error) => {
console.error('Permission denied:', error); console.error('Permission denied:', error);
tracing.setAttribute('notification.token', 'false') tracing.setAttribute('notification.token', 'false')
tracing.setAttribute('outcome', 'failed') tracing.setAttribute('outcome', 'failed')
tracing.finish()
} }
); );
} }
@@ -343,7 +362,10 @@ export class NotificationsService {
} }
notificatinsRoutes = (notification) => { @XTracer({name:'Notification/notificatinsRoutes', bugPrint: true, module:'notification'})
notificatinsRoutes (notification, tracing?: TracingType) {
try {
console.log('BACK BACK', notification) console.log('BACK BACK', notification)
@@ -406,6 +428,25 @@ export class NotificationsService {
setTimeout(() => { setTimeout(() => {
this.zone.run(() => this.router.navigate(['/home/chat'], navigationExtras)); this.zone.run(() => this.router.navigate(['/home/chat'], navigationExtras));
}, 200); }, 200);
} else {
tracing.setAttribute('notification.route', 'false')
tracing.setAttribute('outcome', 'failed')
tracing.setAttribute('parameters', JSON.stringify(notification))
}
} catch (error) {
const validationError = notificationSchema.safeParse(notification)
if(!validationError.success) {
const errors: z.ZodError<any> = (validationError as any).error;
console.log("Validation errors:", errors.issues);
tracing.setAttribute('parameters', JSON.stringify(notification))
tracing.setAttribute('validation.errors', JSON.stringify(errors.issues))
}
tracing.setAttribute('outcome', 'failed')
tracing.setAttribute('parameters', JSON.stringify(notification))
tracing.setAttribute('error', JSON.stringify(error))
} }
@@ -428,8 +428,6 @@ export class EditEventPage implements OnInit {
})); }));
await this.saveDocument()
if (this.addedAttachmentsList.length > 0) { if (this.addedAttachmentsList.length > 0) {
this.agendaDataRepository.addEventAttachment(this._postEvent.EventId, this.loadedEventAttachments).subscribe((value) => { this.agendaDataRepository.addEventAttachment(this._postEvent.EventId, this.loadedEventAttachments).subscribe((value) => {
console.log(value) console.log(value)
@@ -456,112 +454,6 @@ export class EditEventPage implements OnInit {
} }
// async save() {
// this.injectValidation()
// this.runValidation()
// if (this.Form.invalid) {
// return false
// }
// this._postEvent.Attendees = this.taskParticipants.concat(this.taskParticipantsCc);
// this._postEvent.Subject = /* this.domSanitizeService.sanitizeInput( */this._postEvent.Subject/* ) */;
// this._postEvent.Location = /* this.domSanitizeService.sanitizeInput( */this._postEvent.Location/* ) */;
// this._postEvent.Body.Text = /* this.domSanitizeService.sanitizeInput( */this._postEvent.Body.Text/* ) */;
// if (!this._postEvent.EventRecurrence.hasOwnProperty('Type')) {
// this._postEvent.EventRecurrence.Type = '-1'
// } else {
// }
// if (this._postEvent.EventRecurrence.Type == undefined) {
// this._postEvent.EventRecurrence.Type = '-1'
// }
// this.showLoader = true;
// try {
// if (this.sesseionStora.user.Profile == 'MDGPR' || this.sesseionStora.user.Profile == 'PR') {
// await this.eventsService.editEvent(this._postEvent, 2, 3, this._postEvent.CalendarId).toPromise()
// if (this.initCalendarName != this._postEvent.CalendarName) {
// let body = {
// "EventId": this._postEvent.EventId,
// "CalendarDestinationName": this._postEvent.CalendarName,
// }
// try {
// await this.eventsService.changeAgenda(body).toPromise();
// } catch (e) { }
// }
// this.showLoader = false;
// this.httpErrorHandle.httpsSucessMessagge('Editar evento')
// } else {
// console.log(this._postEvent, 2, 3, this._postEvent.CalendarId)
// await this.eventsService.editEvent(this._postEvent, 2, 3, this._postEvent.CalendarId).toPromise()
// if (this.initCalendarName != this._postEvent.CalendarName) {
// let body = {
// "EventId": this._postEvent.EventId,
// "CalendarDestinationName": this._postEvent.CalendarName,
// }
// try {
// await this.eventsService.changeAgenda(body).toPromise();
// } catch (e) { }
// }
// this.showLoader = false;
// this.httpErrorHandle.httpsSucessMessagge('Editar evento')
// }
// } catch (error) {
// this.showLoader = false
// this.httpErrorHandle.httpStatusHandle(error)
// }
// this.clearPostEvent.emit();
// this.deleteTemporaryData();
// await this.saveDocument()
// this.close();
// }
async saveDocument() {
console.log('save document', this.loadedEventAttachments)
try {
for (let e of this.loadedEventAttachments) {
const id: any = e.Id
const remove = e['remove']
if (id == 'add') {
//data.selected
const DocumentToSave = {
SourceTitle: e.SourceName,
ParentId: this._postEvent.EventId,
Source: '1',
SourceId: e.SourceId,
ApplicationId: e.ApplicationId.toString(),
Id: '0',
Link: '',
SerialNumber: '',
};
// await this.attachmentsService.setEventAttachmentById(DocumentToSave).toPromise();
} else if (remove) {
await this.attachmentsService.deleteEventAttachmentById(e.Id).toPromise()
}
}
} catch (error) {
}
}
async addParticipants() { async addParticipants() {
@@ -617,33 +509,18 @@ export class EditEventPage implements OnInit {
window['temp.path:/home/agenda/edit-event.component.ts'] = {} window['temp.path:/home/agenda/edit-event.component.ts'] = {}
} }
async getAttachments(eventId: string) {
if (this._postEvent.HasAttachments) {
let rest: any;
try {
rest = this.attachmentsService.getAttachmentsById(eventId).toPromise()
console.log('GetAttachment', rest)
} catch (error) {
console.error('getAttchment', error)
}
this.loadedEventAttachments = rest;
}
}
deleteAttachment(attachmentID: string, index) { deleteAttachment(attachmentID: string, index) {
console.log(JSON.stringify(this.loadedEventAttachments)) const indexToRemove = index; // Assuming you already know the index you want to remove
const id: any = this.loadedEventAttachments[index].Id
console.log(JSON.stringify(id)) const DocumentId: any = this.loadedEventAttachments[index].Id
let update = this.removeItemById(this.loadedEventAttachments, id) if (indexToRemove > -1 && indexToRemove < this.loadedEventAttachments.length) {
this.loadedEventAttachments = update this.loadedEventAttachments.splice(indexToRemove, 1);
console.log(update)
this.deletedAttachmentsList.push(id)
} }
removeItemById(array, id) { this.deletedAttachmentsList.push(DocumentId)
return array.filter(item => item.Id !== id);
} }
async getDoc() { async getDoc() {
const modal = await this.modalController.create({ const modal = await this.modalController.create({
@@ -12,8 +12,8 @@
<ion-segment [(ngModel)]="selectedUserCalendar" (ionChange)="segmentChanged($event)" *ngIf="SessionStore.user.RoleID !== 100000014"> <ion-segment [(ngModel)]="selectedUserCalendar" (ionChange)="segmentChanged($event)" *ngIf="SessionStore.user.RoleID !== 100000014">
<ion-segment-button *ngFor="let calendars of calendarData" value="{{calendars.wxUserId}}" > <ion-segment-button *ngFor="let calendars of calendarData" value="{{calendars.wxUserId}}" >
<div *ngIf="environment.presidential"> <div *ngIf="environment.presidential">
<div *ngIf="calendars.roleId == RoleIdService.PRES">AGEANDA DO PR </div> <div *ngIf="calendars.roleId == RoleIdService.PRES">AGENDA DO PR </div>
<div *ngIf="calendars.roleId == RoleIdService.MD && calendars.roleId != SessionStore.user.RoleID">AGEANDA DO MDGPR</div> <div *ngIf="calendars.roleId == RoleIdService.MD && calendars.roleId != SessionStore.user.RoleID">AGENDA DO MDGPR</div>
<div *ngIf="calendars.roleId != RoleIdService.MD && calendars.roleId != RoleIdService.PRES && calendars.wxFullName && calendars.wxUserId != SessionStore.user.UserId "> Agenda {{calendars.wxFullName}} </div> <div *ngIf="calendars.roleId != RoleIdService.MD && calendars.roleId != RoleIdService.PRES && calendars.wxFullName && calendars.wxUserId != SessionStore.user.UserId "> Agenda {{calendars.wxFullName}} </div>
<div *ngIf="calendars.wxUserId == SessionStore.user.UserId "> <div *ngIf="calendars.wxUserId == SessionStore.user.UserId ">
Minha agenda Minha agenda
@@ -57,8 +57,8 @@
<ion-segment-button *ngFor="let calendars of calendarData" value="{{calendars.wxUserId}}" > <ion-segment-button *ngFor="let calendars of calendarData" value="{{calendars.wxUserId}}" >
<div *ngIf="environment.presidential"> <div *ngIf="environment.presidential">
<div *ngIf="calendars.roleId == RoleIdService.PRES">AGEANDA DO PR </div> <div *ngIf="calendars.roleId == RoleIdService.PRES">AGENDA DO PR </div>
<div *ngIf="calendars.roleId == RoleIdService.MD && calendars.roleId != SessionStore.user.RoleID">AGEANDA DO MDGPR</div> <div *ngIf="calendars.roleId == RoleIdService.MD && calendars.roleId != SessionStore.user.RoleID">AGENDA DO MDGPR</div>
<div *ngIf="calendars.roleId != RoleIdService.MD && calendars.roleId != RoleIdService.PRES && calendars.wxFullName && calendars.wxUserId != SessionStore.user.UserId "> Agenda {{calendars.wxFullName}} </div> <div *ngIf="calendars.roleId != RoleIdService.MD && calendars.roleId != RoleIdService.PRES && calendars.wxFullName && calendars.wxUserId != SessionStore.user.UserId "> Agenda {{calendars.wxFullName}} </div>
<div *ngIf="calendars.wxUserId == SessionStore.user.UserId "> <div *ngIf="calendars.wxUserId == SessionStore.user.UserId ">
Minha agenda Minha agenda
@@ -2,6 +2,7 @@ import { Injectable, NgZone } from '@angular/core';
import { StorageService } from '../services/storage.service'; import { StorageService } from '../services/storage.service';
import { v4 as uuidv4 } from 'uuid' import { v4 as uuidv4 } from 'uuid'
import { SHA1 } from 'crypto-js'; import { SHA1 } from 'crypto-js';
import { XTracer } from '../services/monitoring/opentelemetry/tracer';
@Injectable({ @Injectable({
providedIn: 'root' providedIn: 'root'
}) })
@@ -185,6 +186,7 @@ export class NotificationHolderService {
addNotification(notification) { addNotification(notification) {
console.log(notification)
let notificationObject = this.notificationObject(notification) let notificationObject = this.notificationObject(notification)
//alert("add notification") //alert("add notification")
+1 -1
View File
@@ -55,7 +55,7 @@ td.monthview-primary-with-event {
td.monthview-current{ td.monthview-current{
border-bottom: 1px solid var(--monthview-selected) !important; border-bottom: 1px solid var(--monthview-selected) !important;
color: black !important; color: black !important;
background-color: #e39c956b !important; background-color: #c0c0c0 !important;
font-weight: 500; font-weight: 500;
} }
// selected date ============================= // selected date =============================
+1 -1
View File
@@ -1,5 +1,5 @@
export let versionData = { export let versionData = {
"shortSHA": "680f573P466", "shortSHA": "680f57366",
"SHA": "680f57313f4d97d944e96c6e3457b7f1a9f379f0", "SHA": "680f57313f4d97d944e96c6e3457b7f1a9f379f0",
"branch": "notification-header/feature", "branch": "notification-header/feature",
"lastCommitAuthor": "'Peter Maquiran'", "lastCommitAuthor": "'Peter Maquiran'",