konradbartecki / Podatki.wtf.OpenSource

Podatki.wtf - Tax calculator for self-employed in Poland
https://podatki.wtf
31 stars 3 forks source link

ZUS rate "Tylko zdrowotny (6mc) / UoP" not loaded on refresh #14

Closed szulcmaciej closed 2 years ago

szulcmaciej commented 3 years ago

Hi, I found a minor issue with ZUS rate "Tylko zdrowotny (6mc) / UoP". After refreshing the page, the rate is changed to "Normalna (duży ZUS)".

When I change the rate from "Normalna (duży ZUS)" to "Tylko zdrowotny", the URL in the browser is changed properly, for example from

https://www.podatki.wtf/?n=100&t=1

to

https://www.podatki.wtf/?n=100&t=1&s=2

But when I refresh the page or just hit this second URL, the selected ZUS rate is "Normalna (duży ZUS)". Seems like ZUS rate isn't set properly with "&s=2" in the URL when loading the page. Other ZUS rates are "saved" correctly when refreshing :)

Anyway, great tool, thanks! :)

konradbartecki commented 2 years ago

Wow, good catch, thank you so much! I'll fix that in the next update which is happening soon™️

konradbartecki commented 2 years ago

Thanks, if you want to know the backstory, long time ago I didn't have the "start relief/tylko zdrowotny" implemented, so I disabled it from loading via an url.

image

Then one day I implemented this and forgot to re-enable the loading via an URL. It should work right now, thanks a lot again! I'm closing this ticket, but please let me know if anything.