WEB-747 Unable to approve or activate the GSIM account from group level (#3184)

This commit is contained in:
Soni Jay
2026-02-18 17:46:39 -06:00
committed by GitHub
parent b494c29821
commit b7e9068556
17 changed files with 172 additions and 22 deletions
@@ -43,10 +43,47 @@
<td mat-cell *matCellDef="let element">{{ element.parentPrincipalAmount }}</td>
</ng-container>
<ng-container matColumnDef="status">
<th mat-header-cell *matHeaderCellDef>{{ 'labels.inputs.Status' | translate }}</th>
<td mat-cell *matCellDef="let element">
@if (element.status) {
<span [ngClass]="element.status.code | statusLookup">
{{ element.status.value }}
</span>
}
</td>
</ng-container>
<ng-container matColumnDef="actions">
<th mat-header-cell *matHeaderCellDef>{{ 'labels.inputs.Actions' | translate }}</th>
<td mat-cell *matCellDef="let element">
@if (element.status?.submittedAndPendingApproval) {
<button
mat-raised-button
color="primary"
(click)="routeEdit($event)"
[routerLink]="['/loans-accounts', element.childLoanId, 'actions', 'Approve']"
>
<i class="fa fa-check"></i> {{ 'buttons.Approve' | translate }}
</button>
}
@if (element.status?.waitingForDisbursal) {
<button
mat-raised-button
color="primary"
(click)="routeEdit($event)"
[routerLink]="['/loans-accounts', element.childLoanId, 'actions', 'Disburse']"
>
<i class="fa fa-flag"></i> {{ 'buttons.Disburse' | translate }}
</button>
}
</td>
</ng-container>
<tr mat-header-row *matHeaderRowDef="displayedColumns"></tr>
<tr
mat-row
[routerLink]="['../../', row.childLoanId, 'general']"
[routerLink]="['/loans-accounts', row.childLoanId, 'general']"
*matRowDef="let row; columns: displayedColumns"
></tr>
</table>
@@ -24,6 +24,8 @@ import {
} from '@angular/material/table';
import { ActivatedRoute, RouterLink } from '@angular/router';
import { NgClass } from '@angular/common';
import { StatusLookupPipe } from 'app/pipes/status-lookup.pipe';
import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module';
/**
@@ -44,7 +46,9 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module';
MatHeaderRowDef,
MatHeaderRow,
MatRowDef,
MatRow
MatRow,
NgClass,
StatusLookupPipe
]
})
export class GlimAccountComponent implements OnInit {
@@ -58,7 +62,9 @@ export class GlimAccountComponent implements OnInit {
'clientName',
'loanAccountNumber',
'clientPrincipalLoan',
'groupPrincipalLoan'
'groupPrincipalLoan',
'status',
'actions'
];
/** Data source for charge overview table. */
dataSource: MatTableDataSource<any>;
@@ -89,4 +95,12 @@ export class GlimAccountComponent implements OnInit {
setLoanClientChargeOverview() {
this.dataSource = new MatTableDataSource(this.glimOverviewData);
}
/**
* Stops the propagation to view pages.
* @param $event
*/
routeEdit($event: MouseEvent) {
$event.stopPropagation();
}
}