PSC-PublicHealth / HERMES

0 stars 0 forks source link

1.1 - Model Builder Breadcrumb/Buttons Issue #118

Open pthompk3 opened 5 years ago

pthompk3 commented 5 years ago

This used to be part of #116 but it's more than big enough to warrant its own.

While testing developing a fix for #116, I found another issue during model creation. If a user has progressed to Add/Remove Components, Vaccine Dose Schedule, or anything after, then when they click into any of the four Edit... breadcrumbs from earlier, the Back and Next buttons break. It doesn't update where it's supposed to link to, and instead continues progressing based upon the page the user breadcrumbed away from. If it moves forward, it can progress past Assign Transport Vehicles into a dead-end, or even finalize an incomplete model without the user's approval.

The Add/Remove Components and Vaccine Dose Schedule pages utilize widget:'stdBackNextButtons' and update window.location through breadcrumbPairs.getNext/BackURL(), while the other pages make their own Back/Next buttons and set window.location using "{{rootPath}}model-create/next" instead. My running theory is that the problems are coming from getNextURL(), getBackURL() and/or the setting of nextURL/backURL.