Skip to content

Commit

Permalink
Add submission date to PR search results and update default sor field (
Browse files Browse the repository at this point in the history
  • Loading branch information
sandratoh authored May 6, 2024
1 parent d749934 commit 048d8e1
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export class InquirySearchTableComponent {
itemsPerPage = 20;
total = 0;
sortDirection: SortDirection = 'desc';
sortField = 'fileId';
sortField = 'dateSubmitted';
isLoading = false;

constructor(private router: Router) {}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,13 @@
</td>
</ng-container>

<ng-container matColumnDef="dateSubmitted">
<th *matHeaderCellDef mat-header-cell mat-sort-header>Date Submitted to ALC</th>
<td *matCellDef="let element" mat-cell>
{{ element.dateSubmitted | date | emptyColumn }}
</td>
</ng-container>

<ng-container matColumnDef="type">
<th *matHeaderCellDef mat-header-cell mat-sort-header>Type</th>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import { TableChange } from '../search.interface';

interface SearchResult {
fileNumber: string;
dateSubmitted: number;
applicant: string;
localGovernmentName?: string;
referenceId: string;
Expand Down Expand Up @@ -36,13 +37,13 @@ export class PlanningReviewSearchTableComponent {

@Output() tableChange = new EventEmitter<TableChange>();

displayedColumns = ['fileId', 'type', 'applicant', 'government', 'status'];
displayedColumns = ['fileId', 'dateSubmitted', 'type', 'applicant', 'government', 'status'];
dataSource: PlanningReviewSearchResultDto[] = [];

itemsPerPage = 20;
total = 0;
sortDirection: SortDirection = 'desc';
sortField = 'fileId';
sortField = 'dateSubmitted';
isLoading = false;

constructor(private router: Router) {}
Expand Down
1 change: 1 addition & 0 deletions services/apps/alcs/src/alcs/search/search.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -581,6 +581,7 @@ export class SearchController {
documentName: planningReview.documentName,
referenceId: planningReview.fileNumber,
fileNumber: planningReview.fileNumber,
dateSubmitted: planningReview.dateSubmittedToAlc,
open: planningReview.open,
type: {
code: planningReview.planningReviewType_code,
Expand Down
1 change: 1 addition & 0 deletions services/apps/alcs/src/alcs/search/search.dto.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ export class PlanningReviewSearchResultDto {
documentName: string | null;
referenceId: string | null;
localGovernmentName: string | null;
dateSubmitted: number;
fileNumber: string;
class: SearchEntityClass;
open: boolean;
Expand Down

0 comments on commit 048d8e1

Please sign in to comment.