Skip to content

Commit

Permalink
feat: add crud for rest of fares v2 tables
Browse files Browse the repository at this point in the history
  • Loading branch information
josh-willis-arcadis committed Jan 29, 2025
1 parent 7d9e556 commit e5e43a5
Show file tree
Hide file tree
Showing 2 changed files with 141 additions and 1 deletion.
134 changes: 134 additions & 0 deletions lib/editor/actions/editor.js
Original file line number Diff line number Diff line change
Expand Up @@ -501,6 +501,140 @@ export function fetchBaseGtfs ({
fare_product (limit: -1) {
id
fare_product_id
fare_product_name
fare_media_id
amount
currency
fare_media {
fare_media_id
fare_media_name
fare_media_type
id
}
}
fare_media {
fare_media_id
fare_media_name
fare_media_type
id
}
fare_leg_rule (limit: -1) {
id
leg_group_id
network_id
from_area_id
to_area_id
from_timeframe_group_id
to_timeframe_group_id
fare_product_id
rule_priority
routes {
route_id
route_long_name
}
networks {
network_id
network_name
}
fare_products {
fare_product_id
fare_product_name
fare_media_id
amount
currency
}
from_time_frame {
timeframe_group_id
start_time
end_time
service_id
}
to_time_frame {
timeframe_group_id
start_time
end_time
service_id
}
to_area {
area_id
area_name
}
from_area {
area_id
area_name
}
}
area (limit: -1) {
id
area_id
area_name
}
fare_transfer_rule (limit: -1) {
from_leg_group_id
to_leg_group_id
transfer_count
duration_limit
duration_limit_type
fare_product_id
fare_products {
fare_product_id
fare_product_name
fare_media_id
amount
currency
fare_media {
fare_media_id
fare_media_name
fare_media_type
id
}
}
from_fare_leg_rule {
leg_group_id
network_id
from_area_id
to_area_id
from_timeframe_group_id
to_timeframe_group_id
fare_product_id
rule_priority
id
}
to_fare_leg_rule {
leg_group_id
network_id
from_area_id
to_area_id
from_timeframe_group_id
to_timeframe_group_id
fare_product_id
rule_priority
id
}
}
network {
network_id
network_name
}
route_network {
network_id
route_id
}
stop_area {
area_id
stop_id
id
stops {
stop_id
stop_name
}
}
time_frame {
timeframe_group_id
start_time
end_time
service_id
id
}
routes (limit: -1) {
id
Expand Down
8 changes: 7 additions & 1 deletion lib/types/reducers.js
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,13 @@ export type EditorTables = {
id: number,
service_id: string
}>,
fare_products: Array<{}>,
fare_products: Array<{
amount: number,
currency: string,
fare_media_id?: number,
fare_product_name?: string,
id: number
}>,
fares: Array<{
fare_id: string,
id: number,
Expand Down

0 comments on commit e5e43a5

Please sign in to comment.