feat: add currencies component (#505)

Fixes: #151
This commit is contained in:
punwai
2019-12-10 21:11:29 +03:00
committed by Abhay Chawla
parent be0366cc05
commit cebaf39cf2
9 changed files with 186 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 '../organization.service';
/**
* Currencies data resolver.
*/
@Injectable()
export class CurrenciesResolver implements Resolve<Object> {
/**
* @param {OrganizationService} organizationService Organization service.
*/
constructor(private organizationService: OrganizationService) {}
/**
* Returns the currencies data.
* @returns {Observable<any>}
*/
resolve(): Observable<any> {
return this.organizationService.getCurrencies();
}
}