Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
70 changes: 34 additions & 36 deletions src/app/app.module.ts
Original file line number Diff line number Diff line change
@@ -1,27 +1,27 @@
import { BrowserModule } from '@angular/platform-browser';
import { CUSTOM_ELEMENTS_SCHEMA, NgModule } from '@angular/core';
import { HttpClientModule, HTTP_INTERCEPTORS, HttpClient } from '@angular/common/http';
import { TranslateHttpLoader } from '@ngx-translate/http-loader';
import { environment } from '../environments/environment';
import { LayoutsModule } from './layouts/layouts.module';
import { NgxResgridLibModule } from '@resgrid/ngx-resgridlib';
import { AppRoutingModule } from './app-routing.module';
import { AppComponent } from './app.component';
import { NgxSpinnerModule } from 'ngx-spinner';
import { StoreModule } from '@ngrx/store';
import { metaReducers, reducers } from './store/reducers';
import { EffectsModule } from '@ngrx/effects';
import { StoreRouterConnectingModule } from '@ngrx/router-store';
import { StoreDevtoolsModule } from '@ngrx/store-devtools';
import { AuthModule } from './features/auth/auth.module';
import { LeafletModule } from '@asymmetrik/ngx-leaflet';
import { VoiceModule } from './features/voice/voice.module';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import { MappingModule } from './features/mapping/mapping.module';
import { TranslateModule, TranslateLoader } from '@ngx-translate/core';
import { BrowserModule } from "@angular/platform-browser";
import { CUSTOM_ELEMENTS_SCHEMA, NgModule } from "@angular/core";
import { HttpClientModule, HTTP_INTERCEPTORS, HttpClient } from "@angular/common/http";
import { TranslateHttpLoader } from "@ngx-translate/http-loader";
import { environment } from "../environments/environment";
import { LayoutsModule } from "./layouts/layouts.module";
import { NgxResgridLibModule } from "@resgrid/ngx-resgridlib";
import { AppRoutingModule } from "./app-routing.module";
import { AppComponent } from "./app.component";
import { NgxSpinnerModule } from "ngx-spinner";
import { StoreModule } from "@ngrx/store";
import { metaReducers, reducers } from "./store/reducers";
import { EffectsModule } from "@ngrx/effects";
import { StoreRouterConnectingModule } from "@ngrx/router-store";
import { StoreDevtoolsModule } from "@ngrx/store-devtools";
import { AuthModule } from "./features/auth/auth.module";
import { LeafletModule } from "@asymmetrik/ngx-leaflet";
import { VoiceModule } from "./features/voice/voice.module";
import { BrowserAnimationsModule } from "@angular/platform-browser/animations";
import { MappingModule } from "./features/mapping/mapping.module";
import { TranslateModule, TranslateLoader } from "@ngx-translate/core";

export function createTranslateLoader(http: HttpClient): any {
return new TranslateHttpLoader(http, 'assets/i18n/', '.json');
return new TranslateHttpLoader(http, "assets/i18n/", ".json");
}

let getBaseUrl = (): string => {
Expand All @@ -34,26 +34,24 @@ let getBaseUrl = (): string => {
};

@NgModule({
declarations: [
AppComponent
],
declarations: [AppComponent],
imports: [
BrowserModule,
HttpClientModule,
AppRoutingModule,
NgxResgridLibModule.forRoot({
baseApiUrl: getBaseUrl,
apiVersion: 'v4',
clientId: 'RgDispatchApp',
apiVersion: "v4",
clientId: "RgDispatchApp",
googleApiKey: environment.googleMapsKey,
channelUrl: environment.channelUrl,
channelHubName: environment.channelHubName,
realtimeGeolocationHubName: environment.realtimeGeolocationHubName,
logLevel: environment.logLevel,
isMobileApp: true,
cacheProvider: null,
storageProvider: null
}),
storageProvider: null,
}),
BrowserAnimationsModule,
LeafletModule,
NgxSpinnerModule,
Expand All @@ -62,27 +60,27 @@ let getBaseUrl = (): string => {
StoreRouterConnectingModule.forRoot(),
StoreDevtoolsModule.instrument({
maxAge: 10, // number of states to retain
name: 'Resgrid Dispatch',
logOnly: environment.production
name: "Resgrid Dispatch",
logOnly: environment.production,
}),
TranslateModule.forRoot({
loader: {
provide: TranslateLoader,
useFactory: createTranslateLoader,
deps: [HttpClient]
}
deps: [HttpClient],
},
}),
AuthModule,
VoiceModule,
LayoutsModule,
MappingModule
MappingModule,
],
providers: [
//{ provide: HTTP_INTERCEPTORS, useClass: JwtInterceptor, multi: true },
//{ provide: HTTP_INTERCEPTORS, useClass: ErrorInterceptor, multi: true },
//{ provide: HTTP_INTERCEPTORS, useClass: FakeBackendInterceptor, multi: true },
],
schemas: [CUSTOM_ELEMENTS_SCHEMA],
bootstrap: [AppComponent]
bootstrap: [AppComponent],
})
export class AppModule { }
export class AppModule {}
11 changes: 3 additions & 8 deletions src/app/features/profile/pages/edit-profile/edit-profile.page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,10 @@ export class EditProfilePage implements OnInit, AfterViewInit {
public microphones: IDevice[] = [];
public selectedMicrophone: IDevice;

constructor(private router: Router) {

}
constructor(private router: Router) {}

ngOnInit(): void {
this.breadCrumbItems = [
{ label: "Resgrid Dispatch" },
{ label: "Edit Profile", active: true },
];
this.breadCrumbItems = [{ label: "Resgrid Dispatch" }, { label: "Edit Profile", active: true }];
}

ngAfterViewInit(): void {
Expand All @@ -32,6 +27,6 @@ export class EditProfilePage implements OnInit, AfterViewInit {

public save() {
//this.deviceService.setMicSelected(this.selectedMicrophone?.device);
this.router.navigate(['/home']);
this.router.navigate(["/home"]);
}
}
46 changes: 23 additions & 23 deletions src/app/features/voice/effects/voice.effect.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ export class VoiceEffects {
})),
tap((data) => {}),
// If request fails, dispatch failed action
catchError(() => of({ type: voiceAction.VoiceActionTypes.GET_VOIPINFO_FAIL }))
)
)
)
catchError(() => of({ type: voiceAction.VoiceActionTypes.GET_VOIPINFO_FAIL })),
),
),
),
);

getVoipInfoSuccess$ = createEffect(() =>
Expand All @@ -38,8 +38,8 @@ export class VoiceEffects {
map((data) => ({
type: voiceAction.VoiceActionTypes.START_VOIP_SERVICES,
payload: data.payload,
}))
)
})),
),
);

startVoipServices$ = createEffect(
Expand All @@ -48,9 +48,9 @@ export class VoiceEffects {
ofType<voiceAction.StartVoipServices>(voiceAction.VoiceActionTypes.START_VOIP_SERVICES),
tap((action) => {
//this.voiceProvider.startVoipServices(action.payload);
})
}),
),
{ dispatch: false }
{ dispatch: false },
);

setNoChannel$ = createEffect(
Expand All @@ -60,9 +60,9 @@ export class VoiceEffects {
tap((data) => {
//this.voiceProvider.disconnect();
//this.openViduService.leaveSession();
})
}),
),
{ dispatch: false }
{ dispatch: false },
);

setActiveChannel$ = createEffect(() =>
Expand All @@ -83,10 +83,10 @@ export class VoiceEffects {
}),
map((data) => ({
type: voiceAction.VoiceActionTypes.DONE,
}))
)
)
)
})),
),
),
),
);

voipCallStartTransmitting$ = createEffect(
Expand All @@ -96,9 +96,9 @@ export class VoiceEffects {
tap((data) => {
//this.voiceProvider.unmute();
//this.openViduService.unmute();
})
}),
),
{ dispatch: false }
{ dispatch: false },
);

voipCallStopTransmitting$ = createEffect(
Expand All @@ -108,27 +108,27 @@ export class VoiceEffects {
tap((data) => {
//this.voiceProvider.mute();
//this.openViduService.mute();
})
}),
),
{ dispatch: false }
{ dispatch: false },
);

addOpenViduStream$ = createEffect(() =>
this.actions$.pipe(
ofType<voiceAction.AddOpenViduStream>(voiceAction.VoiceActionTypes.ADD_OPENVIDU_STREAM),
map((data) => ({
type: voiceAction.VoiceActionTypes.DONE,
}))
)
})),
),
);

removeOpenViduStream$ = createEffect(() =>
this.actions$.pipe(
ofType<voiceAction.RemoveOpenViduStream>(voiceAction.VoiceActionTypes.REMOVE_OPENVIDU_STREAM),
map((data) => ({
type: voiceAction.VoiceActionTypes.DONE,
}))
)
})),
),
);

done$ = createEffect(() => this.actions$.pipe(ofType<voiceAction.Done>(voiceAction.VoiceActionTypes.DONE)), { dispatch: false });
Expand All @@ -139,6 +139,6 @@ export class VoiceEffects {
//private voiceProvider: KazooVoiceService,
private voiceService: VoiceService,
private homeStore: Store<HomeState>,
private authStore: Store<AuthState>
private authStore: Store<AuthState>,
) {}
}
2 changes: 1 addition & 1 deletion src/app/layouts/layout/layout.component.html
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
<app-vertical></app-vertical>
<!--<app-voice-footer></app-voice-footer>-->
<!--<app-voice-footer></app-voice-footer>-->
6 changes: 2 additions & 4 deletions src/assets/scss/app-dark.scss
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
@import "custom/components/demos";
@import "custom/components/print";


// Plugins
@import "custom/plugins/custom-scrollbar";
@import "custom/plugins/calendar";
Expand All @@ -54,7 +53,6 @@
@import "custom/plugins/google-map";
@import "custom/plugins/vector-maps";


// Pages
@import "custom/pages/authentication";
@import "custom/pages/ecommerce";
Expand All @@ -66,5 +64,5 @@
@import "custom/pages/extras-pages";

ngb-modal-backdrop {
z-index: 1040 !important;
}
z-index: 1040 !important;
}
8 changes: 4 additions & 4 deletions src/assets/scss/app.scss
Original file line number Diff line number Diff line change
Expand Up @@ -71,10 +71,10 @@
// @import "custom/rtl/pages-rtl";

.required {
font-style: italic;
color: cornflowerblue;
font-style: italic;
color: cornflowerblue;
}

ngb-modal-backdrop {
z-index: 1040 !important;
}
z-index: 1040 !important;
}