Skip to content

Commit

Permalink
fix: don't include destination in rtt import calling points
Browse files Browse the repository at this point in the history
  • Loading branch information
davwheat committed Sep 22, 2024
1 parent 611177d commit ff9c484
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/data/RttUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,14 @@ export class RttUtils {

return this.getEligibleLocationsInternal(rttService)
.slice(fromLocationIndex + 1)
.filter(l => {
if (!l.isPublicCall || l.displayAs === 'CANCELLED_CALL') return false
.filter((l, i, arr) => {
if (!l.isPublicCall || l.displayAs === 'CANCELLED_CALL' || l.displayAs === 'DESTINATION' || l.displayAs === 'TERMINATES') return false
if (!l.crs) {
console.warn(`Location ${l.tiploc} has no CRS code`)
return false
}
// Ignore destination in calling points
if (i === arr.length - 1 && l.destination.some(d => d.tiploc === l.tiploc)) return false
return true
})
.map(l => ({
Expand Down

0 comments on commit ff9c484

Please sign in to comment.