Skip to content

feat: added gtfs manual link #1049

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading