mariohamann / what-did-you-do

2 stars 0 forks source link

Don't change map view after action is added #40

Open mariohamann opened 1 year ago

christophsaile commented 1 year ago

preserveState from post router request has to be true.

christophsaile commented 1 year ago

click on "+ create" -> send action to db (preserve state), send Action created event -> listen to action created event, close formular, fetch new data from db -> watch geoData prop of Map component for updates -> update source

mariohamann commented 1 year ago

We could now just make a redirect in Laravel to the action after it is created. This would automatically set the zoom and everything and shows additional actions (as soon as they are implemented).

Unfortunately currently something is broken with creating the actions. 🥲

mariohamann commented 1 year ago

Ah, but that might not work as it males full reload. So getting the new event and making a router.get request tonthis might be better. Inthink that could already work pretty well in our setup.