tibudiyanto / jakarta-vax-availability

jakarta-vax-availability.vercel.app
100 stars 46 forks source link

Correctly handle when Kuota data is missing #82

Open resir014 opened 3 years ago

resir014 commented 3 years ago

Description

Some facilities do no provide totalKuota and sisaKuota data on their schedules, which causes our recent build failures.

image

For reference, this applies to this popover. We should add a case so that we can show an "invalid" screen when the Kuota data from each schedule time is missing.

image

Expected Behaviour

The schedule popover should correctly handle the case when no Kuota data is available.

Additional Information

Tweet(s) from @k1m0ch1:

image

are you using the key jadwal.waktu.kuota.sisaKuota ? it still alive, but I see a new key in here the "kuota" key from jaki

https://twitter.com/BukanYahya/status/1415538234881318912


image

I assume some location does not have a "waktu" key or "kuota" key thats why the sisaKuota is error, I think you need to add the handler to check the existence of "waktu" and/or "kuota" key

https://twitter.com/BukanYahya/status/1415540609922723842