diff --git a/.github/workflows/zip.yml b/.github/workflows/zip.yml index f8c52e4c..fd07fdaf 100644 --- a/.github/workflows/zip.yml +++ b/.github/workflows/zip.yml @@ -6,6 +6,8 @@ on: jobs: build: runs-on: ubuntu-latest + env: + FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: 'true' steps: - name: Check out repository uses: actions/checkout@v4 diff --git a/src/app/custom1-module/customComponentMappings.ts b/src/app/custom1-module/customComponentMappings.ts index f4a78171..3d6928ea 100644 --- a/src/app/custom1-module/customComponentMappings.ts +++ b/src/app/custom1-module/customComponentMappings.ts @@ -7,7 +7,7 @@ import { TrafficResultLimitComponent } from '../traffic-result-limit/traffic-res // Define the map export const selectorComponentMap = new Map([ ['nde-footer-after', Libraryh3lpComponent], - ['nde-account-section-results-before', PayFinesComponent], + ['nde-fines-before', PayFinesComponent], ['nde-full-display-service-container-after', NdeProblemReportCustom], ['nde-top-bar-after', LibraryAlertsPannelComponent], ['nde-search-no-results-before', TrafficResultLimitComponent] diff --git a/src/app/traffic-result-limit/traffic-result-limit.component.ts b/src/app/traffic-result-limit/traffic-result-limit.component.ts index 631fc1ae..40eda277 100644 --- a/src/app/traffic-result-limit/traffic-result-limit.component.ts +++ b/src/app/traffic-result-limit/traffic-result-limit.component.ts @@ -1,44 +1,45 @@ - import { Component, OnInit } from '@angular/core'; - import { Location, NgIf } from '@angular/common'; - - @Component({ - selector: 'custom-traffic-result-limit', - standalone: true, - imports: [NgIf], - templateUrl: './traffic-result-limit.component.html', - styleUrl: './traffic-result-limit.component.scss', - }) - export class TrafficResultLimitComponent implements OnInit { - showComponent: boolean = false; - offsetValue: number | null = null; - - constructor(private location: Location) {} - - ngOnInit(): void { - this.checkOffset(); - } - - checkOffset(): void { - const url = this.location.path(); - const queryString = url.includes('?') ? url.split('?')[1] : ''; - - if (!queryString) { - this.showComponent = false; - return; - } - - const urlParams = new URLSearchParams(queryString); - const offsetParam = urlParams.get('offset'); - - if (offsetParam) { - const offsetValue = parseInt(offsetParam, 10); - if (!isNaN(offsetValue) && offsetValue > 500) { - this.showComponent = true; - } else { - this.showComponent = false; - } - } else { - this.showComponent = false; - } - } - } \ No newline at end of file +import { Component, OnInit } from '@angular/core'; +import { Location, NgIf } from '@angular/common'; + +@Component({ + selector: 'custom-traffic-result-limit', + standalone: true, + imports: [NgIf], + templateUrl: './traffic-result-limit.component.html', + styleUrl: './traffic-result-limit.component.scss', +}) +export class TrafficResultLimitComponent implements OnInit { + showComponent: boolean = false; + offsetValue: number | null = null; + + constructor(private location: Location) {} + + ngOnInit(): void { + this.checkOffset(); + } + + checkOffset(): void { + const url = this.location.path(); + const queryString = url.includes('?') ? url.split('?')[1] : ''; + + if (!queryString) { + this.showComponent = false; + return; + } + + const urlParams = new URLSearchParams(queryString); + const offsetParam = urlParams.get('offset'); + + if (offsetParam) { + const offsetValue = parseInt(offsetParam, 10); + // if the user uses the navigation button, this will display with the offset is `550`. If `500` is mannually added to the `offset` parameter within the browser url box, this will not dispaly if the the below function is set to `offsetValue > 500`. Think about making this change within production before going live. + if (!isNaN(offsetValue) && offsetValue >= 0) { + this.showComponent = true; + } else { + this.showComponent = false; + } + } else { + this.showComponent = false; + } + } +}