feat: Plan the next seven days from mobile #1179

Merged
rockachopa merged 5 commits from timmy/1177-plan-the-next-seven-days-from-mobile into main 2026-08-20 13:01:22 +00:00
Showing only changes of commit a1b4698988 - Show all commits

View File

@ -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;}
}