mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 20:47:54 +00:00
add monitoring
This commit is contained in:
@@ -17,6 +17,8 @@ import { RouteService } from 'src/app/services/route.service';
|
||||
import { SessionStore } from 'src/app/store/session.service';
|
||||
import { HttpErrorHandle } from 'src/app/services/http-error-handle.service';
|
||||
import { AgendaDataRepositoryService } from 'src/app/services/Repositorys/Agenda/agenda-data-repository.service';
|
||||
import { TracingType, XTracerAsync } from 'src/app/services/monitoring/opentelemetry/tracer';
|
||||
import { isHttpError } from 'src/app/services/http.service';
|
||||
|
||||
@Component({
|
||||
selector: 'app-view-event',
|
||||
@@ -119,76 +121,32 @@ export class ViewEventPage implements OnInit {
|
||||
ev.target.complete();
|
||||
}
|
||||
|
||||
async loadEvent() {
|
||||
@XTracerAsync({name:'ViewEventPage/loadEvent', log: false, bugPrint: true})
|
||||
async loadEvent(tracing?: TracingType) {
|
||||
const loader = this.toastService.loading();
|
||||
|
||||
if(this.sesseionStora.user.Profile == 'MDGPR' || this.sesseionStora.user.Profile == 'PR') {
|
||||
this.eventsService.getEvent(this.eventId).subscribe(res => {
|
||||
this.loadedEvent = res;
|
||||
// this.addEventToDb(res);
|
||||
|
||||
loader.remove()
|
||||
}, (error) => {
|
||||
|
||||
|
||||
if (error.status === 0) {
|
||||
// this.getFromDb();
|
||||
} else {
|
||||
this.toastService.badRequest('Este evento já não existe na sua agenda')
|
||||
loader.remove()
|
||||
this.modalController.dismiss('Eevent not Foud');
|
||||
this.RouteService.goBack();
|
||||
}
|
||||
loader.remove()
|
||||
});
|
||||
} else {
|
||||
|
||||
if(this.CalendarId) {
|
||||
|
||||
this.eventsService.genericGetEvent(this.eventId, this.CalendarId).subscribe(res => {
|
||||
this.loadedEvent = res;
|
||||
// this.addEventToDb(res);
|
||||
|
||||
loader.remove()
|
||||
}, (error) => {
|
||||
|
||||
if (error.status === 0) {
|
||||
// this.getFromDb();
|
||||
} else {
|
||||
this.toastService.badRequest('Este evento já não existe na sua agenda')
|
||||
loader.remove()
|
||||
this.modalController.dismiss('Eevent not Foud');
|
||||
this.RouteService.goBack();
|
||||
}
|
||||
loader.remove()
|
||||
});
|
||||
} else {
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
let res = await this.agendaDataRepository.getEventById(this.eventId)
|
||||
|
||||
if(res.isOk()) {
|
||||
tracing.setAttribute('outcome', 'success')
|
||||
this.loadedEvent = res.value as any;
|
||||
// this.addEventToDb(res);
|
||||
|
||||
loader.remove()
|
||||
} else {
|
||||
if (res.error.status === 0) {
|
||||
// this.getFromDb();
|
||||
} else {
|
||||
this.toastService.badRequest('Este evento já não existe na sua agenda')
|
||||
loader.remove()
|
||||
this.modalController.dismiss('Eevent not Foud');
|
||||
this.RouteService.goBack();
|
||||
tracing.setAttribute('eventId', this.eventId)
|
||||
tracing.setAttribute('outcome', 'failed')
|
||||
tracing.bugFlag()
|
||||
|
||||
if(!isHttpError(res.error)) {
|
||||
this.toastService._badRequest('Pedimos desculpa mas não foi possível executar a acção. Por favor, contacte o apoio técnico. #13')
|
||||
} else if (isHttpError(res.error)) {
|
||||
|
||||
}
|
||||
loader.remove()
|
||||
this.modalController.dismiss('Eevent not Foud');
|
||||
this.RouteService.goBack();
|
||||
}
|
||||
|
||||
loader.remove()
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -155,8 +155,16 @@ const Attachments = z.object({
|
||||
FileSize: z.number().optional(),
|
||||
});
|
||||
|
||||
const OwnerSchema = z.object({
|
||||
wxUserId: z.number(),
|
||||
wxFullName: z.string(),
|
||||
wxeMail: z.string(),
|
||||
userPhoto: z.string(),
|
||||
});
|
||||
|
||||
|
||||
const EventToApproveDetails = z.object({
|
||||
owner: OwnerSchema,
|
||||
serialNumber: z.string(),
|
||||
taskStatus: z.string().nullable(),
|
||||
originator: OriginatorSchema,
|
||||
|
||||
@@ -711,7 +711,7 @@ export class AgendaPage implements OnInit {
|
||||
calendarOwnerName: selectedCalendar.wxFullName,
|
||||
endDate: endTime.toISOString(),
|
||||
startDate: startTime.toISOString(),
|
||||
status: EEventFilterStatus.Approved
|
||||
status: EEventFilterStatus.AllToCommunicate
|
||||
}, tracing)
|
||||
|
||||
if(response.isOk()) {
|
||||
|
||||
@@ -20,6 +20,8 @@ import { HttpErrorHandle } from 'src/app/services/http-error-handle.service'
|
||||
import { AttachmentsService } from 'src/app/services/attachments.service';
|
||||
import { DateService } from 'src/app/services/date.service';
|
||||
import { AgendaDataRepositoryService } from 'src/app/services/Repositorys/Agenda/agenda-data-repository.service';
|
||||
import { TracingType, XTracerAsync } from 'src/app/services/monitoring/opentelemetry/tracer';
|
||||
import { isHttpError } from 'src/app/services/http.service';
|
||||
|
||||
@Component({
|
||||
selector: 'app-view-event',
|
||||
@@ -189,24 +191,42 @@ export class ViewEventPage implements OnInit {
|
||||
this.TimeZoneString = this.loadedEvent.TimeZone
|
||||
}
|
||||
|
||||
async loadEvent() {
|
||||
@XTracerAsync({name:'ViewEventPage/loadEvent', log: false, bugPrint: true})
|
||||
async loadEvent(tracing?: TracingType) {
|
||||
const loader = this.toastService.loading();
|
||||
|
||||
let res = await this.agendaDataRepository.getEventById(this.eventId)
|
||||
let res = await this.agendaDataRepository.getEventById(this.eventId, tracing)
|
||||
|
||||
if (res.isOk()) {
|
||||
tracing.setAttribute('outcome', 'success')
|
||||
console.log('Loaded Event', res.value)
|
||||
loader.remove()
|
||||
/* let changeDate = this.dateService.fixDate(res.value as any) as any */
|
||||
this.loadedEvent = res.value as any;
|
||||
this.setTimeZone()
|
||||
} else {
|
||||
this.httpErrorHandle.httpStatusHandle(res.error)
|
||||
loader.remove()
|
||||
this.toastService.badRequest('Este evento já não existe na sua agenda')
|
||||
|
||||
tracing.setAttribute('eventId', this.eventId)
|
||||
if(!isHttpError(res.error)) {
|
||||
this.toastService._badRequest('Pedimos desculpa mas não foi possível executar a acção. Por favor, contacte o apoio técnico. #13')
|
||||
console.log(res.error)
|
||||
} else if (isHttpError(res.error)) {
|
||||
if(res.error.status == 404) {
|
||||
this.toastService._badRequest('Este evento já não existe')
|
||||
} else {
|
||||
this.httpErrorHandle.httpStatusHandle(res.error)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
tracing.setAttribute('outcome', 'failed')
|
||||
tracing.bugFlag()
|
||||
|
||||
// this.toastService.badRequest('Este evento já não existe na sua agenda')
|
||||
this.RouteService.goBack();
|
||||
}
|
||||
|
||||
loader.remove()
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -16,6 +16,7 @@ import { ChangeProfileService } from 'src/app/services/change-profile.service';
|
||||
import { SessionStore } from 'src/app/store/session.service';
|
||||
import { TaskService } from 'src/app/services/task.service';
|
||||
import { AgendaDataRepositoryService } from 'src/app/services/Repositorys/Agenda/agenda-data-repository.service';
|
||||
import { EEventFilterStatus } from 'src/app/services/Repositorys/Agenda/model/enums';
|
||||
|
||||
@Component({
|
||||
selector: 'app-events',
|
||||
@@ -237,7 +238,8 @@ export class EventsPage implements OnInit {
|
||||
userId: SessionStore.user.UserId,
|
||||
calendarOwnerName: SessionStore.user.FullName,
|
||||
startDate: date.toISOString(),
|
||||
endDate: new Date(end).toISOString()
|
||||
endDate: new Date(end).toISOString(),
|
||||
status: EEventFilterStatus.AllToCommunicate
|
||||
})
|
||||
|
||||
if(response.isOk()) {
|
||||
|
||||
@@ -19,6 +19,7 @@ import { AttachmentsService } from 'src/app/services/attachments.service';
|
||||
import { AgendaDataRepositoryService } from 'src/app/services/Repositorys/Agenda/agenda-data-repository.service';
|
||||
import { TracingType, XTracerAsync } from 'src/app/services/monitoring/opentelemetry/tracer';
|
||||
import { isHttpError } from 'src/app/services/http.service';
|
||||
import { EventsService } from 'src/app/services/events.service';
|
||||
|
||||
@Component({
|
||||
selector: 'app-approve-event',
|
||||
@@ -61,7 +62,8 @@ export class ApproveEventPage implements OnInit {
|
||||
private httpErrorHandle: HttpErrorHandle,
|
||||
public TaskService: TaskService,
|
||||
private attachmentsService: AttachmentsService,
|
||||
public AgendaDataRepositoryService: AgendaDataRepositoryService
|
||||
public AgendaDataRepositoryService: AgendaDataRepositoryService,
|
||||
public EventsService: EventsService
|
||||
) {
|
||||
this.activatedRoute.paramMap.subscribe(params => {
|
||||
//
|
||||
@@ -111,6 +113,14 @@ export class ApproveEventPage implements OnInit {
|
||||
tracing.setAttribute('outcome', 'success')
|
||||
} else if(isHttpError(res.error)) {
|
||||
|
||||
tracing.setAttribute('eventId', this.serialNumber)
|
||||
|
||||
if(res.error.status == 404) {
|
||||
this.toastService._badRequest('Este evento já não existe')
|
||||
} else {
|
||||
this.httpErrorHandle.httpStatusHandle(res.error)
|
||||
}
|
||||
|
||||
tracing.setAttribute('outcome', 'failed')
|
||||
tracing.bugFlag()
|
||||
|
||||
|
||||
@@ -243,7 +243,7 @@ export class EventListPage implements OnInit {
|
||||
let allEvents = await this.AgendaDataRepositoryService.eventToApproveList({
|
||||
userId,
|
||||
status: EEventFilterStatus.Pending
|
||||
})
|
||||
}, tracing)
|
||||
|
||||
if(allEvents.isOk()) {
|
||||
tracing.setAttribute('outcome', 'success')
|
||||
|
||||
@@ -44,17 +44,28 @@ export class AgendaDataRepositoryService {
|
||||
return this.agendaLocalDataSourceService.createCalendar(currentUserCalendar)
|
||||
}
|
||||
|
||||
async getEventById(id: string) {
|
||||
async getEventById(id: string, tracing?: TracingType) {
|
||||
try {
|
||||
const result = await this.agendaDataService.getEvent(id).pipe(
|
||||
map((response) => {
|
||||
console.log('Response', response.data)
|
||||
console.log('Output', EventMapper.toDomain(response.data))
|
||||
return EventMapper.toDomain(response.data)
|
||||
EventMapper.toDomain(response)
|
||||
return EventMapper.toDomain(response)
|
||||
})
|
||||
).toPromise()
|
||||
return ok(result)
|
||||
} catch (e) {
|
||||
if(isHttpError(e)) {
|
||||
tracing?.setAttribute('status.code', e.status.toString())
|
||||
if (e.status == 400) {
|
||||
tracing.bugFlag()
|
||||
tracing.setAttribute('outcome', 'failed')
|
||||
}
|
||||
} else {
|
||||
tracing.bugFlag()
|
||||
tracing.setAttribute('outcome', 'failed')
|
||||
tracing?.setAttribute('map.error', 'true')
|
||||
tracing?.setAttribute('map.error.context', JSON.stringify(e))
|
||||
}
|
||||
return err(e as HttpErrorResponse)
|
||||
}
|
||||
}
|
||||
@@ -72,7 +83,13 @@ export class AgendaDataRepositoryService {
|
||||
} catch (e) {
|
||||
if(isHttpError(e)) {
|
||||
tracing?.setAttribute('status.code', e.status.toString())
|
||||
if (e.status == 400) {
|
||||
tracing.bugFlag()
|
||||
tracing.setAttribute('outcome', 'failed')
|
||||
}
|
||||
} else {
|
||||
tracing.bugFlag()
|
||||
tracing.setAttribute('outcome', 'failed')
|
||||
tracing?.setAttribute('map.error', 'true')
|
||||
tracing?.setAttribute('map.error.context', JSON.stringify(e))
|
||||
}
|
||||
|
||||
@@ -7,7 +7,8 @@ import { SharedCalendarListOutputDTO, SharedCalendarListOutputDTOSchema } from '
|
||||
import { HttpService } from '../../http.service';
|
||||
import { APIReturn } from '../../decorator/api-validate-schema.decorator';
|
||||
import { TracingType } from '../../monitoring/opentelemetry/tracer';
|
||||
import { EventListOutputDTOSchema } from './model/eventListDTOOutput';
|
||||
import { EventListOutputDTO, EventListOutputDTOSchema } from './model/eventListDTOOutput';
|
||||
import { EventOutputDTO } from './model/eventDTOOutput';
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
@@ -48,7 +49,7 @@ export class AgendaDataService {
|
||||
}
|
||||
|
||||
// @APIReturn(EventListOutputDTOSchema, 'get/Events')
|
||||
getEvents(userId: number, startDate: string, endDate: string, status: number, category: string, type: string, tracing?: TracingType): Observable<any> {
|
||||
getEvents(userId: number, startDate: string, endDate: string, status: number, category: string, type: string, tracing?: TracingType): Observable<EventListOutputDTO> {
|
||||
let params = new HttpParams()
|
||||
.set('UserId', userId)
|
||||
|
||||
@@ -72,7 +73,7 @@ export class AgendaDataService {
|
||||
return this.http.get<any>(`${this.baseUrl}/Events`, { params });
|
||||
}
|
||||
|
||||
getEvent(id: string): Observable<any> {
|
||||
getEvent(id: string): Observable<EventOutputDTO> {
|
||||
return this.http.get<any>(`${this.baseUrl}/Events/${id}`);
|
||||
}
|
||||
|
||||
|
||||
@@ -53,7 +53,9 @@ export class EventMapper {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return {
|
||||
"owner": dto.owner,
|
||||
"HasAttachments": dto.hasAttachments,
|
||||
"EventComunicationId": 1682,
|
||||
"EventId": dto.id,
|
||||
|
||||
@@ -28,6 +28,11 @@ export class EventToApproveDetailsMapper {
|
||||
}
|
||||
|
||||
let color;
|
||||
if(dto.ownerType == EEventOwnerType.PR) {
|
||||
color = 'PR'
|
||||
} else {
|
||||
color = 'MDGPR'
|
||||
}
|
||||
|
||||
// if(dto.ownerType != 'PR') {
|
||||
let ownerType;
|
||||
@@ -74,6 +79,7 @@ export class EventToApproveDetailsMapper {
|
||||
|
||||
|
||||
return {
|
||||
"owner": dto.owner,
|
||||
"serialNumber": dto.id,
|
||||
"taskStatus": taskStatus,
|
||||
"originator": {
|
||||
|
||||
@@ -186,7 +186,7 @@ export class AuthService {
|
||||
this.RochetChatConnectorService.logout();
|
||||
this.RochetChatConnectorService.connect();
|
||||
this.RochetChatConnectorService.login().then((message: any) => {
|
||||
console.log('Chat login', message)
|
||||
// console.log('Chat login', message)
|
||||
|
||||
SessionStore.user.RochetChatUserId = message.result.id
|
||||
SessionStore.save()
|
||||
|
||||
@@ -420,7 +420,7 @@ export class EventsService {
|
||||
isMyEvent(event: any) {
|
||||
|
||||
const data: any = event
|
||||
return data.Organizer.Id == SessionStore.user.UserId
|
||||
return data.owner.wxUserId == SessionStore.user.UserId
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -4,6 +4,7 @@ import { Tracer, Span } from '@opentelemetry/sdk-trace-base';
|
||||
import { OpentelemetryAgendaProvider } from './opentelemetry';
|
||||
import { Device, DeviceInfo } from '@capacitor/device';
|
||||
|
||||
|
||||
const tracerInstance = OpentelemetryAgendaProvider.getTracer('example-tracer-hole', '111', {
|
||||
|
||||
})
|
||||
@@ -81,12 +82,18 @@ export function XTracerAsync({ name, log, bugPrint }: any, p0?: any) {
|
||||
try {
|
||||
const result = await originalMethod.apply(this, args);
|
||||
|
||||
tracing.finish()
|
||||
if(!window.location.origin.includes('https')) {
|
||||
tracing.finish()
|
||||
}
|
||||
|
||||
|
||||
return result
|
||||
} catch (e) {
|
||||
|
||||
tracing.finish()
|
||||
|
||||
if(!window.location.origin.includes('https')) {
|
||||
tracing.finish()
|
||||
}
|
||||
console.error(e);
|
||||
return false
|
||||
}
|
||||
@@ -162,12 +169,18 @@ export function XTracer({name, log, bugPrint}: any) {
|
||||
try {
|
||||
const result = originalMethod.apply(this, args);
|
||||
|
||||
tracing.finish()
|
||||
|
||||
if(!window.location.origin.includes('https')) {
|
||||
tracing.finish()
|
||||
}
|
||||
|
||||
return result
|
||||
} catch (e) {
|
||||
|
||||
tracing.finish()
|
||||
|
||||
if(!window.location.origin.includes('https')) {
|
||||
tracing.finish()
|
||||
}
|
||||
console.error(e);
|
||||
return false
|
||||
}
|
||||
|
||||
@@ -334,7 +334,7 @@ export class TaskService {
|
||||
let allEvents = await this.AgendaDataRepositoryService.eventToApproveList({
|
||||
userId,
|
||||
status: EEventFilterStatus.Pending
|
||||
})
|
||||
}, tracing)
|
||||
|
||||
if(allEvents.isOk()) {
|
||||
tracing.setAttribute('outcome', 'success')
|
||||
|
||||
@@ -13,6 +13,9 @@ import { HttpErrorHandle } from 'src/app/services/http-error-handle.service';
|
||||
import { TaskService } from 'src/app/services/task.service'
|
||||
import { AgendaDataRepositoryService } from 'src/app/services/Repositorys/Agenda/agenda-data-repository.service';
|
||||
import { EventToApproveDetails } from 'src/app/models/entiry/agenda/eventToApproveDetails';
|
||||
import { EventsService } from 'src/app/services/events.service';
|
||||
import { isHttpError } from 'src/app/services/http.service';
|
||||
import { TracingType, XTracerAsync } from 'src/app/services/monitoring/opentelemetry/tracer';
|
||||
|
||||
@Component({
|
||||
selector: 'app-approve-event',
|
||||
@@ -53,7 +56,9 @@ export class ApproveEventPage implements OnInit {
|
||||
public ThemeService: ThemeService,
|
||||
private httpErroHandle: HttpErrorHandle,
|
||||
public TaskService: TaskService,
|
||||
private agendaDataRepository: AgendaDataRepositoryService
|
||||
private agendaDataRepository: AgendaDataRepositoryService,
|
||||
public EventsService: EventsService,
|
||||
private httpErrorHandle: HttpErrorHandle,
|
||||
) {
|
||||
// Event to approve list
|
||||
|
||||
@@ -77,19 +82,33 @@ export class ApproveEventPage implements OnInit {
|
||||
this.modalController.dismiss();
|
||||
}
|
||||
|
||||
async getTask() {
|
||||
@XTracerAsync({name:'ApproveEventPage/getTask', log: false, bugPrint: true})
|
||||
async getTask(tracing?: TracingType) {
|
||||
|
||||
const res = await this.agendaDataRepository.getEventToApproveById(this.serialNumber)
|
||||
const res = await this.agendaDataRepository.getEventToApproveById(this.serialNumber, tracing)
|
||||
|
||||
if (res.isOk()) {
|
||||
this.loadedEvent = res.value;
|
||||
console.log('attachment', res.value)
|
||||
this.loadedAttachments = this.loadedEvent.Attachments
|
||||
this.today = new Date(res.value.workflowInstanceDataFields.StartDate);
|
||||
//
|
||||
this.customDate = this.days[this.today.getDay()] + ", " + this.today.getDate() + " de " + (this.months[this.today.getMonth()]);
|
||||
tracing.setAttribute('outcome', 'success')
|
||||
} else {
|
||||
console.log(res.error.status)
|
||||
tracing.setAttribute('eventId', this.serialNumber)
|
||||
|
||||
if(!isHttpError(res.error)) {
|
||||
this.toastService._badRequest('Pedimos desculpa mas não foi possível executar a acção. Por favor, contacte o apoio técnico. #133')
|
||||
console.log(res.error)
|
||||
} else if (isHttpError(res.error)) {
|
||||
|
||||
if(res.error.status == 404) {
|
||||
this.toastService._badRequest('Este evento já não existe')
|
||||
} else {
|
||||
this.httpErrorHandle.httpStatusHandle(res.error)
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -146,7 +146,7 @@ export class EventListPage implements OnInit {
|
||||
let allEvents = await this.AgendaDataRepositoryService.eventToApproveList({
|
||||
userId,
|
||||
status: EEventFilterStatus.Pending
|
||||
})
|
||||
}, tracing)
|
||||
if(allEvents.isOk()) {
|
||||
|
||||
tracing.setAttribute('outcome', 'success')
|
||||
|
||||
@@ -20,6 +20,8 @@ import { EventController } from 'src/app/controller/event'
|
||||
import { DateService } from 'src/app/services/date.service';
|
||||
import { AgendaDataRepositoryService } from 'src/app/services/Repositorys/Agenda/agenda-data-repository.service';
|
||||
import { SearchList_v2 } from 'src/app/models/search-document';
|
||||
import { TracingType, XTracerAsync } from 'src/app/services/monitoring/opentelemetry/tracer';
|
||||
import { isHttpError } from 'src/app/services/http.service';
|
||||
|
||||
@Component({
|
||||
selector: 'app-view-event',
|
||||
@@ -68,7 +70,7 @@ export class ViewEventPage implements OnInit {
|
||||
private httpErrorHandle: HttpErrorHandle,
|
||||
private router: Router,
|
||||
private dateService: DateService,
|
||||
private agendaDataRepository: AgendaDataRepositoryService
|
||||
private agendaDataRepository: AgendaDataRepositoryService,
|
||||
) {
|
||||
this.isEventEdited = false;
|
||||
this.loadedEvent = new Event();
|
||||
@@ -124,23 +126,41 @@ export class ViewEventPage implements OnInit {
|
||||
setTimeZone() {
|
||||
this.TimeZoneString = this.loadedEvent.TimeZone
|
||||
}
|
||||
async loadEvent() {
|
||||
@XTracerAsync({name:'AgendaPage/loadEvent', log: false, bugPrint: true})
|
||||
async loadEvent(tracing?: TracingType) {
|
||||
|
||||
let res = await this.agendaDataRepository.getEventById(this.eventId)
|
||||
let res = await this.agendaDataRepository.getEventById(this.eventId, tracing)
|
||||
|
||||
if(res.isOk()) {
|
||||
console.log('Loaded Event', res.value)
|
||||
|
||||
console.log('newAttahcmentList', res.value.Attachments)
|
||||
tracing.setAttribute('outcome', 'success')
|
||||
|
||||
/* let changeDate = this.dateService.fixDate(res.value as any) as any */
|
||||
this.loadedEvent = res.value as any;
|
||||
this.setTimeZone()
|
||||
} else {
|
||||
|
||||
tracing.setAttribute('eventId', this.eventId)
|
||||
if(!isHttpError(res.error)) {
|
||||
this.toastService._badRequest('Pedimos desculpa mas não foi possível executar a acção. Por favor, contacte o apoio técnico. #133')
|
||||
console.log(res.error)
|
||||
} else if (isHttpError(res.error)) {
|
||||
|
||||
if(res.error.status == 404) {
|
||||
this.toastService._badRequest('Este evento já não existe')
|
||||
} else {
|
||||
this.httpErrorHandle.httpStatusHandle(res.error)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
tracing.setAttribute('outcome', 'failed')
|
||||
tracing.bugFlag()
|
||||
|
||||
this.viewEventDetailDismiss.emit({
|
||||
type: 'close'
|
||||
})
|
||||
console.log(res.error)
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user