Merge branch 'PRE-PRODUCTION-2026-OSHO' into PRE-PRODUCTION-2026

PRE-PRODUCTION-2026
Naeem Ullah 5 days ago
commit 69912b7366

@ -193,7 +193,7 @@
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
<tr *ngFor="let log of filteredItems | tableFilter: searchText: [ <tr *ngFor="let log of pagedItems | tableFilter: searchText: [
'logId', 'logId',
'porOrgacode', 'porOrgacode',
'transactionID', 'transactionID',

@ -29,7 +29,6 @@ export class TransactionLogsComponent implements OnInit, OnDestroy {
itemsPerPage: number = 10; itemsPerPage: number = 10;
transactionLog: TransactionLog[] = []; transactionLog: TransactionLog[] = [];
isLoading = false; isLoading = false;
pagedItems: any[] = [];
errorMessage: string = ''; errorMessage: string = '';
searchText: string = ''; searchText: string = '';
allItems: TransactionLog[] = []; allItems: TransactionLog[] = [];
@ -135,7 +134,6 @@ export class TransactionLogsComponent implements OnInit, OnDestroy {
this.totalCount = this.transactionLog.length; this.totalCount = this.transactionLog.length;
} }
this.updatePagedItems();
this.isLoading = false; this.isLoading = false;
}, },
error: (err) => { error: (err) => {
@ -144,7 +142,6 @@ export class TransactionLogsComponent implements OnInit, OnDestroy {
this.transactionLog = []; this.transactionLog = [];
this.allItems = []; this.allItems = [];
this.totalCount = 0; this.totalCount = 0;
this.pagedItems = [];
this.isLoading = false; this.isLoading = false;
}, },
complete: () => { complete: () => {
@ -252,8 +249,9 @@ export class TransactionLogsComponent implements OnInit, OnDestroy {
} }
totalPages(): number { totalPages(): number {
if (this.totalCount === 0) return 1;
return Math.ceil(this.totalCount / this.itemsPerPage); return Math.ceil(this.totalCount / this.itemsPerPage);
} }
previousPage(): void { previousPage(): void {
if (this.currentPage > 1) { if (this.currentPage > 1) {
@ -262,14 +260,6 @@ export class TransactionLogsComponent implements OnInit, OnDestroy {
} }
} }
updatePagedItems(): void {
// For client-side display with table filter pipe
const startIndex = (this.currentPage - 1) * this.itemsPerPage;
const endIndex = startIndex + this.itemsPerPage;
this.pagedItems = this.allItems.slice(startIndex, endIndex);
}
nextPage(): void { nextPage(): void {
if (this.currentPage < this.totalPages()) { if (this.currentPage < this.totalPages()) {
this.currentPage++; this.currentPage++;
@ -341,4 +331,10 @@ export class TransactionLogsComponent implements OnInit, OnDestroy {
get isDateFilterActive(): boolean { get isDateFilterActive(): boolean {
return !!this.fromDate || !!this.toDate; return !!this.fromDate || !!this.toDate;
} }
get pagedItems(): TransactionLog[] {
const start = (this.currentPage - 1) * this.itemsPerPage;
return this.allItems.slice(start, start + this.itemsPerPage);
}
} }

@ -58,8 +58,8 @@
(click)="togglePasswordType()" (click)="togglePasswordType()"
[attr.disabled]="isSubmitting ? true : null" [attr.disabled]="isSubmitting ? true : null"
> >
<i class="fas" [class.fa-eye]="newPasswordType === 'password'" <i class="fas" [class.fa-eye]="newPasswordType === 'text'"
[class.fa-eye-slash]="newPasswordType === 'text'"></i> [class.fa-eye-slash]="newPasswordType === 'password'"></i>
</button> </button>
</div> </div>
@ -68,9 +68,6 @@
<div *ngIf="resetPasswordForm.get('newPassword')?.hasError('required')"> <div *ngIf="resetPasswordForm.get('newPassword')?.hasError('required')">
{{ 'fieldRequired' | translate }} {{ 'fieldRequired' | translate }}
</div> </div>
<div *ngIf="resetPasswordForm.get('newPassword')?.hasError('minlength')">
{{ 'passwordMinLength' | translate }}
</div>
<div *ngIf="resetPasswordForm.get('newPassword')?.hasError('maxlength')"> <div *ngIf="resetPasswordForm.get('newPassword')?.hasError('maxlength')">
{{ 'passwordMaxLength' | translate }} {{ 'passwordMaxLength' | translate }}
</div> </div>
@ -105,8 +102,8 @@
(click)="toggleConfirmPasswordType()" (click)="toggleConfirmPasswordType()"
[attr.disabled]="isSubmitting ? true : null" [attr.disabled]="isSubmitting ? true : null"
> >
<i class="fas" [class.fa-eye]="confirmPasswordType === 'password'" <i class="fas" [class.fa-eye]="confirmPasswordType === 'text'"
[class.fa-eye-slash]="confirmPasswordType === 'text'"></i> [class.fa-eye-slash]="confirmPasswordType === 'password'"></i>
</button> </button>
</div> </div>

Loading…
Cancel
Save