feedback updates

This commit is contained in:
Cyril Joseph 2026-01-17 17:07:28 -04:00
parent 602793d2a4
commit c5df0683a0
3 changed files with 20 additions and 3 deletions

View File

@ -37,7 +37,10 @@ export class HomeService {
issueDate: item.ISSUEDATE || null, issueDate: item.ISSUEDATE || null,
expiryDate: item.EXPDATE || null, expiryDate: item.EXPDATE || null,
orderType: item.ORDERTYPE, orderType: item.ORDERTYPE,
carnetStatus: item.CARNETSTATUS carnetStatus: item.CARNETSTATUS,
securityType: item.SECURITYTYPE,
deliveryType: item.DELIVERYTYPE,
clientName: item.CLIENTNAMNE
})); }));
} }
} }

View File

@ -60,6 +60,11 @@
<td mat-cell *matCellDef="let item">{{ item.applicationName }}</td> <td mat-cell *matCellDef="let item">{{ item.applicationName }}</td>
</ng-container> </ng-container>
<ng-container matColumnDef="clientName">
<th mat-header-cell *matHeaderCellDef mat-sort-header>Client Name</th>
<td mat-cell *matCellDef="let item">{{ item.clientName }}</td>
</ng-container>
<ng-container matColumnDef="holderName"> <ng-container matColumnDef="holderName">
<th mat-header-cell *matHeaderCellDef mat-sort-header>Holder Name</th> <th mat-header-cell *matHeaderCellDef mat-sort-header>Holder Name</th>
<td mat-cell *matCellDef="let item">{{ item.holderName }}</td> <td mat-cell *matCellDef="let item">{{ item.holderName }}</td>
@ -70,6 +75,11 @@
<td mat-cell *matCellDef="let item">{{ item.carnetNumber }}</td> <td mat-cell *matCellDef="let item">{{ item.carnetNumber }}</td>
</ng-container> </ng-container>
<ng-container matColumnDef="securityType">
<th mat-header-cell *matHeaderCellDef mat-sort-header>Security Type</th>
<td mat-cell *matCellDef="let item">{{ item.securityType }}</td>
</ng-container>
<ng-container matColumnDef="usSets"> <ng-container matColumnDef="usSets">
<th mat-header-cell *matHeaderCellDef mat-sort-header>US Sets</th> <th mat-header-cell *matHeaderCellDef mat-sort-header>US Sets</th>
<td mat-cell *matCellDef="let item">{{ item.usSets }}</td> <td mat-cell *matCellDef="let item">{{ item.usSets }}</td>

View File

@ -36,8 +36,10 @@ export class HomeComponent {
filterValue: string = ''; filterValue: string = '';
filterableColumns: any[] = [ filterableColumns: any[] = [
{ value: 'applicationName', displayName: 'Application Name' }, { value: 'applicationName', displayName: 'Application Name' },
{ value: 'clientName', displayName: 'Client Name' },
{ value: 'holderName', displayName: 'Holder Name' }, { value: 'holderName', displayName: 'Holder Name' },
{ value: 'carnetNumber', displayName: 'Carnet Number' }, { value: 'carnetNumber', displayName: 'Carnet Number' },
{ value: 'securityType', displayName: 'Security Type' },
{ value: 'usSets', displayName: 'US Sets' }, { value: 'usSets', displayName: 'US Sets' },
{ value: 'foreignSets', displayName: 'Foreign Sets' }, { value: 'foreignSets', displayName: 'Foreign Sets' },
{ value: 'transitSets', displayName: 'Transit Sets' }, { value: 'transitSets', displayName: 'Transit Sets' },
@ -60,7 +62,7 @@ export class HomeComponent {
this.dataSource.sort = value; this.dataSource.sort = value;
} }
displayedColumns: string[] = ['applicationName', 'holderName', 'carnetNumber', 'usSets', 'foreignSets', 'transitSets', 'carnetValue', 'issueDate', 'expiryDate', 'orderType', 'carnetStatus']; displayedColumns: string[] = ['applicationName', 'clientName', 'holderName', 'carnetNumber', 'securityType', 'usSets', 'foreignSets', 'transitSets', 'carnetValue', 'issueDate', 'expiryDate', 'orderType', 'carnetStatus'];
private homeService = inject(HomeService); private homeService = inject(HomeService);
private errorHandler = inject(ApiErrorHandlerService); private errorHandler = inject(ApiErrorHandlerService);
@ -111,7 +113,7 @@ export class HomeComponent {
this.homeService.getCarnetDataByStatus(event.spid, event.carnetStatus).subscribe({ this.homeService.getCarnetDataByStatus(event.spid, event.carnetStatus).subscribe({
next: (carnetDetails) => { next: (carnetDetails) => {
this.isLoading = false; this.isLoading = false;
this.showTable = true; this.showTable = carnetDetails.length > 0;
this.dataSource.data = carnetDetails; this.dataSource.data = carnetDetails;
this.dataSource.paginator = this.paginator; this.dataSource.paginator = this.paginator;
this.dataSource.sort = this.sort; this.dataSource.sort = this.sort;
@ -152,8 +154,10 @@ export class HomeComponent {
prepareDownloadData(): any[] { prepareDownloadData(): any[] {
return this.dataSource.data.map(item => ({ return this.dataSource.data.map(item => ({
'Application Name': item.applicationName, 'Application Name': item.applicationName,
'Client Name': item.clientName,
'Holder Name': item.holderName, 'Holder Name': item.holderName,
'Carnet Number': item.carnetNumber, 'Carnet Number': item.carnetNumber,
'Security Type': item.securityType,
'US Sets': item.usSets, 'US Sets': item.usSets,
'Foreign Sets': item.foreignSets, 'Foreign Sets': item.foreignSets,
'Transit Sets': item.transitSets, 'Transit Sets': item.transitSets,