From 1328dd726fb7ad240f2e9d5266afb556d49a3fed Mon Sep 17 00:00:00 2001 From: Sai Krishna Metpalli <310911@NTTDATA.COM> Date: Thu, 28 Mar 2024 06:21:56 -0700 Subject: [PATCH 1/3] TCVP-2771: fixed sorting --- .../staff-workbench/ticket-inbox/ticket-inbox.component.html | 4 +--- .../staff-workbench/ticket-inbox/ticket-inbox.component.ts | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/frontend/staff-portal/src/app/components/staff-workbench/ticket-inbox/ticket-inbox.component.html b/src/frontend/staff-portal/src/app/components/staff-workbench/ticket-inbox/ticket-inbox.component.html index 387a13c96..8f4b8d6f3 100644 --- a/src/frontend/staff-portal/src/app/components/staff-workbench/ticket-inbox/ticket-inbox.component.html +++ b/src/frontend/staff-portal/src/app/components/staff-workbench/ticket-inbox/ticket-inbox.component.html @@ -25,8 +25,6 @@ - -
@@ -75,7 +73,7 @@ - + diff --git a/src/frontend/staff-portal/src/app/components/staff-workbench/ticket-inbox/ticket-inbox.component.ts b/src/frontend/staff-portal/src/app/components/staff-workbench/ticket-inbox/ticket-inbox.component.ts index 16a861bd0..06837c4e2 100644 --- a/src/frontend/staff-portal/src/app/components/staff-workbench/ticket-inbox/ticket-inbox.component.ts +++ b/src/frontend/staff-portal/src/app/components/staff-workbench/ticket-inbox/ticket-inbox.component.ts @@ -30,7 +30,7 @@ export class TicketInboxComponent implements OnInit { 'submittedTs', 'ticketNumber', 'disputantSurname', - 'disputantGivenNames', + 'disputantGivenName1', 'status', 'requestCourtAppearanceYn', 'disputantDetectedOcrIssues', From d9445adbacdf816056813bb932491ff409f4715f Mon Sep 17 00:00:00 2001 From: Sai Krishna Metpalli <310911@NTTDATA.COM> Date: Thu, 28 Mar 2024 08:28:25 -0700 Subject: [PATCH 2/3] TCVP-2771: fixed the page count --- .../staff-workbench/ticket-inbox/ticket-inbox.component.ts | 7 +++++-- .../staff-portal/src/app/services/dispute.service.ts | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/frontend/staff-portal/src/app/components/staff-workbench/ticket-inbox/ticket-inbox.component.ts b/src/frontend/staff-portal/src/app/components/staff-workbench/ticket-inbox/ticket-inbox.component.ts index 06837c4e2..38d7c54ec 100644 --- a/src/frontend/staff-portal/src/app/components/staff-workbench/ticket-inbox/ticket-inbox.component.ts +++ b/src/frontend/staff-portal/src/app/components/staff-workbench/ticket-inbox/ticket-inbox.component.ts @@ -1,11 +1,10 @@ import { Component, OnInit, ViewChild, AfterViewInit, Output, EventEmitter, Input } from '@angular/core'; import { MatLegacyTableDataSource as MatTableDataSource } from '@angular/material/legacy-table'; -import { MatSort, Sort } from '@angular/material/sort'; +import { Sort } from '@angular/material/sort'; import { DisputeService, Dispute } from 'app/services/dispute.service'; import { DisputeRequestCourtAppearanceYn, DisputeDisputantDetectedOcrIssues, DisputeStatus, DisputeSystemDetectedOcrIssues, PagedDisputeListItemCollection, SortDirection } from 'app/api'; import { LoggerService } from '@core/services/logger.service'; import { AuthService, KeycloakProfile } from 'app/services/auth.service'; -import { DateUtil } from '@shared/utils/date-util'; import { TableFilter, TableFilterKeys } from '@shared/models/table-filter-options.model'; import { TableFilterService } from 'app/services/table-filter.service'; @@ -54,6 +53,7 @@ export class TicketInboxComponent implements OnInit { private disputeService: DisputeService, private logger: LoggerService, private authService: AuthService, + private tableFilterService: TableFilterService, ) { this.disputeService.refreshDisputes.subscribe(x => { this.getAllDisputes(); @@ -69,6 +69,9 @@ export class TicketInboxComponent implements OnInit { }) // when authentication token available, get data + let dataFilter: TableFilter = this.tableFilterService.tableFilters[this.tabIndex]; + dataFilter.status = dataFilter.status ?? ""; + this.filters = dataFilter; this.getAllDisputes(); this.countNewTickets(); } diff --git a/src/frontend/staff-portal/src/app/services/dispute.service.ts b/src/frontend/staff-portal/src/app/services/dispute.service.ts index 481853ba1..533db1d77 100644 --- a/src/frontend/staff-portal/src/app/services/dispute.service.ts +++ b/src/frontend/staff-portal/src/app/services/dispute.service.ts @@ -121,7 +121,7 @@ export class DisputeService implements IDisputeService { return this.disputeApiService.apiDisputeDisputesGet(filters.status ? undefined : [ExcludeStatus.Cancelled, ExcludeStatus.Processing, ExcludeStatus.Rejected, ExcludeStatus.Concluded], filters.ticketNumber, filters.disputantSurname, filters.status ? [filters.status] : [DisputeStatus.New, DisputeStatus.Validated], filters.dateSubmittedFrom, - filters.dateSubmittedTo, undefined, sortBy, sortDirection, undefined, pageNumber, 10) + filters.dateSubmittedTo, undefined, sortBy, sortDirection, undefined, pageNumber, 25) .pipe( map((response: PagedDisputeListItemCollection) => { this.logger.info('DisputeService::getDisputes', response); From 82df08e3832ab3a54cb9606ba16dcbc739edd1b7 Mon Sep 17 00:00:00 2001 From: Sai Krishna Metpalli <310911@NTTDATA.COM> Date: Thu, 28 Mar 2024 08:39:25 -0700 Subject: [PATCH 3/3] TCVP-2771: fixed filtering --- .../staff-workbench/ticket-inbox/ticket-inbox.component.ts | 2 ++ .../src/app/components/table-filters/table-filters.component.ts | 1 + 2 files changed, 3 insertions(+) diff --git a/src/frontend/staff-portal/src/app/components/staff-workbench/ticket-inbox/ticket-inbox.component.ts b/src/frontend/staff-portal/src/app/components/staff-workbench/ticket-inbox/ticket-inbox.component.ts index 38d7c54ec..0b4f629a2 100644 --- a/src/frontend/staff-portal/src/app/components/staff-workbench/ticket-inbox/ticket-inbox.component.ts +++ b/src/frontend/staff-portal/src/app/components/staff-workbench/ticket-inbox/ticket-inbox.component.ts @@ -120,6 +120,7 @@ export class TicketInboxComponent implements OnInit { // called on keyup in filter field onApplyFilter(dataFilters: TableFilter) { this.filters = dataFilters; + this.currentPage = 1; this.getAllDisputes(); } @@ -130,6 +131,7 @@ export class TicketInboxComponent implements OnInit { sortData(sort: Sort){ this.sortBy = [sort.active]; this.sortDirection = [sort.direction ? sort.direction as SortDirection : SortDirection.Desc]; + this.currentPage = 1; this.getAllDisputes(); } diff --git a/src/frontend/staff-portal/src/app/components/table-filters/table-filters.component.ts b/src/frontend/staff-portal/src/app/components/table-filters/table-filters.component.ts index 5b00686f4..2acd47936 100644 --- a/src/frontend/staff-portal/src/app/components/table-filters/table-filters.component.ts +++ b/src/frontend/staff-portal/src/app/components/table-filters/table-filters.component.ts @@ -39,6 +39,7 @@ export class TableFiltersComponent implements OnInit { // Put this call in a Timeout to keep UI responsive. setTimeout(() => { this.tableFilterService.tableFilters[this.tabIndex] = this.dataFilters; + this.dataFilters.status = this.dataFilters.status ?? ""; this.onFilterChanged.emit(this.dataFilters); }, 100); }
Given Name(s)