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