Skip to content

Commit

Permalink
added gtfs manual link
Browse files Browse the repository at this point in the history
  • Loading branch information
alifares10 committed Feb 28, 2025
1 parent d2ce4fb commit c8b1f48
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/locale/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,7 @@
"at_time": "at",
"vehicle_ref": "vehicle plate",
"drive_direction": "drive direction",
"gtfs_manual": "GTFS manual",
"bearing": "bearing",
"coords": "coords",
"hide_document": "Hide geeks data",
Expand Down
1 change: 1 addition & 0 deletions src/locale/he.json
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,7 @@
"at_time": "בשעה",
"vehicle_ref": "לוחית רישוי",
"drive_direction": "כיוון נסיעה",
"gtfs_manual": "מדריך GTFS",
"directions":{
"North": "צפון",
"Northeast": "צפון-מזרח",
Expand Down
11 changes: 11 additions & 0 deletions src/pages/components/map-related/MapLayers/BusToolTip.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ import { getSiriRideWithRelated } from 'src/api/siriService'
import type { Point } from 'src/pages/timeBasedMap'

export type BusToolTipProps = { position: Point; icon: string; children?: ReactNode }
const manualUrl: string =
'https://www.gov.il/BlobFolder/generalpage/gtfs_general_transit_feed_specifications/he/GTFS_Developer_Information_2024.11.21b.pdf'

export function BusToolTip({ position, icon, children }: BusToolTipProps) {
const [siriRide, setSiriRide] = useState<SiriRideWithRelatedPydanticModel | undefined>()
Expand Down Expand Up @@ -139,6 +141,15 @@ export function BusToolTip({ position, icon, children }: BusToolTipProps) {

{showJson && (
<div onClick={(e) => e.stopPropagation()}>
<a
href={manualUrl}
target="_blank"
rel="noreferrer"
style={{ display: 'flex', padding: '5px', backgroundColor: 'white' }}
onMouseEnter={(e) => (e.currentTarget.style.backgroundColor = 'lightgray')}
onMouseLeave={(e) => (e.currentTarget.style.backgroundColor = 'white')}>
{t('gtfs_manual')}
</a>
<CustomTreeView<Point>
id={position.point?.id + ''}
data={position}
Expand Down

0 comments on commit c8b1f48

Please sign in to comment.