feat: view fixed-deposit account page (#959)

Fixes: #225
This commit is contained in:
Karan Takalkar
2020-07-02 20:49:49 +05:30
committed by GitHub
parent 50dbb7b6e6
commit 87604b4e3e
32 changed files with 1333 additions and 2 deletions
@@ -0,0 +1,48 @@
/** Angular Imports */
import { Injectable } from '@angular/core';
import { HttpClient, HttpParams } from '@angular/common/http';
/** rxjs Imports */
import { Observable } from 'rxjs';
/**
* Fixed Deposits Service.
*/
@Injectable({
providedIn: 'root'
})
export class FixedDepositsService {
constructor(private http: HttpClient) {}
/**
* @param accountId Account Id of group to get data for.
* @returns {Observable<any>} Fixed Deposits data.
*/
getFixedDepositsAccountData(accountId: string): Observable<any> {
const httpParams = new HttpParams().set('associations', 'all');
return this.http.get(`/fixeddepositaccounts/${accountId}`, { params: httpParams });
}
/**
* @param clientId Client Id
* @param clientName Client Name
* @param fromAccountId Account Id
* @param locale Locale
* @param dateFormat Date Format
* @returns {Observable<any>} Standing Instructions
*/
getStandingInstructions(
clientId: string, clientName: string, fromAccountId: string,
locale: string, dateFormat: string): Observable<any> {
const httpParams = new HttpParams()
.set('clientId', clientId)
.set('clientName', clientName)
.set('fromAccountId', fromAccountId)
.set('fromAccountType', '2')
.set('locale', locale)
.set('dateFormat', dateFormat);
return this.http.get(`/standinginstructions`, { params: httpParams });
}
}