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