feat: view savings transaction page (#933)

Fixes: #932
This commit is contained in:
Karan Takalkar
2020-06-27 17:31:19 +05:30
committed by GitHub
parent 8e86ccab8f
commit 6ed67a763d
15 changed files with 298 additions and 6 deletions
+12 -1
View File
@@ -194,14 +194,25 @@ export class SavingsService {
return this.http.post(`/savingsaccounts/${accountId}`, data, { params: httpParams });
}
/**
* @param {string} accountId Savings Account Id
* @param {string} transactionId Transaction Id
*/
getSavingsAccountTransaction(accountId: string, transactionId: string) {
return this.http.get(`/savingsaccounts/${accountId}/transactions/${transactionId}`);
}
/**
* @param {string} accountId Savings Account Id
* @param {string} command Command
* @param {any} data Data
* @returns {Observable<any>} Savings data.
*/
executeSavingsAccountTransactionsCommand(accountId: string, command: string, data: any): Observable<any> {
executeSavingsAccountTransactionsCommand(accountId: string, command: string, data: any, transactionId?: any): Observable<any> {
const httpParams = new HttpParams().set('command', command);
if (transactionId) {
return this.http.post(`/savingsaccounts/${accountId}/transactions/${transactionId}`, data, { params: httpParams });
}
return this.http.post(`/savingsaccounts/${accountId}/transactions`, data, { params: httpParams });
}