@@ -0,0 +1,32 @@
|
||||
/** Angular Imports */
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Resolve, ActivatedRouteSnapshot } from '@angular/router';
|
||||
|
||||
/** rxjs Imports */
|
||||
import { Observable } from 'rxjs';
|
||||
|
||||
/** Custom Services */
|
||||
import { GroupsService } from '../groups.service';
|
||||
|
||||
/**
|
||||
* Group Accounts data resolver.
|
||||
*/
|
||||
@Injectable()
|
||||
export class GroupAccountsResolver implements Resolve<Object> {
|
||||
|
||||
/**
|
||||
* @param {GroupsService} GroupsService Groups service.
|
||||
*/
|
||||
constructor(private groupsService: GroupsService) { }
|
||||
|
||||
/**
|
||||
* Returns the Group's Acccounts data.
|
||||
* @param {ActivatedRouteSnapshot} route Route Snapshot.
|
||||
* @returns {Observable<any>}
|
||||
*/
|
||||
resolve(route: ActivatedRouteSnapshot): Observable<any> {
|
||||
const groupId = route.parent.paramMap.get('groupId');
|
||||
return this.groupsService.getGroupAccountsData(groupId);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
/** Angular Imports */
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Resolve, ActivatedRouteSnapshot } from '@angular/router';
|
||||
|
||||
/** rxjs Imports */
|
||||
import { Observable } from 'rxjs';
|
||||
|
||||
/** Custom Services */
|
||||
import { GroupsService } from '../groups.service';
|
||||
|
||||
/**
|
||||
* Groups Client Members data resolver.
|
||||
*/
|
||||
@Injectable()
|
||||
export class GroupClientMembersResolver implements Resolve<Object> {
|
||||
|
||||
/**
|
||||
* @param {GroupsService} GroupsService Groups service.
|
||||
*/
|
||||
constructor(private groupsService: GroupsService) { }
|
||||
|
||||
/**
|
||||
* Returns the Group's Client Members data.
|
||||
* @param {ActivatedRouteSnapshot} route Route Snapshot.
|
||||
* @returns {Observable<any>}
|
||||
*/
|
||||
resolve(route: ActivatedRouteSnapshot): Observable<any> {
|
||||
const groupId = route.parent.paramMap.get('groupId');
|
||||
return this.groupsService.getGroupClientMembers(groupId);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
/** Angular Imports */
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Resolve, ActivatedRouteSnapshot } from '@angular/router';
|
||||
|
||||
/** rxjs Imports */
|
||||
import { Observable } from 'rxjs';
|
||||
|
||||
/** Custom Services */
|
||||
import { GroupsService } from '../groups.service';
|
||||
|
||||
/**
|
||||
* Group Summary resolver.
|
||||
*/
|
||||
@Injectable()
|
||||
export class GroupSummaryResolver implements Resolve<Object> {
|
||||
|
||||
/**
|
||||
* @param {GroupsService} GroupsService Groups service.
|
||||
*/
|
||||
constructor(private groupsService: GroupsService) { }
|
||||
|
||||
/**
|
||||
* Returns the Group Summary data.
|
||||
* @param {ActivatedRouteSnapshot} route Route Snapshot.
|
||||
* @returns {Observable<any>}
|
||||
*/
|
||||
resolve(route: ActivatedRouteSnapshot): Observable<any> {
|
||||
const groupId = route.parent.paramMap.get('groupId');
|
||||
return this.groupsService.getGroupSummary(groupId);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
/** Angular Imports */
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Resolve, ActivatedRouteSnapshot } from '@angular/router';
|
||||
|
||||
/** rxjs Imports */
|
||||
import { Observable } from 'rxjs';
|
||||
|
||||
/** Custom Services */
|
||||
import { GroupsService } from '../groups.service';
|
||||
|
||||
/**
|
||||
* Groups data resolver.
|
||||
*/
|
||||
@Injectable()
|
||||
export class GroupViewResolver implements Resolve<Object> {
|
||||
|
||||
/**
|
||||
* @param {GroupsService} GroupsService Groups service.
|
||||
*/
|
||||
constructor(private groupsService: GroupsService) { }
|
||||
|
||||
/**
|
||||
* Returns the Groups data.
|
||||
* @param {ActivatedRouteSnapshot} route Route Snapshot
|
||||
* @returns {Observable<any>}
|
||||
*/
|
||||
resolve(route: ActivatedRouteSnapshot): Observable<any> {
|
||||
const groupId = route.paramMap.get('groupId');
|
||||
return this.groupsService.getGroupData(groupId);
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user