diff --git a/frontend/week-plan.js b/frontend/week-plan.js index 9fcda16..9c0efaa 100644 --- a/frontend/week-plan.js +++ b/frontend/week-plan.js @@ -83,8 +83,9 @@ function createWeekPlanWorkflow({controller,qs,getLogin,openPlanner,escapeHtml,e } async function open(trigger) { if(!getLogin()){qs('#my-work-action-status').textContent='Planning is unavailable until your operator identity is restored.';return false;} - trigger.disabled=true;qs('#mobile-week-summary').textContent='Loading Week Ahead…'; - try{await controller.load();selectedDate=controller.dates()[0].date;qs('#mobile-week-summary').textContent=controller.summary();openPlanner(trigger);return true;} + trigger.disabled=true;selectedDate=controller.dates()[0].date;renderDates();openPlanner(trigger); + qs('#mobile-week-summary').textContent='Loading Week Ahead…'; + try{await controller.load();qs('#mobile-week-summary').textContent=controller.summary();openPlanner(null,false);return true;} catch(error){qs('#mobile-week-summary').textContent='Unavailable · tap to retry';qs('#my-work-action-status').textContent=(error.message||'Week Ahead is unavailable.')+' Retry when connected.';return false;} finally{trigger.disabled=false;} }