feedback updates
This commit is contained in:
parent
6787450019
commit
ca979c7488
@ -304,7 +304,7 @@ export class TravelPlanComponent {
|
||||
|
||||
if (this.applicationType === 'additional' || this.applicationType === 'extend') {
|
||||
const usentriesControl = this.travelForm.get('usaEntries');
|
||||
usentriesControl?.setValidators([Validators.min(1), Validators.max(99)]);
|
||||
usentriesControl?.setValidators([Validators.min(0), Validators.max(99)]);
|
||||
usentriesControl?.updateValueAndValidity();
|
||||
}
|
||||
|
||||
|
||||
@ -28,7 +28,7 @@ export class HolderService {
|
||||
holderType: holder.HOLDERTYPE,
|
||||
uscibMember: holder.USCIBMEMBERFLAG === 'Y',
|
||||
// govAgency: holder.GOVAGENCYFLAG === 'Y',
|
||||
holderName: holder.HOLDERNAME,
|
||||
holderName: holder.NAMEOF,
|
||||
//NAMEQUALIFIER: holder.NAMEQUALIFIER || null,
|
||||
dbaName: holder.ADDLNAME || null,
|
||||
address1: holder.ADDRESS1,
|
||||
|
||||
@ -21,7 +21,7 @@ export class ReplacementService {
|
||||
}
|
||||
|
||||
private mapToExtensionData(extensionDataCollection: any): Replacement {
|
||||
let extensionData = extensionDataCollection?.[0];
|
||||
let extensionData = extensionDataCollection;
|
||||
|
||||
let replacementData: Replacement = {
|
||||
replacementCarnetNumber: extensionData.REPLACECARNETNO,
|
||||
|
||||
@ -39,6 +39,7 @@ export class HomeService {
|
||||
orderType: item.ORDERTYPE,
|
||||
carnetStatus: item.CARNETSTATUS,
|
||||
headerid: item.HEADERID,
|
||||
printGLStatus: item.PRINTGLSTATUS
|
||||
}));
|
||||
}
|
||||
}
|
||||
|
||||
@ -106,7 +106,7 @@
|
||||
<tr matNoDataRow *matNoDataRow>
|
||||
<td [attr.colspan]="displayedColumns.length" class="no-data-message">
|
||||
<mat-icon>info</mat-icon>
|
||||
<span>No records found matching your criteria</span>
|
||||
<span>No records found</span>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
@ -29,21 +29,9 @@ import { environment } from '../../../environments/environment';
|
||||
providers: [{ provide: MatPaginatorIntl, useClass: CustomPaginator }],
|
||||
})
|
||||
export class SearchHolderComponent {
|
||||
private _paginator!: MatPaginator;
|
||||
|
||||
@ViewChild(MatPaginator, { static: false })
|
||||
set paginator(value: MatPaginator) {
|
||||
this._paginator = value;
|
||||
this.dataSource.paginator = value;
|
||||
}
|
||||
get paginator(): MatPaginator {
|
||||
return this._paginator;
|
||||
}
|
||||
|
||||
@ViewChild(MatSort, { static: false })
|
||||
set sort(value: MatSort) {
|
||||
this.dataSource.sort = value;
|
||||
}
|
||||
@ViewChild(MatPaginator, { static: false }) paginator!: MatPaginator;
|
||||
@ViewChild(MatSort, { static: false }) sort!: MatSort;
|
||||
|
||||
@Input() isViewMode = false;
|
||||
@Input() headerid: number = 0;
|
||||
@ -73,8 +61,7 @@ export class SearchHolderComponent {
|
||||
dataSource = new MatTableDataSource<any>([]);
|
||||
|
||||
ngAfterViewInit() {
|
||||
// This is different from other pages to show the item selected in the table.
|
||||
//this.dataSource.paginator = this.paginator;
|
||||
this.dataSource.paginator = this.paginator;
|
||||
this.dataSource.sort = this.sort;
|
||||
}
|
||||
|
||||
@ -93,19 +80,10 @@ export class SearchHolderComponent {
|
||||
});
|
||||
}
|
||||
|
||||
ngOnInit(): void {
|
||||
if (this.allowActions) {
|
||||
this.searchHolders();
|
||||
}
|
||||
}
|
||||
|
||||
ngOnChanges(changes: SimpleChanges): void {
|
||||
if (changes['selectedHolderId']) {
|
||||
if (this.selectedHolderId && this.paginator && this.dataSource.data.length && this.allowActions) {
|
||||
this.goToItemPage(this.selectedHolderId);
|
||||
}
|
||||
|
||||
if (!this.allowActions && this.selectedHolderId) {
|
||||
if (this.selectedHolderId) {
|
||||
this.showSelectedHolder(this.selectedHolderId);
|
||||
}
|
||||
}
|
||||
@ -168,6 +146,11 @@ export class SearchHolderComponent {
|
||||
this.isLoading = true;
|
||||
const filterData: HolderFilter = this.searchForm.value;
|
||||
|
||||
if (!this.searchForm.value.holderName && this.selectedHolderId) {
|
||||
this.showSelectedHolder(this.selectedHolderId);
|
||||
return;
|
||||
}
|
||||
|
||||
this.holderService.getHolders(filterData).pipe(finalize(() => {
|
||||
this.isLoading = false;
|
||||
})).subscribe({
|
||||
@ -290,13 +273,4 @@ export class SearchHolderComponent {
|
||||
// Filter out any empty, null, or undefined parts and then join them.
|
||||
return parts.filter(part => part).join(', ');
|
||||
}
|
||||
|
||||
goToItemPage(holderid: number): void {
|
||||
const itemIndex = this.dataSource.data.findIndex(dataItem => dataItem.holderid === holderid);
|
||||
if (itemIndex > -1 && this.paginator) {
|
||||
const targetPageIndex = Math.floor(itemIndex / this.paginator.pageSize);
|
||||
this.paginator.pageIndex = targetPageIndex;
|
||||
this.dataSource.paginator = this.paginator;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -119,15 +119,20 @@
|
||||
<th mat-header-cell *matHeaderCellDef>Actions</th>
|
||||
<td mat-cell *matCellDef="let item">
|
||||
<div class="action-buttons">
|
||||
<button mat-icon-button color="primary" (click)="editCarnet(item)"
|
||||
<!-- <button mat-icon-button color="primary" (click)="editCarnet(item)"
|
||||
*ngIf="getCarnetStatusLabel(item.carnetStatus) === 'Not Submitted'"
|
||||
matTooltip="Edit">
|
||||
<mat-icon>edit</mat-icon>
|
||||
</button>
|
||||
</button> -->
|
||||
<button matIconButton [matMenuTriggerFor]="carnetActions">
|
||||
<mat-icon>more_horiz</mat-icon>
|
||||
</button>
|
||||
<mat-menu #carnetActions="matMenu">
|
||||
<button mat-menu-item (click)="editCarnet(item)"
|
||||
*ngIf="getCarnetStatusLabel(item.carnetStatus) === 'Not Submitted'">
|
||||
<mat-icon>edit</mat-icon>
|
||||
<span>Edit</span>
|
||||
</button>
|
||||
<button mat-menu-item (click)="viewCarnet(item)">
|
||||
<mat-icon>article</mat-icon>
|
||||
<span>View</span>
|
||||
@ -137,9 +142,10 @@
|
||||
<mat-icon>delete</mat-icon>
|
||||
<span>Delete</span>
|
||||
</button>
|
||||
<button mat-menu-item (click)="printGeneralList(item.headerid)">
|
||||
<button mat-menu-item (click)="printGeneralList(item.headerid)"
|
||||
*ngIf="item.printGLStatus === 'PRINTGL'">
|
||||
<mat-icon>print</mat-icon>
|
||||
<span>Print</span>
|
||||
<span>Print GL</span>
|
||||
</button>
|
||||
<button mat-menu-item (click)="copyCarnet(item.headerid)">
|
||||
<mat-icon>file_copy</mat-icon>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user