feat(shares): close share account directly on withdrawal approval; drop separate closure-request flow
Replaces the auto-submit-closure-request behavior with an immediate account close, in the same approval action, when a withdrawal brings shares to zero — matching the backend's new single-step close-on- approval flow. Removes the now-unneeded Share Closure Request feature entirely: dedicated create/list components (Clerk Dashboard + Approval Center), routes, nav links, and the "eligible for closure" banner on the Share Account view. Also adds a clear "this will close the account" notice wherever a withdrawal would zero out the account's shares — the standalone Share Withdrawal Request page (submit + review) and Transaction Entry's Share Redemption Transfer confirm dialog — styled as an amber warning callout rather than a plain info line. Trims that confirm dialog to just the required details (dropped the redundant ECS A/C No. line and the validation-checklist block) and compacts its overall size.
This commit is contained in:
@@ -148,6 +148,16 @@
|
||||
</label>
|
||||
</div>
|
||||
|
||||
@if (account && remainingShares === 0) {
|
||||
<div class="swr-close-notice">
|
||||
<mat-icon>lock</mat-icon>
|
||||
<span>
|
||||
This withdraws <strong>all</strong> shares on this account. Approving it will
|
||||
<strong>close the share account automatically</strong> — no separate closure step is needed.
|
||||
</span>
|
||||
</div>
|
||||
}
|
||||
|
||||
@if (!isReview) {
|
||||
<div class="inv-form-actions">
|
||||
<button
|
||||
@@ -355,9 +365,14 @@
|
||||
{{ requestedShares }} @ ₹{{ unitPrice | number: '1.2-2' }} = ₹{{ withdrawalValue | number: '1.2-2' }}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<tr [class.swr-close-row]="remainingShares === 0">
|
||||
<td>Remaining Shares After Withdrawal</td>
|
||||
<td>{{ remainingShares }}</td>
|
||||
<td>
|
||||
{{ remainingShares }}
|
||||
@if (remainingShares === 0) {
|
||||
<span class="swr-close-tag"><mat-icon>lock</mat-icon> Account will be closed on approval</span>
|
||||
}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Requested Date</td>
|
||||
|
||||
Reference in New Issue
Block a user