-
Notifications
You must be signed in to change notification settings - Fork 50
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(board): adds via destination column for departures (#1093)
* feat(graphql): adds via destination to queried data * feat(board): adds via column to table view and edit * fix(via): better coverage for diff arrays fetched from api * refactor(via): simplifies stringify via destinations * chore(via): removes redundant styles
- Loading branch information
Showing
6 changed files
with
27 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 15 additions & 0 deletions
15
next-tavla/src/Board/scenarios/Table/components/Via/index.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import { useNonNullContext } from 'hooks/useNonNullContext' | ||
import { DepartureContext } from 'Board/scenarios/Table/contexts' | ||
import { isNotNullOrUndefined } from 'utils/typeguards' | ||
|
||
function Via() { | ||
const departure = useNonNullContext(DepartureContext) | ||
|
||
const viaDestinations = departure.destinationDisplay?.via | ||
?.filter(isNotNullOrUndefined) | ||
.join(', ') | ||
|
||
return <td>{viaDestinations}</td> | ||
} | ||
|
||
export { Via } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters