@@ -0,0 +1,30 @@
|
||||
/** Angular Imports */
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Resolve } from '@angular/router';
|
||||
|
||||
/** rxjs Imports */
|
||||
import { Observable } from 'rxjs';
|
||||
|
||||
/** Custom Services */
|
||||
import { ReportsService } from '../reports.service';
|
||||
|
||||
/**
|
||||
* Mix Mappings data resolver.
|
||||
*/
|
||||
@Injectable()
|
||||
export class MixMappingsResolver implements Resolve<Object> {
|
||||
|
||||
/**
|
||||
* @param {ReportsService} reportsService Reports service.
|
||||
*/
|
||||
constructor(private reportsService: ReportsService) {}
|
||||
|
||||
/**
|
||||
* Returns Mix Mappings.
|
||||
* @returns {Observable<any>}
|
||||
*/
|
||||
resolve(): Observable<any> {
|
||||
return this.reportsService.getMixMappings();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
/** Angular Imports */
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Resolve } from '@angular/router';
|
||||
|
||||
/** rxjs Imports */
|
||||
import { Observable } from 'rxjs';
|
||||
|
||||
/** Custom Services */
|
||||
import { ReportsService } from '../reports.service';
|
||||
|
||||
/**
|
||||
* Mix Taxononmy data resolver.
|
||||
*/
|
||||
@Injectable()
|
||||
export class MixTaxonomyResolver implements Resolve<Object> {
|
||||
|
||||
/**
|
||||
* @param {ReportsService} reportsService Reports service.
|
||||
*/
|
||||
constructor(private reportsService: ReportsService) {}
|
||||
|
||||
/**
|
||||
* Returns the Mix Taxonomy data.
|
||||
* @returns {Observable<any>}
|
||||
*/
|
||||
resolve(): Observable<any> {
|
||||
return this.reportsService.getMixTaxonomyArray();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
/** Angular Imports */
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Resolve } from '@angular/router';
|
||||
|
||||
/** rxjs Imports */
|
||||
import { Observable } from 'rxjs';
|
||||
|
||||
/** Custom Services */
|
||||
import { ReportsService } from '../reports.service';
|
||||
|
||||
/**
|
||||
* Reports data resolver.
|
||||
*/
|
||||
@Injectable()
|
||||
export class ReportsResolver implements Resolve<Object> {
|
||||
|
||||
/**
|
||||
* @param {ReportsService} reportsService Reports service.
|
||||
*/
|
||||
constructor(private reportsService: ReportsService) {}
|
||||
|
||||
/**
|
||||
* Returns the reports data.
|
||||
* @returns {Observable<any>}
|
||||
*/
|
||||
resolve(): Observable<any> {
|
||||
return this.reportsService.getReports();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
/** Angular Imports */
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Resolve, ActivatedRouteSnapshot } from '@angular/router';
|
||||
|
||||
/** rxjs Imports */
|
||||
import { Observable } from 'rxjs';
|
||||
|
||||
/** Custom Services */
|
||||
import { ReportsService } from '../reports.service';
|
||||
|
||||
/**
|
||||
* Reports data resolver.
|
||||
*/
|
||||
@Injectable()
|
||||
export class RunReportResolver implements Resolve<Object> {
|
||||
|
||||
/**
|
||||
* @param {ReportsService} reportsService Reports service.
|
||||
*/
|
||||
constructor(private reportsService: ReportsService) {}
|
||||
|
||||
/**
|
||||
* Returns the reports data.
|
||||
* @returns {Observable<any>}
|
||||
*/
|
||||
resolve(route: ActivatedRouteSnapshot): Observable<any> {
|
||||
return this.reportsService.getReportParams(route.params['report-name']);
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user