mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 20:47:54 +00:00
merge chat
This commit is contained in:
+51
-25
@@ -22,7 +22,6 @@ import { FormsModule, ReactiveFormsModule } from '@angular/forms';
|
||||
import { CalendarModule, DateAdapter } from 'angular-calendar';
|
||||
import { adapterFactory } from 'angular-calendar/date-adapters/date-fns';
|
||||
import { NoopAnimationsModule } from '@angular/platform-browser/animations';
|
||||
import { ChatService } from './services/chat.service';
|
||||
import {MatDatepickerModule} from '@angular/material/datepicker';
|
||||
import {MAT_DATE_LOCALE} from '@angular/material/core';
|
||||
import { Network } from '@ionic-native/network/ngx';
|
||||
@@ -97,20 +96,20 @@ import { DiplomaOptionsPage } from './shared/popover/deploma-options/deploma-opt
|
||||
import { ImageCropperModule } from 'ngx-image-cropper';
|
||||
import { metricsInterceptor, MetricsInterceptor } from './interceptors/metter.interceptor';
|
||||
import { environment } from 'src/environments/environment';
|
||||
import { StoreModule } from '@ngrx/store';
|
||||
|
||||
import {MatMenuModule} from '@angular/material/menu';
|
||||
import {MatIconModule} from '@angular/material/icon';
|
||||
import { AngularCropperjsModule } from 'angular-cropperjs';
|
||||
import { calendarReducer } from './module/agenda/data/data-source/agenda-memory-source.service';
|
||||
// import { ServiceWorkerModule } from '@angular/service-worker';
|
||||
// import { AngularFireModule } from '@angular/fire';
|
||||
// import { AngularFireMessagingModule } from '@angular/fire/messaging';
|
||||
// import { environment } from 'src/environments/environment';
|
||||
import { createAction, createReducer, on, StoreModule } from '@ngrx/store';
|
||||
import { ChatModule } from './module/chat/chat.module';
|
||||
import { openTelemetryLogging, OpenTelemetryLogging } from './services/monitoring/opentelemetry/logging';
|
||||
|
||||
/* import { FCM } from '@ionic-native/fcm/ngx';
|
||||
import { FirebaseX } from '@ionic-native/firebase-x/ngx'; */
|
||||
//import { FCM } from 'cordova-plugin-fcm-with-dependecy-updated/ionic/ngx';
|
||||
import { registerLocaleData } from '@angular/common';
|
||||
import localePt from '@angular/common/locales/pt';
|
||||
|
||||
// Register the locale data
|
||||
registerLocaleData(localePt, 'pt');
|
||||
|
||||
Sentry.init(
|
||||
{
|
||||
@@ -122,26 +121,55 @@ import { FirebaseX } from '@ionic-native/firebase-x/ngx'; */
|
||||
// We recommend adjusting this value in production.
|
||||
tracesSampleRate: 1.0,
|
||||
integrations: [
|
||||
// new BrowserTracing({
|
||||
// tracingOrigins: ['localhost', 'https://gd-api.oapr.gov.ao/api/'],
|
||||
// }) as Integration,
|
||||
new BrowserTracing({
|
||||
tracingOrigins: ['localhost', 'https://gd-api.oapr.gov.ao/api/'],
|
||||
}) as Integration,
|
||||
],
|
||||
beforeSend(event, hint) {
|
||||
|
||||
// Modify the event here
|
||||
// console.log('Intercepted Sentry event:', event);
|
||||
|
||||
// Optionally, return null to drop the event or return the modified event
|
||||
beforeSend(event) {
|
||||
if (event.level === 'error') {
|
||||
// console.log(event.exception.values[0].value)
|
||||
openTelemetryLogging.send({
|
||||
type: 'graylog',
|
||||
payload: {
|
||||
message: event.exception.values[0].value,
|
||||
object: {
|
||||
sentry: true,
|
||||
error: event
|
||||
}
|
||||
},
|
||||
spanContext: null
|
||||
})
|
||||
}
|
||||
// Return event to send it to Sentry
|
||||
return event;
|
||||
}
|
||||
},
|
||||
},
|
||||
// Forward the init method to the sibling Framework.
|
||||
SentrySibling.init
|
||||
SentrySibling.init,
|
||||
);
|
||||
|
||||
export const increment = createAction('[Counter Component] Increment');
|
||||
export const decrement = createAction('[Counter Component] Decrement');
|
||||
export const reset = createAction('[Counter Component] Reset');
|
||||
|
||||
export const initialState = 0;
|
||||
|
||||
const _counterReducer = createReducer(
|
||||
initialState,
|
||||
on(increment, (state) => state + 1),
|
||||
on(decrement, (state) => state - 1),
|
||||
on(reset, (state) => 0)
|
||||
);
|
||||
|
||||
export function counterReducer(state, action) {
|
||||
return _counterReducer(state, action);
|
||||
}
|
||||
|
||||
@NgModule({
|
||||
declarations: [AppComponent, PopupQuestionPipe, InputFilterDirective],
|
||||
imports: [BrowserModule,
|
||||
StoreModule.forRoot({ calendar: calendarReducer }),
|
||||
// StoreModule.forRoot({ userTyping: typingReducer }),
|
||||
CommonModule,
|
||||
FormsModule,
|
||||
CalendarModule.forRoot({
|
||||
@@ -196,9 +224,10 @@ import { FirebaseX } from '@ionic-native/firebase-x/ngx'; */
|
||||
DeplomaOptionsPageModule,
|
||||
CreateProcessPageModule,
|
||||
ImageCropperModule,
|
||||
|
||||
MatMenuModule,
|
||||
MatIconModule
|
||||
MatIconModule,
|
||||
// module
|
||||
ChatModule
|
||||
],
|
||||
entryComponents: [
|
||||
DiplomaOptionsPage,
|
||||
@@ -223,7 +252,6 @@ import { FirebaseX } from '@ionic-native/firebase-x/ngx'; */
|
||||
FilePath,
|
||||
/* FCM,
|
||||
FirebaseX, */
|
||||
ChatService,
|
||||
ScreenOrientation,
|
||||
Network,
|
||||
SQLite,
|
||||
@@ -244,8 +272,6 @@ import { FirebaseX } from '@ionic-native/firebase-x/ngx'; */
|
||||
chatTokenInterceptor,
|
||||
tokenInterceptor,
|
||||
metricsInterceptor
|
||||
|
||||
|
||||
],
|
||||
bootstrap: [AppComponent],
|
||||
schemas: [CUSTOM_ELEMENTS_SCHEMA]
|
||||
|
||||
Reference in New Issue
Block a user