existing account saving and current add or remove nominee and digital & account features and also FE & RD nominee add or remove
This commit is contained in:
@@ -370,4 +370,49 @@ export class CurrentAccountsService {
|
||||
loadCurrentAccountDocument(currentAccountId: any, data: any): Observable<any> {
|
||||
return this.http.post(`/currentaccounts/${currentAccountId}/documents`, data);
|
||||
}
|
||||
|
||||
/**
|
||||
* Submits a maker-checker edit request (Nominee and/or Digital & Account Features change) for a
|
||||
* current account. The edit is held for checker approval before it is actually applied.
|
||||
* @param {string} accountId Current Account Id
|
||||
* @param {any} data Edit payload — `accountFacilityConfig` and/or `nominee`, plus locale/dateFormat
|
||||
* @returns {Observable<any>}
|
||||
*/
|
||||
submitCurrentAccountEdit(accountId: string, data: any): Observable<any> {
|
||||
return this.http.post(`/currentaccounts/${accountId}/edit`, data);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {string} accountId Current Account Id
|
||||
* @returns {Observable<any>} the pending edit for this account, if any.
|
||||
*/
|
||||
getPendingCurrentAccountEdit(accountId: string): Observable<any> {
|
||||
return this.http.get(`/currentaccounts/${accountId}/edit/pending`);
|
||||
}
|
||||
|
||||
/**
|
||||
* @returns {Observable<any>} all current account edits currently awaiting checker approval.
|
||||
*/
|
||||
getAllPendingCurrentAccountEdits(): Observable<any> {
|
||||
return this.http.get(`/currentaccounts/edit/pending`);
|
||||
}
|
||||
|
||||
/**
|
||||
* Approves a pending current account edit, releasing any hold and applying the proposed changes.
|
||||
* @param {string} accountId Current Account Id
|
||||
* @returns {Observable<any>}
|
||||
*/
|
||||
approveCurrentAccountEdit(accountId: string): Observable<any> {
|
||||
return this.http.post(`/currentaccounts/${accountId}/edit/approve`, {});
|
||||
}
|
||||
|
||||
/**
|
||||
* Rejects a pending current account edit, releasing any hold without applying the changes.
|
||||
* @param {string} accountId Current Account Id
|
||||
* @param {string} rejectReason Optional reason for rejection
|
||||
* @returns {Observable<any>}
|
||||
*/
|
||||
rejectCurrentAccountEdit(accountId: string, rejectReason?: string): Observable<any> {
|
||||
return this.http.post(`/currentaccounts/${accountId}/edit/reject`, { rejectReason: rejectReason || '' });
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user