fix: preserve synchronous Today reconciliation
This commit is contained in:
parent
d86e84253a
commit
6fb547e8ce
|
|
@ -476,15 +476,15 @@
|
|||
refreshMyWorkView();
|
||||
warmTodayOffline();
|
||||
},
|
||||
onRemotePlan: async plan => {
|
||||
onRemotePlan: plan => {
|
||||
if (!planningOwnerLogin) return;
|
||||
latestTodayPlan = plan;
|
||||
const startDayLaunch = window.location.hash === '#/my-work/start-day';
|
||||
await promoteTomorrowIfDue(plan);
|
||||
if (startDayLaunch) {
|
||||
promoteTomorrowIfDue(plan).finally(() => {
|
||||
if (!startDayLaunch) return;
|
||||
window.history.replaceState({}, '', '#/my-work/today');
|
||||
openMobileStartDay();
|
||||
}
|
||||
});
|
||||
todayWork.replacePlanning({
|
||||
capacity_minutes: plan.capacity_minutes ?? null,
|
||||
estimates: plan.estimates || {},
|
||||
|
|
|
|||
|
|
@ -144,5 +144,6 @@ def test_mobile_settings_and_launch_route_wire_start_day_into_existing_promotion
|
|||
assert "startDayControl:qs('#push-start-day')" in dashboard
|
||||
assert "startDayHour:qs('#push-start-day-hour')" in dashboard
|
||||
assert "window.location.hash === '#/my-work/start-day'" in dashboard
|
||||
assert "await promoteTomorrowIfDue(plan)" in dashboard
|
||||
assert "promoteTomorrowIfDue(plan).finally(() =>" in dashboard
|
||||
assert "onRemotePlan: async plan =>" not in dashboard
|
||||
assert "openMobileStartDay()" in dashboard
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user