Product Sale Module done (Sales Detail) -- need to rename the permission
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
import {Injectable} from '@angular/core';
|
||||
import {ActivatedRouteSnapshot, Resolve, RouterStateSnapshot} from '@angular/router';
|
||||
import {Observable} from 'rxjs/internal/Observable';
|
||||
import {ProductSaleReport} from './product-sale-report';
|
||||
import {ProductSaleReportService} from './product-sale-report.service';
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
export class ProductSaleReportResolver implements Resolve<ProductSaleReport> {
|
||||
|
||||
constructor(private ser: ProductSaleReportService) {
|
||||
}
|
||||
|
||||
resolve(route: ActivatedRouteSnapshot, state: RouterStateSnapshot): Observable<ProductSaleReport> {
|
||||
const startDate = route.queryParamMap.get('startDate') || null;
|
||||
const finishDate = route.queryParamMap.get('finishDate') || null;
|
||||
return this.ser.get(startDate, finishDate);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user