Skip to content
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

new agencies should appear in the dashboard #789

Closed
NoamGaash opened this issue Jun 6, 2024 · 9 comments · Fixed by #797
Closed

new agencies should appear in the dashboard #789

NoamGaash opened this issue Jun 6, 2024 · 9 comments · Fixed by #797
Assignees
Labels
bug Something isn't working frontend frontend developers issue good first issue Good for newcomers

Comments

@NoamGaash
Copy link
Member

we should call https://open-bus-stride-api.hasadna.org.il/gtfs_agencies/list?date_from=2024-06-01 with dynamic date argument to make sure new agencies appear

@NoamGaash NoamGaash added bug Something isn't working good first issue Good for newcomers frontend frontend developers issue labels Jun 6, 2024
@EyalIlan
Copy link

EyalIlan commented Jun 6, 2024

hey can i take this issue? please :)

@NoamGaash
Copy link
Member Author

sure

@EyalIlan
Copy link

EyalIlan commented Jun 6, 2024

yay thanks :) I will start working on it

@NoamGaash
Copy link
Member Author

another task (for separate pr) - add "דרך אגד" to the list of important operators

@asidelnik
Copy link
Collaborator

asidelnik commented Jun 11, 2024

@NoamGaash
What does dynamic date mean?

Should date_from equal each date's current date?
Ex: today: 2024-06-11, tomorrow: 2024-06-12

Or should it equal each month's first date? (as in api url in this issue's description)
Ex: today: 2024-06-01, next month: 2024-07-01

The updated function in file agencyList.ts
Need to understand which variable to pass to the date_from: todayDate or firstDateInMonth?

export default async function getAgencyList(): Promise<Agency[]> {
  if (!agencyList) {
    const now = moment()
    const todayDate = now.clone().format('YYYY-MM-DD')
    const firstDateInMonth = now.clone().startOf('month').format('YYYY-MM-DD')
    const response = await fetch(`${BASE_PATH}/gtfs_agencies/list?date_from=${firstDateInMonth}`)

    const data = (await response.json()) as Awaited<Agency[]>
    agencyList = data.filter(Boolean) // filter empty entries
  }
  return agencyList
}

@NoamGaash
Copy link
Member Author

I think providing yesterday's date would be the safest approach, but it's up to you to decide.

@asidelnik
Copy link
Collaborator

asidelnik commented Jun 11, 2024

@NoamGaash Can you give me push & pull request permissions?
If you are wondering how I got here, it's through Dorit & yesterday's Hasadna meeting.
I was listening in the Zoom meeting.

@NoamGaash
Copy link
Member Author

@asidelnik Welcome! It's great to see you here 👏

@NoamGaash
Copy link
Member Author

image

is it related?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working frontend frontend developers issue good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants