feat: add create adhoc query component (#573)

Fixes: #537
This commit is contained in:
Oussema.exe
2020-04-27 01:57:25 +05:30
committed by GitHub
parent 11593da32f
commit ee4329ed21
9 changed files with 266 additions and 3 deletions
@@ -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 { OrganizationService } from 'app/organization/organization.service';
/**
* Adhoc Query template data resolver.
*/
@Injectable()
export class AdhocQueryTemplateResolver implements Resolve<Object> {
/**
* @param {OrganizationService} organizationService Organization service.
*/
constructor(private organizationService: OrganizationService) {}
/**
* Returns the adhoc query template data.
* @returns {Observable<any>}
*/
resolve(): Observable<any> {
return this.organizationService.getAdhocQueryTemplate();
}
}