feat: implement share account actions, view components, and pending checker tasks

This commit is contained in:
2026-08-27 10:23:25 +05:30
parent 1273bdbe0e
commit 83e58376cb
32 changed files with 1699 additions and 93 deletions
+28
View File
@@ -122,6 +122,21 @@ export class SharesService {
return this.http.post(`/accounts/share/${accountId}`, data, { params: httpParams });
}
/**
* Whether a new additional-share tranche can be funded from the member's linked savings.
*
* Tranche-scoped, unlike `/sharesavingsdebit/eligibility`: that one values an account's first
* application by summing every purchase on the account, which for a further tranche would quote
* the member's whole holding history and call an already-settled account ineligible.
*
* @returns {Observable<any>} `{ eligible, reason, requestedShares, unitPrice, amount,
* savingsAccountNo, savingsBalance }`.
*/
getAdditionalSharesSavingsEligibility(accountId: string, requestedShares: number): Observable<any> {
const httpParams = new HttpParams().set('requestedShares', String(requestedShares));
return this.http.get(`/shareaccounts/${accountId}/additionalshares/savings-eligibility`, { params: httpParams });
}
/**
* @param {string} accountId Shares Account Id.
* @param {any} data Details edit payload.
@@ -146,6 +161,19 @@ export class SharesService {
return this.http.get(`/shareaccounts/edit/pending`);
}
/**
* Share accounts submitted and awaiting a checker's approval.
*
* Its own endpoint rather than `/accounts/share`, which only lists ACTIVE accounts and returns the
* whole account graph per row; this returns just the member, product, requested shares and value a
* checker decides on.
*
* @returns {Observable<any>} One row per pending account.
*/
getPendingShareAccounts(): Observable<any> {
return this.http.get('/shareaccounts/pending');
}
/**
* @param {string} accountId Shares Account Id.
* @returns {Observable<any>}